chrome-devtools-frontend 1.0.1515796 → 1.0.1515988

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 (129) hide show
  1. package/docs/contributing/infrastructure.md +131 -82
  2. package/front_end/Tests.js +3 -29
  3. package/front_end/core/common/Progress.ts +73 -55
  4. package/front_end/core/host/UserMetrics.ts +0 -1
  5. package/front_end/core/protocol_client/InspectorBackend.ts +2 -0
  6. package/front_end/core/root/Runtime.ts +0 -1
  7. package/front_end/core/sdk/CSSMatchedStyles.ts +12 -10
  8. package/front_end/core/sdk/CSSModel.ts +1 -31
  9. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +27 -7
  10. package/front_end/core/sdk/DebuggerModel.ts +1 -31
  11. package/front_end/core/sdk/EnhancedTracesParser.ts +81 -50
  12. package/front_end/core/sdk/NetworkManager.ts +1 -31
  13. package/front_end/core/sdk/NetworkRequest.ts +1 -31
  14. package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1003 -0
  15. package/front_end/core/sdk/RehydratingConnection.ts +13 -18
  16. package/front_end/core/sdk/RehydratingObject.ts +8 -31
  17. package/front_end/core/sdk/RemoteObject.ts +1 -31
  18. package/front_end/core/sdk/ResourceTreeModel.ts +1 -31
  19. package/front_end/core/sdk/RuntimeModel.ts +1 -31
  20. package/front_end/core/sdk/ServiceWorkerManager.ts +1 -31
  21. package/front_end/core/sdk/SourceMap.ts +1 -31
  22. package/front_end/core/sdk/TraceObject.ts +8 -3
  23. package/front_end/entrypoints/main/MainImpl.ts +0 -2
  24. package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -3
  25. package/front_end/models/ai_assistance/ConversationHandler.ts +4 -6
  26. package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -1
  27. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +107 -72
  28. package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +2 -2
  29. package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
  30. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +178 -85
  31. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +308 -218
  32. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +100 -100
  33. package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +10 -1
  34. package/front_end/models/ai_assistance/performance/AIContext.ts +19 -21
  35. package/front_end/models/bindings/ContentProviderBasedProject.ts +6 -4
  36. package/front_end/models/breakpoints/BreakpointManager.ts +3 -3
  37. package/front_end/models/har/Writer.ts +11 -11
  38. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +3 -3
  39. package/front_end/models/persistence/IsolatedFileSystem.ts +4 -4
  40. package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -7
  41. package/front_end/models/persistence/PersistenceImpl.ts +8 -8
  42. package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
  43. package/front_end/models/trace/ModelImpl.ts +2 -16
  44. package/front_end/models/trace/Processor.ts +15 -9
  45. package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +4 -4
  46. package/front_end/models/trace/handlers/FramesHandler.ts +2 -2
  47. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -10
  48. package/front_end/models/trace/handlers/MetaHandler.ts +11 -9
  49. package/front_end/models/trace/handlers/ScreenshotsHandler.ts +1 -1
  50. package/front_end/models/trace/handlers/ScriptsHandler.ts +5 -5
  51. package/front_end/models/trace/handlers/UserInteractionsHandler.ts +2 -14
  52. package/front_end/models/trace/handlers/UserTimingsHandler.ts +3 -4
  53. package/front_end/models/trace/insights/CLSCulprits.ts +1 -1
  54. package/front_end/models/trace/insights/DocumentLatency.ts +3 -4
  55. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
  56. package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
  57. package/front_end/models/trace/insights/ImageDelivery.ts +1 -1
  58. package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
  59. package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
  60. package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
  61. package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
  62. package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
  63. package/front_end/models/trace/insights/types.ts +2 -0
  64. package/front_end/models/trace/types/TraceEvents.ts +41 -64
  65. package/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +1 -1
  66. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +21 -99
  67. package/front_end/panels/application/ServiceWorkersView.ts +0 -1
  68. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
  69. package/front_end/panels/common/GdpSignUpDialog.ts +6 -3
  70. package/front_end/panels/console/ConsoleView.ts +23 -28
  71. package/front_end/panels/console/ConsoleViewport.ts +2 -2
  72. package/front_end/panels/console/consoleView.css +11 -1
  73. package/front_end/panels/coverage/CoverageView.ts +2 -2
  74. package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
  75. package/front_end/panels/elements/StyleEditorWidget.ts +8 -19
  76. package/front_end/panels/elements/StylePropertyTreeElement.ts +39 -25
  77. package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
  78. package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -3
  79. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
  80. package/front_end/panels/layers/LayerTreeModel.ts +3 -3
  81. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -4
  82. package/front_end/panels/network/NetworkLogView.ts +1 -1
  83. package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
  84. package/front_end/panels/network/NetworkSearchScope.ts +6 -6
  85. package/front_end/panels/search/SearchView.ts +33 -32
  86. package/front_end/panels/settings/components/SyncSection.ts +6 -1
  87. package/front_end/panels/sources/SourcesSearchScope.ts +4 -4
  88. package/front_end/panels/sources/TabbedEditorContainer.ts +5 -5
  89. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -5
  90. package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -15
  91. package/front_end/panels/timeline/TimelinePanel.ts +41 -22
  92. package/front_end/panels/timeline/TracingLayerTree.ts +4 -5
  93. package/front_end/panels/timeline/components/ExportTraceOptions.ts +37 -22
  94. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +17 -7
  95. package/front_end/third_party/axe-core/README.chromium +1 -0
  96. package/front_end/third_party/codemirror/README.chromium +1 -0
  97. package/front_end/third_party/codemirror.next/README.chromium +1 -0
  98. package/front_end/third_party/csp_evaluator/README.chromium +1 -0
  99. package/front_end/third_party/diff/README.chromium +1 -0
  100. package/front_end/third_party/i18n/README.chromium +1 -0
  101. package/front_end/third_party/intl-messageformat/README.chromium +1 -0
  102. package/front_end/third_party/json5/README.chromium +1 -0
  103. package/front_end/third_party/legacy-javascript/README.chromium +1 -0
  104. package/front_end/third_party/lighthouse/README.chromium +1 -0
  105. package/front_end/third_party/lit/README.chromium +1 -0
  106. package/front_end/third_party/marked/README.chromium +1 -0
  107. package/front_end/third_party/puppeteer-replay/README.chromium +1 -0
  108. package/front_end/third_party/third-party-web/README.chromium +1 -0
  109. package/front_end/third_party/vscode.web-custom-data/README.chromium +1 -0
  110. package/front_end/third_party/wasmparser/README.chromium +1 -0
  111. package/front_end/third_party/web-vitals/README.chromium +1 -0
  112. package/front_end/ui/components/tooltips/Tooltip.ts +17 -1
  113. package/front_end/ui/legacy/ContextMenu.ts +2 -2
  114. package/front_end/ui/legacy/GlassPane.ts +7 -3
  115. package/front_end/ui/legacy/ProgressIndicator.ts +29 -16
  116. package/front_end/ui/legacy/TabbedPane.ts +2 -2
  117. package/front_end/ui/legacy/Treeoutline.ts +10 -5
  118. package/front_end/ui/legacy/UIUtils.ts +42 -10
  119. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +14 -14
  120. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
  121. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -29
  122. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +14 -14
  123. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  124. package/inspector_overlay/highlight_common.ts +1 -27
  125. package/inspector_overlay/highlight_grid_common.ts +1 -27
  126. package/inspector_overlay/tool_highlight.ts +1 -27
  127. package/inspector_overlay/tool_persistent.ts +1 -27
  128. package/inspector_overlay/tool_source_order.ts +1 -27
  129. package/package.json +1 -1
@@ -38,6 +38,10 @@ const UIStrings = {
38
38
  * @description Text for the include annotations option.
39
39
  */
40
40
  includeAnnotations: 'Include annotations',
41
+ /**
42
+ * @description Text for the compression option.
43
+ */
44
+ shouldCompress: 'Compress with gzip',
41
45
  /**
42
46
  * @description Text for the save trace button
43
47
  */
@@ -52,6 +56,7 @@ export interface ExportTraceOptionsData {
52
56
  includeScriptContent: boolean,
53
57
  includeSourceMaps: boolean,
54
58
  addModifications: boolean,
59
+ shouldCompress: boolean,
55
60
  }) => Promise<void>;
56
61
  buttonEnabled: boolean;
57
62
  }
@@ -63,6 +68,7 @@ export interface ExportTraceOptionsState {
63
68
  includeAnnotations: boolean;
64
69
  includeScriptContent: boolean;
65
70
  includeSourceMaps: boolean;
71
+ shouldCompress: boolean;
66
72
  displayAnnotationsCheckbox?: boolean;
67
73
  displayScriptContentCheckbox?: boolean;
68
74
  displaySourceMapsCheckbox?: boolean;
@@ -72,22 +78,26 @@ export class ExportTraceOptions extends HTMLElement {
72
78
  readonly #shadow = this.attachShadow({mode: 'open'});
73
79
  #data: ExportTraceOptionsData|null = null;
74
80
 
75
- readonly #includeAnnotationsSettingString: string = 'export-performance-trace-include-annotations';
76
- readonly #includeScriptContentSettingString: string = 'export-performance-trace-include-scripts';
77
- readonly #includeSourceMapsSettingString: string = 'export-performance-trace-include-sourcemaps';
81
+ static readonly #includeAnnotationsSettingString: string = 'export-performance-trace-include-annotations';
82
+ static readonly #includeScriptContentSettingString: string = 'export-performance-trace-include-scripts';
83
+ static readonly #includeSourceMapsSettingString: string = 'export-performance-trace-include-sourcemaps';
84
+ static readonly #shouldCompressSettingString: string = 'export-performance-trace-should-compress';
78
85
 
79
86
  #includeAnnotationsSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
80
- this.#includeAnnotationsSettingString, true, Common.Settings.SettingStorageType.SESSION);
87
+ ExportTraceOptions.#includeAnnotationsSettingString, true, Common.Settings.SettingStorageType.SESSION);
81
88
  #includeScriptContentSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
82
- this.#includeScriptContentSettingString, false, Common.Settings.SettingStorageType.SESSION);
89
+ ExportTraceOptions.#includeScriptContentSettingString, false, Common.Settings.SettingStorageType.SESSION);
83
90
  #includeSourceMapsSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
84
- this.#includeSourceMapsSettingString, false, Common.Settings.SettingStorageType.SESSION);
91
+ ExportTraceOptions.#includeSourceMapsSettingString, false, Common.Settings.SettingStorageType.SESSION);
92
+ #shouldCompressSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
93
+ ExportTraceOptions.#shouldCompressSettingString, true, Common.Settings.SettingStorageType.SYNCED);
85
94
 
86
95
  #state: ExportTraceOptionsState = {
87
96
  dialogState: Dialogs.Dialog.DialogState.COLLAPSED,
88
97
  includeAnnotations: this.#includeAnnotationsSetting.get(),
89
98
  includeScriptContent: this.#includeScriptContentSetting.get(),
90
99
  includeSourceMaps: this.#includeSourceMapsSetting.get(),
100
+ shouldCompress: this.#shouldCompressSetting.get(),
91
101
  };
92
102
 
93
103
  #includeAnnotationsCheckbox = UI.UIUtils.CheckboxLabel.create(
@@ -102,6 +112,10 @@ export class ExportTraceOptions extends HTMLElement {
102
112
  /* title*/ i18nString(UIStrings.includeSourcemap), /* checked*/ this.#state.includeSourceMaps,
103
113
  /* subtitle*/ undefined,
104
114
  /* jslogContext*/ 'timeline.export-trace-options.source-maps-checkbox');
115
+ #shouldCompressCheckbox = UI.UIUtils.CheckboxLabel.create(
116
+ /* title*/ i18nString(UIStrings.shouldCompress), /* checked*/ this.#state.shouldCompress,
117
+ /* subtitle*/ undefined,
118
+ /* jslogContext*/ 'timeline.export-trace-options.should-compress-checkbox');
105
119
 
106
120
  set data(data: ExportTraceOptionsData) {
107
121
  this.#data = data;
@@ -113,18 +127,23 @@ export class ExportTraceOptions extends HTMLElement {
113
127
  this.#includeAnnotationsSetting.set(state.includeAnnotations);
114
128
  this.#includeScriptContentSetting.set(state.includeScriptContent);
115
129
  this.#includeSourceMapsSetting.set(state.includeSourceMaps);
130
+ this.#shouldCompressSetting.set(state.shouldCompress);
116
131
 
117
132
  this.#scheduleRender();
118
133
  }
119
134
 
120
- updateContentVisibility(annotationsExist: boolean): void {
135
+ get state(): Readonly<ExportTraceOptionsState> {
136
+ return this.#state;
137
+ }
138
+
139
+ updateContentVisibility(options: {annotationsExist: boolean}): void {
121
140
  const showIncludeScriptContentCheckbox =
122
141
  Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_ENHANCED_TRACES);
123
142
  const showIncludeSourceMapCheckbox =
124
143
  Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_COMPILED_SOURCES);
125
144
 
126
145
  const newState = Object.assign({}, this.#state, {
127
- displayAnnotationsCheckbox: annotationsExist,
146
+ displayAnnotationsCheckbox: options.annotationsExist,
128
147
  displayScriptContentCheckbox: showIncludeScriptContentCheckbox,
129
148
  displaySourceMapsCheckbox: showIncludeSourceMapCheckbox
130
149
  });
@@ -158,6 +177,10 @@ export class ExportTraceOptions extends HTMLElement {
158
177
  newState.includeSourceMaps = checked;
159
178
  break;
160
179
  }
180
+ case this.#shouldCompressCheckbox: {
181
+ newState.shouldCompress = checked;
182
+ break;
183
+ }
161
184
  }
162
185
 
163
186
  this.state = newState;
@@ -189,10 +212,6 @@ export class ExportTraceOptions extends HTMLElement {
189
212
  throw new Error('Export trace options dialog render was not scheduled');
190
213
  }
191
214
 
192
- const emptyDialog =
193
- !(this.#state.displayAnnotationsCheckbox || this.#state.displayScriptContentCheckbox ||
194
- this.#state.displaySourceMapsCheckbox);
195
-
196
215
  // clang-format off
197
216
  const output = html`
198
217
  <style>${exportTraceOptionsStyles}</style>
@@ -208,7 +227,7 @@ export class ExportTraceOptions extends HTMLElement {
208
227
  horizontalAlignment: Dialogs.Dialog.DialogHorizontalAlignment.AUTO,
209
228
  closeButton: false,
210
229
  dialogTitle: i18nString(UIStrings.exportTraceOptionsDialogTitle),
211
- state: emptyDialog ? Dialogs.Dialog.DialogState.DISABLED : this.#state.dialogState,
230
+ state: this.#state.dialogState,
212
231
  } as Dialogs.ButtonDialog.ButtonDialogData}>
213
232
  <div class='export-trace-options-content'>
214
233
  ${this.#state.displayAnnotationsCheckbox ? this.#renderCheckbox(this.#includeAnnotationsCheckbox,
@@ -218,6 +237,7 @@ export class ExportTraceOptions extends HTMLElement {
218
237
  i18nString(UIStrings.includeScriptContent), this.#state.includeScriptContent): ''}
219
238
  ${this.#state.displayScriptContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderCheckbox(
220
239
  this.#includeSourceMapsCheckbox, i18nString(UIStrings.includeSourcemap), this.#state.includeSourceMaps): ''}
240
+ ${this.#renderCheckbox(this.#shouldCompressCheckbox, i18nString(UIStrings.shouldCompress), this.#state.shouldCompress)}
221
241
  <div class='export-trace-options-row'><div class='export-trace-blank'></div><devtools-button
222
242
  class="setup-button"
223
243
  @click=${this.#onExportClick.bind(this)}
@@ -235,14 +255,7 @@ export class ExportTraceOptions extends HTMLElement {
235
255
  }
236
256
 
237
257
  async #onButtonDialogClick(): Promise<void> {
238
- // Handles button dialog click. Either expands dialog with options or
239
- // directly exports if no options available.
240
- if (!(this.#state.displayAnnotationsCheckbox || this.#state.displayScriptContentCheckbox ||
241
- this.#state.displaySourceMapsCheckbox)) {
242
- void this.#onExportCallback();
243
- } else {
244
- this.state = Object.assign({}, this.#state, {dialogState: Dialogs.Dialog.DialogState.EXPANDED});
245
- }
258
+ this.state = Object.assign({}, this.#state, {dialogState: Dialogs.Dialog.DialogState.EXPANDED});
246
259
  }
247
260
 
248
261
  async #onExportCallback(): Promise<void> {
@@ -250,7 +263,9 @@ export class ExportTraceOptions extends HTMLElement {
250
263
  await this.#data?.onExport({
251
264
  includeScriptContent: this.#state.includeScriptContent,
252
265
  includeSourceMaps: this.#state.includeSourceMaps,
253
- addModifications: this.#state.includeAnnotations
266
+ // Note: this also includes track configuration ...
267
+ addModifications: this.#state.includeAnnotations,
268
+ shouldCompress: this.#state.shouldCompress,
254
269
  });
255
270
 
256
271
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceExported);
@@ -175,20 +175,24 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
175
175
  }
176
176
 
177
177
  #dispatchInsightToggle(): void {
178
+ if (!this.data.insightSetKey || !this.model) {
179
+ // Shouldn't happen, but needed to satisfy TS.
180
+ return;
181
+ }
182
+
183
+ const focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
178
184
  if (this.#selected) {
179
185
  this.dispatchEvent(new SidebarInsight.InsightDeactivated());
180
186
 
181
187
  // Clear agent (but only if currently focused on an insight).
182
- const focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
183
- if (focus && focus.data.type === 'insight') {
184
- UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, null);
188
+ if (focus) {
189
+ UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus.withInsight(null));
185
190
  }
186
191
  return;
187
192
  }
188
193
 
189
- if (!this.data.insightSetKey || !this.model) {
190
- // Shouldn't happen, but needed to satisfy TS.
191
- return;
194
+ if (focus) {
195
+ UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus.withInsight(this.model));
192
196
  }
193
197
 
194
198
  this.sharedTableState.selectedRowEl?.classList.remove('selected');
@@ -359,7 +363,13 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
359
363
  return;
360
364
  }
361
365
 
362
- UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, this.#agentFocus);
366
+ let focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
367
+ if (focus) {
368
+ focus = focus.withInsight(this.model);
369
+ } else {
370
+ focus = this.#agentFocus;
371
+ }
372
+ UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus);
363
373
 
364
374
  // Trigger the AI Assistance panel to open.
365
375
  const action = UI.ActionRegistry.ActionRegistry.instance().getAction(actionId);
@@ -4,6 +4,7 @@ URL: https://github.com/dequelabs/axe-core/
4
4
  Version: N/A
5
5
  Date: 2017-07-24
6
6
  Revision: d02dba3223fefe525438330e40b5da5de81eeeb5
7
+ Update Mechanism: Manual
7
8
  License: MPL-2.0
8
9
  License File: LICENSE
9
10
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: CodeMirror
3
3
  URL: https://github.com/codemirror/CodeMirror/
4
4
  Version: 5.61.0
5
5
  Revision: eac70bb1a31a08201e5705c788cd72e6283958f0
6
+ Update Mechanism: Manual
6
7
  License: MIT
7
8
  License File: package/LICENSE
8
9
  Security Critical: no
@@ -2,6 +2,7 @@ Name: CodeMirror 6
2
2
  Short Name: CodeMirror.next
3
3
  URL: https://github.com/codemirror/CodeMirror.next/
4
4
  Version: 0.19.0
5
+ Update Mechanism: Manual
5
6
  License: MIT
6
7
  License File: LICENSE
7
8
  Security Critical: no
@@ -2,6 +2,7 @@ Name: CSP Evaluator Core Library, a tool that allows developers to check if a Co
2
2
  Short Name: csp_evaluator
3
3
  URL: https://www.npmjs.com/package/csp_evaluator
4
4
  Version: 1.1.1
5
+ Update Mechanism: Manual
5
6
  License: Apache-2.0
6
7
  License File: package/LICENSE
7
8
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: diff-match-patch
3
3
  URL: https://github.com/google/diff-match-patch/tree/master/javascript
4
4
  Version: 5.60.0
5
5
  Revision: 0ae308daa77aeddb089cd6b7b0a443fca026266e
6
+ Update Mechanism: Manual
6
7
  License: Apache-2.0
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: i18n
3
3
  URL: https://github.com/GoogleChrome/lighthouse
4
4
  Version: 15dad3944c2754a9e147fef9ef99934169e2ca08
5
5
  Revision: 15dad3944c2754a9e147fef9ef99934169e2ca08
6
+ Update Mechanism: Manual
6
7
  License: Apache-2.0
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: intl-messageformat
3
3
  URL: https://github.com/formatjs/formatjs
4
4
  Version: 9.8.0
5
5
  Revision: 51a665ca0a7c6129c0c93b6b7837603a8e31caa4
6
+ Update Mechanism: Manual
6
7
  License: BSD-3-Clause
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: json5
3
3
  URL: https://github.com/json5/json5
4
4
  Version: 2.2.3
5
5
  Revision: de344f0
6
+ Update Mechanism: Manual
6
7
  License: MIT
7
8
  License File: LICENSE
8
9
  Shipped: yes
@@ -3,6 +3,7 @@ Short Name: legacy-javascript
3
3
  URL: https://github.com/GoogleChrome/lighthouse/tree/main/core/lib/legacy-javascript
4
4
  Version: 0.0.1
5
5
  Revision: 410adb1220ca0d36c317f64cdbc652b798561413
6
+ Update Mechanism: Manual
6
7
  License: Apache-2.0
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -2,6 +2,7 @@ Name: Lighthouse
2
2
  Short Name: lighthouse
3
3
  Version: 12.8.2
4
4
  Revision: 8dc40bb0e13a71b1c58aaf891810ac9360b86ac9
5
+ Update Mechanism: Manual
5
6
  URL: https://github.com/GoogleChrome/lighthouse
6
7
  License: Apache-2.0
7
8
  License File: LICENSE
@@ -3,6 +3,7 @@ Short Name: lit
3
3
  URL: https://github.com/lit/lit
4
4
  Version: 2.4.1
5
5
  Revision: 02c28397c612845ffab9e22af08eecc869f8ce47
6
+ Update Mechanism: Manual
6
7
  License: BSD-3-Clause
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -3,6 +3,7 @@ Short Name: marked
3
3
  URL: https://github.com/markedjs/marked
4
4
  Version: 13.0.1
5
5
  Revision: aaee616d54e82295d61a61aa26192416c2547ac4
6
+ Update Mechanism: Manual
6
7
  License: BSD-3-Clause, MIT
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -5,6 +5,7 @@ Version: 3.1.3
5
5
  License: Apache-2.0
6
6
  License File: package/LICENSE
7
7
  Revision: 8be2fd240bbe6da6fbf031164b24f5057350f175
8
+ Update Mechanism: Manual
8
9
  Security Critical: no
9
10
  Shipped: yes
10
11
 
@@ -3,6 +3,7 @@ Short Name: third-party-web
3
3
  URL: https://github.com/patrickhulce/third-party-web
4
4
  Version: 0.26.2
5
5
  Revision: d60863a2ea913ed26ae0446296a0cb1cc6c71291
6
+ Update Mechanism: Manual
6
7
  License: MIT
7
8
  License File: LICENSE
8
9
  Security Critical: no
@@ -5,6 +5,7 @@ Version: 0.5.2
5
5
  License: MIT
6
6
  License File: package/LICENSE.md
7
7
  Revision: 79f0e53d9ade00eb00eda53016edb637a809ec1f
8
+ Update Mechanism: Manual
8
9
  Security Critical: no
9
10
  Shipped: yes
10
11
 
@@ -3,6 +3,7 @@ Short Name: wasmparser
3
3
  URL: https://github.com/wasdk/wasmparser
4
4
  Version: 5.4.0
5
5
  Revision: e0a3281fdd678e6e3d5624b6d939bdf7c3d215ad
6
+ Update Mechanism: Manual
6
7
  License: Apache-2.0
7
8
  License File: package/LICENSE
8
9
  Security Critical: no
@@ -5,6 +5,7 @@ Version: 4.2.4
5
5
  License: Apache-2.0
6
6
  License File: package/LICENSE
7
7
  Revision: 3d2b3dc8576cc003618952fa39902fab764a53e2
8
+ Update Mechanism: Manual
8
9
  Security Critical: no
9
10
  Shipped: yes
10
11
 
@@ -162,12 +162,14 @@ export interface TooltipProperties {
162
162
  * @property variant - reflects the `"variant"` attribute.
163
163
  * @property padding - reflects the `"padding"` attribute.
164
164
  * @property useClick - reflects the `"click"` attribute.
165
+ * @property verticalDistanceIncrease - reflexts the `"vertical-distance-increase"` attribute.
165
166
  * @attribute id - Id of the tooltip. Used for searching an anchor element with aria-describedby.
166
167
  * @attribute hover-delay - Hover length in ms before the tooltip is shown and hidden.
167
168
  * @attribute variant - Variant of the tooltip, `"simple"` for strings only, inverted background,
168
169
  * `"rich"` for interactive content, background according to theme's surface.
169
170
  * @attribute padding - Which padding to use, defaults to `"small"`. Use `"large"` for richer content.
170
171
  * @attribute use-click - If present, the tooltip will be shown on click instead of on hover.
172
+ * @attribute vertical-distance-increase - The tooltip is moved vertically this many pixels further away from its anchor.
171
173
  * @attribute use-hotkey - If present, the tooltip will be shown on hover but not when receiving focus.
172
174
  * Requires a hotkey to open when fosed (Alt-down). When `"use-click"` is present
173
175
  * as well, use-click takes precedence.
@@ -244,6 +246,14 @@ export class Tooltip extends HTMLElement {
244
246
  this.#updateJslog();
245
247
  }
246
248
 
249
+ get verticalDistanceIncrease(): number {
250
+ return this.hasAttribute('vertical-distance-increase') ? Number(this.getAttribute('vertical-distance-increase')) :
251
+ 0;
252
+ }
253
+ set verticalDistanceIncrease(increase: number) {
254
+ this.setAttribute('vertical-distance-increase', increase.toString());
255
+ }
256
+
247
257
  get anchor(): HTMLElement|null {
248
258
  return this.#anchor;
249
259
  }
@@ -387,7 +397,13 @@ export class Tooltip extends HTMLElement {
387
397
  proposedRectForRichTooltip({inspectorViewRect, anchorRect, currentPopoverRect}) :
388
398
  proposedRectForSimpleTooltip({inspectorViewRect, anchorRect, currentPopoverRect});
389
399
  this.style.left = `${proposedPopoverRect.left}px`;
390
- this.style.top = `${proposedPopoverRect.top}px`;
400
+
401
+ // If the tooltip is above its anchor, we need to decrease the tooltip's
402
+ // y-coordinate to increase the distance between tooltip and anchor.
403
+ // If the tooltip is below its anchor, we add to the tooltip's y-coord.
404
+ const actualVerticalOffset =
405
+ anchorRect.top < proposedPopoverRect.top ? this.verticalDistanceIncrease : -this.verticalDistanceIncrease;
406
+ this.style.top = `${proposedPopoverRect.top + actualVerticalOffset}px`;
391
407
  this.style.visibility = 'visible';
392
408
  requestAnimationFrame(this.#positionPopover);
393
409
  };
@@ -743,7 +743,7 @@ export class ContextMenu extends SubMenu {
743
743
 
744
744
  this.pendingTargets = [];
745
745
 
746
- this.innerShow();
746
+ this.#show();
747
747
  }
748
748
 
749
749
  /**
@@ -780,7 +780,7 @@ export class ContextMenu extends SubMenu {
780
780
  }
781
781
  }
782
782
 
783
- private innerShow(): void {
783
+ #show(): void {
784
784
  if (!this.eventTarget) {
785
785
  return;
786
786
  }
@@ -28,6 +28,7 @@ export class GlassPane {
28
28
  constructor(jslog?: string) {
29
29
  this.#widget = new Widget({jslog, useShadowDom: true});
30
30
  this.#widget.markAsRoot();
31
+ this.#widget.onDetach = this.#onDetach.bind(this);
31
32
  this.element = this.#widget.element;
32
33
  this.contentElement = this.#widget.contentElement;
33
34
 
@@ -124,15 +125,18 @@ export class GlassPane {
124
125
  if (!this.isShowing()) {
125
126
  return;
126
127
  }
127
- panes.delete(this);
128
- this.element.ownerDocument.body.removeEventListener('mousedown', this.onMouseDownBound, true);
129
- this.element.ownerDocument.body.removeEventListener('pointerdown', this.onMouseDownBound, true);
130
128
  this.#widget.detach();
131
129
  if (this.#onHideCallback) {
132
130
  this.#onHideCallback();
133
131
  }
134
132
  }
135
133
 
134
+ #onDetach(): void {
135
+ panes.delete(this);
136
+ this.element.ownerDocument.body.removeEventListener('mousedown', this.onMouseDownBound, true);
137
+ this.element.ownerDocument.body.removeEventListener('pointerdown', this.onMouseDownBound, true);
138
+ }
139
+
136
140
  private onMouseDown(event: Event): void {
137
141
  if (!this.onClickOutsideCallback) {
138
142
  return;
@@ -33,44 +33,57 @@ export class ProgressIndicator extends HTMLElement implements Common.Progress.Pr
33
33
  // using the 'no-stop-button' attribute on the element.
34
34
  if (!this.hasAttribute('no-stop-button')) {
35
35
  this.#stopButton = this.#contentElement.createChild('button', 'progress-indicator-shadow-stop-button');
36
- this.#stopButton.addEventListener('click', this.cancel.bind(this));
36
+ this.#stopButton.addEventListener('click', () => {
37
+ this.canceled = true;
38
+ });
37
39
  }
38
40
  }
39
41
 
40
- done(): void {
41
- if (this.#isDone) {
42
+ set done(done: boolean) {
43
+ if (this.#isDone === done) {
42
44
  return;
43
45
  }
44
- this.#isDone = true;
45
- this.remove();
46
+ this.#isDone = done;
47
+ if (done) {
48
+ this.remove();
49
+ }
50
+ }
51
+
52
+ get done(): boolean {
53
+ return this.#isDone;
46
54
  }
47
55
 
48
- cancel(): void {
49
- this.#isCanceled = true;
56
+ set canceled(value: boolean) {
57
+ this.#isCanceled = value;
50
58
  }
51
59
 
52
- isCanceled(): boolean {
60
+ get canceled(): boolean {
53
61
  return this.#isCanceled;
54
62
  }
55
63
 
56
- setTitle(title: string): void {
64
+ override set title(title: string) {
57
65
  this.#labelElement.textContent = title;
58
66
  }
59
67
 
60
- setTotalWork(totalWork: number): void {
68
+ override get title(): string {
69
+ return this.#labelElement.textContent ?? '';
70
+ }
71
+
72
+ set totalWork(totalWork: number) {
61
73
  this.#progressElement.max = totalWork;
62
74
  }
63
75
 
64
- setWorked(worked: number, title?: string): void {
76
+ get totalWork(): number {
77
+ return this.#progressElement.max;
78
+ }
79
+
80
+ set worked(worked: number) {
65
81
  this.#worked = worked;
66
82
  this.#progressElement.value = worked;
67
- if (title) {
68
- this.setTitle(title);
69
- }
70
83
  }
71
84
 
72
- incrementWorked(worked?: number): void {
73
- this.setWorked(this.#worked + (worked || 1));
85
+ get worked(): number {
86
+ return this.#worked;
74
87
  }
75
88
  }
76
89
 
@@ -242,7 +242,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
242
242
 
243
243
  const focused = this.hasFocus();
244
244
  for (let i = 0; i < ids.length; ++i) {
245
- this.innerCloseTab(ids[i], userGesture);
245
+ this.#closeTab(ids[i], userGesture);
246
246
  }
247
247
  this.requestUpdate();
248
248
  if (this.tabsHistory.length) {
@@ -253,7 +253,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
253
253
  }
254
254
  }
255
255
 
256
- private innerCloseTab(id: string, userGesture?: boolean): true|undefined {
256
+ #closeTab(id: string, userGesture?: boolean): true|undefined {
257
257
  const tab = this.tabsById.get(id);
258
258
  if (!tab) {
259
259
  return;
@@ -1618,8 +1618,8 @@ function getTreeNodes(nodeList: NodeList|Node[]): HTMLLIElement[] {
1618
1618
 
1619
1619
  /**
1620
1620
  * A tree element that can be used as progressive enhancement over a <ul> element. A `template` IDL attribute allows
1621
- * additionally to insert the <ul> into a <template>, avoiding rendering anything into light DOM. The <ul> itself will
1622
- * be cloned into shadow DOM and rendered there.
1621
+ * additionally to insert the <ul> into a <template>, avoiding rendering anything into light DOM, which is recommended.
1622
+ * The <ul> itself will be cloned into shadow DOM and rendered there.
1623
1623
  *
1624
1624
  * ## Usage ##
1625
1625
  *
@@ -1663,12 +1663,17 @@ function getTreeNodes(nodeList: NodeList|Node[]): HTMLLIElement[] {
1663
1663
  *
1664
1664
  * ## Event Handling ##
1665
1665
  *
1666
+ * This section is only relevant if NOT using the `template`.
1667
+ *
1666
1668
  * Since config elements are cloned into the shadow DOM, it's not possible to directly attach event listeners to the
1667
- * children of config elements. Instead, the `HTMLElementWithLightDOMTemplate.on` directive should be used as a wrapper:
1669
+ * children of config elements. Instead, the `UI.UIUtils.InterceptBindingDirective` directive needs to be used as a
1670
+ * wrapper:
1668
1671
  * ```
1669
- * <li role="treeitem">
1672
+ * const on = Lit.Directive.directive(UI.UIUtils.InterceptBindingDirective);
1673
+ *
1674
+ * html`<li role="treeitem">
1670
1675
  * <button @click=${on(clickHandler)}>click me</button>
1671
- * </li>
1676
+ * </li>`
1672
1677
  * ```
1673
1678
  *
1674
1679
  * @property template Define the tree contents