chrome-devtools-frontend 1.0.1703574 → 1.0.1705227

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 (85) hide show
  1. package/AUTHORS +2 -0
  2. package/docs/architecture_of_devtools.md +1 -1
  3. package/docs/cookbook/localization.md +2 -2
  4. package/front_end/core/common/ParsedURL.ts +54 -0
  5. package/front_end/core/common/README.md +4 -3
  6. package/front_end/core/platform/StringUtilities.ts +65 -0
  7. package/front_end/core/sdk/CPUThrottlingManager.ts +3 -3
  8. package/front_end/core/sdk/SourceMap.ts +3 -3
  9. package/front_end/core/sdk/SourceMapScopeChainEntry.ts +4 -3
  10. package/front_end/core/sdk/SourceMapScopesInfo.ts +17 -5
  11. package/front_end/entrypoints/formatter_actions/formatter_actions.ts +18 -0
  12. package/front_end/entrypoints/formatter_worker/Substitute.ts +9 -8
  13. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +2 -2
  14. package/front_end/entrypoints/main/MainImpl.ts +3 -3
  15. package/front_end/foundation/Universe.ts +9 -0
  16. package/front_end/generated/InspectorBackendCommands.ts +3 -2
  17. package/front_end/generated/protocol.ts +16 -0
  18. package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
  19. package/front_end/models/formatter/FormatterWorkerPool.ts +8 -3
  20. package/front_end/models/har/HARFormat.ts +7 -2
  21. package/front_end/models/source_map_scopes/NamesResolver.ts +75 -38
  22. package/front_end/models/source_map_scopes/ScopeChainModel.ts +13 -45
  23. package/front_end/models/source_map_scopes/ScopeChainResolver.ts +101 -0
  24. package/front_end/models/source_map_scopes/source_map_scopes.ts +2 -0
  25. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingListView.ts +33 -1
  26. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +4 -12
  27. package/front_end/panels/application/ApplicationPanelSidebar.ts +58 -60
  28. package/front_end/panels/application/BackForwardCacheTreeElement.ts +1 -1
  29. package/front_end/panels/application/FrameDetailsView.ts +64 -82
  30. package/front_end/panels/application/OpenedWindowDetailsView.ts +20 -21
  31. package/front_end/panels/application/PreloadingTreeElement.ts +3 -3
  32. package/front_end/panels/common/CommentsOverlayWidget.ts +145 -72
  33. package/front_end/panels/common/commentsOverlay.css +34 -23
  34. package/front_end/panels/console/ConsolePrompt.ts +2 -1
  35. package/front_end/panels/elements/DOMTreeWidget.ts +29 -10
  36. package/front_end/panels/network/RequestPayloadView.ts +7 -2
  37. package/front_end/panels/network/ShowMoreDetailsWidget.ts +12 -9
  38. package/front_end/panels/sources/DebuggerPlugin.ts +52 -20
  39. package/front_end/panels/sources/ScopeChainSidebarPane.ts +2 -2
  40. package/front_end/panels/sources/SourcesPanel.ts +1 -1
  41. package/front_end/panels/sources/SourcesView.ts +3 -12
  42. package/front_end/panels/sources/TabbedEditorContainer.ts +0 -3
  43. package/front_end/panels/sources/components/HeadersView.ts +193 -123
  44. package/front_end/third_party/chromium/README.chromium +1 -1
  45. package/front_end/third_party/puppeteer/README.chromium +2 -2
  46. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +5 -0
  47. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +24 -32
  48. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ElementHandle.d.ts +1 -1
  49. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ElementHandle.d.ts.map +1 -1
  50. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ElementHandle.js +15 -1
  51. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ElementHandle.js.map +1 -1
  52. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js +8 -1
  53. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js.map +1 -1
  54. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts +0 -8
  55. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts.map +1 -1
  56. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js +0 -24
  57. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js.map +1 -1
  58. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +12 -0
  59. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  60. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +79 -17
  61. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
  62. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.js +1 -1
  63. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.js.map +1 -1
  64. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  65. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  66. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  67. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  68. package/front_end/third_party/puppeteer/package/lib/types.d.ts +5 -0
  69. package/front_end/third_party/puppeteer/package/package.json +4 -4
  70. package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +15 -2
  71. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +10 -1
  72. package/front_end/third_party/puppeteer/package/src/common/Debug.ts +0 -27
  73. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +96 -17
  74. package/front_end/third_party/puppeteer/package/src/node-env-setup.ts +1 -1
  75. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  76. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  77. package/front_end/ui/comments/CommentAnchorResolver.ts +60 -22
  78. package/front_end/ui/comments/CommentOverlayManager.ts +78 -25
  79. package/front_end/ui/legacy/README.md +12 -12
  80. package/front_end/ui/legacy/components/data_grid/DataGridExporter.ts +7 -13
  81. package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +51 -57
  82. package/front_end/ui/legacy/components/source_frame/ImageView.ts +101 -42
  83. package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -2
  84. package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
  85. package/package.json +1 -1
@@ -1,8 +1,6 @@
1
1
  // Copyright 2022 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
- /* eslint-disable @devtools/no-lit-render-outside-of-view */
6
4
 
7
5
  import * as Host from '../../../core/host/host.js';
8
6
  import * as i18n from '../../../core/i18n/i18n.js';
@@ -18,7 +16,7 @@ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
18
16
 
19
17
  import headersViewStyles from './HeadersView.css.js';
20
18
 
21
- const {html} = Lit;
19
+ const {html, Directives: {ref}} = Lit;
22
20
 
23
21
  const UIStrings = {
24
22
  /**
@@ -59,25 +57,70 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
59
57
  const DEFAULT_HEADER_VALUE = 'header value';
60
58
  const getDefaultHeaderName = (i: number): string => `header-name-${i}`;
61
59
 
60
+ export interface WrapperViewInput {
61
+ data: HeadersViewComponentData;
62
+ }
63
+
64
+ export interface WrapperViewOutput {
65
+ component?: HeadersViewComponent;
66
+ }
67
+
68
+ export type WrapperView = (input: WrapperViewInput, output: WrapperViewOutput, target: HTMLElement) => void;
69
+
70
+ // clang-format off
71
+ export const HEADERS_VIEW_DEFAULT_VIEW: WrapperView = (input, output, target) => {
72
+ Lit.render(html`
73
+ <devtools-sources-headers-view
74
+ .data=${input.data}
75
+ ${ref(el => {
76
+ if (el) {
77
+ output.component = el as HeadersViewComponent;
78
+ }
79
+ })}
80
+ ></devtools-sources-headers-view>
81
+ `, target);
82
+ };
83
+ // clang-format on
84
+
62
85
  export class HeadersView extends UI.View.SimpleView {
63
- readonly #headersViewComponent = new HeadersViewComponent();
86
+ #headersViewComponent!: HeadersViewComponent;
64
87
  #uiSourceCode: Workspace.UISourceCode.UISourceCode;
88
+ readonly #view: WrapperView;
89
+ #componentData: HeadersViewComponentData;
65
90
 
66
- constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode) {
91
+ constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode, view: WrapperView = HEADERS_VIEW_DEFAULT_VIEW) {
67
92
  super({
68
93
  title: i18n.i18n.lockedString('HeadersView'),
69
94
  viewId: 'headers-view',
70
95
  jslog: `${VisualLogging.pane('headers-view')}`,
71
96
  });
97
+ this.#view = view;
72
98
  this.#uiSourceCode = uiSourceCode;
73
- this.#uiSourceCode.addEventListener(
74
- Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged, this);
75
- this.#uiSourceCode.addEventListener(
76
- Workspace.UISourceCode.Events.WorkingCopyCommitted, this.#onWorkingCopyCommitted, this);
77
- this.element.appendChild(this.#headersViewComponent);
99
+ this.#componentData = {
100
+ headerOverrides: [],
101
+ uiSourceCode: this.#uiSourceCode,
102
+ parsingError: false,
103
+ };
104
+ this.#uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged,
105
+ this);
106
+ this.#uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted,
107
+ this.#onWorkingCopyCommitted, this);
108
+ this.performUpdate();
78
109
  void this.#setInitialData();
79
110
  }
80
111
 
112
+ override performUpdate(): void {
113
+ const that = this;
114
+ const output: WrapperViewOutput = {
115
+ set component(value: HeadersViewComponent|undefined) {
116
+ if (value) {
117
+ that.#headersViewComponent = value;
118
+ }
119
+ },
120
+ };
121
+ this.#view({data: this.#componentData}, output, this.contentElement);
122
+ }
123
+
81
124
  async #setInitialData(): Promise<void> {
82
125
  const contentDataOrError = await this.#uiSourceCode.requestContentData();
83
126
  this.#setComponentData(TextUtils.ContentData.ContentData.textOr(contentDataOrError, ''));
@@ -97,11 +140,12 @@ export class HeadersView extends UI.View.SimpleView {
97
140
  parsingError = true;
98
141
  }
99
142
 
100
- this.#headersViewComponent.data = {
143
+ this.#componentData = {
101
144
  headerOverrides,
102
145
  uiSourceCode: this.#uiSourceCode,
103
146
  parsingError,
104
147
  };
148
+ this.performUpdate();
105
149
  }
106
150
 
107
151
  #onWorkingCopyChanged(): void {
@@ -117,10 +161,10 @@ export class HeadersView extends UI.View.SimpleView {
117
161
  }
118
162
 
119
163
  dispose(): void {
120
- this.#uiSourceCode.removeEventListener(
121
- Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged, this);
122
- this.#uiSourceCode.removeEventListener(
123
- Workspace.UISourceCode.Events.WorkingCopyCommitted, this.#onWorkingCopyCommitted, this);
164
+ this.#uiSourceCode.removeEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged,
165
+ this);
166
+ this.#uiSourceCode.removeEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted,
167
+ this.#onWorkingCopyCommitted, this);
124
168
  }
125
169
  }
126
170
 
@@ -323,7 +367,7 @@ export class HeadersViewComponent extends HTMLElement {
323
367
  }
324
368
  range.deleteContents();
325
369
 
326
- const textNode = document.createTextNode(text);
370
+ const textNode = new Text(text);
327
371
  range.insertNode(textNode);
328
372
  range.selectNodeContents(textNode);
329
373
  range.collapse(false);
@@ -341,119 +385,42 @@ export class HeadersViewComponent extends HTMLElement {
341
385
  throw new Error('HeadersView render was not scheduled');
342
386
  }
343
387
 
344
- if (this.#parsingError) {
345
- const fileName = this.#uiSourceCode?.name() || '.headers';
346
- // clang-format off
347
- Lit.render(html`
348
- <style>${headersViewStyles}</style>
349
- <div class="center-wrapper">
350
- <div class="centered">
351
- <div class="error-header">${i18nString(UIStrings.errorWhenParsing, {PH1: fileName})}</div>
352
- <div class="error-body">${i18nString(UIStrings.parsingErrorExplainer, {PH1: fileName})}</div>
353
- </div>
354
- </div>
355
- `, this.#shadow, {host: this});
356
- // clang-format on
357
- return;
358
- }
359
-
360
- // clang-format off
361
- Lit.render(html`
362
- <style>${headersViewStyles}</style>
363
- ${this.#headerOverrides.map((headerOverride, blockIndex) =>
364
- html`
365
- ${this.#renderApplyToRow(headerOverride.applyTo, blockIndex)}
366
- ${headerOverride.headers.map((header, headerIndex) =>
367
- html`
368
- ${this.#renderHeaderRow(header, blockIndex, headerIndex)}
369
- `,
370
- )}
371
- `,
372
- )}
373
- <devtools-button
374
- .variant=${Buttons.Button.Variant.OUTLINED}
375
- .jslogContext=${'headers-view.add-override-rule'}
376
- class="add-block">
377
- ${i18nString(UIStrings.addOverrideRule)}
378
- </devtools-button>
379
- <div class="learn-more-row">
380
- <devtools-link
381
- href="https://goo.gle/devtools-override"
382
- class="link"
383
- jslogContext=${'learn-more'}>${i18nString(UIStrings.learnMore)}</devtools-link>
384
- </div>
385
- `, this.#shadow, {host: this});
386
- // clang-format on
388
+ const output: ComponentViewOutput = {};
389
+ DEFAULT_VIEW(
390
+ {
391
+ headerOverrides: this.#headerOverrides,
392
+ parsingError: this.#parsingError,
393
+ fileName: this.#uiSourceCode?.name() || '.headers',
394
+ isDeletable: (blockIndex: number, headerIndex: number) => this.#isDeletable(blockIndex, headerIndex),
395
+ },
396
+ output,
397
+ this.#shadow,
398
+ );
387
399
 
388
400
  if (this.#focusElement) {
389
- let focusElement: Element|null = null;
390
- if (this.#focusElement.headerIndex) {
391
- focusElement = this.#shadow.querySelector(`[data-block-index="${
392
- this.#focusElement.blockIndex}"][data-header-index="${this.#focusElement.headerIndex}"] .header-name`);
393
- } else {
394
- focusElement = this.#shadow.querySelector(`[data-block-index="${this.#focusElement.blockIndex}"] .apply-to`);
395
- }
396
- if (focusElement) {
397
- (focusElement as HTMLElement).focus();
398
- }
401
+ output.focusElement?.(this.#focusElement.blockIndex, this.#focusElement.headerIndex);
399
402
  this.#focusElement = null;
400
403
  }
401
404
  }
405
+ }
402
406
 
403
- #renderApplyToRow(pattern: string, blockIndex: number): Lit.TemplateResult {
404
- // clang-format off
405
- return html`
406
- <div class="row" data-block-index=${blockIndex}
407
- jslog=${VisualLogging.treeItem(pattern === '*' ? pattern : undefined).track({resize: true})}>
408
- <div>${i18n.i18n.lockedString('Apply to')}</div>
409
- <div class="separator">:</div>
410
- ${this.#renderEditable(pattern, 'apply-to')}
411
- <devtools-button
412
- title=${i18nString(UIStrings.removeBlock)}
413
- .size=${Buttons.Button.Size.SMALL}
414
- .iconName=${'bin'}
415
- .iconWidth=${'14px'}
416
- .iconHeight=${'14px'}
417
- .variant=${Buttons.Button.Variant.ICON}
418
- .jslogContext=${'headers-view.remove-apply-to-section'}
419
- class="remove-block inline-button"
420
- ></devtools-button>
421
- </div>
422
- `;
423
- // clang-format on
424
- }
407
+ export interface ComponentViewInput {
408
+ headerOverrides: Persistence.NetworkPersistenceManager.HeaderOverride[];
409
+ parsingError: boolean;
410
+ fileName: string;
411
+ isDeletable: (blockIndex: number, headerIndex: number) => boolean;
412
+ }
425
413
 
426
- #renderHeaderRow(header: Protocol.Fetch.HeaderEntry, blockIndex: number, headerIndex: number): Lit.TemplateResult {
427
- // clang-format off
428
- return html`
429
- <div class="row padded" data-block-index=${blockIndex} data-header-index=${headerIndex}
430
- jslog=${VisualLogging.treeItem(header.name).parent('headers-editor-row-parent').track({resize: true})}>
431
- ${this.#renderEditable(header.name, 'header-name red', true)}
432
- <div class="separator">:</div>
433
- ${this.#renderEditable(header.value, 'header-value')}
434
- <devtools-button
435
- title=${i18nString(UIStrings.addHeader)}
436
- .size=${Buttons.Button.Size.SMALL}
437
- .iconName=${'plus'}
438
- .variant=${Buttons.Button.Variant.ICON}
439
- .jslogContext=${'headers-view.add-header'}
440
- class="add-header inline-button"
441
- ></devtools-button>
442
- <devtools-button
443
- title=${i18nString(UIStrings.removeHeader)}
444
- .size=${Buttons.Button.Size.SMALL}
445
- .iconName=${'bin'}
446
- .variant=${Buttons.Button.Variant.ICON}
447
- ?hidden=${!this.#isDeletable(blockIndex, headerIndex)}
448
- .jslogContext=${'headers-view.remove-header'}
449
- class="remove-header inline-button"
450
- ></devtools-button>
451
- </div>
452
- `;
453
- // clang-format on
454
- }
414
+ export interface ComponentViewOutput {
415
+ focusElement?: (blockIndex: number, headerIndex?: number) => void;
416
+ }
455
417
 
456
- #renderEditable(value: string, className?: string, isKey?: boolean): Lit.TemplateResult {
418
+ export const DEFAULT_VIEW = (
419
+ input: ComponentViewInput,
420
+ output: ComponentViewOutput,
421
+ target: HTMLElement|DocumentFragment,
422
+ ): void => {
423
+ const renderEditable = (value: string, className?: string, isKey?: boolean): Lit.TemplateResult => {
457
424
  // This uses Lit's `live`-directive, so that when checking whether to
458
425
  // update during re-render, `value` is compared against the actual live DOM
459
426
  // value of the contenteditable element and not the potentially outdated
@@ -466,8 +433,111 @@ export class HeadersViewComponent extends HTMLElement {
466
433
  tabindex="0"
467
434
  .innerText=${Lit.Directives.live(value)}></span>`;
468
435
  // clang-format on
469
- }
470
- }
436
+ };
437
+
438
+ const renderApplyToRow = (pattern: string, blockIndex: number): Lit.TemplateResult => {
439
+ // clang-format off
440
+ return html`
441
+ <div class="row" data-block-index=${blockIndex}
442
+ jslog=${VisualLogging.treeItem(pattern === '*' ? pattern : undefined).track({resize: true})}>
443
+ <div>${i18n.i18n.lockedString('Apply to')}</div>
444
+ <div class="separator">:</div>
445
+ ${renderEditable(pattern, 'apply-to')}
446
+ <devtools-button
447
+ title=${i18nString(UIStrings.removeBlock)}
448
+ .size=${Buttons.Button.Size.SMALL}
449
+ .iconName=${'bin'}
450
+ .iconWidth=${'14px'}
451
+ .iconHeight=${'14px'}
452
+ .variant=${Buttons.Button.Variant.ICON}
453
+ .jslogContext=${'headers-view.remove-apply-to-section'}
454
+ class="remove-block inline-button"
455
+ ></devtools-button>
456
+ </div>
457
+ `;
458
+ // clang-format on
459
+ };
460
+
461
+ const renderHeaderRow =
462
+ (header: Protocol.Fetch.HeaderEntry, blockIndex: number, headerIndex: number): Lit.TemplateResult => {
463
+ // clang-format off
464
+ return html`
465
+ <div class="row padded" data-block-index=${blockIndex} data-header-index=${headerIndex}
466
+ jslog=${VisualLogging.treeItem(header.name).parent('headers-editor-row-parent').track({resize: true})}>
467
+ ${renderEditable(header.name, 'header-name red', true)}
468
+ <div class="separator">:</div>
469
+ ${renderEditable(header.value, 'header-value')}
470
+ <devtools-button
471
+ title=${i18nString(UIStrings.addHeader)}
472
+ .size=${Buttons.Button.Size.SMALL}
473
+ .iconName=${'plus'}
474
+ .variant=${Buttons.Button.Variant.ICON}
475
+ .jslogContext=${'headers-view.add-header'}
476
+ class="add-header inline-button"
477
+ ></devtools-button>
478
+ <devtools-button
479
+ title=${i18nString(UIStrings.removeHeader)}
480
+ .size=${Buttons.Button.Size.SMALL}
481
+ .iconName=${'bin'}
482
+ .variant=${Buttons.Button.Variant.ICON}
483
+ ?hidden=${!input.isDeletable(blockIndex, headerIndex)}
484
+ .jslogContext=${'headers-view.remove-header'}
485
+ class="remove-header inline-button"
486
+ ></devtools-button>
487
+ </div>
488
+ `;
489
+ // clang-format on
490
+ };
491
+
492
+ // clang-format off
493
+ Lit.render(
494
+ input.parsingError
495
+ ? html`
496
+ <style>${headersViewStyles}</style>
497
+ <div class="center-wrapper">
498
+ <div class="centered">
499
+ <div class="error-header">${i18nString(UIStrings.errorWhenParsing, {PH1: input.fileName})}</div>
500
+ <div class="error-body">${i18nString(UIStrings.parsingErrorExplainer, {PH1: input.fileName})}</div>
501
+ </div>
502
+ </div>
503
+ `
504
+ : html`
505
+ <style>${headersViewStyles}</style>
506
+ ${input.headerOverrides.map((headerOverride, blockIndex) =>
507
+ html`
508
+ ${renderApplyToRow(headerOverride.applyTo, blockIndex)}
509
+ ${headerOverride.headers.map((header, headerIndex) =>
510
+ html`
511
+ ${renderHeaderRow(header, blockIndex, headerIndex)}
512
+ `,
513
+ )}
514
+ `,
515
+ )}
516
+ <devtools-button
517
+ .variant=${Buttons.Button.Variant.OUTLINED}
518
+ .jslogContext=${'headers-view.add-override-rule'}
519
+ class="add-block">
520
+ ${i18nString(UIStrings.addOverrideRule)}
521
+ </devtools-button>
522
+ <div class="learn-more-row">
523
+ <devtools-link
524
+ href="https://goo.gle/devtools-override"
525
+ class="link"
526
+ jslogContext=${'learn-more'}>${i18nString(UIStrings.learnMore)}</devtools-link>
527
+ </div>
528
+ `,
529
+ target);
530
+ // clang-format on
531
+
532
+ output.focusElement = (blockIndex: number, headerIndex?: number) => {
533
+ const focusElement = headerIndex !== undefined ?
534
+ target.querySelector(`[data-block-index="${blockIndex}"][data-header-index="${headerIndex}"] .header-name`) :
535
+ target.querySelector(`[data-block-index="${blockIndex}"] .apply-to`);
536
+ if (focusElement) {
537
+ (focusElement as HTMLElement).focus();
538
+ }
539
+ };
540
+ };
471
541
 
472
542
  VisualLogging.registerParentProvider('headers-editor-row-parent', (e: Element) => {
473
543
  while (e.previousElementSibling?.classList?.contains('padded')) {
@@ -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: d45ba94c77a2835c4097934e46ff30d9b7615fc0
4
+ Revision: cd8ab87ab38bee0c301e4ba26302fd1c7e38377a
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -1,10 +1,10 @@
1
1
  Name: Puppeteer Core
2
2
  Short Name: Puppeteer Core
3
3
  URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core
4
- Version: 25.11.0
4
+ Version: 25.12.0
5
5
  License: Apache-2.0
6
6
  License File: LICENSE
7
- Revision: 043cd46e594b39ea77343e221a59724183448059
7
+ Revision: 15684eb7f1adf98c1c0c4a5d23a154b7995e947e
8
8
  Security Critical: no
9
9
  Shipped: yes
10
10
  Update Mechanism: Autoroll
@@ -8392,6 +8392,11 @@ export declare const PredefinedNetworkConditions: Readonly<{
8392
8392
  export declare type Predicate<From, To extends From = From> =
8393
8393
  ((value: From) => value is To) | ((value: From) => Awaitable<boolean>);
8394
8394
 
8395
+ declare interface ProcessExitEmitter {
8396
+ once(event: 'exit', listener: () => void): void;
8397
+ off(event: 'exit', listener: () => void): void;
8398
+ }
8399
+
8395
8400
  export {Protocol};
8396
8401
 
8397
8402
  /**
@@ -2524,9 +2524,6 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
2524
2524
  return;
2525
2525
  }
2526
2526
  return (...logArgs) => {
2527
- if (captureLogs) {
2528
- capturedLogs.push(prefix + logArgs);
2529
- }
2530
2527
  nodeDebug(...logArgs);
2531
2528
  };
2532
2529
  }
@@ -2549,27 +2546,6 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
2549
2546
  console.log(`${prefix}:`, ...logArgs);
2550
2547
  };
2551
2548
  };
2552
- /**
2553
- * @internal
2554
- */
2555
- let capturedLogs = [];
2556
- /**
2557
- * @internal
2558
- */
2559
- let captureLogs = false;
2560
- /**
2561
- * @internal
2562
- */
2563
- function setLogCapture(value) {
2564
- capturedLogs = [];
2565
- captureLogs = value;
2566
- }
2567
- /**
2568
- * @internal
2569
- */
2570
- function getCapturedLogs() {
2571
- return capturedLogs;
2572
- }
2573
2549
 
2574
2550
  /**
2575
2551
  MIT License
@@ -3178,7 +3154,7 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
3178
3154
  */
3179
3155
  // If moved update release-please config
3180
3156
  // x-release-please-start-version
3181
- const packageVersion = '25.11.0';
3157
+ const packageVersion = '25.12.0';
3182
3158
  // x-release-please-end
3183
3159
 
3184
3160
  /**
@@ -7756,20 +7732,25 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
7756
7732
  * returned.
7757
7733
  */
7758
7734
  async drag(target) {
7759
- await this.scrollIntoViewIfNeeded();
7760
7735
  const page = this.frame.page();
7761
7736
  if (page.isDragInterceptionEnabled()) {
7737
+ await this.scrollIntoViewIfNeeded();
7762
7738
  const source = await this.clickablePoint();
7763
7739
  if (target instanceof ElementHandle) {
7764
7740
  target = await target.clickablePoint();
7765
7741
  }
7766
7742
  return await page.mouse.drag(source, target);
7767
7743
  }
7744
+ // The button is down either because an earlier `drag()` pressed it, or
7745
+ // because this call is about to.
7746
+ let isMouseDown = page._isDragging;
7768
7747
  try {
7748
+ await this.scrollIntoViewIfNeeded();
7769
7749
  if (!page._isDragging) {
7770
7750
  page._isDragging = true;
7771
7751
  await this.hover();
7772
7752
  await page.mouse.down();
7753
+ isMouseDown = true;
7773
7754
  }
7774
7755
  if (target instanceof ElementHandle) {
7775
7756
  await target.hover();
@@ -7778,6 +7759,14 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
7778
7759
  }
7779
7760
  } catch (error) {
7780
7761
  page._isDragging = false;
7762
+ if (isMouseDown) {
7763
+ // `drop()` is the only thing that releases the button and it will never
7764
+ // run now, so without this the button stays pressed for the rest of the
7765
+ // session. It must not mask the error that got us here.
7766
+ await page.mouse.up().catch(error => {
7767
+ this.logger(DEBUG_PREFIXES.error)?.(error);
7768
+ });
7769
+ }
7781
7770
  throw error;
7782
7771
  }
7783
7772
  }
@@ -13544,7 +13533,12 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
13544
13533
  // Since Text nodes are not elements, we want to
13545
13534
  // return a handle to the parent element for them.
13546
13535
  return await handle.evaluateHandle(node => {
13547
- return node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
13536
+ if (node.nodeType !== Node.TEXT_NODE) {
13537
+ return node;
13538
+ }
13539
+ // A text node placed directly in a shadow root has no parent
13540
+ // element, so fall back to the shadow host.
13541
+ return node.parentElement ?? node.parentNode?.host ?? null;
13548
13542
  });
13549
13543
  } catch (e_2) {
13550
13544
  env_2.error = e_2;
@@ -28302,9 +28296,9 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
28302
28296
  * @internal
28303
28297
  */
28304
28298
  const PUPPETEER_REVISIONS = Object.freeze({
28305
- chrome: '153.0.8010.36',
28306
- 'chrome-headless-shell': '153.0.8010.36',
28307
- firefox: 'stable_155.0.1'
28299
+ chrome: '154.0.8037.57',
28300
+ 'chrome-headless-shell': '154.0.8037.57',
28301
+ firefox: 'stable_156.0.1'
28308
28302
  });
28309
28303
 
28310
28304
  /**
@@ -28472,7 +28466,6 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
28472
28466
  exports.filterAsync = filterAsync;
28473
28467
  exports.fromAbortSignal = fromAbortSignal;
28474
28468
  exports.fromEmitterEvent = fromEmitterEvent;
28475
- exports.getCapturedLogs = getCapturedLogs;
28476
28469
  exports.getQueryHandlerAndSelector = getQueryHandlerAndSelector;
28477
28470
  exports.getReadableAsTypedArray = getReadableAsTypedArray;
28478
28471
  exports.getReadableFromProtocolStream = getReadableFromProtocolStream;
@@ -28498,7 +28491,6 @@ var Puppeteer = function (exports, _PuppeteerURL, _LazyArg, _ARIAQueryHandler, _
28498
28491
  exports.rewriteError = rewriteError$1;
28499
28492
  exports.scriptInjector = scriptInjector;
28500
28493
  exports.setDefaultScreenshotOptions = setDefaultScreenshotOptions;
28501
- exports.setLogCapture = setLogCapture;
28502
28494
  exports.supportedMetrics = supportedMetrics$1;
28503
28495
  exports.throwIfDetached = throwIfDetached;
28504
28496
  exports.timeout = timeout;
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type { Protocol } from 'devtools-protocol';
7
7
  import type { Frame } from '../api/Frame.js';
8
- import type { Logger } from '../common/Debug.js';
8
+ import { type Logger } from '../common/Debug.js';
9
9
  import type { AwaitableIterable, ElementFor, EvaluateFuncWith, HandleFor, HandleOr, NodeFor } from '../common/types.js';
10
10
  import type { KeyInput } from '../common/USKeyboardLayout.js';
11
11
  import { _isElementHandle } from './ElementHandleSymbol.js';
@@ -1 +1 @@
1
- {"version":3,"file":"ElementHandle.d.ts","sourceRoot":"","sources":["../../../src/api/ElementHandle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;A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gB,uBAAuB;IACvC,wBAAwB,gCAAgC;IACxD,eAAe,sBAAsB;IACrC,gBAAgB,uBAAuB;IACvC,cAAc,qBAAqB;IACnC,kBAAkB,yBAAyB;CAC5C;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB;IACE;;OAEG;IACH,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,GACD;IACE;;OAEG;IACH,OAAO,EAAE;QACP,MAAM,EAAE,KAAK,CAAC;YACZ;;;;eAIG;YACH,IAAI,EAAE,oBAAoB,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;YAC7D,KAAK,EAAE,MAAM,CAAC;SACf,CAAC,CAAC;KACJ,CAAC;IACF,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC"}
@@ -93,6 +93,7 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
93
93
  if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
94
94
  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
95
95
  };
96
+ import { DEBUG_PREFIXES } from '../common/Debug.js';
96
97
  import { getQueryHandlerAndSelector } from '../common/GetQueryHandler.js';
97
98
  import { LazyArg } from '../common/LazyArg.js';
98
99
  import { isString, withSourcePuppeteerURLIfNone } from '../common/util.js';
@@ -765,20 +766,25 @@ let ElementHandle = (() => {
765
766
  * returned.
766
767
  */
767
768
  async drag(target) {
768
- await this.scrollIntoViewIfNeeded();
769
769
  const page = this.frame.page();
770
770
  if (page.isDragInterceptionEnabled()) {
771
+ await this.scrollIntoViewIfNeeded();
771
772
  const source = await this.clickablePoint();
772
773
  if (target instanceof ElementHandle) {
773
774
  target = await target.clickablePoint();
774
775
  }
775
776
  return await page.mouse.drag(source, target);
776
777
  }
778
+ // The button is down either because an earlier `drag()` pressed it, or
779
+ // because this call is about to.
780
+ let isMouseDown = page._isDragging;
777
781
  try {
782
+ await this.scrollIntoViewIfNeeded();
778
783
  if (!page._isDragging) {
779
784
  page._isDragging = true;
780
785
  await this.hover();
781
786
  await page.mouse.down();
787
+ isMouseDown = true;
782
788
  }
783
789
  if (target instanceof ElementHandle) {
784
790
  await target.hover();
@@ -789,6 +795,14 @@ let ElementHandle = (() => {
789
795
  }
790
796
  catch (error) {
791
797
  page._isDragging = false;
798
+ if (isMouseDown) {
799
+ // `drop()` is the only thing that releases the button and it will never
800
+ // run now, so without this the button stays pressed for the rest of the
801
+ // session. It must not mask the error that got us here.
802
+ await page.mouse.up().catch(error => {
803
+ this.logger(DEBUG_PREFIXES.error)?.(error);
804
+ });
805
+ }
792
806
  throw error;
793
807
  }
794
808
  }