chrome-devtools-frontend 1.0.1661063 → 1.0.1662289

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 (75) hide show
  1. package/.agents/skills/evaluate-ai-css-completion/SKILL.md +19 -9
  2. package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +44 -16
  3. package/.agents/skills/migrate-chromium-test/SKILL.md +7 -2
  4. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
  5. package/docs/ui_engineering.md +75 -42
  6. package/front_end/core/common/SettingRegistration.ts +0 -5
  7. package/front_end/core/platform/ArrayUtilities.ts +10 -0
  8. package/front_end/foundation/README.md +86 -0
  9. package/front_end/generated/InspectorBackendCommands.ts +4 -5
  10. package/front_end/generated/protocol.ts +20 -38
  11. package/front_end/models/bindings/CompilerScriptMapping.ts +5 -4
  12. package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
  13. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -3
  14. package/front_end/models/bindings/DefaultScriptMapping.ts +3 -3
  15. package/front_end/models/bindings/NetworkProject.ts +10 -1
  16. package/front_end/models/bindings/ResourceMapping.ts +4 -3
  17. package/front_end/models/bindings/ResourceScriptMapping.ts +2 -1
  18. package/front_end/models/bindings/SASSSourceMapping.ts +4 -3
  19. package/front_end/models/bindings/StylesSourceMapping.ts +3 -3
  20. package/front_end/models/extensions/RecorderExtensionEndpoint.ts +7 -5
  21. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +14 -5
  22. package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +8 -9
  23. package/front_end/models/issues_manager/RelatedIssue.ts +10 -8
  24. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  25. package/front_end/models/logs/RequestResolver.ts +2 -2
  26. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +0 -5
  27. package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +1 -1
  28. package/front_end/models/trace/handlers/FramesHandler.ts +4 -7
  29. package/front_end/models/trace/handlers/ModelHandlers.ts +0 -1
  30. package/front_end/models/trace/handlers/RendererHandler.ts +2 -15
  31. package/front_end/models/trace/handlers/Threads.ts +4 -11
  32. package/front_end/models/trace/insights/DOMSize.ts +1 -1
  33. package/front_end/models/workspace/WorkspaceImpl.ts +1 -10
  34. package/front_end/panels/application/ApplicationPanelSidebar.ts +0 -44
  35. package/front_end/panels/application/CookieItemsView.ts +1 -1
  36. package/front_end/panels/application/FrameDetailsView.ts +1 -1
  37. package/front_end/panels/application/ServiceWorkersView.ts +494 -411
  38. package/front_end/panels/application/application.ts +0 -6
  39. package/front_end/panels/application/components/components.ts +0 -2
  40. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +1 -1
  41. package/front_end/panels/application/serviceWorkersView.css +40 -4
  42. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +147 -123
  43. package/front_end/panels/common/ExtensionServer.ts +3 -3
  44. package/front_end/panels/console/ConsoleView.ts +1 -1
  45. package/front_end/panels/emulation/DeviceModeView.ts +139 -70
  46. package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
  47. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +53 -12
  48. package/front_end/panels/network/RequestPayloadView.ts +77 -39
  49. package/front_end/panels/network/components/ResponseHeaderSection.ts +5 -3
  50. package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
  51. package/front_end/panels/recorder/RecorderController.ts +213 -49
  52. package/front_end/panels/recorder/RecorderPanel.ts +1 -1
  53. package/front_end/panels/sources/SourcesNavigator.ts +3 -2
  54. package/front_end/panels/sources/SourcesView.ts +0 -17
  55. package/front_end/panels/sources/UISourceCodeFrame.ts +42 -0
  56. package/front_end/panels/sources/sources.ts +0 -2
  57. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +0 -17
  58. package/front_end/panels/timeline/ThreadAppender.ts +0 -106
  59. package/front_end/third_party/chromium/README.chromium +1 -1
  60. package/front_end/ui/components/report_view/ReportView.ts +11 -5
  61. package/front_end/ui/components/report_view/report.css +4 -1
  62. package/front_end/ui/legacy/TextPrompt.ts +49 -1
  63. package/front_end/ui/legacy/UIUtils.ts +11 -1
  64. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -2
  65. package/front_end/ui/legacy/textPrompt.css +10 -0
  66. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  67. package/package.json +1 -1
  68. package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
  69. package/front_end/panels/application/InterestGroupStorageModel.ts +0 -81
  70. package/front_end/panels/application/InterestGroupStorageView.ts +0 -151
  71. package/front_end/panels/application/InterestGroupTreeElement.ts +0 -65
  72. package/front_end/panels/application/components/InterestGroupAccessGrid.ts +0 -135
  73. package/front_end/panels/application/components/interestGroupAccessGrid.css +0 -27
  74. package/front_end/panels/application/interestGroupStorageView.css +0 -9
  75. package/front_end/panels/sources/InplaceFormatterEditorAction.ts +0 -149
@@ -87,48 +87,7 @@ const UIStrings = {
87
87
  * @example {2} PH1
88
88
  */
89
89
  threadPoolThreadS: 'Thread pool worker {PH1}',
90
- /**
91
- * @description Title of a bidder auction worklet with known URL in the timeline flame chart of the Performance panel
92
- * @example {https://google.com} PH1
93
- */
94
- bidderWorkletS: 'Bidder Worklet — {PH1}',
95
- /**
96
- * @description Title of a bidder auction worklet in the timeline flame chart of the Performance panel with an unknown URL
97
- */
98
- bidderWorklet: 'Bidder Worklet',
99
-
100
- /**
101
- * @description Title of a seller auction worklet in the timeline flame chart of the Performance panel with an unknown URL
102
- */
103
- sellerWorklet: 'Seller Worklet',
104
-
105
- /**
106
- * @description Title of an auction worklet in the timeline flame chart of the Performance panel with an unknown URL
107
- */
108
- unknownWorklet: 'Auction Worklet',
109
-
110
- /**
111
- * @description Title of control thread of a service process for an auction worklet in the timeline flame chart of the Performance panel with an unknown URL
112
- */
113
- workletService: 'Auction Worklet service',
114
-
115
- /**
116
- * @description Title of a seller auction worklet with known URL in the timeline flame chart of the Performance panel
117
- * @example {https://google.com} PH1
118
- */
119
- sellerWorkletS: 'Seller Worklet — {PH1}',
120
90
 
121
- /**
122
- * @description Title of an auction worklet with known URL in the timeline flame chart of the Performance panel
123
- * @example {https://google.com} PH1
124
- */
125
- unknownWorkletS: 'Auction Worklet — {PH1}',
126
-
127
- /**
128
- * @description Title of control thread of a service process for an auction worklet with known URL in the timeline flame chart of the Performance panel
129
- * @example {https://google.com} PH1
130
- */
131
- workletServiceS: 'Auction Worklet service — {PH1}',
132
91
  } as const;
133
92
 
134
93
  const str_ = i18n.i18n.registerUIStrings('panels/timeline/ThreadAppender.ts', UIStrings);
@@ -181,12 +140,6 @@ export class ThreadAppender implements TrackAppender {
181
140
  this.#threadDefaultName = threadName || i18nString(UIStrings.threadS, {PH1: threadId});
182
141
  this.isOnMainFrame = Boolean(this.#parsedTrace.data.Renderer?.processes.get(processId)?.isOnMainFrame);
183
142
  this.threadType = type;
184
- // AuctionWorklets are threads, so we re-use this appender rather than
185
- // duplicate it, but we change the name because we want to render these
186
- // lower down than other threads.
187
- if (this.#parsedTrace.data.AuctionWorklets.worklets.has(processId)) {
188
- this.appenderName = 'Thread_AuctionWorklet';
189
- }
190
143
  this.#url = this.#parsedTrace.data.Renderer?.processes.get(this.#processId)?.url || '';
191
144
  }
192
145
 
@@ -279,8 +232,6 @@ export class ThreadAppender implements TrackAppender {
279
232
  return VisualLoggingTrackName.THREAD_WORKER;
280
233
  case Trace.Handlers.Threads.ThreadType.RASTERIZER:
281
234
  return VisualLoggingTrackName.THREAD_RASTERIZER;
282
- case Trace.Handlers.Threads.ThreadType.AUCTION_WORKLET:
283
- return VisualLoggingTrackName.THREAD_AUCTION_WORKLET;
284
235
  case Trace.Handlers.Threads.ThreadType.OTHER:
285
236
  return VisualLoggingTrackName.THREAD_OTHER;
286
237
  case Trace.Handlers.Threads.ThreadType.CPU_PROFILE:
@@ -350,9 +301,6 @@ export class ThreadAppender implements TrackAppender {
350
301
  break;
351
302
  case Trace.Handlers.Threads.ThreadType.OTHER:
352
303
  break;
353
- case Trace.Handlers.Threads.ThreadType.AUCTION_WORKLET:
354
- threadTypeLabel = this.#buildNameForAuctionWorklet();
355
- break;
356
304
  default:
357
305
  return Platform.assertNever(this.threadType, `Unknown thread type: ${this.threadType}`);
358
306
  }
@@ -371,60 +319,6 @@ export class ThreadAppender implements TrackAppender {
371
319
  return this.#entries;
372
320
  }
373
321
 
374
- #buildNameForAuctionWorklet(): string {
375
- const workletMetadataEvent = this.#parsedTrace.data.AuctionWorklets.worklets.get(this.#processId);
376
- // We should always have this event - if we do not, we were instantiated with invalid data.
377
- if (!workletMetadataEvent) {
378
- return i18nString(UIStrings.unknownWorklet);
379
- }
380
-
381
- // Host could be empty - in which case we do not want to add it.
382
- const host = workletMetadataEvent.host ? `https://${workletMetadataEvent.host}` : '';
383
- const shouldAddHost = host.length > 0;
384
-
385
- // For each Auction Worklet in a page there are two threads we care about on the same process.
386
- // 1. The "Worklet Service" which is a generic helper service. This thread
387
- // is always named "auction_worklet.CrUtilityMain".
388
- //
389
- // 2. The "Seller/Bidder" service. This thread is always named
390
- // "AuctionV8HelperThread". The AuctionWorkets handler does the job of
391
- // figuring this out for us - the metadata event it provides for each
392
- // worklet process will have a `type` already set.
393
- //
394
- // Therefore, for this given thread, which we know is part of
395
- // an AuctionWorklet process, we need to figure out if this thread is the
396
- // generic service, or a seller/bidder worklet.
397
- //
398
- // Note that the worklet could also have the "unknown" type - this is not
399
- // expected but implemented to prevent trace event changes causing DevTools
400
- // to break with unknown worklet types.
401
- const isUtilityThread = workletMetadataEvent.args.data.utilityThread.tid === this.#threadId;
402
- const isBidderOrSeller = workletMetadataEvent.args.data.v8HelperThread.tid === this.#threadId;
403
-
404
- if (isUtilityThread) {
405
- return shouldAddHost ? i18nString(UIStrings.workletServiceS, {PH1: host}) : i18nString(UIStrings.workletService);
406
- }
407
-
408
- if (isBidderOrSeller) {
409
- switch (workletMetadataEvent.type) {
410
- case Trace.Types.Events.AuctionWorkletType.SELLER:
411
- return shouldAddHost ? i18nString(UIStrings.sellerWorkletS, {PH1: host}) :
412
- i18nString(UIStrings.sellerWorklet);
413
- case Trace.Types.Events.AuctionWorkletType.BIDDER:
414
- return shouldAddHost ? i18nString(UIStrings.bidderWorkletS, {PH1: host}) :
415
- i18nString(UIStrings.bidderWorklet);
416
- case Trace.Types.Events.AuctionWorkletType.UNKNOWN:
417
- return shouldAddHost ? i18nString(UIStrings.unknownWorkletS, {PH1: host}) :
418
- i18nString(UIStrings.unknownWorklet);
419
- default:
420
- Platform.assertNever(
421
- workletMetadataEvent.type, `Unexpected Auction Worklet Type ${workletMetadataEvent.type}`);
422
- }
423
- }
424
- // We should never reach here, but just in case!
425
- return shouldAddHost ? i18nString(UIStrings.unknownWorkletS, {PH1: host}) : i18nString(UIStrings.unknownWorklet);
426
- }
427
-
428
322
  #buildNameForWorker(): string {
429
323
  const url = this.#parsedTrace.data.Renderer?.processes.get(this.#processId)?.url || '';
430
324
  const workerId = this.#parsedTrace.data.Workers.workerIdByThread.get(this.#threadId);
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
2
  URL: Internal
3
3
  Version: N/A
4
- Revision: a37baa84e85d62d8bdc7eef3ff6237217c0c8a9e
4
+ Revision: 27fac8d1924b08d4a6bb70e21df6482a1d430b2b
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -55,13 +55,19 @@ export class Report extends HTMLElement {
55
55
  #render(): void {
56
56
  // Disabled until https://crbug.com/1079231 is fixed.
57
57
  // clang-format off
58
+ const hasToolbar = this.querySelector('[slot="toolbar"]') !== null;
58
59
  render(html`
59
60
  <style>${reportStyles}</style>
60
- ${this.#reportTitle ? html`<h1 class="report-title">
61
- ${this.#reportTitle}
62
- ${this.#reportUrl ? Components.Linkifier.Linkifier.linkifyURL(this.#reportUrl, {
63
- tabStop: true, jslogContext: 'source-location', className: 'report-url'}) : nothing}
64
- </h1>` : nothing}
61
+ ${(this.#reportTitle || hasToolbar) ? html`
62
+ <div class="report-header-wrapper">
63
+ ${this.#reportTitle ? html`<h1 class="report-title">
64
+ ${this.#reportTitle}
65
+ ${this.#reportUrl ? Components.Linkifier.Linkifier.linkifyURL(this.#reportUrl, {
66
+ tabStop: true, jslogContext: 'source-location', className: 'report-url'}) : nothing}
67
+ </h1>` : nothing}
68
+ <slot name="toolbar"></slot>
69
+ </div>
70
+ ` : nothing}
65
71
  <div class="content">
66
72
  <slot></slot>
67
73
  </div>
@@ -16,13 +16,16 @@
16
16
  margin: var(--sys-size-5) 0;
17
17
  }
18
18
 
19
+ .report-header-wrapper {
20
+ border-bottom: 1px solid var(--sys-color-divider);
21
+ }
22
+
19
23
  .report-title {
20
24
  padding: var(--sys-size-7) var(--sys-size-9);
21
25
  font: var(--sys-typescale-headline4);
22
26
  white-space: nowrap;
23
27
  overflow: hidden;
24
28
  text-overflow: ellipsis;
25
- border-bottom: 1px solid var(--sys-color-divider);
26
29
  color: var(--sys-color-on-surface);
27
30
  background-color: var(--sys-color-cdt-base-container);
28
31
  margin: 0;
@@ -68,7 +68,7 @@ import {cloneCustomElement, ElementFocusRestorer} from './UIUtils.js';
68
68
  * @attribute value Sets the initial text value that's edited when editing starts. If not provided, the slot's inner text is used.
69
69
  */
70
70
  export class TextPromptElement extends HTMLElement {
71
- static readonly observedAttributes = ['editing', 'completions', 'placeholder', 'cancel-on-blur'];
71
+ static readonly observedAttributes = ['editing', 'completions', 'placeholder', 'cancel-on-blur', 'render-as-block'];
72
72
  static formAssociated = true;
73
73
  readonly #shadow = this.attachShadow({mode: 'open'});
74
74
  readonly #internals = this.attachInternals();
@@ -79,6 +79,7 @@ export class TextPromptElement extends HTMLElement {
79
79
  #completionObserver = new MutationObserver(this.#onMutate.bind(this));
80
80
  #validator?: (value: string) => null | Platform.UIString.LocalizedString;
81
81
  #cancelOnBlur = false;
82
+ #isEditing = false;
82
83
 
83
84
  constructor() {
84
85
  super();
@@ -101,6 +102,18 @@ export class TextPromptElement extends HTMLElement {
101
102
  return this.#cancelOnBlur;
102
103
  }
103
104
 
105
+ set renderAsBlock(renderAsBlock: boolean) {
106
+ if (renderAsBlock) {
107
+ this.setAttribute('render-as-block', '');
108
+ } else {
109
+ this.removeAttribute('render-as-block');
110
+ }
111
+ }
112
+
113
+ get renderAsBlock(): boolean {
114
+ return this.hasAttribute('render-as-block');
115
+ }
116
+
104
117
  #onMutate(changes: MutationRecord[]): void {
105
118
  const listId = this.getAttribute('completions');
106
119
  if (!listId) {
@@ -159,6 +172,17 @@ export class TextPromptElement extends HTMLElement {
159
172
  this.#completionObserver.disconnect();
160
173
  }
161
174
  break;
175
+ case 'render-as-block':
176
+ if (this.#isEditing) {
177
+ if (isTruthy(newValue)) {
178
+ this.#textPrompt.renderAsBlock();
179
+ this.#entrypoint.style.display = 'block';
180
+ } else {
181
+ this.#textPrompt.renderAsInlineBlock();
182
+ this.#entrypoint.style.display = 'inline';
183
+ }
184
+ }
185
+ break;
162
186
  }
163
187
  }
164
188
 
@@ -188,6 +212,7 @@ export class TextPromptElement extends HTMLElement {
188
212
  }
189
213
 
190
214
  #startEditing(): void {
215
+ this.#isEditing = true;
191
216
  const truncatedTextPlaceholder = this.getAttribute('placeholder');
192
217
  const placeholder = this.#entrypoint.createChild('span');
193
218
  const initialText = this.getAttribute('value') ?? this.#slot.deepInnerText();
@@ -198,6 +223,13 @@ export class TextPromptElement extends HTMLElement {
198
223
  }
199
224
  this.#slot.remove();
200
225
 
226
+ if (this.renderAsBlock) {
227
+ this.#textPrompt.renderAsBlock();
228
+ this.#entrypoint.style.display = 'block';
229
+ } else {
230
+ this.#textPrompt.renderAsInlineBlock();
231
+ this.#entrypoint.style.display = 'inline';
232
+ }
201
233
  const proxy =
202
234
  this.#textPrompt.attachAndStartEditing(placeholder, e => this.#done(e, /* commit=*/ !this.#cancelOnBlur));
203
235
  proxy.addEventListener('keydown', this.#editingValueKeyDown.bind(this));
@@ -206,6 +238,7 @@ export class TextPromptElement extends HTMLElement {
206
238
  }
207
239
 
208
240
  #stopEditing(): void {
241
+ this.#isEditing = false;
209
242
  this.#entrypoint.removeChildren();
210
243
  this.#entrypoint.appendChild(this.#slot);
211
244
  this.#textPrompt.detach();
@@ -224,6 +257,9 @@ export class TextPromptElement extends HTMLElement {
224
257
  }
225
258
 
226
259
  #done(e: Event, commit: boolean): void {
260
+ if (!this.#isEditing) {
261
+ return;
262
+ }
227
263
  const target = e.target as HTMLElement;
228
264
  const text = target.textContent || '';
229
265
  if (commit) {
@@ -238,9 +274,11 @@ export class TextPromptElement extends HTMLElement {
238
274
  return;
239
275
  }
240
276
 
277
+ this.#isEditing = false;
241
278
  this.dispatchEvent(new TextPromptElement.CommitEvent(text));
242
279
  } else {
243
280
  this.#internals.setValidity({});
281
+ this.#isEditing = false;
244
282
  this.dispatchEvent(new TextPromptElement.CancelEvent());
245
283
  }
246
284
  e.consume();
@@ -365,6 +403,16 @@ export class TextPrompt extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
365
403
 
366
404
  renderAsBlock(): void {
367
405
  this.proxyElementDisplay = 'block';
406
+ if (this.proxyElement) {
407
+ (this.proxyElement as HTMLElement).style.display = 'block';
408
+ }
409
+ }
410
+
411
+ renderAsInlineBlock(): void {
412
+ this.proxyElementDisplay = 'inline-block';
413
+ if (this.proxyElement) {
414
+ (this.proxyElement as HTMLElement).style.display = 'inline-block';
415
+ }
368
416
  }
369
417
 
370
418
  /**
@@ -1190,7 +1190,7 @@ export function setTitle(element: HTMLElement, title: string): void {
1190
1190
  }
1191
1191
 
1192
1192
  export class CheckboxLabel extends HTMLElement {
1193
- static readonly observedAttributes = ['checked', 'disabled', 'indeterminate', 'name', 'title', 'aria-label'];
1193
+ static readonly observedAttributes = ['checked', 'disabled', 'indeterminate', 'name', 'title', 'aria-label', 'small'];
1194
1194
 
1195
1195
  readonly #shadowRoot!: DocumentFragment;
1196
1196
  #checkboxElement!: HTMLInputElement;
@@ -1255,6 +1255,8 @@ export class CheckboxLabel extends HTMLElement {
1255
1255
  this.#textElement.title = newValue ?? '';
1256
1256
  } else if (name === 'aria-label') {
1257
1257
  this.#checkboxElement.ariaLabel = newValue;
1258
+ } else if (name === 'small') {
1259
+ this.#checkboxElement.classList.toggle('small', newValue !== null);
1258
1260
  }
1259
1261
  }
1260
1262
 
@@ -1282,6 +1284,14 @@ export class CheckboxLabel extends HTMLElement {
1282
1284
  this.toggleAttribute('checked', checked);
1283
1285
  }
1284
1286
 
1287
+ get small(): boolean {
1288
+ return this.hasAttribute('small');
1289
+ }
1290
+
1291
+ set small(small: boolean) {
1292
+ this.toggleAttribute('small', small);
1293
+ }
1294
+
1285
1295
  set disabled(disabled: boolean) {
1286
1296
  this.toggleAttribute('disabled', disabled);
1287
1297
  }
@@ -688,10 +688,10 @@ export class CookiesTable extends UI.Widget.VBox {
688
688
  ]);
689
689
  void Common.Revealer.reveal(requestFilter);
690
690
  }, {jslogContext: 'show-requests-with-this-cookie'});
691
- if (IssuesManager.RelatedIssue.hasIssues(cookie)) {
691
+ if (IssuesManager.RelatedIssue.hasIssues(cookie, IssuesManager.IssuesManager.IssuesManager.instance())) {
692
692
  contextMenu.revealSection().appendItem(i18nString(UIStrings.showIssueAssociatedWithThis), () => {
693
693
  // TODO(chromium:1077719): Just filter for the cookie instead of revealing one of the associated issues.
694
- void IssuesManager.RelatedIssue.reveal(cookie);
694
+ void IssuesManager.RelatedIssue.reveal(cookie, IssuesManager.IssuesManager.IssuesManager.instance());
695
695
  }, {jslogContext: 'show-issue-associated-with-this'});
696
696
  }
697
697
  }
@@ -24,6 +24,16 @@
24
24
  min-width: var(--devtools-text-prompt-min-width, auto);
25
25
  }
26
26
 
27
+ :host([render-as-block]) .text-prompt-root,
28
+ :host([render-as-block]) .text-prompt {
29
+ flex: auto;
30
+ width: 100%;
31
+ }
32
+
33
+ :host([render-as-block]) .text-prompt:focus {
34
+ outline: none;
35
+ }
36
+
27
37
  .text-prompt::-webkit-scrollbar {
28
38
  display: none;
29
39
  }
@@ -1353,6 +1353,7 @@ export const knownContextValues = new Set([
1353
1353
  'device-bound-sessions-request',
1354
1354
  'device-bound-sessions-root',
1355
1355
  'device-fold',
1356
+ 'device-frame-disable',
1356
1357
  'device-frame-enable',
1357
1358
  'device-mode',
1358
1359
  'device-mode-preset-1024px',
package/package.json CHANGED
@@ -92,5 +92,5 @@
92
92
  "webidl2": "24.5.0",
93
93
  "yargs": "17.7.2"
94
94
  },
95
- "version": "1.0.1661063"
95
+ "version": "1.0.1662289"
96
96
  }
@@ -1,183 +0,0 @@
1
- // Copyright 2023 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Helpers from '../helpers/helpers.js';
6
- import * as Types from '../types/types.js';
7
-
8
- /**
9
- * There are two metadata events that we care about.
10
- * => AuctionWorkletRunningInProcess tells us which process the Auction Worklet
11
- * has taken to run in.
12
- * => AuctionWorkletDoneWithProcess tells us when the worklet is done with that
13
- * process. This is less useful - but in the future we might want to surface
14
- * this information so we still parse and return the event.
15
- *
16
- * It is important to note that the top level PID on these events is NOT the
17
- * PID that the worklet is running on; instead we have to look at its
18
- * args.data.pid property, which is the PID of the process that it is running
19
- * on.
20
- *
21
- * For any given RunningInProcess event, we would typically expect to see a
22
- * DoneWithProcess event, however this is not guaranteed, especially as users
23
- * can record any chunk of time in DevTools.
24
- *
25
- * Similarly, it is also possible to see a DoneWithProcess event without a
26
- * RunningInProcess event, if the user started recording after the auction
27
- * worklets started. Therefore we are happy to create
28
- * SyntheticAuctionWorklets as long as we see just one of these events.
29
- *
30
- * If we do get two events and need to pair them, we can use the
31
- * args.data.target property, which is a string ID shared by both
32
- * events.
33
- */
34
- let runningInProcessEvents = new Map<Types.Events.ProcessID, Types.Events.AuctionWorkletRunningInProcess>();
35
- let doneWithProcessEvents = new Map<Types.Events.ProcessID, Types.Events.AuctionWorkletDoneWithProcess>();
36
-
37
- // Keyed by the PID defined in `args.data.pid` on AuctionWorklet trace events..
38
- let createdSyntheticEvents = new Map<Types.Events.ProcessID, Types.Events.SyntheticAuctionWorklet>();
39
-
40
- // Each AuctonWorklet takes over a process and has 2 threads (that we care
41
- // about and want to show as tracks):
42
- // 1. A CrUtilityMain thread which is known as the "control process".
43
- // 2. A AuctionV8HelperThread which is the actual auction worklet and will be
44
- // either a "Seller" or a "Bidder"
45
- // To detect these we look for the metadata thread_name events. We key these by
46
- // PID so that we can easily look them up later without having to loop through.
47
- let utilityThreads = new Map<Types.Events.ProcessID, Types.Events.ThreadName>();
48
- let v8HelperThreads = new Map<Types.Events.ProcessID, Types.Events.ThreadName>();
49
-
50
- export function reset(): void {
51
- runningInProcessEvents = new Map();
52
- doneWithProcessEvents = new Map();
53
- createdSyntheticEvents = new Map();
54
- utilityThreads = new Map();
55
- v8HelperThreads = new Map();
56
- }
57
-
58
- export function handleEvent(event: Types.Events.Event): void {
59
- if (Types.Events.isAuctionWorkletRunningInProcess(event)) {
60
- runningInProcessEvents.set(event.args.data.pid, event);
61
- return;
62
- }
63
-
64
- if (Types.Events.isAuctionWorkletDoneWithProcess(event)) {
65
- doneWithProcessEvents.set(event.args.data.pid, event);
66
- return;
67
- }
68
-
69
- if (Types.Events.isThreadName(event)) {
70
- if (event.args.name === 'auction_worklet.CrUtilityMain') {
71
- utilityThreads.set(event.pid, event);
72
- return;
73
- }
74
- if (event.args.name === 'AuctionV8HelperThread') {
75
- v8HelperThreads.set(event.pid, event);
76
- }
77
- }
78
- }
79
-
80
- function workletType(input: string): Types.Events.AuctionWorkletType {
81
- switch (input) {
82
- case 'seller':
83
- return Types.Events.AuctionWorkletType.SELLER;
84
- case 'bidder':
85
- return Types.Events.AuctionWorkletType.BIDDER;
86
- default:
87
- return Types.Events.AuctionWorkletType.UNKNOWN;
88
- }
89
- }
90
-
91
- /**
92
- * We cannot make the full event without knowing the type of event, but we can
93
- * create everything other than the `args` field, as those are identical
94
- * regardless of the type of event.
95
- */
96
- function makeSyntheticEventBase(
97
- event: Types.Events.AuctionWorkletDoneWithProcess|
98
- Types.Events.AuctionWorkletRunningInProcess): Omit<Types.Events.SyntheticAuctionWorklet, 'args'> {
99
- return Helpers.SyntheticEvents.SyntheticEventsManager
100
- .registerSyntheticEvent<Omit<Types.Events.SyntheticAuctionWorklet, 'args'>>({
101
- rawSourceEvent: event,
102
- name: 'SyntheticAuctionWorklet',
103
- s: Types.Events.Scope.THREAD,
104
- cat: event.cat,
105
- tid: event.tid,
106
- ts: event.ts,
107
- ph: Types.Events.Phase.INSTANT,
108
- pid: event.args.data.pid,
109
- host: event.args.data.host,
110
- target: event.args.data.target,
111
- type: workletType(event.args.data.type),
112
- });
113
- }
114
-
115
- export async function finalize(): Promise<void> {
116
- // Loop through the utility threads we found to create the worklet events. We
117
- // expect each worklet to have a utility thread, so we can use them as the
118
- // root of our list of worklets.
119
- for (const [pid, utilityThreadNameEvent] of utilityThreads) {
120
- const v8HelperEvent = v8HelperThreads.get(pid);
121
- if (!v8HelperEvent) {
122
- // Bad trace data - AuctionWorklets are expected to always have both threads.
123
- continue;
124
- }
125
-
126
- const runningEvent = runningInProcessEvents.get(pid);
127
- const doneWithEvent = doneWithProcessEvents.get(pid);
128
-
129
- // We can create a worklet from either the runningEvent or doneWithEvent -
130
- // we do not need both. We cannot express that to TypeScript with an early
131
- // return here, so instead we set the event initially to null, and then
132
- // create it from either the running event or the doneWith event. If it is
133
- // still null after this, that means neither event was found, and we drop
134
- // the worklet as we do not have enough information to create the synthetic
135
- // event.
136
-
137
- let syntheticEvent: Types.Events.SyntheticAuctionWorklet|null = null;
138
-
139
- if (runningEvent) {
140
- syntheticEvent = {
141
- ...makeSyntheticEventBase(runningEvent),
142
- args: {
143
- data: {
144
- runningInProcessEvent: runningEvent,
145
- utilityThread: utilityThreadNameEvent,
146
- v8HelperThread: v8HelperEvent,
147
- },
148
- },
149
- };
150
- if (doneWithEvent) {
151
- syntheticEvent.args.data.doneWithProcessEvent = doneWithEvent;
152
- }
153
- } else if (doneWithEvent) {
154
- syntheticEvent = {
155
- ...makeSyntheticEventBase(doneWithEvent),
156
- args: {
157
- data: {
158
- doneWithProcessEvent: doneWithEvent,
159
- utilityThread: utilityThreadNameEvent,
160
- v8HelperThread: v8HelperEvent,
161
- },
162
- },
163
- };
164
- if (runningEvent) {
165
- syntheticEvent.args.data.runningInProcessEvent = runningEvent;
166
- }
167
- }
168
- if (syntheticEvent === null) {
169
- continue;
170
- }
171
- createdSyntheticEvents.set(pid, syntheticEvent);
172
- }
173
- }
174
-
175
- export interface AuctionWorkletsData {
176
- worklets: Map<Types.Events.ProcessID, Types.Events.SyntheticAuctionWorklet>;
177
- }
178
-
179
- export function data(): AuctionWorkletsData {
180
- return {
181
- worklets: createdSyntheticEvents,
182
- };
183
- }
@@ -1,81 +0,0 @@
1
- // Copyright 2021 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as SDK from '../../core/sdk/sdk.js';
6
- import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
7
- import type * as Protocol from '../../generated/protocol.js';
8
-
9
- export class InterestGroupStorageModel extends SDK.SDKModel.SDKModel<EventTypes> implements
10
- ProtocolProxyApi.StorageDispatcher {
11
- private readonly storageAgent: ProtocolProxyApi.StorageApi;
12
- private enabled?: boolean;
13
-
14
- constructor(target: SDK.Target.Target) {
15
- super(target);
16
- target.registerStorageDispatcher(this);
17
- this.storageAgent = target.storageAgent();
18
- this.enabled = false;
19
- }
20
-
21
- enable(): void {
22
- if (this.enabled) {
23
- return;
24
- }
25
- void this.storageAgent.invoke_setInterestGroupTracking({enable: true});
26
- }
27
-
28
- disable(): void {
29
- if (!this.enabled) {
30
- return;
31
- }
32
- void this.storageAgent.invoke_setInterestGroupTracking({enable: false});
33
- }
34
-
35
- interestGroupAccessed(event: Protocol.Storage.InterestGroupAccessedEvent): void {
36
- this.dispatchEventToListeners(Events.INTEREST_GROUP_ACCESS, event);
37
- }
38
-
39
- indexedDBListUpdated(_event: Protocol.Storage.IndexedDBListUpdatedEvent): void {
40
- }
41
-
42
- indexedDBContentUpdated(_event: Protocol.Storage.IndexedDBContentUpdatedEvent): void {
43
- }
44
-
45
- interestGroupAuctionEventOccurred(_event: Protocol.Storage.InterestGroupAuctionEventOccurredEvent): void {
46
- }
47
-
48
- interestGroupAuctionNetworkRequestCreated(_event: Protocol.Storage.InterestGroupAuctionNetworkRequestCreatedEvent):
49
- void {
50
- }
51
-
52
- cacheStorageListUpdated(_event: Protocol.Storage.CacheStorageListUpdatedEvent): void {
53
- }
54
-
55
- cacheStorageContentUpdated(_event: Protocol.Storage.CacheStorageContentUpdatedEvent): void {
56
- }
57
-
58
- sharedStorageAccessed(_event: Protocol.Storage.SharedStorageAccessedEvent): void {
59
- }
60
-
61
- sharedStorageWorkletOperationExecutionFinished(
62
- _event: Protocol.Storage.SharedStorageWorkletOperationExecutionFinishedEvent): void {
63
- }
64
-
65
- storageBucketCreatedOrUpdated(_event: Protocol.Storage.StorageBucketCreatedOrUpdatedEvent): void {
66
- }
67
-
68
- storageBucketDeleted(_event: Protocol.Storage.StorageBucketDeletedEvent): void {
69
- }
70
- }
71
-
72
- SDK.SDKModel.SDKModel.register(
73
- InterestGroupStorageModel, {capabilities: SDK.Target.Capability.STORAGE, autostart: false});
74
-
75
- export const enum Events {
76
- INTEREST_GROUP_ACCESS = 'InterestGroupAccess',
77
- }
78
-
79
- export interface EventTypes {
80
- [Events.INTEREST_GROUP_ACCESS]: Protocol.Storage.InterestGroupAccessedEvent;
81
- }