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.
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +16 -11
- package/front_end/core/sdk/NetworkManager.ts +7 -0
- package/front_end/core/sdk/SecurityOrigin.ts +1 -0
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +3 -0
- package/front_end/core/sdk/SourceMap.ts +12 -1
- package/front_end/core/sdk/SourceMapCache.ts +12 -0
- package/front_end/core/sdk/SourceMapManager.ts +17 -8
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +2 -19
- package/front_end/core/sdk/SourceMapScopesInfo.ts +21 -0
- package/front_end/core/sdk/StorageBucketsModel.ts +2 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +7 -3
- package/front_end/entrypoints/formatter_worker/Substitute.ts +90 -26
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +17 -4
- package/front_end/entrypoints/main/GlobalAiButton.ts +2 -6
- package/front_end/entrypoints/main/MainImpl.ts +8 -1
- package/front_end/generated/InspectorBackendCommands.ts +13 -5
- package/front_end/generated/SupportedCSSProperties.ts +14 -0
- package/front_end/generated/protocol-mapping.d.ts +48 -9
- package/front_end/generated/protocol-proxy-api.d.ts +37 -7
- package/front_end/generated/protocol.ts +135 -22
- package/front_end/models/ai_assistance/debug.ts +10 -2
- package/front_end/models/bindings/NetworkProject.ts +30 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +62 -0
- package/front_end/models/change_tracker/ChangeTracker.ts +1 -1
- package/front_end/models/comment_manager/CD4ABridge.ts +4 -4
- package/front_end/models/comment_manager/CommentManager.ts +21 -0
- package/front_end/models/extensions/ExtensionAPI.ts +4 -2
- package/front_end/models/formatter/FormatterWorkerPool.ts +2 -2
- package/front_end/models/issues_manager/CookieIssue.ts +0 -2
- package/front_end/models/javascript_metadata/NativeFunctions.ts +7 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +29 -4
- package/front_end/models/source_map_scopes/NamesResolver.ts +65 -40
- package/front_end/models/source_map_scopes/ScopeChainModel.ts +21 -1
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +70 -1
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +5 -8
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +128 -134
- package/front_end/panels/application/CrashReportContextView.ts +5 -5
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +17 -17
- package/front_end/panels/application/DeviceBoundSessionsView.ts +136 -137
- package/front_end/panels/application/IndexedDBModel.ts +3 -0
- package/front_end/panels/application/OriginTrialTreeView.ts +18 -23
- package/front_end/panels/application/ReportingApiTreeElement.ts +3 -3
- package/front_end/panels/application/ReportingApiView.ts +6 -14
- package/front_end/panels/application/application-meta.ts +7 -7
- package/front_end/panels/common/CommentThreadWidget.ts +19 -6
- package/front_end/panels/common/CommentsOverlayWidget.ts +143 -10
- package/front_end/panels/common/CommentsStatusBarPill.ts +13 -1
- package/front_end/panels/common/ExtensionServer.ts +61 -42
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
- package/front_end/panels/common/commentThreadWidget.css +18 -0
- package/front_end/panels/common/common-meta.ts +4 -1
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +2 -1
- package/front_end/panels/elements/DOMTreeContextMenu.ts +1 -1
- package/front_end/panels/elements/{ElementsTreeOutline.ts → DOMTreeWidget.ts} +45 -31
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +3 -1
- package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -6
- package/front_end/panels/elements/TopLayerContainer.ts +1 -1
- package/front_end/panels/elements/elements.ts +4 -3
- package/front_end/panels/elements/elementsTreeOutline.css +4 -0
- package/front_end/panels/event_listeners/EventListenersView.ts +9 -4
- package/front_end/panels/issues/IssuesPane.ts +34 -22
- package/front_end/panels/network/RequestPayloadView.ts +17 -15
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +1 -1
- package/front_end/panels/profiler/HeapProfileView.ts +8 -6
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +8 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +6 -4
- package/front_end/panels/recorder/RecordingView.ts +32 -53
- package/front_end/panels/recorder/controlButton.css +6 -0
- package/front_end/panels/recorder/recordingView.css +11 -2
- package/front_end/panels/security/SecurityPanel.ts +87 -99
- package/front_end/panels/sensors/SensorsView.ts +87 -0
- package/front_end/panels/sensors/sensors-meta.ts +69 -1
- package/front_end/panels/settings/keybindsSettingsTab.css +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +136 -55
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +17 -15
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +0 -2
- package/front_end/panels/timeline/components/LiveMetricsView.ts +59 -64
- package/front_end/panels/timeline/components/liveMetricsView.css +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1580 -1524
- package/front_end/third_party/lighthouse/locales/ar-XB.json +111 -72
- package/front_end/third_party/lighthouse/locales/ar.json +113 -74
- package/front_end/third_party/lighthouse/locales/bg.json +112 -73
- package/front_end/third_party/lighthouse/locales/ca.json +112 -73
- package/front_end/third_party/lighthouse/locales/cs.json +112 -73
- package/front_end/third_party/lighthouse/locales/da.json +112 -73
- package/front_end/third_party/lighthouse/locales/de.json +112 -73
- package/front_end/third_party/lighthouse/locales/el.json +112 -73
- package/front_end/third_party/lighthouse/locales/en-GB.json +111 -72
- package/front_end/third_party/lighthouse/locales/en-US.json +102 -66
- package/front_end/third_party/lighthouse/locales/en-XA.json +111 -72
- package/front_end/third_party/lighthouse/locales/en-XL.json +102 -66
- package/front_end/third_party/lighthouse/locales/es-419.json +112 -73
- package/front_end/third_party/lighthouse/locales/es.json +112 -73
- package/front_end/third_party/lighthouse/locales/fi.json +112 -73
- package/front_end/third_party/lighthouse/locales/fil.json +112 -73
- package/front_end/third_party/lighthouse/locales/fr.json +112 -73
- package/front_end/third_party/lighthouse/locales/he.json +112 -73
- package/front_end/third_party/lighthouse/locales/hi.json +112 -73
- package/front_end/third_party/lighthouse/locales/hr.json +112 -73
- package/front_end/third_party/lighthouse/locales/hu.json +112 -73
- package/front_end/third_party/lighthouse/locales/id.json +112 -73
- package/front_end/third_party/lighthouse/locales/it.json +113 -74
- package/front_end/third_party/lighthouse/locales/ja.json +112 -73
- package/front_end/third_party/lighthouse/locales/ko.json +112 -73
- package/front_end/third_party/lighthouse/locales/lt.json +112 -73
- package/front_end/third_party/lighthouse/locales/lv.json +112 -73
- package/front_end/third_party/lighthouse/locales/nl.json +112 -73
- package/front_end/third_party/lighthouse/locales/no.json +112 -73
- package/front_end/third_party/lighthouse/locales/pl.json +112 -73
- package/front_end/third_party/lighthouse/locales/pt-PT.json +112 -73
- package/front_end/third_party/lighthouse/locales/pt.json +112 -73
- package/front_end/third_party/lighthouse/locales/ro.json +112 -73
- package/front_end/third_party/lighthouse/locales/ru.json +112 -73
- package/front_end/third_party/lighthouse/locales/sk.json +112 -73
- package/front_end/third_party/lighthouse/locales/sl.json +112 -73
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +112 -73
- package/front_end/third_party/lighthouse/locales/sr.json +112 -73
- package/front_end/third_party/lighthouse/locales/sv.json +124 -85
- package/front_end/third_party/lighthouse/locales/ta.json +112 -73
- package/front_end/third_party/lighthouse/locales/te.json +112 -73
- package/front_end/third_party/lighthouse/locales/th.json +112 -73
- package/front_end/third_party/lighthouse/locales/tr.json +113 -74
- package/front_end/third_party/lighthouse/locales/uk.json +112 -73
- package/front_end/third_party/lighthouse/locales/vi.json +112 -73
- package/front_end/third_party/lighthouse/locales/zh-HK.json +112 -73
- package/front_end/third_party/lighthouse/locales/zh-TW.json +113 -74
- package/front_end/third_party/lighthouse/locales/zh.json +113 -74
- package/front_end/third_party/lighthouse/report/bundle.d.ts +4 -4
- package/front_end/third_party/lighthouse/report/bundle.js +10 -3
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -2
- package/front_end/third_party/lit/lit.ts +3 -0
- package/front_end/third_party/lit/package.json +3 -0
- package/front_end/third_party/lit/rebuild.sh +3 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +8 -2
- package/front_end/ui/comments/CommentOverlayManager.ts +2 -1
- package/front_end/ui/legacy/InspectorView.ts +4 -3
- package/front_end/ui/legacy/TabbedPane.ts +121 -80
- package/front_end/ui/legacy/Treeoutline.ts +37 -7
- package/front_end/ui/legacy/UIUtils.ts +7 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +135 -146
- package/front_end/ui/legacy/treeoutline.css +2 -2
- package/front_end/ui/lit/lit.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +11 -0
- package/inspector_overlay/highlight_anchor.ts +197 -0
- package/inspector_overlay/tool_highlight.ts +8 -0
- 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:
|
|
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:
|
|
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.
|
|
1639
|
+
<devtools-widget class="dom-tree-widget" ${widget(Elements.DOMTreeWidget.DOMTreeWidget, {
|
|
1640
1640
|
maxTreeDepth: 2,
|
|
1641
1641
|
enableContextMenu: false,
|
|
1642
1642
|
showComments: false,
|