chrome-devtools-frontend 1.0.944903 → 1.0.945884

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 (86) hide show
  1. package/config/gni/devtools_grd_files.gni +1 -0
  2. package/config/gni/devtools_image_files.gni +1 -0
  3. package/front_end/Images/src/circled_exclamation_icon.svg +3 -0
  4. package/front_end/core/host/InspectorFrontendHostAPI.ts +5 -5
  5. package/front_end/core/host/UserMetrics.ts +3 -1
  6. package/front_end/core/i18n/i18nImpl.ts +7 -4
  7. package/front_end/core/i18n/locales/en-US.json +9 -45
  8. package/front_end/core/i18n/locales/en-XL.json +9 -45
  9. package/front_end/core/sdk/CSSMetadata.ts +0 -1
  10. package/front_end/core/sdk/sdk-meta.ts +20 -8
  11. package/front_end/entrypoints/main/MainImpl.ts +6 -0
  12. package/front_end/generated/protocol.d.ts +0 -4
  13. package/front_end/models/emulation/EmulatedDevices.ts +2 -4
  14. package/front_end/models/persistence/IsolatedFileSystemManager.ts +6 -10
  15. package/front_end/models/timeline_model/TimelineJSProfile.ts +16 -3
  16. package/front_end/models/timeline_model/TimelineModel.ts +1 -0
  17. package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -6
  18. package/front_end/panels/animation/AnimationTimeline.ts +1 -1
  19. package/front_end/panels/application/BackForwardCacheStrings.ts +15 -75
  20. package/front_end/panels/application/BackForwardCacheView.ts +8 -1
  21. package/front_end/panels/changes/ChangesView.ts +8 -7
  22. package/front_end/panels/elements/StyleEditorWidget.ts +7 -7
  23. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -15
  24. package/front_end/panels/elements/StylesSidebarPane.ts +35 -9
  25. package/front_end/panels/emulation/DeviceModeView.ts +3 -0
  26. package/front_end/panels/help/ReleaseNoteText.ts +3 -1
  27. package/front_end/panels/network/NetworkItemView.ts +7 -1
  28. package/front_end/panels/profiler/heapProfiler.css +2 -5
  29. package/front_end/panels/timeline/TimelineController.ts +3 -0
  30. package/front_end/panels/webauthn/WebauthnPane.ts +31 -32
  31. package/front_end/third_party/acorn/README.chromium +2 -2
  32. package/front_end/third_party/acorn/acorn.ts +1 -1
  33. package/front_end/third_party/acorn/package/CHANGELOG.md +31 -1
  34. package/front_end/third_party/acorn/package/README.md +1 -1
  35. package/front_end/third_party/acorn/package/dist/acorn.d.ts +3 -0
  36. package/front_end/third_party/acorn/package/dist/acorn.js +772 -708
  37. package/front_end/third_party/acorn/package/dist/acorn.mjs +767 -703
  38. package/front_end/third_party/acorn/package/dist/bin.js +47 -21
  39. package/front_end/third_party/acorn/package/package.json +1 -1
  40. package/front_end/third_party/acorn-loose/README.chromium +2 -2
  41. package/front_end/third_party/acorn-loose/package/CHANGELOG.md +12 -0
  42. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +27 -7
  43. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +28 -8
  44. package/front_end/third_party/acorn-loose/package/package.json +2 -2
  45. package/front_end/third_party/i18n/i18n-impl.ts +1 -1
  46. package/front_end/ui/components/adorners/Adorner.ts +14 -14
  47. package/front_end/ui/components/buttons/Button.ts +133 -42
  48. package/front_end/ui/components/buttons/button.css +31 -0
  49. package/front_end/ui/components/data_grid/DataGrid.ts +131 -122
  50. package/front_end/ui/components/data_grid/DataGridController.ts +42 -42
  51. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  52. package/front_end/ui/components/docs/button/basic.html +3 -0
  53. package/front_end/ui/components/docs/button/basic.ts +58 -0
  54. package/front_end/ui/components/expandable_list/ExpandableList.ts +11 -11
  55. package/front_end/ui/components/icon_button/Icon.ts +24 -21
  56. package/front_end/ui/components/icon_button/IconButton.ts +31 -31
  57. package/front_end/ui/components/issue_counter/IssueCounter.ts +52 -52
  58. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +42 -42
  59. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +67 -67
  60. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -22
  61. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +36 -36
  62. package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +19 -19
  63. package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +24 -32
  64. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +52 -52
  65. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +21 -21
  66. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
  67. package/front_end/ui/components/markdown_view/MarkdownImage.ts +14 -14
  68. package/front_end/ui/components/markdown_view/MarkdownLink.ts +8 -8
  69. package/front_end/ui/components/markdown_view/MarkdownView.ts +6 -6
  70. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +33 -33
  71. package/front_end/ui/components/report_view/ReportView.ts +18 -18
  72. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +53 -53
  73. package/front_end/ui/components/settings/SettingCheckbox.ts +15 -15
  74. package/front_end/ui/components/survey_link/SurveyLink.ts +28 -28
  75. package/front_end/ui/components/text_editor/TextEditor.ts +55 -52
  76. package/front_end/ui/components/text_editor/javascript.ts +6 -6
  77. package/front_end/ui/components/text_prompt/TextPrompt.ts +19 -19
  78. package/front_end/ui/components/tree_outline/TreeOutline.ts +56 -56
  79. package/front_end/ui/legacy/Infobar.ts +9 -0
  80. package/front_end/ui/legacy/InspectorView.ts +1 -1
  81. package/front_end/ui/legacy/ListWidget.ts +2 -2
  82. package/front_end/ui/legacy/tabbedPane.css +1 -1
  83. package/inspector_overlay/main.ts +3 -0
  84. package/package.json +1 -1
  85. package/scripts/eslint_rules/lib/l10n_filename_matches.js +17 -4
  86. package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +21 -0
@@ -424,66 +424,6 @@ const UIStrings = {
424
424
  * @description Description text for not restored reason ContentMediaPlay.
425
425
  */
426
426
  contentMediaPlay: 'A media player was playing upon navigating away.',
427
- /**
428
- * @description Description text for not restored reason EmbedderPopupBlockerTabHelper.
429
- */
430
- embedderPopupBlockerTabHelper: 'EmbedderPopupBlockerTabHelper',
431
- /**
432
- * @description Description text for not restored reason EmbedderSafeBrowsingTriggeredPopupBlocker.
433
- */
434
- embedderSafeBrowsingTriggeredPopupBlocker: 'EmbedderSafeBrowsingTriggeredPopupBlocker',
435
- /**
436
- * @description Description text for not restored reason EmbedderSafeBrowsingThreatDetails.
437
- */
438
- embedderSafeBrowsingThreatDetails: 'EmbedderSafeBrowsingThreatDetails',
439
- /**
440
- * @description Description text for not restored reason EmbedderAppBannerManager.
441
- */
442
- embedderAppBannerManager: 'EmbedderAppBannerManager',
443
- /**
444
- * @description Description text for not restored reason EmbedderDomDistillerViewerSource.
445
- */
446
- embedderDomDistillerViewerSource: 'EmbedderDomDistillerViewerSource',
447
- /**
448
- * @description Description text for not restored reason EmbedderDomDistillerSelfDeletingRequestDelegate.
449
- */
450
- embedderDomDistillerSelfDeletingRequestDelegate: 'EmbedderDomDistillerSelfDeletingRequestDelegate',
451
- /**
452
- * @description Description text for not restored reason EmbedderOomInterventionTabHelper.
453
- */
454
- embedderOomInterventionTabHelper: 'EmbedderOomInterventionTabHelper',
455
- /**
456
- * @description Description text for not restored reason EmbedderOfflinePage.
457
- */
458
- embedderOfflinePage: 'EmbedderOfflinePage',
459
- /**
460
- * @description Description text for not restored reason EmbedderChromePasswordManagerClientBindCredentialManager.
461
- */
462
- embedderChromePasswordManagerClientBindCredentialManager: 'EmbedderChromePasswordManagerClientBindCredentialManager',
463
- /**
464
- * @description Description text for not restored reason EmbedderPermissionRequestManager.
465
- */
466
- embedderPermissionRequestManager: 'EmbedderPermissionRequestManager',
467
- /**
468
- * @description Description text for not restored reason EmbedderModalDialog.
469
- */
470
- embedderModalDialog: 'EmbedderModalDialog',
471
- /**
472
- * @description Description text for not restored reason EmbedderExtensions.
473
- */
474
- embedderExtensions: 'EmbedderExtensions',
475
- /**
476
- * @description Description text for not restored reason EmbedderExtensionMessaging.
477
- */
478
- embedderExtensionMessaging: 'EmbedderExtensionMessaging',
479
- /**
480
- * @description Description text for not restored reason EmbedderExtensionMessagingForOpenPort.
481
- */
482
- embedderExtensionMessagingForOpenPort: 'EmbedderExtensionMessagingForOpenPort',
483
- /**
484
- * @description Description text for not restored reason EmbedderExtensionSentMessageToCachedFrame.
485
- */
486
- embedderExtensionSentMessageToCachedFrame: 'EmbedderExtensionSentMessageToCachedFrame',
487
427
  };
488
428
 
489
429
  const str_ = i18n.i18n.registerUIStrings('panels/application/BackForwardCacheStrings.ts', UIStrings);
@@ -601,23 +541,23 @@ export const NotRestoredReasonDescription = {
601
541
  'ContentMediaSession': {name: i18nLazyString(UIStrings.contentMediaSession)},
602
542
  'ContentMediaSessionService': {name: i18nLazyString(UIStrings.contentMediaSessionService)},
603
543
  'ContentMediaPlay': {name: i18nLazyString(UIStrings.contentMediaPlay)},
604
- 'EmbedderPopupBlockerTabHelper': {name: i18nLazyString(UIStrings.embedderPopupBlockerTabHelper)},
544
+ 'EmbedderPopupBlockerTabHelper': {name: i18n.i18n.lockedLazyString('EmbedderPopupBlockerTabHelper')},
605
545
  'EmbedderSafeBrowsingTriggeredPopupBlocker':
606
- {name: i18nLazyString(UIStrings.embedderSafeBrowsingTriggeredPopupBlocker)},
607
- 'EmbedderSafeBrowsingThreatDetails': {name: i18nLazyString(UIStrings.embedderSafeBrowsingThreatDetails)},
608
- 'EmbedderAppBannerManager': {name: i18nLazyString(UIStrings.embedderAppBannerManager)},
609
- 'EmbedderDomDistillerViewerSource': {name: i18nLazyString(UIStrings.embedderDomDistillerViewerSource)},
546
+ {name: i18n.i18n.lockedLazyString('EmbedderSafeBrowsingTriggeredPopupBlocker')},
547
+ 'EmbedderSafeBrowsingThreatDetails': {name: i18n.i18n.lockedLazyString('EmbedderSafeBrowsingThreatDetails')},
548
+ 'EmbedderAppBannerManager': {name: i18n.i18n.lockedLazyString('EmbedderAppBannerManager')},
549
+ 'EmbedderDomDistillerViewerSource': {name: i18n.i18n.lockedLazyString('EmbedderDomDistillerViewerSource')},
610
550
  'EmbedderDomDistillerSelfDeletingRequestDelegate':
611
- {name: i18nLazyString(UIStrings.embedderDomDistillerSelfDeletingRequestDelegate)},
612
- 'EmbedderOomInterventionTabHelper': {name: i18nLazyString(UIStrings.embedderOomInterventionTabHelper)},
613
- 'EmbedderOfflinePage': {name: i18nLazyString(UIStrings.embedderOfflinePage)},
551
+ {name: i18n.i18n.lockedLazyString('EmbedderDomDistillerSelfDeletingRequestDelegate')},
552
+ 'EmbedderOomInterventionTabHelper': {name: i18n.i18n.lockedLazyString('EmbedderOomInterventionTabHelper')},
553
+ 'EmbedderOfflinePage': {name: i18n.i18n.lockedLazyString('EmbedderOfflinePage')},
614
554
  'EmbedderChromePasswordManagerClientBindCredentialManager':
615
- {name: i18nLazyString(UIStrings.embedderChromePasswordManagerClientBindCredentialManager)},
616
- 'EmbedderPermissionRequestManager': {name: i18nLazyString(UIStrings.embedderPermissionRequestManager)},
617
- 'EmbedderModalDialog': {name: i18nLazyString(UIStrings.embedderModalDialog)},
618
- 'EmbedderExtensions': {name: i18nLazyString(UIStrings.embedderExtensions)},
619
- 'EmbedderExtensionMessaging': {name: i18nLazyString(UIStrings.embedderExtensionMessaging)},
620
- 'EmbedderExtensionMessagingForOpenPort': {name: i18nLazyString(UIStrings.embedderExtensionMessagingForOpenPort)},
555
+ {name: i18n.i18n.lockedLazyString('EmbedderChromePasswordManagerClientBindCredentialManager')},
556
+ 'EmbedderPermissionRequestManager': {name: i18n.i18n.lockedLazyString('EmbedderPermissionRequestManager')},
557
+ 'EmbedderModalDialog': {name: i18n.i18n.lockedLazyString('EmbedderModalDialog')},
558
+ 'EmbedderExtensions': {name: i18n.i18n.lockedLazyString('EmbedderExtensions')},
559
+ 'EmbedderExtensionMessaging': {name: i18n.i18n.lockedLazyString('EmbedderExtensionMessaging')},
560
+ 'EmbedderExtensionMessagingForOpenPort': {name: i18n.i18n.lockedLazyString('EmbedderExtensionMessagingForOpenPort')},
621
561
  'EmbedderExtensionSentMessageToCachedFrame':
622
- {name: i18nLazyString(UIStrings.embedderExtensionSentMessageToCachedFrame)},
562
+ {name: i18n.i18n.lockedLazyString('EmbedderExtensionSentMessageToCachedFrame')},
623
563
  };
@@ -262,7 +262,14 @@ export class BackForwardCacheView extends UI.ThrottledWidget.ThrottledWidget {
262
262
 
263
263
  private renderReason(explanation: Protocol.Page.BackForwardCacheNotRestoredExplanation): LitHtml.TemplateResult {
264
264
  return LitHtml.html`
265
- <li>${explanation.reason} : ${
265
+ <li>
266
+ <${IconButton.Icon.Icon.litTagName} class="inline-icon" .data=${{
267
+ iconName: 'circled_exclamation_icon',
268
+ color: 'orange',
269
+ width: '16px',
270
+ height: '16px',
271
+ } as IconButton.Icon.IconData}></${IconButton.Icon.Icon.litTagName}>
272
+ ${explanation.reason} : ${
266
273
  (explanation.reason in NotRestoredReasonDescription) ?
267
274
  LitHtml.html`${NotRestoredReasonDescription[explanation.reason].name()}` :
268
275
  LitHtml.nothing} </li>
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
+ import * as Root from '../../core/root/root.js';
7
8
  import * as Diff from '../../third_party/diff/diff.js';
8
9
  import * as DiffView from '../../ui/components/diff_view/diff_view.js';
9
10
  import * as UI from '../../ui/legacy/legacy.js';
@@ -166,7 +167,7 @@ export class ChangesView extends UI.Widget.VBox {
166
167
  this.registerCSSFiles([changesViewStyles]);
167
168
  }
168
169
 
169
- private refreshDiff(): void {
170
+ private async refreshDiff(): Promise<void> {
170
171
  if (!this.isShowing()) {
171
172
  return;
172
173
  }
@@ -180,12 +181,12 @@ export class ChangesView extends UI.Widget.VBox {
180
181
  this.hideDiff(i18nString(UIStrings.binaryData));
181
182
  return;
182
183
  }
183
- this.workspaceDiff.requestDiff(uiSourceCode).then((diff: Diff.Diff.DiffArray|null): void => {
184
- if (this.selectedUISourceCode !== uiSourceCode) {
185
- return;
186
- }
187
- this.renderDiffRows(diff);
188
- });
184
+ const diff = await this.workspaceDiff.requestDiff(
185
+ uiSourceCode, {shouldFormatDiff: Root.Runtime.experiments.isEnabled('preciseChanges')});
186
+ if (this.selectedUISourceCode !== uiSourceCode) {
187
+ return;
188
+ }
189
+ this.renderDiffRows(diff);
189
190
  }
190
191
 
191
192
  private hideDiff(message: string): void {
@@ -30,7 +30,7 @@ export class StyleEditorWidget extends UI.Widget.VBox {
30
30
  private section?: StylePropertiesSection;
31
31
  private editorContainer: HTMLElement;
32
32
 
33
- #propertyIndex = -1;
33
+ #triggerKey: string|undefined;
34
34
 
35
35
  constructor() {
36
36
  super(true);
@@ -73,12 +73,12 @@ export class StyleEditorWidget extends UI.Widget.VBox {
73
73
  this.editor?.addEventListener('propertydeselected', this.onPropertyDeselected);
74
74
  }
75
75
 
76
- setPropertyIndex(value: number): void {
77
- this.#propertyIndex = value;
76
+ setTriggerKey(value: string): void {
77
+ this.#triggerKey = value;
78
78
  }
79
79
 
80
- getPropertyIndex(): number {
81
- return this.#propertyIndex;
80
+ getTriggerKey(): string|undefined {
81
+ return this.#triggerKey;
82
82
  }
83
83
 
84
84
  unbindContext(): void {
@@ -116,7 +116,7 @@ export class StyleEditorWidget extends UI.Widget.VBox {
116
116
 
117
117
  static createTriggerButton(
118
118
  pane: StylesSidebarPane, section: StylePropertiesSection, editorClass: {new(): Editor}, buttonTitle: string,
119
- propertyIndex: number): HTMLElement {
119
+ triggerKey: string): HTMLElement {
120
120
  const triggerButton = createButton(buttonTitle);
121
121
 
122
122
  triggerButton.onclick = async(event): Promise<void> => {
@@ -125,7 +125,7 @@ export class StyleEditorWidget extends UI.Widget.VBox {
125
125
  const widget = StyleEditorWidget.instance();
126
126
  widget.setEditor(editorClass);
127
127
  widget.bindContext(pane, section);
128
- widget.setPropertyIndex(propertyIndex);
128
+ widget.setTriggerKey(triggerKey);
129
129
  await widget.render();
130
130
  const scrollerElement = triggerButton.enclosingNodeOrSelfWithClass('style-panes-wrapper');
131
131
  const onScroll = (): void => {
@@ -668,24 +668,17 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
668
668
  const section = this.section();
669
669
  if (this.valueElement && section && section.editable && this.property.name === 'display') {
670
670
  const propertyValue = this.property.trimmedValueWithoutImportant();
671
- if (propertyValue === 'flex' || propertyValue === 'inline-flex') {
671
+ const isFlex = propertyValue === 'flex' || propertyValue === 'inline-flex';
672
+ const isGrid = propertyValue === 'grid' || propertyValue === 'inline-grid';
673
+ if (isFlex || isGrid) {
674
+ const key = `${section.getSectionIdx()}_${section.nextEditorTriggerButtonIdx}`;
672
675
  const button = StyleEditorWidget.createTriggerButton(
673
- this.parentPaneInternal, section, FlexboxEditor, i18nString(UIStrings.flexboxEditorButton),
674
- this.property.index);
676
+ this.parentPaneInternal, section, isFlex ? FlexboxEditor : GridEditor,
677
+ isFlex ? i18nString(UIStrings.flexboxEditorButton) : i18nString(UIStrings.gridEditorButton), key);
678
+ section.nextEditorTriggerButtonIdx++;
675
679
  this.listItemElement.appendChild(button);
676
680
  const helper = this.parentPaneInternal.swatchPopoverHelper();
677
- if (helper.isShowing(StyleEditorWidget.instance()) &&
678
- this.property.index === StyleEditorWidget.instance().getPropertyIndex()) {
679
- helper.setAnchorElement(button);
680
- }
681
- }
682
- if (propertyValue === 'grid' || propertyValue === 'inline-grid') {
683
- const button = StyleEditorWidget.createTriggerButton(
684
- this.parentPaneInternal, section, GridEditor, i18nString(UIStrings.gridEditorButton), this.property.index);
685
- this.listItemElement.appendChild(button);
686
- const helper = this.parentPaneInternal.swatchPopoverHelper();
687
- if (helper.isShowing(StyleEditorWidget.instance()) &&
688
- this.property.index === StyleEditorWidget.instance().getPropertyIndex()) {
681
+ if (helper.isShowing(StyleEditorWidget.instance()) && StyleEditorWidget.instance().getTriggerKey() === key) {
689
682
  helper.setAnchorElement(button);
690
683
  }
691
684
  }
@@ -832,6 +832,7 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
832
832
  this.idleCallbackManager = new IdleCallbackManager();
833
833
 
834
834
  const blocks = [new SectionBlock(null)];
835
+ let sectionIdx = 0;
835
836
  let lastParentNode: SDK.DOMModel.DOMNode|null = null;
836
837
  for (const style of matchedStyles.nodeStyles()) {
837
838
  const parentNode = matchedStyles.isInherited(style) ? matchedStyles.nodeForStyle(style) : null;
@@ -844,7 +845,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
844
845
  const lastBlock = blocks[blocks.length - 1];
845
846
  if (lastBlock) {
846
847
  this.idleCallbackManager.schedule(() => {
847
- const section = new StylePropertiesSection(this, matchedStyles, style);
848
+ const section = new StylePropertiesSection(this, matchedStyles, style, sectionIdx);
849
+ sectionIdx++;
848
850
  lastBlock.sections.push(section);
849
851
  });
850
852
  }
@@ -860,7 +862,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
860
862
  const block = SectionBlock.createPseudoTypeBlock(pseudoType);
861
863
  for (const style of matchedStyles.pseudoStyles(pseudoType)) {
862
864
  this.idleCallbackManager.schedule(() => {
863
- const section = new StylePropertiesSection(this, matchedStyles, style);
865
+ const section = new StylePropertiesSection(this, matchedStyles, style, sectionIdx);
866
+ sectionIdx++;
864
867
  block.sections.push(section);
865
868
  });
866
869
  }
@@ -871,7 +874,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
871
874
  const block = SectionBlock.createKeyframesBlock(keyframesRule.name().text);
872
875
  for (const keyframe of keyframesRule.keyframes()) {
873
876
  this.idleCallbackManager.schedule(() => {
874
- block.sections.push(new KeyframePropertiesSection(this, matchedStyles, keyframe.style));
877
+ block.sections.push(new KeyframePropertiesSection(this, matchedStyles, keyframe.style, sectionIdx));
878
+ sectionIdx++;
875
879
  });
876
880
  }
877
881
  blocks.push(block);
@@ -917,7 +921,7 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
917
921
  const node = this.node();
918
922
  const blankSection = new BlankStylePropertiesSection(
919
923
  this, insertAfterSection.matchedStyles, node ? node.simpleSelector() : '', styleSheetId, ruleLocation,
920
- insertAfterSection.style());
924
+ insertAfterSection.style(), 0);
921
925
 
922
926
  this.sectionsContainer.insertBefore(blankSection.element, insertAfterSection.element.nextSibling);
923
927
 
@@ -929,6 +933,13 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
929
933
  block.sections.splice(index + 1, 0, blankSection);
930
934
  blankSection.startEditingSelector();
931
935
  }
936
+ let sectionIdx = 0;
937
+ for (const block of this.sectionBlocks) {
938
+ for (const section of block.sections) {
939
+ section.setSectionIdx(sectionIdx);
940
+ sectionIdx++;
941
+ }
942
+ }
932
943
  }
933
944
 
934
945
  removeSection(section: StylePropertiesSection): void {
@@ -1208,10 +1219,15 @@ export class StylePropertiesSection {
1208
1219
 
1209
1220
  private queryListElement: HTMLElement;
1210
1221
 
1222
+ // Used to identify buttons that trigger a flexbox or grid editor.
1223
+ nextEditorTriggerButtonIdx = 1;
1224
+ private sectionIdx = 0;
1225
+
1211
1226
  constructor(
1212
1227
  parentPane: StylesSidebarPane, matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
1213
- style: SDK.CSSStyleDeclaration.CSSStyleDeclaration) {
1228
+ style: SDK.CSSStyleDeclaration.CSSStyleDeclaration, sectionIdx: number) {
1214
1229
  this.parentPane = parentPane;
1230
+ this.sectionIdx = sectionIdx;
1215
1231
  this.styleInternal = style;
1216
1232
  this.matchedStyles = matchedStyles;
1217
1233
  this.editable = Boolean(style.styleSheetId && style.range);
@@ -1344,6 +1360,15 @@ export class StylePropertiesSection {
1344
1360
  this.onpopulate();
1345
1361
  }
1346
1362
 
1363
+ setSectionIdx(sectionIdx: number): void {
1364
+ this.sectionIdx = sectionIdx;
1365
+ this.onpopulate();
1366
+ }
1367
+
1368
+ getSectionIdx(): number {
1369
+ return this.sectionIdx;
1370
+ }
1371
+
1347
1372
  registerFontProperty(treeElement: StylePropertyTreeElement): void {
1348
1373
  if (this.fontEditorSectionManager) {
1349
1374
  this.fontEditorSectionManager.registerFontProperty(treeElement);
@@ -1935,6 +1960,7 @@ export class StylePropertiesSection {
1935
1960
 
1936
1961
  onpopulate(): void {
1937
1962
  this.parentPane.setActiveProperty(null);
1963
+ this.nextEditorTriggerButtonIdx = 1;
1938
1964
  this.propertiesTreeOutline.removeChildren();
1939
1965
  const style = this.styleInternal;
1940
1966
  let count = 0;
@@ -2457,10 +2483,10 @@ export class BlankStylePropertiesSection extends StylePropertiesSection {
2457
2483
  constructor(
2458
2484
  stylesPane: StylesSidebarPane, matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, defaultSelectorText: string,
2459
2485
  styleSheetId: Protocol.CSS.StyleSheetId, ruleLocation: TextUtils.TextRange.TextRange,
2460
- insertAfterStyle: SDK.CSSStyleDeclaration.CSSStyleDeclaration) {
2486
+ insertAfterStyle: SDK.CSSStyleDeclaration.CSSStyleDeclaration, sectionIdx: number) {
2461
2487
  const cssModel = (stylesPane.cssModel() as SDK.CSSModel.CSSModel);
2462
2488
  const rule = SDK.CSSRule.CSSStyleRule.createDummyRule(cssModel, defaultSelectorText);
2463
- super(stylesPane, matchedStyles, rule.style);
2489
+ super(stylesPane, matchedStyles, rule.style, sectionIdx);
2464
2490
  this.normal = false;
2465
2491
  this.ruleLocation = ruleLocation;
2466
2492
  this.styleSheetId = styleSheetId;
@@ -2564,8 +2590,8 @@ export class BlankStylePropertiesSection extends StylePropertiesSection {
2564
2590
  export class KeyframePropertiesSection extends StylePropertiesSection {
2565
2591
  constructor(
2566
2592
  stylesPane: StylesSidebarPane, matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
2567
- style: SDK.CSSStyleDeclaration.CSSStyleDeclaration) {
2568
- super(stylesPane, matchedStyles, style);
2593
+ style: SDK.CSSStyleDeclaration.CSSStyleDeclaration, sectionIdx: number) {
2594
+ super(stylesPane, matchedStyles, style, sectionIdx);
2569
2595
  this.selectorElement.className = 'keyframe-key';
2570
2596
  }
2571
2597
 
@@ -547,6 +547,9 @@ export class DeviceModeView extends UI.Widget.VBox {
547
547
  const link = document.createElement('a');
548
548
  link.download = fileName + '.png';
549
549
  canvas.toBlob(blob => {
550
+ if (blob === null) {
551
+ return;
552
+ }
550
553
  link.href = URL.createObjectURL(blob);
551
554
  link.click();
552
555
  });
@@ -21,7 +21,9 @@ function getReleaseNoteLang(): string {
21
21
  // @ts-ignore TODO(crbug.com/1163928) Wait for Intl support.
22
22
  const currentDevToolsLocale = new Intl.Locale(currentDevToolsUILanguage);
23
23
 
24
- return releaseNoteLangs.has(currentDevToolsLocale.language) ? currentDevToolsLocale.language : '';
24
+ return currentDevToolsLocale.language && releaseNoteLangs.has(currentDevToolsLocale.language) ?
25
+ currentDevToolsLocale.language :
26
+ '';
25
27
  }
26
28
 
27
29
  function getLocalizedReleaseNoteURL(url: string): string {
@@ -270,7 +270,13 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
270
270
 
271
271
  private selectTabInternal(tabId: string): void {
272
272
  if (!this.selectTab(tabId)) {
273
- this.selectTab('headers');
273
+ // maybeAppendPayloadPanel might cause payload tab to appear asynchronously, so
274
+ // it makes sense to retry on the next tick
275
+ setTimeout(() => {
276
+ if (!this.selectTab(tabId)) {
277
+ this.selectTab('headers');
278
+ }
279
+ }, 0);
274
280
  }
275
281
  }
276
282
 
@@ -132,11 +132,8 @@
132
132
  }
133
133
  }
134
134
 
135
- .heap-snapshot-view tr:not(.selected) td.object-column span.heap-object-tag {
136
- color: var(--color-text-secondary);
137
- }
138
-
139
- .heap-snapshot-view td.object-column span.grayed {
135
+ .heap-snapshot-view tr:not(.selected) td.object-column span.heap-object-tag,
136
+ .heap-snapshot-view tr:not(.selected) td.object-column span.grayed {
140
137
  color: var(--color-text-secondary);
141
138
  }
142
139
 
@@ -93,6 +93,9 @@ export class TimelineController implements SDK.TargetManager.SDKModelObserver<SD
93
93
  ];
94
94
  categoriesArray.push(TimelineModel.TimelineModel.TimelineModelImpl.Category.LatencyInfo);
95
95
 
96
+ if (Root.Runtime.experiments.isEnabled('timelineV8RuntimeCallStats') && options.enableJSSampling) {
97
+ categoriesArray.push(disabledByDefault('v8.runtime_stats_sampling'));
98
+ }
96
99
  if (!Root.Runtime.Runtime.queryParam('timelineTracingJSProfileDisabled') && options.enableJSSampling) {
97
100
  categoriesArray.push(disabledByDefault('v8.cpu_profiler'));
98
101
  }
@@ -227,15 +227,15 @@ const PROTOCOL_AUTHENTICATOR_VALUES: Protocol.EnumerableEnum<typeof Protocol.Web
227
227
  U2f: Protocol.WebAuthn.AuthenticatorProtocol.U2f,
228
228
  };
229
229
 
230
- export class WebauthnPaneImpl extends UI.Widget.VBox {
231
- private enabled: boolean;
232
- private activeAuthId: Protocol.WebAuthn.AuthenticatorId|null;
233
- private hasBeenEnabled: boolean;
234
- private readonly dataGrids: Map<Protocol.WebAuthn.AuthenticatorId, DataGrid.DataGrid.DataGridImpl<DataGridNode>>;
235
- // @ts-ignore
236
- private enableCheckbox: UI.Toolbar.ToolbarCheckbox;
230
+ export class WebauthnPaneImpl extends UI.Widget.VBox implements
231
+ SDK.TargetManager.SDKModelObserver<SDK.WebAuthnModel.WebAuthnModel> {
232
+ private activeAuthId: Protocol.WebAuthn.AuthenticatorId|null = null;
233
+ private hasBeenEnabled = false;
234
+ private readonly dataGrids =
235
+ new Map<Protocol.WebAuthn.AuthenticatorId, DataGrid.DataGrid.DataGridImpl<DataGridNode>>();
236
+ private enableCheckbox!: UI.Toolbar.ToolbarCheckbox;
237
237
  private readonly availableAuthenticatorSetting: Common.Settings.Setting<AvailableAuthenticatorOptions[]>;
238
- private model: SDK.WebAuthnModel.WebAuthnModel|null|undefined;
238
+ private model?: SDK.WebAuthnModel.WebAuthnModel;
239
239
  private authenticatorsView: HTMLElement;
240
240
  private topToolbarContainer: HTMLElement|undefined;
241
241
  private topToolbar: UI.Toolbar.Toolbar|undefined;
@@ -253,21 +253,13 @@ export class WebauthnPaneImpl extends UI.Widget.VBox {
253
253
 
254
254
  constructor() {
255
255
  super(true);
256
+ SDK.TargetManager.TargetManager.instance().observeModels(SDK.WebAuthnModel.WebAuthnModel, this);
256
257
 
257
258
  this.contentElement.classList.add('webauthn-pane');
258
- this.enabled = false;
259
- this.activeAuthId = null;
260
- this.hasBeenEnabled = false;
261
- this.dataGrids = new Map();
262
259
 
263
260
  this.availableAuthenticatorSetting =
264
- (Common.Settings.Settings.instance().createSetting('webauthnAuthenticators', []) as
265
- Common.Settings.Setting<AvailableAuthenticatorOptions[]>);
266
-
267
- const mainTarget = SDK.TargetManager.TargetManager.instance().mainTarget();
268
- if (mainTarget) {
269
- this.model = mainTarget.model(SDK.WebAuthnModel.WebAuthnModel);
270
- }
261
+ Common.Settings.Settings.instance().createSetting<AvailableAuthenticatorOptions[]>(
262
+ 'webauthnAuthenticators', []);
271
263
 
272
264
  this.createToolbar();
273
265
  this.authenticatorsView = this.contentElement.createChild('div', 'authenticators-view');
@@ -284,6 +276,18 @@ export class WebauthnPaneImpl extends UI.Widget.VBox {
284
276
  return webauthnPaneImplInstance;
285
277
  }
286
278
 
279
+ modelAdded(model: SDK.WebAuthnModel.WebAuthnModel): void {
280
+ if (model.target() === SDK.TargetManager.TargetManager.instance().mainTarget()) {
281
+ this.model = model;
282
+ }
283
+ }
284
+
285
+ modelRemoved(model: SDK.WebAuthnModel.WebAuthnModel): void {
286
+ if (model.target() === SDK.TargetManager.TargetManager.instance().mainTarget()) {
287
+ this.model = undefined;
288
+ }
289
+ }
290
+
287
291
  private async loadInitialAuthenticators(): Promise<void> {
288
292
  let activeAuthenticatorId: Protocol.WebAuthn.AuthenticatorId|null = null;
289
293
  const availableAuthenticators = this.availableAuthenticatorSetting.get();
@@ -422,7 +426,6 @@ export class WebauthnPaneImpl extends UI.Widget.VBox {
422
426
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.VirtualAuthenticatorEnvironmentEnabled);
423
427
  this.hasBeenEnabled = true;
424
428
  }
425
- this.enabled = enable;
426
429
  if (this.model) {
427
430
  await this.model.setVirtualAuthEnvEnabled(enable);
428
431
  }
@@ -609,7 +612,7 @@ export class WebauthnPaneImpl extends UI.Widget.VBox {
609
612
  UI.UIUtils.createRadioLabel(`active-authenticator-${authenticatorId}`, i18nString(UIStrings.active));
610
613
  activeLabel.radioElement.addEventListener('click', this.setActiveAuthenticator.bind(this, authenticatorId));
611
614
  activeButtonContainer.appendChild(activeLabel);
612
- /** @type {!HTMLInputElement} */ (activeLabel.radioElement as HTMLInputElement).checked = true;
615
+ (activeLabel.radioElement as HTMLInputElement).checked = true;
613
616
  this.activeAuthId = authenticatorId; // Newly added authenticator is automatically set as active.
614
617
 
615
618
  const removeButton = headerElement.createChild('button', 'text-button');
@@ -783,19 +786,16 @@ export class WebauthnPaneImpl extends UI.Widget.VBox {
783
786
  throw new Error('Unable to create options from current inputs');
784
787
  }
785
788
 
786
- /**
787
- * @type {!Protocol.WebAuthn.VirtualAuthenticatorOptions}
788
- */
789
- const options = ({
790
- protocol: this.protocolSelect.options[this.protocolSelect.selectedIndex].value,
791
- transport: this.transportSelect.options[this.transportSelect.selectedIndex].value,
789
+ return {
790
+ protocol: this.protocolSelect.options[this.protocolSelect.selectedIndex].value as
791
+ Protocol.WebAuthn.AuthenticatorProtocol,
792
+ transport: this.transportSelect.options[this.transportSelect.selectedIndex].value as
793
+ Protocol.WebAuthn.AuthenticatorTransport,
792
794
  hasResidentKey: this.residentKeyCheckbox.checked,
793
795
  hasUserVerification: this.userVerificationCheckbox.checked,
794
796
  automaticPresenceSimulation: true,
795
797
  isUserVerified: true,
796
- } as Protocol.WebAuthn.VirtualAuthenticatorOptions);
797
-
798
- return options;
798
+ };
799
799
  }
800
800
 
801
801
  /**
@@ -824,8 +824,7 @@ export class WebauthnPaneImpl extends UI.Widget.VBox {
824
824
  if (!button) {
825
825
  return;
826
826
  }
827
- button.checked =
828
- /** @type {!HTMLElement} */ (authenticator as HTMLElement).dataset.authenticatorId === this.activeAuthId;
827
+ button.checked = (authenticator as HTMLElement).dataset.authenticatorId === this.activeAuthId;
829
828
  });
830
829
  }
831
830
 
@@ -1,7 +1,7 @@
1
1
  Name: Acorn, a tiny, fast JavaScript parser written in JavaScript.
2
2
  Short Name: acorn
3
3
  URL: https://github.com/acornjs/acorn
4
- Version: 8.4.1
4
+ Version: 8.6.0
5
5
  License: MIT
6
6
  License File: LICENSE
7
7
  Security Critical: no
@@ -10,5 +10,5 @@ Description:
10
10
  A tiny, fast JavaScript parser written in JavaScript.
11
11
 
12
12
  ```bash
13
- wget -qO- https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz | tar xzf -
13
+ wget -qO- https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz | tar xzf -
14
14
  ```
@@ -7,7 +7,7 @@ import * as acorn from './package/dist/acorn.mjs';
7
7
  import type * as ESTree from './estree-legacy';
8
8
  export {ESTree};
9
9
 
10
- export { Comment, defaultOptions, getLineInfo, isNewLine, lineBreak, lineBreakG, Node, SourceLocation, Token,tokTypes} from './package/dist/acorn.mjs';
10
+ export { Comment, defaultOptions, getLineInfo, isNewLine, lineBreak, lineBreakG, Node, SourceLocation, Token, tokTypes, tokContexts} from './package/dist/acorn.mjs';
11
11
 
12
12
  export const Parser = acorn.Parser;
13
13
  export const tokenizer = acorn.Parser.tokenizer.bind(acorn.Parser);
@@ -1,3 +1,33 @@
1
+ ## 8.6.0 (2021-11-18)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment.
6
+
7
+ ### New features
8
+
9
+ Support class private fields with the `in` operator.
10
+
11
+ ## 8.5.0 (2021-09-06)
12
+
13
+ ### Bug fixes
14
+
15
+ Improve context-dependent tokenization in a number of corner cases.
16
+
17
+ Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number).
18
+
19
+ Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators.
20
+
21
+ Fix wrong end locations stored on SequenceExpression nodes.
22
+
23
+ Implement restriction that `for`/`of` loop LHS can't start with `let`.
24
+
25
+ ### New features
26
+
27
+ Add support for ES2022 class static blocks.
28
+
29
+ Allow multiple input files to be passed to the CLI tool.
30
+
1
31
  ## 8.4.1 (2021-06-24)
2
32
 
3
33
  ### Bug fixes
@@ -16,7 +46,7 @@ A new option, `allowSuperOutsideMethod`, can be used to suppress the error when
16
46
 
17
47
  Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher.
18
48
 
19
- Add support for the `p` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag.
49
+ Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag.
20
50
 
21
51
  ## 8.2.4 (2021-05-04)
22
52
 
@@ -54,7 +54,7 @@ required):
54
54
 
55
55
  - **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
56
56
  either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
57
- 11 (2020), 12 (2021, partial support), 13 (2022, partial support)
57
+ 11 (2020), 12 (2021), 13 (2022, partial support)
58
58
  or `"latest"` (the latest the library supports). This influences
59
59
  support for strict mode, the set of reserved words, and support
60
60
  for new syntax features.
@@ -173,6 +173,9 @@ declare namespace acorn {
173
173
  p_expr: TokContext
174
174
  q_tmpl: TokContext
175
175
  f_expr: TokContext
176
+ f_stat: TokContext
177
+ f_expr_gen: TokContext
178
+ f_gen: TokContext
176
179
  }
177
180
 
178
181
  function isIdentifierStart(code: number, astral?: boolean): boolean