chrome-devtools-frontend 1.0.1732418 → 1.0.1732697

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 (102) hide show
  1. package/docs/get_the_code.md +1 -73
  2. package/front_end/Tests.js +0 -5
  3. package/front_end/core/host/AidaClientTypes.ts +19 -2
  4. package/front_end/core/sdk/DOMModel.ts +8 -3
  5. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +2 -2
  6. package/front_end/generated/SupportedCSSProperties.ts +2 -2
  7. package/front_end/models/ai-utils/debug.ts +127 -22
  8. package/front_end/models/ai_assistance/README.md +1 -1
  9. package/front_end/models/ai_assistance/agents/AiAgent.ts +10 -5
  10. package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +4 -3
  11. package/front_end/models/ai_assistance/contexts/LighthouseContext.snapshot.txt +4 -2
  12. package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +6 -0
  13. package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +2 -0
  14. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +1 -1
  15. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +26 -26
  16. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -1
  17. package/front_end/models/ai_code_completion/ai_code_completion.ts +11 -2
  18. package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -1
  19. package/front_end/models/ai_code_generation/ai_code_generation.ts +11 -2
  20. package/front_end/models/trace/LanternComputationData.ts +4 -0
  21. package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +126 -1
  22. package/front_end/models/trace/lantern/types/Lantern.ts +3 -0
  23. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +32 -0
  24. package/front_end/panels/ai_assistance/ExternalHandler.ts +1 -1
  25. package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +4 -4
  26. package/front_end/panels/ai_assistance/components/chatMessage.css +3 -4
  27. package/front_end/panels/ai_assistance/components/exploreWidget.css +2 -2
  28. package/front_end/panels/application/components/reportsGrid.css +1 -1
  29. package/front_end/panels/application/components/serviceWorkerRouterView.css +2 -2
  30. package/front_end/panels/application/components/trustTokensView.css +1 -1
  31. package/front_end/panels/application/indexedDBViews.css +0 -4
  32. package/front_end/panels/application/resourcesPanel.css +0 -9
  33. package/front_end/panels/application/serviceWorkerUpdateCycleView.css +3 -3
  34. package/front_end/panels/application/serviceWorkersView.css +3 -2
  35. package/front_end/panels/comments/CommentsPane.ts +2 -11
  36. package/front_end/panels/common/CommentThreadWidget.ts +11 -3
  37. package/front_end/panels/console/consoleContextSelector.css +1 -1
  38. package/front_end/panels/console/consolePinPane.css +1 -1
  39. package/front_end/panels/console/consolePrompt.css +4 -2
  40. package/front_end/panels/elements/ComputedStyleWidget.ts +8 -19
  41. package/front_end/panels/elements/PropertyRenderer.ts +7 -27
  42. package/front_end/panels/elements/StylePropertyTreeElement.ts +61 -72
  43. package/front_end/panels/elements/components/elementsBreadcrumbs.css +1 -1
  44. package/front_end/panels/elements/metricsSidebarPane.css +2 -2
  45. package/front_end/panels/elements/propertiesWidget.css +0 -5
  46. package/front_end/panels/emulation/deviceModeView.css +3 -3
  47. package/front_end/panels/event_listeners/eventListenersView.css +1 -1
  48. package/front_end/panels/explain/components/consoleInsight.css +2 -2
  49. package/front_end/panels/issues/issuesTree.css +6 -4
  50. package/front_end/panels/layer_viewer/layerTreeOutline.css +1 -1
  51. package/front_end/panels/lighthouse/lighthousePanel.css +1 -1
  52. package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +1 -1
  53. package/front_end/panels/media/playerListView.css +8 -4
  54. package/front_end/panels/media/playerMessagesView.css +9 -5
  55. package/front_end/panels/network/NetworkWaterfallColumn.ts +92 -55
  56. package/front_end/panels/network/networkConfigView.css +3 -3
  57. package/front_end/panels/network/networkLogView.css +5 -4
  58. package/front_end/panels/network/networkManageCustomHeadersView.css +1 -1
  59. package/front_end/panels/network/networkTimingTable.css +4 -4
  60. package/front_end/panels/network/requestPayloadView.css +1 -1
  61. package/front_end/panels/performance_monitor/performanceMonitor.css +1 -1
  62. package/front_end/panels/profiler/ModuleUIStrings.ts +12 -0
  63. package/front_end/panels/protocol_monitor/JSONEditor.css +4 -3
  64. package/front_end/panels/recorder/createRecordingView.css +2 -2
  65. package/front_end/panels/recorder/stepView.css +0 -7
  66. package/front_end/panels/recorder/timelineSection.css +1 -1
  67. package/front_end/panels/screencast/screencastView.css +1 -1
  68. package/front_end/panels/security/mainView.css +1 -1
  69. package/front_end/panels/security/originView.css +1 -1
  70. package/front_end/panels/sources/breakpointsView.css +3 -3
  71. package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -1
  72. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +30 -10
  73. package/front_end/panels/timeline/components/networkRequestTooltip.css +2 -2
  74. package/front_end/panels/timeline/components/relatedInsightChips.css +1 -1
  75. package/front_end/panels/timeline/timelineFlameChartView.css +4 -4
  76. package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -2
  77. package/front_end/panels/timeline/timelineMiniMap.css +2 -1
  78. package/front_end/third_party/chromium/README.chromium +1 -1
  79. package/front_end/ui/components/buttons/button.css +0 -1
  80. package/front_end/ui/components/diff_view/diffView.css +1 -1
  81. package/front_end/ui/components/markdown_view/codeBlock.css +3 -3
  82. package/front_end/ui/components/markdown_view/markdownView.css +2 -2
  83. package/front_end/ui/components/panel_feedback/panelFeedback.css +3 -2
  84. package/front_end/ui/components/suggestion_input/suggestionInput.css +2 -2
  85. package/front_end/ui/legacy/components/inline_editor/colorSwatch.css +1 -2
  86. package/front_end/ui/legacy/components/perf_ui/chartViewport.css +1 -1
  87. package/front_end/ui/legacy/components/perf_ui/filmStripView.css +1 -1
  88. package/front_end/ui/legacy/components/perf_ui/flameChart.css +5 -3
  89. package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +7 -4
  90. package/front_end/ui/legacy/components/perf_ui/pieChart.css +0 -1
  91. package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
  92. package/front_end/ui/legacy/inspectorCommon.css +8 -25
  93. package/front_end/ui/legacy/progressIndicator.css +1 -2
  94. package/front_end/ui/legacy/reportView.css +4 -1
  95. package/front_end/ui/legacy/searchableView.css +1 -1
  96. package/front_end/ui/legacy/tabbedPane.css +7 -4
  97. package/front_end/ui/legacy/treeoutline.css +1 -1
  98. package/front_end/ui/legacy/viewContainers.css +1 -1
  99. package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
  100. package/package.json +1 -1
  101. package/front_end/models/ai_code_completion/debug.ts +0 -33
  102. package/front_end/models/ai_code_generation/debug.ts +0 -33
@@ -146,8 +146,8 @@ p {
146
146
  border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
147
147
  padding: var(--sys-size-4) 0;
148
148
  position: relative;
149
- padding-left: calc(var(--issue-indent) + 43px);
150
- padding-bottom: 26px;
149
+ padding-left: calc(var(--issue-indent) + var(--sys-size-14));
150
+ padding-bottom: var(--sys-size-11);
151
151
  padding-right: var(--sys-size-5);
152
152
  }
153
153
 
@@ -187,7 +187,8 @@ p {
187
187
  }
188
188
 
189
189
  devtools-icon.leading-issue-icon {
190
- margin: var(--sys-size-1) 0 calc(-1 * var(--sys-size-1)) 7px;
190
+ /* 8px (--sys-size-5) minus 1px (--sys-size-1) aligns the 20px icon after the 16px disclosure arrow with the 23px .issue-body::before border and 43px body indent. */
191
+ margin: var(--sys-size-1) 0 calc(-1 * var(--sys-size-1)) calc(var(--sys-size-5) - var(--sys-size-1));
191
192
  }
192
193
 
193
194
  .message {
@@ -426,7 +427,8 @@ ul > li.plain-enum::before {
426
427
  }
427
428
 
428
429
  .aggregated-issues-count {
429
- padding: 3px 7px 0;
430
+ /* Center the 14px (--sys-size-7) adorner pill vertically against the 20px (--sys-size-9) issue icon. */
431
+ padding: calc((var(--sys-size-9) - var(--sys-size-7)) / 2) var(--sys-size-4) 0;
430
432
  }
431
433
 
432
434
  .affected-resource-directive-info-header {
@@ -8,7 +8,7 @@
8
8
  .layer-summary {
9
9
  border-top: var(--sys-size-1) solid var(--sys-color-divider);
10
10
  justify-content: space-between;
11
- padding: var(--sys-size-3) 10px;
11
+ padding: var(--sys-size-3) var(--sys-size-5);
12
12
  flex-shrink: 0;
13
13
  }
14
14
 
@@ -76,7 +76,7 @@ select.lighthouse-report {
76
76
  }
77
77
 
78
78
  &.lh-active + .lh-tools__dropdown {
79
- clip: rect(calc(-1 * var(--sys-size-5)), 204px, 270px, -10px); /* stylelint-disable-line property-no-deprecated */
79
+ clip: rect(calc(-1 * var(--sys-size-5)), var(--sys-size-26), var(--sys-size-30), calc(-1 * var(--sys-size-6))); /* stylelint-disable-line property-no-deprecated */
80
80
  }
81
81
  }
82
82
 
@@ -41,7 +41,7 @@
41
41
 
42
42
  .signed-divider {
43
43
  width: var(--sys-size-1);
44
- height: 15px;
44
+ height: var(--sys-size-8);
45
45
  background-color: var(--sys-color-divider);
46
46
  margin: 0 var(--sys-size-3);
47
47
  }
@@ -83,9 +83,13 @@ li.storage-group-list-item::before {
83
83
  }
84
84
 
85
85
  .player-entry-header {
86
- height: 27px;
87
- line-height: 27px;
88
- min-height: 27px;
89
- padding-left: 10px;
86
+ /* 28px toolbar height (--sys-size-12) minus 1px divider border (--sys-size-1) = 27px,
87
+ * matching .tabbed-pane-header in the adjacent PlayerDetailView split pane. */
88
+ height: calc(var(--sys-size-12) - var(--sys-size-1));
89
+ line-height: calc(var(--sys-size-12) - var(--sys-size-1));
90
+ min-height: calc(var(--sys-size-12) - var(--sys-size-1));
91
+ /* 8px base inline padding (--sys-size-5) plus 2px optical inset (--sys-size-2) = 10px,
92
+ * matching the 10px cell padding of the player rows below. */
93
+ padding-left: calc(var(--sys-size-5) + var(--sys-size-2));
90
94
  border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
91
95
  }
@@ -6,7 +6,7 @@
6
6
  .media-messages-header {
7
7
  background-color: var(--sys-color-cdt-base-container);
8
8
  border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
9
- min-height: 26px;
9
+ flex: none;
10
10
  }
11
11
 
12
12
  .media-messages-body {
@@ -14,8 +14,11 @@
14
14
  }
15
15
 
16
16
  .media-messages-level-dropdown-element {
17
- height: 18px;
18
- line-height: 18px;
17
+ /* 16px (--sys-size-8) + 2px (--sys-size-2) = 18px row height matching
18
+ * SoftDropDown.setRowHeight(18) so all 6 items (108px) fit the 108px
19
+ * GlassPane without vertical scrollbar clipping. */
20
+ height: calc(var(--sys-size-8) + var(--sys-size-2));
21
+ line-height: calc(var(--sys-size-8) + var(--sys-size-2));
19
22
  }
20
23
 
21
24
  .media-messages-level-dropdown-text {
@@ -24,7 +27,8 @@
24
27
 
25
28
  .media-messages-level-dropdown-checkbox {
26
29
  float: left;
27
- width: 18px;
30
+ /* 16px checkmark slot (--sys-size-8) plus 2px left padding (--sys-size-2) under border-box sizing. */
31
+ width: calc(var(--sys-size-8) + var(--sys-size-2));
28
32
  height: 100%;
29
33
  padding-left: var(--sys-size-2);
30
34
  }
@@ -74,7 +78,7 @@
74
78
  }
75
79
 
76
80
  .status-error-field-label {
77
- padding-right: 10px;
81
+ padding-right: var(--sys-size-5);
78
82
  color: var(--sys-color-token-subtle);
79
83
  }
80
84
 
@@ -1,7 +1,6 @@
1
1
  // Copyright 2016 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 type * as SDK from '../../core/sdk/sdk.js';
@@ -10,6 +9,7 @@ import * as RenderCoordinator from '../../ui/components/render_coordinator/rende
10
9
  import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
11
10
  import * as UI from '../../ui/legacy/legacy.js';
12
11
  import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
12
+ import {Directives, html, render} from '../../ui/lit/lit.js';
13
13
  import * as Settings from '../../ui/settings/settings.js';
14
14
 
15
15
  import type {NetworkNode} from './NetworkDataGridNode.js';
@@ -17,10 +17,47 @@ import {RequestTimeRangeNameToColor} from './NetworkOverview.js';
17
17
  import networkWaterfallColumnStyles from './networkWaterfallColumn.css.js';
18
18
  import {RequestTimingView} from './RequestTimingView.js';
19
19
 
20
+ const {ref} = Directives;
21
+
20
22
  const BAR_SPACING = 1;
21
23
 
24
+ export interface ViewInput {
25
+ onMouseMove: (offsetY: number, shiftKey: boolean) => void;
26
+ onMouseLeave: () => void;
27
+ onClick: (offsetY: number) => boolean;
28
+ }
29
+
30
+ export interface ViewOutput {
31
+ canvas?: HTMLCanvasElement;
32
+ }
33
+
34
+ export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
35
+
36
+ export const DEFAULT_VIEW: View = (input, output, target) => {
37
+ // clang-format off
38
+ render(html`
39
+ <style>${networkWaterfallColumnStyles}</style>
40
+ <canvas
41
+ tabindex="-1"
42
+ @mousemove=${(event: MouseEvent) => input.onMouseMove(event.offsetY, event.shiftKey)}
43
+ @mouseleave=${input.onMouseLeave}
44
+ @click=${(event: MouseEvent) => {
45
+ if (input.onClick(event.offsetY)) {
46
+ event.consume(true);
47
+ }
48
+ }}
49
+ ${ref(e => {
50
+ output.canvas = e instanceof HTMLCanvasElement ? e : undefined;
51
+ })}
52
+ ></canvas>
53
+ `, target);
54
+ // clang-format on
55
+ };
56
+
22
57
  export class NetworkWaterfallColumn extends UI.Widget.VBox {
23
- private canvas: HTMLCanvasElement;
58
+ readonly #view: View;
59
+ readonly #viewOutput: ViewOutput = {};
60
+ private canvas!: HTMLCanvasElement;
24
61
  private canvasPosition: DOMRect;
25
62
  private readonly leftPadding: number;
26
63
  private readonly fontSize: number;
@@ -45,15 +82,11 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
45
82
  private readonly pathForStyle: Map<LayerStyle, Path2D>;
46
83
  private textLayers: TextLayer[];
47
84
 
48
- constructor(calculator: NetworkTimeCalculator.NetworkTimeCalculator) {
49
- // TODO(allada) Make this a shadowDOM when the NetworkWaterfallColumn gets moved into NetworkLogViewColumns.
85
+ constructor(calculator: NetworkTimeCalculator.NetworkTimeCalculator, view: View = DEFAULT_VIEW) {
86
+ // TODO(allada) Make this a shadowDOM when the NetworkWaterfallColumn gets
87
+ // moved into NetworkLogViewColumns.
50
88
  super();
51
- this.registerRequiredCSS(networkWaterfallColumnStyles);
52
-
53
- this.canvas = this.contentElement.createChild('canvas');
54
- this.canvas.tabIndex = -1;
55
- this.setDefaultFocusedElement(this.canvas);
56
- this.canvasPosition = this.canvas.getBoundingClientRect();
89
+ this.#view = view;
57
90
 
58
91
  this.leftPadding = 5;
59
92
  this.fontSize = 10;
@@ -81,10 +114,6 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
81
114
 
82
115
  this.eventDividers = new Map();
83
116
 
84
- this.element.addEventListener('mousemove', this.onMouseMove.bind(this), true);
85
- this.element.addEventListener('mouseleave', _event => this.setHoveredNode(null, false), true);
86
- this.element.addEventListener('click', this.onClick.bind(this), true);
87
-
88
117
  this.styleForTimeRangeName = NetworkWaterfallColumn.buildRequestTimeRangeStyle();
89
118
 
90
119
  const resourceStyleTuple = NetworkWaterfallColumn.buildResourceTypeStyle();
@@ -93,30 +122,50 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
93
122
 
94
123
  const baseLineColor = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-state-disabled');
95
124
  this.wiskerStyle = {borderColor: baseLineColor, lineWidth: 1};
96
- this.hoverDetailsStyle = {fillStyle: baseLineColor, lineWidth: 1, borderColor: baseLineColor};
125
+ this.hoverDetailsStyle = {
126
+ fillStyle: baseLineColor,
127
+ lineWidth: 1,
128
+ borderColor: baseLineColor,
129
+ };
97
130
 
98
131
  this.pathForStyle = new Map();
99
132
  this.textLayers = [];
133
+
134
+ this.performUpdate();
135
+ this.canvasPosition = this.canvas?.getBoundingClientRect() ?? new DOMRect();
136
+ }
137
+
138
+ override performUpdate(): void {
139
+ this.#view({
140
+ onMouseMove: (offsetY, shiftKey) => this.setHoveredNode(this.getNodeFromPoint(offsetY), shiftKey),
141
+ onMouseLeave: () => this.setHoveredNode(null, false),
142
+ onClick: offsetY => this.setSelectedNode(this.getNodeFromPoint(offsetY)),
143
+ },
144
+ this.#viewOutput, this.contentElement);
145
+ if (this.#viewOutput.canvas) {
146
+ this.canvas = this.#viewOutput.canvas;
147
+ this.setDefaultFocusedElement(this.canvas);
148
+ }
100
149
  }
101
150
 
102
151
  static buildRequestTimeRangeStyle(): Map<NetworkTimeCalculator.RequestTimeRangeNames, LayerStyle> {
103
152
  const styleMap = new Map<NetworkTimeCalculator.RequestTimeRangeNames, LayerStyle>();
104
- styleMap.set(
105
- NetworkTimeCalculator.RequestTimeRangeNames.CONNECTING,
106
- {fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.CONNECTING]});
107
- styleMap.set(
108
- NetworkTimeCalculator.RequestTimeRangeNames.SSL,
109
- {fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SSL]});
110
- styleMap.set(
111
- NetworkTimeCalculator.RequestTimeRangeNames.DNS,
112
- {fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.DNS]});
113
- styleMap.set(
114
- NetworkTimeCalculator.RequestTimeRangeNames.PROXY,
115
- {fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.PROXY]});
153
+ styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.CONNECTING, {
154
+ fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.CONNECTING],
155
+ });
156
+ styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.SSL, {
157
+ fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SSL],
158
+ });
159
+ styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.DNS, {
160
+ fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.DNS],
161
+ });
162
+ styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.PROXY, {
163
+ fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.PROXY],
164
+ });
116
165
  styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.BLOCKING, {fillStyle: '--network-waterfall-blocking'});
117
- styleMap.set(
118
- NetworkTimeCalculator.RequestTimeRangeNames.PUSH,
119
- {fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.PUSH]});
166
+ styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.PUSH, {
167
+ fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.PUSH],
168
+ });
120
169
  styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.QUEUEING, {
121
170
  fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.QUEUEING],
122
171
  lineWidth: 2,
@@ -128,15 +177,15 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
128
177
  lineWidth: 2,
129
178
  borderColor: '#03A9F4',
130
179
  });
131
- styleMap.set(
132
- NetworkTimeCalculator.RequestTimeRangeNames.WAITING,
133
- {fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.WAITING]});
134
- styleMap.set(
135
- NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING_PUSH,
136
- {fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING_PUSH]});
137
- styleMap.set(
138
- NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER,
139
- {fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER]});
180
+ styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.WAITING, {
181
+ fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.WAITING],
182
+ });
183
+ styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING_PUSH, {
184
+ fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING_PUSH],
185
+ });
186
+ styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER, {
187
+ fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER],
188
+ });
140
189
  styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_PREPARATION, {
141
190
  fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_PREPARATION],
142
191
  });
@@ -228,17 +277,6 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
228
277
  this.update();
229
278
  }
230
279
 
231
- private onMouseMove(event: MouseEvent): void {
232
- this.setHoveredNode(this.getNodeFromPoint(event.offsetY), event.shiftKey);
233
- }
234
-
235
- private onClick(event: MouseEvent): void {
236
- const handled = this.setSelectedNode(this.getNodeFromPoint(event.offsetY));
237
- if (handled) {
238
- event.consume(true);
239
- }
240
- }
241
-
242
280
  private getPopoverRequest(event: MouseEvent|KeyboardEvent): UI.PopoverHelper.PopoverRequest|null {
243
281
  if (event instanceof KeyboardEvent) {
244
282
  return null;
@@ -389,7 +427,7 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
389
427
  this.offsetWidth = this.contentElement.offsetWidth - this.rightPadding;
390
428
  this.offsetHeight = this.contentElement.offsetHeight;
391
429
  this.calculator.setDisplayWidth(this.offsetWidth);
392
- this.canvasPosition = this.canvas.getBoundingClientRect();
430
+ this.canvasPosition = this.canvas?.getBoundingClientRect() ?? new DOMRect();
393
431
  }
394
432
 
395
433
  private timeToPosition(time: number): number {
@@ -585,10 +623,9 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
585
623
  }
586
624
 
587
625
  if (!this.calculator.startAtZero) {
588
- const queueingRange =
589
- (NetworkTimeCalculator.calculateRequestTimeRanges(request, 0)
590
- .find(data => data.name === NetworkTimeCalculator.RequestTimeRangeNames.TOTAL) as
591
- NetworkTimeCalculator.RequestTimeRange);
626
+ const queueingRange = (NetworkTimeCalculator.calculateRequestTimeRanges(request, 0)
627
+ .find(data => data.name === NetworkTimeCalculator.RequestTimeRangeNames.TOTAL) as
628
+ NetworkTimeCalculator.RequestTimeRange);
592
629
  const leftLabelWidth = labels ? context.measureText(labels.left).width : 0;
593
630
  const leftTextPlacedInBar = leftLabelWidth < ranges.mid - ranges.start;
594
631
  const wiskerTextPadding = 13;
@@ -19,7 +19,7 @@
19
19
 
20
20
  .network-config-title {
21
21
  margin-right: var(--sys-size-8);
22
- width: 130px;
22
+ width: var(--sys-size-21);
23
23
  }
24
24
 
25
25
  .network-config-fields {
@@ -27,7 +27,7 @@
27
27
  }
28
28
 
29
29
  .network-config-fields > span:first-of-type {
30
- padding: 3px 0;
30
+ padding: var(--sys-size-2) 0;
31
31
  }
32
32
 
33
33
  .panel-section-separator {
@@ -45,7 +45,7 @@
45
45
 
46
46
  .network-config-input-validation-error {
47
47
  color: var(--sys-color-error);
48
- margin: 5px 0;
48
+ margin: var(--sys-size-3) 0;
49
49
  }
50
50
 
51
51
  .network-config-input-validation-error:empty {
@@ -22,9 +22,9 @@
22
22
  }
23
23
 
24
24
  .network-summary-bar {
25
- flex: 0 0 27px;
26
- line-height: 27px;
27
- padding-left: 5px;
25
+ flex: 0 0 calc(var(--sys-size-12) - var(--sys-size-1)); /* 28px toolbar minus 1px top border */
26
+ align-items: center;
27
+ padding-left: var(--sys-size-4);
28
28
  background-color: var(--sys-color-cdt-base-container);
29
29
  border-top: var(--sys-size-1) solid var(--sys-color-divider);
30
30
  white-space: nowrap;
@@ -75,7 +75,8 @@
75
75
 
76
76
  .network-waterfall-header,
77
77
  .network-log-grid.data-grid thead {
78
- height: 31px;
78
+ /* 32px (--sys-size-13) header height minus 1px (--sys-size-1) bottom border offset. */
79
+ height: calc(var(--sys-size-13) - var(--sys-size-1));
79
80
  background-color: var(--sys-color-surface1);
80
81
  }
81
82
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  .custom-headers-list {
8
8
  display: flex;
9
- height: 272px;
9
+ height: var(--sys-size-30);
10
10
  width: var(--sys-size-29);
11
11
  margin: 0 var(--sys-size-8);
12
12
  border: var(--sys-size-1) solid var(--sys-color-divider);
@@ -5,10 +5,10 @@
5
5
  */
6
6
 
7
7
  .network-timing-table {
8
- width: 380px;
8
+ width: var(--sys-size-32);
9
9
  border-spacing: 0;
10
- padding-left: 10px;
11
- padding-right: 10px;
10
+ padding-left: var(--sys-size-6);
11
+ padding-right: var(--sys-size-6);
12
12
  line-height: initial;
13
13
  table-layout: fixed;
14
14
  }
@@ -237,7 +237,7 @@ tr.synthetic {
237
237
  .network-timing-bar.ssl,
238
238
  .network-timing-bar.connecting,
239
239
  .network-timing-bar.blocking {
240
- height: 10px;
240
+ height: var(--sys-size-5);
241
241
  margin: auto;
242
242
  }
243
243
 
@@ -13,7 +13,7 @@
13
13
 
14
14
  .raw-payload-section {
15
15
  flex: 1 1 auto;
16
- min-height: 200px;
16
+ min-height: var(--sys-size-25);
17
17
  display: flex;
18
18
  flex-direction: column;
19
19
  border-top: var(--sys-size-1) solid var(--sys-color-divider);
@@ -74,7 +74,7 @@
74
74
  }
75
75
 
76
76
  .perfmon-indicator-value {
77
- flex: 0 0 55px;
77
+ flex: 0 0 var(--sys-size-17);
78
78
  text-align: right;
79
79
  overflow: visible;
80
80
  align-self: center;
@@ -104,6 +104,18 @@ export const UIStrings = {
104
104
  * @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
105
105
  */
106
106
  loadingLocations: 'Loading locations…',
107
+ /**
108
+ * @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
109
+ */
110
+ loadingScopes: 'Loading scopes…',
111
+ /**
112
+ * @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
113
+ */
114
+ loadingScopeContextVars: 'Loading scope context vars…',
115
+ /**
116
+ * @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
117
+ */
118
+ loadingScopeUses: 'Loading scope uses…',
107
119
  /**
108
120
  * @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
109
121
  */
@@ -22,7 +22,8 @@
22
22
  }
23
23
 
24
24
  .warning-icon {
25
- margin-left: -18px;
25
+ /* -18px: shift left by the 14px small icon (--sys-size-7) plus its 4px right margin (--sys-size-3). */
26
+ margin-left: calc(-1 * (var(--sys-size-7) + var(--sys-size-3)));
26
27
  margin-right: var(--sys-size-3);
27
28
  }
28
29
 
@@ -38,8 +39,8 @@
38
39
  font-family: var(--monospace-font-family);
39
40
  font-size: var(--monospace-font-size);
40
41
  align-items: center;
41
- line-height: 18px;
42
- margin-top: 3px;
42
+ line-height: var(--sys-typescale-body4-line-height);
43
+ margin-top: var(--sys-size-2);
43
44
  }
44
45
 
45
46
  .separator {
@@ -30,14 +30,14 @@ h1 {
30
30
  font-weight: 500;
31
31
  font-size: var(--sys-typescale-body5-size);
32
32
  line-height: var(--sys-typescale-body5-line-height);
33
- letter-spacing: 0.8px;
33
+ letter-spacing: 0.07em;
34
34
  text-transform: uppercase;
35
35
  color: var(--sys-color-secondary);
36
36
  margin-bottom: var(--sys-size-5);
37
37
  margin-top: var(--sys-size-13);
38
38
  display: flex;
39
39
  align-items: center;
40
- gap: 3px;
40
+ gap: var(--sys-size-3);
41
41
  }
42
42
 
43
43
  .footer {
@@ -62,13 +62,6 @@
62
62
  cy: var(--sys-size-5);
63
63
  }
64
64
 
65
- .is-start-of-group:not(:first-of-type) .circle-icon {
66
- r: 7px;
67
- fill: var(--sys-color-cdt-base-container);
68
- stroke: var(--sys-color-primary);
69
- stroke-width: var(--sys-size-2);
70
- }
71
-
72
65
  .step.is-success .circle-icon {
73
66
  fill: var(--sys-color-primary);
74
67
  stroke: var(--sys-color-primary);
@@ -72,7 +72,7 @@
72
72
  left: var(--sys-size-3);
73
73
  display: block;
74
74
  transform: translateX(-50%);
75
- top: 18px;
75
+ top: var(--sys-size-8);
76
76
  height: 100%;
77
77
  z-index: 1; /* We want this to be below of `.overlay` for stopped case */
78
78
  }
@@ -29,7 +29,7 @@
29
29
  .screencast-navigation input {
30
30
  flex: 1;
31
31
  margin: var(--sys-size-2);
32
- max-height: 19px;
32
+ max-height: var(--sys-size-9);
33
33
  }
34
34
 
35
35
  .screencast-navigation .progress {
@@ -18,7 +18,7 @@
18
18
  }
19
19
 
20
20
  .security-summary-section-title {
21
- font-size: 15px;
21
+ font-size: var(--sys-typescale-headline4-size);
22
22
  margin: var(--sys-size-6) var(--sys-size-8);
23
23
  user-select: text;
24
24
  }
@@ -77,7 +77,7 @@
77
77
 
78
78
  .security-origin-view .details-table-row > td:first-child {
79
79
  color: var(--sys-color-token-subtle);
80
- width: calc(120px + 1em);
80
+ width: calc(var(--sys-size-21) + 1em); /* 128px label column + 1em right padding */
81
81
  text-align: right;
82
82
  padding-right: 1em;
83
83
  }
@@ -120,8 +120,8 @@
120
120
 
121
121
  button {
122
122
  cursor: pointer;
123
- width: 13px;
124
- height: 13px;
123
+ width: var(--sys-size-7);
124
+ height: var(--sys-size-7);
125
125
  border: none;
126
126
  background-color: transparent;
127
127
  display: none;
@@ -230,7 +230,7 @@
230
230
  }
231
231
 
232
232
  .pause-on-uncaught-exceptions {
233
- margin-top: 3px;
233
+ margin-top: var(--sys-size-2);
234
234
  }
235
235
 
236
236
  .pause-on-caught-exceptions {
@@ -109,7 +109,8 @@ li.watch-expression-tree-item > span.tree-element-title {
109
109
  .watch-expression-header {
110
110
  flex: auto;
111
111
  margin-left: calc(-1 * var(--sys-size-8));
112
- padding-left: 15px;
112
+ /* 16px (--sys-size-8) negative margin offset minus 1px (--sys-size-1) object header title margin */
113
+ padding-left: calc(var(--sys-size-8) - var(--sys-size-1));
113
114
  }
114
115
 
115
116
  li.watch-expression-tree-item {