chrome-devtools-frontend 1.0.1699061 → 1.0.1701636

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 (157) hide show
  1. package/front_end/core/root/Runtime.ts +5 -0
  2. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +16 -11
  3. package/front_end/core/sdk/NetworkManager.ts +7 -0
  4. package/front_end/core/sdk/SecurityOrigin.ts +1 -0
  5. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +3 -0
  6. package/front_end/core/sdk/SourceMap.ts +12 -1
  7. package/front_end/core/sdk/SourceMapCache.ts +12 -0
  8. package/front_end/core/sdk/SourceMapManager.ts +17 -8
  9. package/front_end/core/sdk/SourceMapScopeChainEntry.ts +2 -19
  10. package/front_end/core/sdk/SourceMapScopesInfo.ts +21 -0
  11. package/front_end/core/sdk/StorageBucketsModel.ts +2 -0
  12. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +7 -3
  13. package/front_end/entrypoints/formatter_worker/Substitute.ts +90 -26
  14. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -1
  15. package/front_end/entrypoints/main/ExecutionContextSelector.ts +17 -4
  16. package/front_end/entrypoints/main/GlobalAiButton.ts +2 -6
  17. package/front_end/entrypoints/main/MainImpl.ts +8 -1
  18. package/front_end/generated/InspectorBackendCommands.ts +13 -5
  19. package/front_end/generated/SupportedCSSProperties.ts +14 -0
  20. package/front_end/generated/protocol-mapping.d.ts +48 -9
  21. package/front_end/generated/protocol-proxy-api.d.ts +37 -7
  22. package/front_end/generated/protocol.ts +135 -22
  23. package/front_end/models/ai_assistance/debug.ts +10 -2
  24. package/front_end/models/bindings/NetworkProject.ts +30 -0
  25. package/front_end/models/bindings/ResourceScriptMapping.ts +62 -0
  26. package/front_end/models/change_tracker/ChangeTracker.ts +1 -1
  27. package/front_end/models/comment_manager/CD4ABridge.ts +4 -4
  28. package/front_end/models/comment_manager/CommentManager.ts +21 -0
  29. package/front_end/models/extensions/ExtensionAPI.ts +4 -2
  30. package/front_end/models/formatter/FormatterWorkerPool.ts +2 -2
  31. package/front_end/models/issues_manager/CookieIssue.ts +0 -2
  32. package/front_end/models/javascript_metadata/NativeFunctions.ts +7 -2
  33. package/front_end/models/persistence/NetworkPersistenceManager.ts +29 -4
  34. package/front_end/models/source_map_scopes/NamesResolver.ts +65 -40
  35. package/front_end/models/source_map_scopes/ScopeChainModel.ts +21 -1
  36. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +70 -1
  37. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +5 -8
  38. package/front_end/panels/ai_assistance/components/ChatMessage.ts +1 -1
  39. package/front_end/panels/application/AppManifestView.ts +128 -134
  40. package/front_end/panels/application/CrashReportContextView.ts +5 -5
  41. package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +17 -17
  42. package/front_end/panels/application/DeviceBoundSessionsView.ts +136 -137
  43. package/front_end/panels/application/IndexedDBModel.ts +3 -0
  44. package/front_end/panels/application/OriginTrialTreeView.ts +18 -23
  45. package/front_end/panels/application/ReportingApiTreeElement.ts +3 -3
  46. package/front_end/panels/application/ReportingApiView.ts +6 -14
  47. package/front_end/panels/application/application-meta.ts +7 -7
  48. package/front_end/panels/common/CommentThreadWidget.ts +19 -6
  49. package/front_end/panels/common/CommentsOverlayWidget.ts +143 -10
  50. package/front_end/panels/common/CommentsStatusBarPill.ts +13 -1
  51. package/front_end/panels/common/ExtensionServer.ts +61 -42
  52. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
  53. package/front_end/panels/common/commentThreadWidget.css +18 -0
  54. package/front_end/panels/common/common-meta.ts +4 -1
  55. package/front_end/panels/console/ConsolePrompt.ts +1 -1
  56. package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
  57. package/front_end/panels/elements/ClassesPaneWidget.ts +2 -1
  58. package/front_end/panels/elements/DOMTreeContextMenu.ts +1 -1
  59. package/front_end/panels/elements/{ElementsTreeOutline.ts → DOMTreeWidget.ts} +45 -31
  60. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  61. package/front_end/panels/elements/ElementsTreeElement.ts +3 -1
  62. package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
  63. package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
  64. package/front_end/panels/elements/StylesSidebarPane.ts +4 -6
  65. package/front_end/panels/elements/TopLayerContainer.ts +1 -1
  66. package/front_end/panels/elements/elements.ts +4 -3
  67. package/front_end/panels/elements/elementsTreeOutline.css +4 -0
  68. package/front_end/panels/event_listeners/EventListenersView.ts +9 -4
  69. package/front_end/panels/issues/IssuesPane.ts +34 -22
  70. package/front_end/panels/network/RequestPayloadView.ts +17 -15
  71. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +1 -1
  72. package/front_end/panels/profiler/HeapProfileView.ts +8 -6
  73. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +8 -1
  74. package/front_end/panels/profiler/HeapSnapshotView.ts +6 -4
  75. package/front_end/panels/recorder/RecordingView.ts +32 -53
  76. package/front_end/panels/recorder/controlButton.css +6 -0
  77. package/front_end/panels/recorder/recordingView.css +11 -2
  78. package/front_end/panels/security/SecurityPanel.ts +87 -99
  79. package/front_end/panels/sensors/SensorsView.ts +87 -0
  80. package/front_end/panels/sensors/sensors-meta.ts +69 -1
  81. package/front_end/panels/settings/keybindsSettingsTab.css +1 -1
  82. package/front_end/panels/sources/DebuggerPlugin.ts +136 -55
  83. package/front_end/panels/sources/ScopeChainSidebarPane.ts +17 -15
  84. package/front_end/panels/timeline/components/IgnoreListSetting.ts +0 -2
  85. package/front_end/panels/timeline/components/LiveMetricsView.ts +59 -64
  86. package/front_end/panels/timeline/components/liveMetricsView.css +1 -0
  87. package/front_end/third_party/chromium/README.chromium +1 -1
  88. package/front_end/third_party/lighthouse/README.chromium +2 -2
  89. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1580 -1524
  90. package/front_end/third_party/lighthouse/locales/ar-XB.json +111 -72
  91. package/front_end/third_party/lighthouse/locales/ar.json +113 -74
  92. package/front_end/third_party/lighthouse/locales/bg.json +112 -73
  93. package/front_end/third_party/lighthouse/locales/ca.json +112 -73
  94. package/front_end/third_party/lighthouse/locales/cs.json +112 -73
  95. package/front_end/third_party/lighthouse/locales/da.json +112 -73
  96. package/front_end/third_party/lighthouse/locales/de.json +112 -73
  97. package/front_end/third_party/lighthouse/locales/el.json +112 -73
  98. package/front_end/third_party/lighthouse/locales/en-GB.json +111 -72
  99. package/front_end/third_party/lighthouse/locales/en-US.json +102 -66
  100. package/front_end/third_party/lighthouse/locales/en-XA.json +111 -72
  101. package/front_end/third_party/lighthouse/locales/en-XL.json +102 -66
  102. package/front_end/third_party/lighthouse/locales/es-419.json +112 -73
  103. package/front_end/third_party/lighthouse/locales/es.json +112 -73
  104. package/front_end/third_party/lighthouse/locales/fi.json +112 -73
  105. package/front_end/third_party/lighthouse/locales/fil.json +112 -73
  106. package/front_end/third_party/lighthouse/locales/fr.json +112 -73
  107. package/front_end/third_party/lighthouse/locales/he.json +112 -73
  108. package/front_end/third_party/lighthouse/locales/hi.json +112 -73
  109. package/front_end/third_party/lighthouse/locales/hr.json +112 -73
  110. package/front_end/third_party/lighthouse/locales/hu.json +112 -73
  111. package/front_end/third_party/lighthouse/locales/id.json +112 -73
  112. package/front_end/third_party/lighthouse/locales/it.json +113 -74
  113. package/front_end/third_party/lighthouse/locales/ja.json +112 -73
  114. package/front_end/third_party/lighthouse/locales/ko.json +112 -73
  115. package/front_end/third_party/lighthouse/locales/lt.json +112 -73
  116. package/front_end/third_party/lighthouse/locales/lv.json +112 -73
  117. package/front_end/third_party/lighthouse/locales/nl.json +112 -73
  118. package/front_end/third_party/lighthouse/locales/no.json +112 -73
  119. package/front_end/third_party/lighthouse/locales/pl.json +112 -73
  120. package/front_end/third_party/lighthouse/locales/pt-PT.json +112 -73
  121. package/front_end/third_party/lighthouse/locales/pt.json +112 -73
  122. package/front_end/third_party/lighthouse/locales/ro.json +112 -73
  123. package/front_end/third_party/lighthouse/locales/ru.json +112 -73
  124. package/front_end/third_party/lighthouse/locales/sk.json +112 -73
  125. package/front_end/third_party/lighthouse/locales/sl.json +112 -73
  126. package/front_end/third_party/lighthouse/locales/sr-Latn.json +112 -73
  127. package/front_end/third_party/lighthouse/locales/sr.json +112 -73
  128. package/front_end/third_party/lighthouse/locales/sv.json +124 -85
  129. package/front_end/third_party/lighthouse/locales/ta.json +112 -73
  130. package/front_end/third_party/lighthouse/locales/te.json +112 -73
  131. package/front_end/third_party/lighthouse/locales/th.json +112 -73
  132. package/front_end/third_party/lighthouse/locales/tr.json +113 -74
  133. package/front_end/third_party/lighthouse/locales/uk.json +112 -73
  134. package/front_end/third_party/lighthouse/locales/vi.json +112 -73
  135. package/front_end/third_party/lighthouse/locales/zh-HK.json +112 -73
  136. package/front_end/third_party/lighthouse/locales/zh-TW.json +113 -74
  137. package/front_end/third_party/lighthouse/locales/zh.json +113 -74
  138. package/front_end/third_party/lighthouse/report/bundle.d.ts +4 -4
  139. package/front_end/third_party/lighthouse/report/bundle.js +10 -3
  140. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -2
  141. package/front_end/third_party/lit/lit.ts +3 -0
  142. package/front_end/third_party/lit/package.json +3 -0
  143. package/front_end/third_party/lit/rebuild.sh +3 -2
  144. package/front_end/ui/comments/CommentAnchorResolver.ts +8 -2
  145. package/front_end/ui/comments/CommentOverlayManager.ts +2 -1
  146. package/front_end/ui/legacy/InspectorView.ts +4 -3
  147. package/front_end/ui/legacy/TabbedPane.ts +121 -80
  148. package/front_end/ui/legacy/Treeoutline.ts +37 -7
  149. package/front_end/ui/legacy/UIUtils.ts +7 -0
  150. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +1 -1
  151. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +135 -146
  152. package/front_end/ui/legacy/treeoutline.css +2 -2
  153. package/front_end/ui/lit/lit.ts +1 -1
  154. package/front_end/ui/visual_logging/KnownContextValues.ts +11 -0
  155. package/inspector_overlay/highlight_anchor.ts +197 -0
  156. package/inspector_overlay/tool_highlight.ts +8 -0
  157. package/package.json +1 -1
@@ -4,6 +4,7 @@
4
4
 
5
5
  import type * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
+ import * as Platform from '../../core/platform/platform.js';
7
8
  import * as SDK from '../../core/sdk/sdk.js';
8
9
  import type * as Protocol from '../../generated/protocol.js';
9
10
  import * as Buttons from '../../ui/components/buttons/buttons.js';
@@ -35,6 +36,10 @@ const UIStrings = {
35
36
  * @description Tooltip for the clear announcements button in the announcements tool.
36
37
  */
37
38
  clearAnnouncements: 'Clear announcements',
39
+ /**
40
+ * @description Tooltip for the export to CSV button in the announcements tool.
41
+ */
42
+ exportCsv: 'Export to CSV',
38
43
  /**
39
44
  * @description Label/title for the dropdown filter to select which announcement types to record.
40
45
  */
@@ -108,6 +113,8 @@ export interface ViewInput {
108
113
  isRecording: boolean;
109
114
  onToggleRecording: () => void;
110
115
  onClear: () => void;
116
+ onExportCsv: () => void;
117
+ canExport: boolean;
111
118
  recordTypeFilter: RecordTypeFilter;
112
119
  onRecordTypeFilterChange: (type: RecordTypeFilter) => void;
113
120
  textFilter: string;
@@ -144,6 +151,14 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
144
151
  .variant=${Buttons.Button.Variant.TOOLBAR}
145
152
  .jslogContext=${'accessibility.clear-announcements'}>
146
153
  </devtools-button>
154
+ <devtools-button
155
+ title=${i18nString(UIStrings.exportCsv)}
156
+ .iconName=${'download'}
157
+ .disabled=${!input.canExport}
158
+ @click=${input.onExportCsv}
159
+ .variant=${Buttons.Button.Variant.TOOLBAR}
160
+ .jslogContext=${'accessibility.export-csv'}>
161
+ </devtools-button>
147
162
  <div class="toolbar-divider" role="separator"></div>
148
163
  <select
149
164
  title=${i18nString(UIStrings.filterByType)}
@@ -729,6 +744,32 @@ export function validateAndSanitizeAnnouncement(payload: unknown): A11yAnnouncem
729
744
  };
730
745
  }
731
746
 
747
+ export function escapeCsvValue(val: string): string {
748
+ const escaped = val.replace(/"/g, '""');
749
+ if (escaped.includes(',') || escaped.includes('\n') || escaped.includes('\r') || escaped.includes('"')) {
750
+ return `"${escaped}"`;
751
+ }
752
+ return escaped;
753
+ }
754
+
755
+ export function buildCsvContent(announcements: readonly A11yAnnouncement[]): string {
756
+ const csvRows: string[] = [];
757
+ csvRows.push(['Time', 'API', 'Politeness', 'Message'].join(','));
758
+
759
+ for (const item of announcements) {
760
+ const timeString = new Date(item.time).toISOString();
761
+ const row = [
762
+ escapeCsvValue(timeString),
763
+ escapeCsvValue(item.api),
764
+ escapeCsvValue(item.politeness),
765
+ escapeCsvValue(item.message),
766
+ ];
767
+ csvRows.push(row.join(','));
768
+ }
769
+
770
+ return csvRows.join('\r\n');
771
+ }
772
+
732
773
  export class AccessibilityAnnouncementRecordingView extends AccessibilitySubPane implements SDK.TargetManager.Observer {
733
774
  #announcements: A11yAnnouncement[] = [];
734
775
  #filteredAnnouncements: readonly A11yAnnouncement[]|null = null;
@@ -984,6 +1025,29 @@ export class AccessibilityAnnouncementRecordingView extends AccessibilitySubPane
984
1025
  this.requestUpdate();
985
1026
  }
986
1027
 
1028
+ #exportCsv(): void {
1029
+ const csvContent = this.#buildCsvContent();
1030
+ const blob = new Blob(['\ufeff', csvContent], {type: 'text/csv;charset=utf-8'});
1031
+ const url = URL.createObjectURL(blob);
1032
+ /* eslint-disable-next-line @devtools/no-imperative-dom-api */
1033
+ const link = document.createElement('a');
1034
+ link.setAttribute('href', url);
1035
+ link.setAttribute('download', `aria-live-announcements-${Platform.DateUtilities.toISO8601Compact(new Date())}.csv`);
1036
+ link.style.visibility = 'hidden';
1037
+ document.body.appendChild(link);
1038
+ link.click();
1039
+ document.body.removeChild(link);
1040
+ URL.revokeObjectURL(url);
1041
+ }
1042
+
1043
+ #buildCsvContent(): string {
1044
+ return buildCsvContent(this.filteredAnnouncements);
1045
+ }
1046
+
1047
+ exportCsvForTest(): string {
1048
+ return this.#buildCsvContent();
1049
+ }
1050
+
987
1051
  override performUpdate(): void {
988
1052
  const blockedTargets: BlockedTargetInfo[] = [];
989
1053
  for (const [target, reason] of this.#blockedTargets) {
@@ -991,6 +1055,7 @@ export class AccessibilityAnnouncementRecordingView extends AccessibilitySubPane
991
1055
  blockedTargets.push({targetName, reason});
992
1056
  }
993
1057
 
1058
+ const filteredAnnouncements = this.filteredAnnouncements;
994
1059
  const input: ViewInput = {
995
1060
  isRecording: this.#isRecording,
996
1061
  onToggleRecording: () => {
@@ -1003,6 +1068,10 @@ export class AccessibilityAnnouncementRecordingView extends AccessibilitySubPane
1003
1068
  onClear: () => {
1004
1069
  this.clearAnnouncements();
1005
1070
  },
1071
+ onExportCsv: () => {
1072
+ this.#exportCsv();
1073
+ },
1074
+ canExport: filteredAnnouncements.length > 0,
1006
1075
  recordTypeFilter: this.#recordTypeFilter,
1007
1076
  onRecordTypeFilterChange: (type: RecordTypeFilter) => {
1008
1077
  this.setRecordTypeFilter(type);
@@ -1012,7 +1081,7 @@ export class AccessibilityAnnouncementRecordingView extends AccessibilitySubPane
1012
1081
  this.setTextFilter(text);
1013
1082
  },
1014
1083
  blockedTargets,
1015
- announcements: this.filteredAnnouncements,
1084
+ announcements: filteredAnnouncements,
1016
1085
  };
1017
1086
  this.#view(input, undefined, this.contentElement);
1018
1087
  }
@@ -35,22 +35,18 @@ const UIStrings = {
35
35
  * the current context.
36
36
  */
37
37
  debugWithAi: 'Debug with AI',
38
- /**
39
- * @description The title of the Gemini panel.
40
- */
41
- gemini: 'Gemini',
42
38
  /**
43
39
  * @description The title of the command menu action for showing the Gemini panel.
44
40
  */
45
- showGemini: 'Show Gemini',
41
+ showGemini: 'Show `Gemini`',
46
42
  /**
47
43
  * @description The setting title to enable the Gemini via the settings tab.
48
44
  */
49
- enableGemini: 'Enable Gemini',
45
+ enableGemini: 'Enable `Gemini`',
50
46
  /**
51
47
  * @description Text of a context menu item to redirect to the Gemini panel with the current context.
52
48
  */
53
- debugWithGemini: 'Debug with Gemini',
49
+ debugWithGemini: 'Debug with `Gemini`',
54
50
  } as const;
55
51
 
56
52
  const str_ = i18n.i18n.registerUIStrings('panels/ai_assistance/ai_assistance-meta.ts', UIStrings);
@@ -108,7 +104,8 @@ UI.ViewManager.registerViewExtension({
108
104
  location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,
109
105
  id: 'freestyler',
110
106
  commandPrompt: i18nAiBrandedString(UIStrings.showGemini, UIStrings.showAiAssistance),
111
- title: i18nAiBrandedString(UIStrings.gemini, UIStrings.aiAssistance),
107
+ title: () => Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled ? i18n.i18n.lockedString('Gemini') :
108
+ i18nString(UIStrings.aiAssistance),
112
109
  order: 10,
113
110
  persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,
114
111
  hasToolbar: false,
@@ -1636,7 +1636,7 @@ async function makeDomTreeWidget(widgetData: AiAssistanceModel.AiAgent.DomTreeAi
1636
1636
  // clang-format off
1637
1637
  const renderedWidget = html`
1638
1638
  ${networkRequest ? renderNetworkRequestPreview(networkRequest) : Lit.nothing}
1639
- <devtools-widget class="dom-tree-widget" ${widget(Elements.ElementsTreeOutline.DOMTreeWidget, {
1639
+ <devtools-widget class="dom-tree-widget" ${widget(Elements.DOMTreeWidget.DOMTreeWidget, {
1640
1640
  maxTreeDepth: 2,
1641
1641
  enableContextMenu: false,
1642
1642
  showComments: false,