chrome-devtools-frontend 1.0.1556696 → 1.0.1559913

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 (201) hide show
  1. package/front_end/Images/src/container.svg +4 -0
  2. package/front_end/core/common/Gzip.ts +15 -0
  3. package/front_end/core/common/Object.ts +5 -1
  4. package/front_end/core/host/ResourceLoader.ts +1 -1
  5. package/front_end/core/host/UserMetrics.ts +3 -1
  6. package/front_end/core/sdk/CSSMetadata.ts +6 -6
  7. package/front_end/core/sdk/CSSModel.ts +2 -2
  8. package/front_end/core/sdk/DOMModel.ts +14 -3
  9. package/front_end/core/sdk/NetworkManager.ts +0 -7
  10. package/front_end/core/sdk/SourceMap.ts +16 -2
  11. package/front_end/core/sdk/SourceMapManager.ts +1 -1
  12. package/front_end/core/sdk/SourceMapScopesInfo.ts +11 -4
  13. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +1 -0
  14. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +51 -8
  15. package/front_end/entrypoints/main/GlobalAiButton.ts +5 -1
  16. package/front_end/generated/Deprecation.ts +0 -7
  17. package/front_end/generated/InspectorBackendCommands.ts +5 -4
  18. package/front_end/generated/SupportedCSSProperties.js +64 -32
  19. package/front_end/generated/protocol-mapping.d.ts +9 -0
  20. package/front_end/generated/protocol-proxy-api.d.ts +7 -0
  21. package/front_end/generated/protocol.ts +23 -1
  22. package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
  23. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +11 -7
  24. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +3 -3
  25. package/front_end/models/bindings/CompilerScriptMapping.ts +7 -6
  26. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +4 -4
  27. package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
  28. package/front_end/models/stack_trace/StackTraceImpl.ts +5 -3
  29. package/front_end/models/stack_trace/StackTraceModel.ts +53 -40
  30. package/front_end/models/trace/EventsSerializer.ts +8 -2
  31. package/front_end/models/trace/LanternComputationData.ts +4 -3
  32. package/front_end/models/trace/Processor.ts +6 -5
  33. package/front_end/models/trace/Styles.ts +10 -1
  34. package/front_end/models/trace/handlers/LargestImagePaintHandler.ts +2 -2
  35. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +2 -2
  36. package/front_end/models/trace/handlers/MetaHandler.ts +14 -0
  37. package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +54 -34
  38. package/front_end/models/trace/helpers/Timing.ts +8 -1
  39. package/front_end/models/trace/insights/Common.ts +1 -1
  40. package/front_end/models/trace/insights/LCPBreakdown.ts +4 -4
  41. package/front_end/models/trace/insights/LCPDiscovery.ts +3 -3
  42. package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
  43. package/front_end/models/trace/insights/types.ts +1 -1
  44. package/front_end/models/trace/types/TraceEvents.ts +62 -10
  45. package/front_end/panels/application/AppManifestView.ts +134 -223
  46. package/front_end/panels/application/CookieItemsView.ts +1 -0
  47. package/front_end/panels/application/SharedStorageTreeElement.ts +3 -0
  48. package/front_end/panels/application/appManifestView.css +1 -1
  49. package/front_end/panels/common/AiCodeGenerationTeaser.ts +48 -12
  50. package/front_end/panels/common/aiCodeGenerationTeaser.css +14 -0
  51. package/front_end/panels/common/common.ts +1 -1
  52. package/front_end/panels/console/ConsoleViewMessage.ts +4 -3
  53. package/front_end/panels/console/consoleView.css +1 -1
  54. package/front_end/panels/elements/CSSRuleValidator.ts +38 -0
  55. package/front_end/panels/elements/ElementsTreeElement.ts +108 -58
  56. package/front_end/panels/elements/ElementsTreeOutline.ts +0 -17
  57. package/front_end/panels/elements/ElementsTreeOutlineRenderer.ts +7 -1
  58. package/front_end/panels/elements/StylesSidebarPane.ts +15 -4
  59. package/front_end/panels/elements/components/AdornerManager.ts +8 -0
  60. package/front_end/panels/emulation/DeviceModeToolbar.ts +3 -1
  61. package/front_end/panels/issues/AffectedResourcesView.ts +0 -1
  62. package/front_end/panels/lighthouse/LighthousePanel.ts +10 -0
  63. package/front_end/panels/lighthouse/lighthousePanel.css +46 -3
  64. package/front_end/panels/network/NetworkLogViewColumns.ts +9 -9
  65. package/front_end/panels/network/RequestCookiesView.ts +125 -141
  66. package/front_end/panels/network/components/RequestHeadersView.ts +2 -2
  67. package/front_end/panels/network/requestCookiesView.css +22 -20
  68. package/front_end/panels/recorder/components/RecordingView.ts +3 -3
  69. package/front_end/panels/recorder/components/StepView.ts +2 -1
  70. package/front_end/panels/settings/keybindsSettingsTab.css +4 -0
  71. package/front_end/panels/sources/CallStackSidebarPane.ts +7 -3
  72. package/front_end/panels/sources/DebuggerPausedMessage.ts +125 -90
  73. package/front_end/panels/sources/SourcesPanel.ts +10 -7
  74. package/front_end/panels/sources/debuggerPausedMessage.css +8 -0
  75. package/front_end/panels/timeline/StatusDialog.ts +4 -3
  76. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +3 -16
  77. package/front_end/panels/timeline/TimelineFlameChartView.ts +64 -21
  78. package/front_end/panels/timeline/TimelinePanel.ts +71 -24
  79. package/front_end/panels/timeline/TimelineUIUtils.ts +28 -2
  80. package/front_end/panels/timeline/TimingsTrackAppender.ts +3 -1
  81. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
  82. package/front_end/panels/timeline/components/insights/RenderBlocking.ts +6 -4
  83. package/front_end/panels/timeline/components/sidebarInsightsTab.css +2 -0
  84. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +4 -0
  85. package/front_end/panels/timeline/timelinePanel.css +8 -1
  86. package/front_end/panels/timeline/utils/EntryNodes.ts +2 -1
  87. package/front_end/third_party/acorn/estree-legacy.d.ts +2 -0
  88. package/front_end/third_party/chromium/README.chromium +1 -1
  89. package/front_end/third_party/puppeteer/README.chromium +2 -2
  90. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +12 -0
  91. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
  92. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +14 -2
  94. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  96. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +3 -1
  97. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
  98. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +6 -0
  99. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +0 -1
  101. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +0 -20
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +3 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +10 -14
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +1 -0
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +14 -0
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +3 -1
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +12 -0
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts +1 -0
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/EmulationManager.js +22 -0
  119. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/EmulationManager.js.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +3 -1
  121. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +9 -2
  123. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  126. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  127. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  129. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  131. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +26 -0
  132. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +72 -15
  133. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +12 -0
  134. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
  136. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +14 -2
  137. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +3 -1
  140. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +6 -0
  142. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +0 -1
  144. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +0 -20
  146. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +3 -1
  148. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +11 -15
  150. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +1 -0
  152. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +14 -0
  154. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +3 -1
  156. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +12 -0
  158. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/EmulationManager.d.ts +1 -0
  160. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/EmulationManager.js +22 -0
  162. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/EmulationManager.js.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +3 -1
  164. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +9 -2
  166. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  168. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  169. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/types.d.ts +26 -0
  173. package/front_end/third_party/puppeteer/package/package.json +1 -1
  174. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +18 -0
  175. package/front_end/third_party/puppeteer/package/src/api/Page.ts +16 -2
  176. package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +13 -0
  177. package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +0 -33
  178. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +14 -28
  179. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +19 -0
  180. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +19 -0
  181. package/front_end/third_party/puppeteer/package/src/cdp/EmulationManager.ts +30 -0
  182. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +15 -6
  183. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  184. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  185. package/front_end/ui/components/icon_button/iconButton.css +3 -1
  186. package/front_end/ui/components/report_view/ReportView.ts +11 -2
  187. package/front_end/ui/components/report_view/report.css +16 -0
  188. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +202 -32
  189. package/front_end/ui/components/text_editor/config.ts +6 -6
  190. package/front_end/ui/legacy/ContextMenu.ts +11 -2
  191. package/front_end/ui/legacy/SearchableView.ts +11 -5
  192. package/front_end/ui/legacy/SplitWidget.ts +1 -1
  193. package/front_end/ui/legacy/TextPrompt.ts +1 -1
  194. package/front_end/ui/legacy/Toolbar.ts +4 -0
  195. package/front_end/ui/legacy/UIUtils.ts +0 -2
  196. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +18 -3
  197. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -3
  198. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +6 -0
  199. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +43 -9
  200. package/front_end/ui/visual_logging/KnownContextValues.ts +13 -0
  201. package/package.json +1 -1
@@ -33,6 +33,7 @@ export enum RegisteredAdorners {
33
33
  SCROLL = 'scroll',
34
34
  SCROLL_SNAP = 'scroll-snap',
35
35
  SLOT = 'slot',
36
+ VIEW_SOURCE = 'view-source',
36
37
  STARTING_STYLE = 'starting-style',
37
38
  SUBGRID = 'subgrid',
38
39
  TOP_LAYER = 'top-layer',
@@ -129,6 +130,13 @@ export function getRegisteredAdorner(which: RegisteredAdorners): RegisteredAdorn
129
130
  enabledByDefault: true,
130
131
  };
131
132
  }
133
+ case RegisteredAdorners.VIEW_SOURCE: {
134
+ return {
135
+ name: 'view-source',
136
+ category: AdornerCategories.DEFAULT,
137
+ enabledByDefault: true,
138
+ };
139
+ }
132
140
  }
133
141
  }
134
142
 
@@ -351,7 +351,9 @@ export class DeviceModeToolbar {
351
351
  MobileThrottling.ThrottlingManager.throttlingManager().createMobileThrottlingButton();
352
352
  this.throttlingConditionsItem.turnShrinkable();
353
353
  toolbar.appendToolbarItem(this.throttlingConditionsItem);
354
- toolbar.appendToolbarItem(MobileThrottling.ThrottlingManager.throttlingManager().createSaveDataOverrideSelector());
354
+ const saveDataItem = MobileThrottling.ThrottlingManager.throttlingManager().createSaveDataOverrideSelector();
355
+ saveDataItem.turnShrinkable();
356
+ toolbar.appendToolbarItem(saveDataItem);
355
357
  }
356
358
 
357
359
  private appendDevicePositionItems(toolbar: UI.Toolbar.Toolbar): void {
@@ -254,7 +254,6 @@ export abstract class AffectedResourcesView extends UI.TreeOutline.TreeElement {
254
254
  sourceCodeLocation.classList.add('affected-source-location');
255
255
  if (sourceLocation) {
256
256
  const maxLengthForDisplayedURLs = 40; // Same as console messages.
257
- // TODO(crbug.com/1108503): Add some mechanism to be able to add telemetry to this element.
258
257
  const linkifier = new Components.Linkifier.Linkifier(maxLengthForDisplayedURLs);
259
258
  const sourceAnchor = linkifier.linkifyScriptLocation(
260
259
  target || null, sourceLocation.scriptId || null, sourceLocation.url as Platform.DevToolsPath.UrlString,
@@ -104,6 +104,7 @@ export class LighthousePanel extends UI.Panel.Panel {
104
104
 
105
105
  this.renderToolbar();
106
106
  this.auditResultsElement = this.contentElement.createChild('div', 'lighthouse-results-container');
107
+ this.auditResultsElement.addEventListener('keydown', this.onKeyDown.bind(this));
107
108
  this.renderStartView();
108
109
 
109
110
  this.controller.recomputePageAuditability();
@@ -365,4 +366,13 @@ export class LighthousePanel extends UI.Panel.Panel {
365
366
  }
366
367
  return els;
367
368
  }
369
+
370
+ private onKeyDown(event: KeyboardEvent): void {
371
+ // The LHR's tool button is a toggle. When the user hits escape, the default behavior
372
+ // is to close the tool drawer. We want to prevent this behavior and instead let the
373
+ // LHR's tool button handle the event and close the tool's dropdown.
374
+ if (event.key === 'Escape' && this.auditResultsElement.querySelector('.lh-tools__button.lh-active')) {
375
+ event.handled = true;
376
+ }
377
+ }
368
378
  }
@@ -19,9 +19,6 @@ button.view-trace {
19
19
  margin: 10px;
20
20
  }
21
21
 
22
- .lighthouse-results-container {
23
- position: relative;
24
- }
25
22
  /** `window.opener` is null for windows opened from DevTools. This breaks
26
23
  the LH viewer app, so disable this feature. */
27
24
 
@@ -63,3 +60,49 @@ select.lighthouse-report {
63
60
  .lh-devtools .lh-element-screenshot__overlay {
64
61
  position: absolute;
65
62
  }
63
+
64
+ .lighthouse-results-container {
65
+ position: relative;
66
+
67
+ :focus-visible {
68
+ outline: -webkit-focus-ring-color auto 1px;
69
+ }
70
+
71
+ .lh-tools__button {
72
+ height: var(--sys-size-9);
73
+ width: var(--sys-size-9);
74
+ min-width: var(--sys-size-9);
75
+
76
+ &:focus-visible {
77
+ border-radius: var(--sys-shape-corner-full);
78
+ outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
79
+ }
80
+
81
+ &.lh-active + .lh-tools__dropdown {
82
+ clip: rect(-8px, 204px, 270px, -10px); /* stylelint-disable-line property-no-deprecated */
83
+ }
84
+ }
85
+
86
+ .lh-tools__dropdown {
87
+ padding: var(--sys-size-5) 0;
88
+ border-radius: var(--sys-shape-corner-small);
89
+ box-shadow: var(--sys-elevation-level3);
90
+ top: 24px;
91
+
92
+ &:hover a:focus {
93
+ background-color: transparent;
94
+ }
95
+
96
+ a {
97
+ height: var(--sys-size-11);
98
+ padding: 0 var(--sys-size-8);
99
+ white-space: nowrap;
100
+ align-items: center;
101
+
102
+ &::before {
103
+ content: none;
104
+ }
105
+ }
106
+ }
107
+
108
+ }
@@ -31,11 +31,11 @@ const UIStrings = {
31
31
  /**
32
32
  * @description A context menu item in the Network Log View Columns of the Network panel
33
33
  */
34
- responseHeaders: 'Response Headers',
34
+ responseHeaders: 'Response headers',
35
35
  /**
36
36
  * @description A context menu item in the Network Log View Columns of the Network panel
37
37
  */
38
- requestHeaders: 'Request Headers',
38
+ requestHeaders: 'Request headers',
39
39
  /**
40
40
  * @description Text in Network Log View Columns of the Network panel
41
41
  */
@@ -43,19 +43,19 @@ const UIStrings = {
43
43
  /**
44
44
  * @description Text for the start time of an activity
45
45
  */
46
- startTime: 'Start Time',
46
+ startTime: 'Start time',
47
47
  /**
48
48
  * @description Text in Network Log View Columns of the Network panel
49
49
  */
50
- responseTime: 'Response Time',
50
+ responseTime: 'Response time',
51
51
  /**
52
52
  * @description Text in Network Log View Columns of the Network panel
53
53
  */
54
- endTime: 'End Time',
54
+ endTime: 'End time',
55
55
  /**
56
56
  * @description Text in Network Log View Columns of the Network panel
57
57
  */
58
- totalDuration: 'Total Duration',
58
+ totalDuration: 'Total duration',
59
59
  /**
60
60
  * @description Text for the latency of a task
61
61
  */
@@ -99,7 +99,7 @@ const UIStrings = {
99
99
  /**
100
100
  * @description Text in Network Log View Columns of the Network panel
101
101
  */
102
- remoteAddress: 'Remote Address',
102
+ remoteAddress: 'Remote address',
103
103
  /**
104
104
  * @description Text that refers to some types
105
105
  */
@@ -115,7 +115,7 @@ const UIStrings = {
115
115
  /**
116
116
  * @description Column header in the Network log view of the Network panel
117
117
  */
118
- initiatorAddressSpace: 'Initiator Address Space',
118
+ initiatorAddressSpace: 'Initiator address space',
119
119
  /**
120
120
  * @description Text for web cookies
121
121
  */
@@ -147,7 +147,7 @@ const UIStrings = {
147
147
  /**
148
148
  * @description Text in Network Log View Columns of the Network panel
149
149
  */
150
- remoteAddressSpace: 'Remote Address Space',
150
+ remoteAddressSpace: 'Remote address space',
151
151
  /**
152
152
  * @description Text to show whether a request is ad-related
153
153
  */
@@ -1,20 +1,19 @@
1
1
  // Copyright 2011 The Chromium Authors
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
- /* eslint-disable @devtools/no-imperative-dom-api */
5
4
 
6
5
  import * as Common from '../../core/common/common.js';
7
6
  import * as i18n from '../../core/i18n/i18n.js';
8
7
  import * as SDK from '../../core/sdk/sdk.js';
9
8
  import * as Protocol from '../../generated/protocol.js';
10
9
  import * as uiI18n from '../../ui/i18n/i18n.js';
11
- import {Icon} from '../../ui/kit/kit.js';
12
10
  import * as CookieTable from '../../ui/legacy/components/cookie_table/cookie_table.js';
13
- import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
14
11
  import * as UI from '../../ui/legacy/legacy.js';
12
+ import * as Lit from '../../ui/lit/lit.js';
15
13
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
16
14
 
17
15
  import requestCookiesViewStyles from './requestCookiesView.css.js';
16
+ const {render, html} = Lit;
18
17
 
19
18
  const UIStrings = {
20
19
  /**
@@ -74,74 +73,108 @@ const UIStrings = {
74
73
  const str_ = i18n.i18n.registerUIStrings('panels/network/RequestCookiesView.ts', UIStrings);
75
74
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
76
75
 
76
+ interface ViewInput {
77
+ requestCookies: CookieTable.CookiesTable.CookiesTableData;
78
+ responseCookies: CookieTable.CookiesTable.CookiesTableData;
79
+ malformedResponseCookies: SDK.NetworkRequest.BlockedSetCookieWithReason[];
80
+ showFilteredOutCookies: boolean;
81
+ hasBlockedCookies: boolean;
82
+ gotCookies: boolean;
83
+ onShowFilteredOutCookiesChange: (checked: boolean) => void;
84
+ siteHasCookieInOtherPartition: boolean;
85
+ }
86
+
87
+ type ViewFunction = (input: ViewInput, output: undefined, target: HTMLElement) => void;
88
+
89
+ export const DEFAULT_VIEW: ViewFunction = (input, _output, target) => {
90
+ // clang-format off
91
+ render(
92
+ html`
93
+ <style>${requestCookiesViewStyles}</style>
94
+ <style>${UI.inspectorCommonStyles}</style>
95
+ <div class="request-cookies-view">
96
+ ${input.gotCookies ? Lit.nothing : html`
97
+ <devtools-widget .widgetConfig=${UI.Widget.widgetConfig(UI.EmptyWidget.EmptyWidget, {
98
+ header: i18nString(UIStrings.thisRequestHasNoCookies)})}></devtools-widget>
99
+ `}
100
+
101
+ <div class=${input.requestCookies.cookies.length || input.hasBlockedCookies ? '' : 'hidden'}>
102
+ <span class="request-cookies-title" title=${i18nString(UIStrings.cookiesThatWereSentToTheServerIn)}>
103
+ ${i18nString(UIStrings.requestCookies)}
104
+ </span>
105
+ <devtools-checkbox
106
+ @change=${(e: Event) => input.onShowFilteredOutCookiesChange((e.target as HTMLInputElement).checked)}
107
+ .checked=${input.showFilteredOutCookies}>
108
+ ${i18nString(UIStrings.showFilteredOutRequestCookies)}
109
+ </devtools-checkbox>
110
+ </div>
111
+
112
+ <div class="cookies-panel-item ${!input.requestCookies.cookies.length && input.hasBlockedCookies ? '' : 'hidden'}">
113
+ ${i18nString(UIStrings.noRequestCookiesWereSent)}
114
+ </div>
115
+
116
+ ${input.requestCookies.cookies.length > 0 ? html`
117
+ <devtools-widget .widgetConfig=${UI.Widget.widgetConfig(CookieTable.CookiesTable.CookiesTable, {
118
+ cookiesData: input.requestCookies,
119
+ inline: true
120
+ })} class="cookie-table cookies-panel-item"></devtools-widget>
121
+ ` : Lit.nothing}
122
+
123
+ <div class="cookies-panel-item site-has-cookies-in-other-partition ${input.siteHasCookieInOtherPartition ? '' : 'hidden'}">
124
+ ${uiI18n.getFormatLocalizedString(str_, UIStrings.siteHasCookieInOtherPartition, {
125
+ PH1: UI.XLink.XLink.create(
126
+ 'https://developer.chrome.com/en/docs/privacy-sandbox/chips/', i18nString(UIStrings.learnMore), undefined,
127
+ undefined, 'learn-more'),})}
128
+ </div>
129
+
130
+ <div class="request-cookies-title ${input.responseCookies.cookies.length ? '' : 'hidden'}"
131
+ title=${i18nString(UIStrings.cookiesThatWereReceivedFromThe)}>
132
+ ${i18nString(UIStrings.responseCookies)}
133
+ </div>
134
+
135
+ ${input.responseCookies.cookies.length ? html`
136
+ <devtools-widget .widgetConfig=${UI.Widget.widgetConfig(CookieTable.CookiesTable.CookiesTable, {
137
+ cookiesData: input.responseCookies,
138
+ inline: true })} class="cookie-table cookies-panel-item"></devtools-widget>
139
+ ` : Lit.nothing}
140
+
141
+ <div class="request-cookies-title ${input.malformedResponseCookies.length ? '' : 'hidden'}" title=${i18nString(UIStrings.cookiesThatWereReceivedFromTheServer)}>
142
+ ${i18nString(UIStrings.malformedResponseCookies)}
143
+ </div>
144
+
145
+ <div class=${input.malformedResponseCookies.length ? '' : 'hidden'}>
146
+ ${input.malformedResponseCookies.map(malformedCookie => html`
147
+ <span class="cookie-line source-code" title=${getMalformedCookieTooltip(malformedCookie)}>
148
+ <devtools-icon class="cookie-warning-icon small" .name=${'cross-circle-filled'}></devtools-icon>
149
+ ${malformedCookie.cookieLine}
150
+ </span>
151
+ `)}
152
+ </div>
153
+ </div>
154
+ `,
155
+ target);
156
+ // clang-format on
157
+ };
158
+
159
+ function getMalformedCookieTooltip(malformedCookie: SDK.NetworkRequest.BlockedSetCookieWithReason): string {
160
+ if (malformedCookie.blockedReasons.includes(Protocol.Network.SetCookieBlockedReason.NameValuePairExceedsMaxSize)) {
161
+ return SDK.NetworkRequest.setCookieBlockedReasonToUiString(
162
+ Protocol.Network.SetCookieBlockedReason.NameValuePairExceedsMaxSize);
163
+ }
164
+ return SDK.NetworkRequest.setCookieBlockedReasonToUiString(Protocol.Network.SetCookieBlockedReason.SyntaxError);
165
+ }
166
+
77
167
  export class RequestCookiesView extends UI.Widget.Widget {
78
168
  private request: SDK.NetworkRequest.NetworkRequest;
79
169
  private readonly showFilteredOutCookiesSetting: Common.Settings.Setting<boolean>;
80
- private readonly emptyWidget: UI.EmptyWidget.EmptyWidget;
81
- private readonly requestCookiesTitle: HTMLElement;
82
- private readonly requestCookiesEmpty: HTMLElement;
83
- private readonly requestCookiesTable: CookieTable.CookiesTable.CookiesTable;
84
- private readonly responseCookiesTitle: HTMLElement;
85
- private readonly responseCookiesTable: CookieTable.CookiesTable.CookiesTable;
86
- private readonly siteHasCookieInOtherPartition: HTMLElement;
87
- private readonly malformedResponseCookiesTitle: HTMLElement;
88
- private readonly malformedResponseCookiesList: HTMLElement;
170
+ private readonly view: ViewFunction;
89
171
 
90
- constructor(request: SDK.NetworkRequest.NetworkRequest) {
172
+ constructor(request: SDK.NetworkRequest.NetworkRequest, view: ViewFunction = DEFAULT_VIEW) {
91
173
  super({jslog: `${VisualLogging.pane('cookies').track({resize: true})}`});
92
- this.registerRequiredCSS(requestCookiesViewStyles);
93
-
94
- this.element.classList.add('request-cookies-view');
95
-
96
174
  this.request = request;
97
175
  this.showFilteredOutCookiesSetting = Common.Settings.Settings.instance().createSetting(
98
176
  'show-filtered-out-request-cookies', /* defaultValue */ false);
99
-
100
- this.emptyWidget = new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.thisRequestHasNoCookies), '');
101
- this.emptyWidget.show(this.element);
102
-
103
- this.requestCookiesTitle = this.element.createChild('div');
104
- const titleText = this.requestCookiesTitle.createChild('span', 'request-cookies-title');
105
- titleText.textContent = i18nString(UIStrings.requestCookies);
106
- UI.Tooltip.Tooltip.install(titleText, i18nString(UIStrings.cookiesThatWereSentToTheServerIn));
107
-
108
- const requestCookiesCheckbox = SettingsUI.SettingsUI.createSettingCheckbox(
109
- i18nString(UIStrings.showFilteredOutRequestCookies), this.showFilteredOutCookiesSetting);
110
- requestCookiesCheckbox.addEventListener('change', () => {
111
- this.refreshRequestCookiesView();
112
- });
113
- this.requestCookiesTitle.appendChild(requestCookiesCheckbox);
114
-
115
- this.requestCookiesEmpty = this.element.createChild('div', 'cookies-panel-item');
116
- this.requestCookiesEmpty.textContent = i18nString(UIStrings.noRequestCookiesWereSent);
117
-
118
- this.requestCookiesTable = new CookieTable.CookiesTable.CookiesTable(/* renderInline */ true);
119
- this.requestCookiesTable.contentElement.classList.add('cookie-table', 'cookies-panel-item');
120
- this.requestCookiesTable.show(this.element);
121
-
122
- this.siteHasCookieInOtherPartition =
123
- this.element.createChild('div', 'cookies-panel-item site-has-cookies-in-other-partition');
124
- this.siteHasCookieInOtherPartition.appendChild(
125
- uiI18n.getFormatLocalizedString(str_, UIStrings.siteHasCookieInOtherPartition, {
126
- PH1: UI.XLink.XLink.create(
127
- 'https://developer.chrome.com/en/docs/privacy-sandbox/chips/', i18nString(UIStrings.learnMore), undefined,
128
- undefined, 'learn-more'),
129
- }));
130
-
131
- this.responseCookiesTitle = this.element.createChild('div', 'request-cookies-title');
132
- this.responseCookiesTitle.textContent = i18nString(UIStrings.responseCookies);
133
- this.responseCookiesTitle.title = i18nString(UIStrings.cookiesThatWereReceivedFromThe);
134
-
135
- this.responseCookiesTable = new CookieTable.CookiesTable.CookiesTable(/* renderInline */ true);
136
- this.responseCookiesTable.contentElement.classList.add('cookie-table', 'cookies-panel-item');
137
- this.responseCookiesTable.show(this.element);
138
-
139
- this.malformedResponseCookiesTitle = this.element.createChild('div', 'request-cookies-title');
140
- this.malformedResponseCookiesTitle.textContent = i18nString(UIStrings.malformedResponseCookies);
141
- UI.Tooltip.Tooltip.install(
142
- this.malformedResponseCookiesTitle, i18nString(UIStrings.cookiesThatWereReceivedFromTheServer));
143
-
144
- this.malformedResponseCookiesList = this.element.createChild('div');
177
+ this.view = view;
145
178
  }
146
179
 
147
180
  private getRequestCookies(): {
@@ -230,99 +263,50 @@ export class RequestCookiesView extends UI.Widget.Widget {
230
263
  return {responseCookies, responseCookieToBlockedReasons, responseCookieToExemptionReason, malformedResponseCookies};
231
264
  }
232
265
 
233
- private refreshRequestCookiesView(): void {
266
+ override performUpdate(): void {
234
267
  if (!this.isShowing()) {
235
268
  return;
236
269
  }
237
-
238
- const gotCookies = this.request.hasRequestCookies() || this.request.responseCookies.length;
239
- if (gotCookies) {
240
- this.emptyWidget.hideWidget();
241
- } else {
242
- this.emptyWidget.showWidget();
243
- }
244
-
245
270
  const {requestCookies, requestCookieToBlockedReasons, requestCookieToExemptionReason} = this.getRequestCookies();
246
271
  const {responseCookies, responseCookieToBlockedReasons, responseCookieToExemptionReason, malformedResponseCookies} =
247
272
  this.getResponseCookies();
248
273
 
249
- if (requestCookies.length) {
250
- this.requestCookiesTitle.classList.remove('hidden');
251
- this.requestCookiesEmpty.classList.add('hidden');
252
- this.requestCookiesTable.showWidget();
253
- this.requestCookiesTable.setCookies(
254
- requestCookies, requestCookieToBlockedReasons, requestCookieToExemptionReason);
255
-
256
- } else if (this.request.blockedRequestCookies().length) {
257
- this.requestCookiesTitle.classList.remove('hidden');
258
- this.requestCookiesEmpty.classList.remove('hidden');
259
- this.requestCookiesTable.hideWidget();
260
-
261
- } else {
262
- this.requestCookiesTitle.classList.add('hidden');
263
- this.requestCookiesEmpty.classList.add('hidden');
264
- this.requestCookiesTable.hideWidget();
265
- }
266
-
267
- if (responseCookies.length) {
268
- this.responseCookiesTitle.classList.remove('hidden');
269
- this.responseCookiesTable.showWidget();
270
- this.responseCookiesTable.setCookies(
271
- responseCookies, responseCookieToBlockedReasons, responseCookieToExemptionReason);
272
- } else {
273
- this.responseCookiesTitle.classList.add('hidden');
274
- this.responseCookiesTable.hideWidget();
275
- }
276
-
277
- if (malformedResponseCookies.length) {
278
- this.malformedResponseCookiesTitle.classList.remove('hidden');
279
- this.malformedResponseCookiesList.classList.remove('hidden');
280
-
281
- this.malformedResponseCookiesList.removeChildren();
282
- for (const malformedCookie of malformedResponseCookies) {
283
- const listItem = this.malformedResponseCookiesList.createChild('span', 'cookie-line source-code');
284
- const icon = new Icon();
285
- icon.name = 'cross-circle-filled';
286
- icon.classList.add('cookie-warning-icon', 'small');
287
- listItem.appendChild(icon);
288
- UI.UIUtils.createTextChild(listItem, malformedCookie.cookieLine);
289
-
290
- if (malformedCookie.blockedReasons.includes(
291
- Protocol.Network.SetCookieBlockedReason.NameValuePairExceedsMaxSize)) {
292
- listItem.title = SDK.NetworkRequest.setCookieBlockedReasonToUiString(
293
- Protocol.Network.SetCookieBlockedReason.NameValuePairExceedsMaxSize);
294
- } else {
295
- listItem.title =
296
- SDK.NetworkRequest.setCookieBlockedReasonToUiString(Protocol.Network.SetCookieBlockedReason.SyntaxError);
297
- }
298
- }
299
- } else {
300
- this.malformedResponseCookiesTitle.classList.add('hidden');
301
- this.malformedResponseCookiesList.classList.add('hidden');
302
- }
303
-
304
- if (this.request.siteHasCookieInOtherPartition()) {
305
- this.siteHasCookieInOtherPartition.classList.remove('hidden');
306
- } else {
307
- this.siteHasCookieInOtherPartition.classList.add('hidden');
308
- }
274
+ const input: ViewInput = {
275
+ gotCookies: this.request.hasRequestCookies() || this.request.responseCookies.length > 0,
276
+ requestCookies: {
277
+ cookies: requestCookies,
278
+ cookieToBlockedReasons: requestCookieToBlockedReasons,
279
+ cookieToExemptionReason: requestCookieToExemptionReason,
280
+ },
281
+ responseCookies: {
282
+ cookies: responseCookies,
283
+ cookieToBlockedReasons: responseCookieToBlockedReasons,
284
+ cookieToExemptionReason: responseCookieToExemptionReason,
285
+ },
286
+ malformedResponseCookies,
287
+ showFilteredOutCookies: this.showFilteredOutCookiesSetting.get(),
288
+ onShowFilteredOutCookiesChange: (checked: boolean) => {
289
+ this.showFilteredOutCookiesSetting.set(checked);
290
+ this.requestUpdate();
291
+ },
292
+ siteHasCookieInOtherPartition: this.request.siteHasCookieInOtherPartition(),
293
+ hasBlockedCookies: this.request.blockedRequestCookies().length > 0,
294
+ };
295
+
296
+ this.view(input, undefined, this.contentElement);
309
297
  }
310
298
 
311
299
  override wasShown(): void {
312
300
  super.wasShown();
313
- this.request.addEventListener(
314
- SDK.NetworkRequest.Events.REQUEST_HEADERS_CHANGED, this.refreshRequestCookiesView, this);
315
- this.request.addEventListener(
316
- SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.refreshRequestCookiesView, this);
301
+ this.request.addEventListener(SDK.NetworkRequest.Events.REQUEST_HEADERS_CHANGED, this.requestUpdate, this);
302
+ this.request.addEventListener(SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.requestUpdate, this);
317
303
 
318
- this.refreshRequestCookiesView();
304
+ this.requestUpdate();
319
305
  }
320
306
 
321
307
  override willHide(): void {
322
308
  super.willHide();
323
- this.request.removeEventListener(
324
- SDK.NetworkRequest.Events.REQUEST_HEADERS_CHANGED, this.refreshRequestCookiesView, this);
325
- this.request.removeEventListener(
326
- SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.refreshRequestCookiesView, this);
309
+ this.request.removeEventListener(SDK.NetworkRequest.Events.REQUEST_HEADERS_CHANGED, this.requestUpdate, this);
310
+ this.request.removeEventListener(SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.requestUpdate, this);
327
311
  }
328
312
  }
@@ -86,11 +86,11 @@ const UIStrings = {
86
86
  /**
87
87
  * @description A context menu item in the Network Log View Columns of the Network panel
88
88
  */
89
- responseHeaders: 'Response Headers',
89
+ responseHeaders: 'Response headers',
90
90
  /**
91
91
  * @description A context menu item in the Network Log View Columns of the Network panel
92
92
  */
93
- earlyHintsHeaders: 'Early Hints Headers',
93
+ earlyHintsHeaders: 'Early hints headers',
94
94
  /**
95
95
  * @description Title text for a link to the Sources panel to the file containing the header override definitions
96
96
  */
@@ -4,27 +4,29 @@
4
4
  * found in the LICENSE file.
5
5
  */
6
6
 
7
- .request-cookies-view {
8
- overflow: auto;
9
- padding: 12px;
10
- height: 100%;
11
- background-color: var(--sys-color-cdt-base-container);
12
- }
7
+ @scope to (devtools-widget > *) {
8
+ .request-cookies-view {
9
+ overflow: auto;
10
+ padding: 12px;
11
+ height: 100%;
12
+ background-color: var(--sys-color-cdt-base-container);
13
+ }
13
14
 
14
- .request-cookies-view .request-cookies-title {
15
- font-size: 12px;
16
- font-weight: bold;
17
- margin-right: 30px;
18
- color: var(--sys-color-on-surface);
19
- }
15
+ .request-cookies-view .request-cookies-title {
16
+ font-size: 12px;
17
+ font-weight: bold;
18
+ margin-right: 30px;
19
+ color: var(--sys-color-on-surface);
20
+ }
20
21
 
21
- .request-cookies-view .cookie-line {
22
- margin-top: 6px;
23
- display: flex;
24
- }
22
+ .request-cookies-view .cookie-line {
23
+ margin-top: 6px;
24
+ display: flex;
25
+ }
25
26
 
26
- .request-cookies-view .cookies-panel-item {
27
- margin-top: 6px;
28
- margin-bottom: 16px;
29
- flex: none;
27
+ .request-cookies-view .cookies-panel-item {
28
+ margin-top: 6px;
29
+ margin-bottom: 16px;
30
+ flex: none;
31
+ }
30
32
  }
@@ -910,7 +910,7 @@ export class RecordingView extends UI.Widget.Widget {
910
910
  }
911
911
 
912
912
  #isTitleInvalid = false;
913
- #selectedStep?: Models.Schema.Step|null;
913
+ #selectedStep: Models.Schema.Step|null = null;
914
914
  #replaySettingsExpanded = false;
915
915
  #showCodeView = false;
916
916
  #code = '';
@@ -1090,10 +1090,10 @@ export class RecordingView extends UI.Widget.Widget {
1090
1090
  }
1091
1091
 
1092
1092
  #onWrapperClick(): void {
1093
- if (this.#selectedStep === undefined) {
1093
+ if (!this.#selectedStep) {
1094
1094
  return;
1095
1095
  }
1096
- this.#selectedStep = undefined;
1096
+ this.#selectedStep = null;
1097
1097
  this.performUpdate();
1098
1098
  }
1099
1099
 
@@ -412,7 +412,8 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
412
412
  }
413
413
  data-step-index=${input.stepIndex}
414
414
  data-section-index=${input.sectionIndex}
415
- @click=${() => {
415
+ @click=${(event: Event) => {
416
+ event.stopPropagation();
416
417
  const stepOrSection = input.step || input.section;
417
418
  if (stepOrSection) {
418
419
  input.onStepClick(stepOrSection);
@@ -147,6 +147,10 @@ button.text-button {
147
147
  grid-column: 3 / -1;
148
148
  }
149
149
 
150
+ .keybinds-delete-button {
151
+ flex-shrink: 0;
152
+ }
153
+
150
154
  .docs-link.devtools-link {
151
155
  align-self: flex-start;
152
156
  min-height: 2em;
@@ -111,6 +111,8 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
111
111
  private muteActivateItem?: boolean;
112
112
  private lastDebuggerModel: SDK.DebuggerModel.DebuggerModel|null = null;
113
113
 
114
+ #details: SDK.DebuggerModel.DebuggerPausedDetails|null = null;
115
+
114
116
  private constructor() {
115
117
  super({
116
118
  jslog: `${VisualLogging.section('sources.callstack')}`,
@@ -196,10 +198,13 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
196
198
  return callstackSidebarPaneInstance;
197
199
  }
198
200
 
199
- flavorChanged(_object: Object|null): void {
201
+ flavorChanged(details: SDK.DebuggerModel.DebuggerPausedDetails|null): void {
200
202
  this.showIgnoreListed = false;
201
203
  this.ignoreListCheckboxElement.checked = false;
202
204
  this.maxAsyncStackChainDepth = defaultMaxAsyncStackChainDepth;
205
+ this.#details = details;
206
+ this.setSourceMapSubscription(details?.debuggerModel ?? null);
207
+
203
208
  this.requestUpdate();
204
209
  }
205
210
 
@@ -230,8 +235,7 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
230
235
 
231
236
  this.callFrameWarningsElement.classList.add('hidden');
232
237
 
233
- const details = UI.Context.Context.instance().flavor(SDK.DebuggerModel.DebuggerPausedDetails);
234
- this.setSourceMapSubscription(details?.debuggerModel ?? null);
238
+ const details = this.#details;
235
239
  if (!details) {
236
240
  this.notPausedMessageElement.classList.remove('hidden');
237
241
  this.ignoreListMessageElement.classList.add('hidden');