chrome-devtools-frontend 1.0.1661063 → 1.0.1662965

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 (131) hide show
  1. package/.agents/skills/devtools-unicode-escaping/SKILL.md +64 -0
  2. package/.agents/skills/evaluate-ai-css-completion/SKILL.md +19 -9
  3. package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +44 -16
  4. package/.agents/skills/migrate-chromium-test/SKILL.md +32 -2
  5. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
  6. package/docs/ui_engineering.md +75 -42
  7. package/front_end/core/common/SettingRegistration.ts +0 -10
  8. package/front_end/core/common/Settings.ts +69 -3
  9. package/front_end/core/platform/ArrayUtilities.ts +10 -0
  10. package/front_end/core/platform/StringUtilities.ts +38 -6
  11. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -10
  12. package/front_end/core/sdk/StorageBucketsModel.ts +0 -10
  13. package/front_end/core/sdk/sdk-meta.ts +0 -1
  14. package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +0 -13
  15. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +8 -3
  16. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +3 -3
  17. package/front_end/entrypoints/main/MainImpl.ts +7 -2
  18. package/front_end/foundation/README.md +86 -0
  19. package/front_end/foundation/Universe.ts +16 -0
  20. package/front_end/generated/InspectorBackendCommands.ts +6 -19
  21. package/front_end/generated/protocol-mapping.d.ts +0 -53
  22. package/front_end/generated/protocol-proxy-api.d.ts +0 -46
  23. package/front_end/generated/protocol.ts +20 -186
  24. package/front_end/models/ai_assistance/AiAgent2.ts +3 -3
  25. package/front_end/models/ai_assistance/AiConversation.ts +21 -10
  26. package/front_end/models/ai_assistance/AiHistoryStorage.ts +21 -10
  27. package/front_end/models/ai_assistance/ChangeManager.ts +2 -2
  28. package/front_end/models/ai_assistance/ExtensionScope.ts +6 -2
  29. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -1
  30. package/front_end/models/ai_assistance/agents/AiAgent.ts +8 -1
  31. package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
  32. package/front_end/models/badges/UserBadges.ts +31 -17
  33. package/front_end/models/bindings/CompilerScriptMapping.ts +5 -4
  34. package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
  35. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -3
  36. package/front_end/models/bindings/DefaultScriptMapping.ts +3 -3
  37. package/front_end/models/bindings/NetworkProject.ts +22 -1
  38. package/front_end/models/bindings/ResourceMapping.ts +4 -3
  39. package/front_end/models/bindings/ResourceScriptMapping.ts +2 -1
  40. package/front_end/models/bindings/SASSSourceMapping.ts +4 -3
  41. package/front_end/models/bindings/StylesSourceMapping.ts +3 -3
  42. package/front_end/models/emulation/DeviceModeModel.ts +67 -5
  43. package/front_end/models/extensions/RecorderExtensionEndpoint.ts +7 -5
  44. package/front_end/models/extensions/RecorderPluginManager.ts +10 -6
  45. package/front_end/models/har/Log.snapshot.txt +193 -0
  46. package/front_end/models/har/Log.ts +3 -2
  47. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +14 -5
  48. package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +8 -9
  49. package/front_end/models/issues_manager/RelatedIssue.ts +10 -8
  50. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  51. package/front_end/models/logs/RequestResolver.ts +2 -2
  52. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +0 -5
  53. package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +8 -6
  54. package/front_end/models/source_map_scopes/NamesResolver.ts +36 -30
  55. package/front_end/models/stack_trace/StackTrace.ts +17 -0
  56. package/front_end/models/trace/handlers/FramesHandler.ts +4 -7
  57. package/front_end/models/trace/handlers/ModelHandlers.ts +0 -1
  58. package/front_end/models/trace/handlers/RendererHandler.ts +2 -15
  59. package/front_end/models/trace/handlers/Threads.ts +4 -11
  60. package/front_end/models/trace/insights/DOMSize.ts +1 -1
  61. package/front_end/models/workspace/WorkspaceImpl.ts +1 -10
  62. package/front_end/panels/application/ApplicationPanelSidebar.ts +0 -44
  63. package/front_end/panels/application/CookieItemsView.ts +1 -1
  64. package/front_end/panels/application/FrameDetailsView.ts +1 -1
  65. package/front_end/panels/application/IndexedDBModel.ts +0 -10
  66. package/front_end/panels/application/IndexedDBViews.ts +240 -164
  67. package/front_end/panels/application/ServiceWorkersView.ts +494 -411
  68. package/front_end/panels/application/SharedStorageModel.ts +0 -10
  69. package/front_end/panels/application/application.ts +0 -6
  70. package/front_end/panels/application/components/AdsView.ts +23 -0
  71. package/front_end/panels/application/components/SharedStorageAccessGrid.ts +1 -1
  72. package/front_end/panels/application/components/adsView.css +21 -1
  73. package/front_end/panels/application/components/components.ts +0 -2
  74. package/front_end/panels/application/indexedDBViews.css +1 -1
  75. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +1 -1
  76. package/front_end/panels/application/serviceWorkersView.css +40 -4
  77. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +147 -123
  78. package/front_end/panels/common/ExtensionServer.ts +3 -3
  79. package/front_end/panels/console/ConsoleView.ts +1 -1
  80. package/front_end/panels/emulation/DeviceModeView.ts +139 -70
  81. package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
  82. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +53 -12
  83. package/front_end/panels/network/NetworkDataGridNode.ts +43 -1
  84. package/front_end/panels/network/RequestInitiatorView.ts +24 -2
  85. package/front_end/panels/network/RequestPayloadView.ts +77 -39
  86. package/front_end/panels/network/components/ResponseHeaderSection.ts +5 -3
  87. package/front_end/panels/network/networkLogView.css +5 -0
  88. package/front_end/panels/network/requestInitiatorViewTree.css +5 -0
  89. package/front_end/panels/profiler/HeapProfileView.ts +198 -79
  90. package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
  91. package/front_end/panels/recorder/README.md +1 -2
  92. package/front_end/panels/recorder/RecorderPanel.ts +1749 -17
  93. package/front_end/panels/recorder/recorder.ts +0 -2
  94. package/front_end/panels/settings/AISettingsTab.ts +13 -0
  95. package/front_end/panels/sources/SourcesNavigator.ts +3 -2
  96. package/front_end/panels/sources/SourcesView.ts +0 -17
  97. package/front_end/panels/sources/UISourceCodeFrame.ts +42 -0
  98. package/front_end/panels/sources/sources.ts +0 -2
  99. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +0 -17
  100. package/front_end/panels/timeline/ThreadAppender.ts +0 -106
  101. package/front_end/third_party/chromium/README.chromium +1 -1
  102. package/front_end/ui/components/report_view/ReportView.ts +11 -5
  103. package/front_end/ui/components/report_view/report.css +4 -1
  104. package/front_end/ui/components/spinners/Spinner.ts +29 -32
  105. package/front_end/ui/components/spinners/spinner.css +32 -84
  106. package/front_end/ui/legacy/TextPrompt.ts +49 -1
  107. package/front_end/ui/legacy/Treeoutline.ts +14 -6
  108. package/front_end/ui/legacy/UIUtils.ts +36 -11
  109. package/front_end/ui/legacy/Widget.ts +17 -10
  110. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -2
  111. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +36 -7
  112. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +63 -68
  113. package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +1 -1
  114. package/front_end/ui/legacy/components/object_ui/objectValue.css +2 -1
  115. package/front_end/ui/legacy/inspectorCommon.css +4 -4
  116. package/front_end/ui/legacy/textPrompt.css +10 -0
  117. package/front_end/ui/lit/lit.ts +1 -0
  118. package/front_end/ui/lit/render.ts +44 -10
  119. package/front_end/ui/lit/strip-whitespace.ts +23 -2
  120. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  121. package/package.json +1 -1
  122. package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
  123. package/front_end/panels/application/InterestGroupStorageModel.ts +0 -81
  124. package/front_end/panels/application/InterestGroupStorageView.ts +0 -151
  125. package/front_end/panels/application/InterestGroupTreeElement.ts +0 -65
  126. package/front_end/panels/application/components/InterestGroupAccessGrid.ts +0 -135
  127. package/front_end/panels/application/components/interestGroupAccessGrid.css +0 -27
  128. package/front_end/panels/application/interestGroupStorageView.css +0 -9
  129. package/front_end/panels/recorder/RecorderController.ts +0 -1595
  130. package/front_end/panels/sources/InplaceFormatterEditorAction.ts +0 -149
  131. /package/front_end/panels/recorder/{recorderController.css → recorderPanel.css} +0 -0
@@ -1,149 +0,0 @@
1
- // Copyright 2014 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- /* eslint-disable @devtools/no-imperative-dom-api */
5
-
6
- import * as Common from '../../core/common/common.js';
7
- import * as i18n from '../../core/i18n/i18n.js';
8
- import * as Formatter from '../../models/formatter/formatter.js';
9
- import * as Persistence from '../../models/persistence/persistence.js';
10
- import * as TextUtils from '../../models/text_utils/text_utils.js';
11
- import * as Workspace from '../../models/workspace/workspace.js';
12
- import * as UI from '../../ui/legacy/legacy.js';
13
-
14
- import {
15
- type EditorAction,
16
- type EditorClosedEvent,
17
- Events,
18
- registerEditorAction,
19
- type SourcesView,
20
- } from './SourcesView.js';
21
- import type {UISourceCodeFrame} from './UISourceCodeFrame.js';
22
-
23
- const UIStrings = {
24
- /**
25
- * @description Title of the format button in the Sources panel
26
- * @example {file name} PH1
27
- */
28
- formatS: 'Format {PH1}',
29
- /**
30
- * @description Tooltip text that appears when hovering over the largeicon pretty print button in the Inplace Formatter Editor Action of the Sources panel
31
- */
32
- format: 'Format',
33
- } as const;
34
- const str_ = i18n.i18n.registerUIStrings('panels/sources/InplaceFormatterEditorAction.ts', UIStrings);
35
- const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
36
-
37
- let inplaceFormatterEditorActionInstance: InplaceFormatterEditorAction;
38
-
39
- export class InplaceFormatterEditorAction implements EditorAction {
40
- private button!: UI.Toolbar.ToolbarButton;
41
- private sourcesView!: SourcesView;
42
- private uiSourceCodeTitleChangedEvent: Common.EventTarget.EventDescriptor|null = null;
43
- static instance(opts: {
44
- forceNew: boolean|null,
45
- } = {forceNew: null}): InplaceFormatterEditorAction {
46
- const {forceNew} = opts;
47
- if (!inplaceFormatterEditorActionInstance || forceNew) {
48
- inplaceFormatterEditorActionInstance = new InplaceFormatterEditorAction();
49
- }
50
-
51
- return inplaceFormatterEditorActionInstance;
52
- }
53
-
54
- private editorSelected(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
55
- const uiSourceCode = event.data;
56
- this.updateButton(uiSourceCode);
57
- }
58
-
59
- private editorClosed(event: Common.EventTarget.EventTargetEvent<EditorClosedEvent>): void {
60
- const {wasSelected} = event.data;
61
- if (wasSelected) {
62
- this.updateButton(null);
63
- }
64
- }
65
-
66
- private updateButton(uiSourceCode: Workspace.UISourceCode.UISourceCode|null): void {
67
- if (this.uiSourceCodeTitleChangedEvent) {
68
- Common.EventTarget.removeEventListeners([this.uiSourceCodeTitleChangedEvent]);
69
- }
70
- this.uiSourceCodeTitleChangedEvent = uiSourceCode ?
71
- uiSourceCode.addEventListener(
72
- Workspace.UISourceCode.Events.TitleChanged, event => this.updateButton(event.data), this) :
73
- null;
74
- const isFormattable = this.isFormattable(uiSourceCode);
75
- this.button.element.classList.toggle('hidden', !isFormattable);
76
- if (uiSourceCode && isFormattable) {
77
- this.button.setTitle(i18nString(UIStrings.formatS, {PH1: uiSourceCode.name()}));
78
- }
79
- }
80
-
81
- getOrCreateButton(sourcesView: SourcesView): UI.Toolbar.ToolbarButton {
82
- if (this.button) {
83
- return this.button;
84
- }
85
-
86
- this.sourcesView = sourcesView;
87
- this.sourcesView.addEventListener(Events.EDITOR_SELECTED, this.editorSelected.bind(this));
88
- this.sourcesView.addEventListener(Events.EDITOR_CLOSED, this.editorClosed.bind(this));
89
-
90
- this.button = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.format), 'brackets');
91
- this.button.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, this.formatSourceInPlace, this);
92
- this.updateButton(sourcesView.currentUISourceCode());
93
-
94
- return this.button;
95
- }
96
-
97
- private isFormattable(uiSourceCode: Workspace.UISourceCode.UISourceCode|null): boolean {
98
- if (!uiSourceCode) {
99
- return false;
100
- }
101
- // Only show Format button for editable files
102
- if (!Persistence.Persistence.PersistenceImpl.instance().hasEditableContent(uiSourceCode)) {
103
- return false;
104
- }
105
- // Only show Format button for JavaScript files. For other file types (JSON, CSS),
106
- // the pretty-print toggle in the status bar should be used instead, which provides
107
- // reversible formatting (fixes issue 378870233).
108
- const mimeType = Common.ResourceType.ResourceType.simplifyContentType(uiSourceCode.mimeType());
109
- return Common.ResourceType.ResourceType.isJavaScriptMimeType(mimeType);
110
- }
111
-
112
- private formatSourceInPlace(): void {
113
- const sourceFrame = this.sourcesView.currentSourceFrame();
114
- if (!sourceFrame) {
115
- return;
116
- }
117
- const uiSourceCode = sourceFrame.uiSourceCode();
118
- if (!this.isFormattable(uiSourceCode)) {
119
- return;
120
- }
121
-
122
- if (uiSourceCode.isDirty()) {
123
- void this.contentLoaded(uiSourceCode, sourceFrame, uiSourceCode.workingCopy());
124
- } else {
125
- void uiSourceCode.requestContentData()
126
- .then(contentDataOrError => TextUtils.ContentData.ContentData.textOr(contentDataOrError, ''))
127
- .then(content => {
128
- void this.contentLoaded(uiSourceCode, sourceFrame, content);
129
- });
130
- }
131
- }
132
-
133
- private async contentLoaded(
134
- uiSourceCode: Workspace.UISourceCode.UISourceCode, sourceFrame: UISourceCodeFrame,
135
- content: string): Promise<void> {
136
- const {formattedContent, formattedMapping} = await Formatter.ScriptFormatter.format(
137
- Common.Settings.Settings.instance(), uiSourceCode.contentType(), sourceFrame.contentType, content);
138
- if (uiSourceCode.workingCopy() === formattedContent) {
139
- return;
140
- }
141
- const selection = sourceFrame.textEditor.toLineColumn(sourceFrame.textEditor.state.selection.main.head);
142
- const [lineNumber, columnNumber] =
143
- formattedMapping.originalToFormatted(selection.lineNumber, selection.columnNumber);
144
- uiSourceCode.setWorkingCopy(formattedContent);
145
- this.sourcesView.showSourceLocation(uiSourceCode, {lineNumber, columnNumber});
146
- }
147
- }
148
-
149
- registerEditorAction(InplaceFormatterEditorAction.instance);