chrome-devtools-frontend 1.0.1662289 → 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.
- package/.agents/skills/devtools-unicode-escaping/SKILL.md +64 -0
- package/.agents/skills/migrate-chromium-test/SKILL.md +29 -4
- package/front_end/core/common/SettingRegistration.ts +0 -5
- package/front_end/core/common/Settings.ts +69 -3
- package/front_end/core/platform/StringUtilities.ts +38 -6
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -10
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -10
- package/front_end/core/sdk/sdk-meta.ts +0 -1
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +0 -13
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +8 -3
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +7 -2
- package/front_end/foundation/Universe.ts +16 -0
- package/front_end/generated/InspectorBackendCommands.ts +2 -14
- package/front_end/generated/protocol-mapping.d.ts +0 -53
- package/front_end/generated/protocol-proxy-api.d.ts +0 -46
- package/front_end/generated/protocol.ts +0 -148
- package/front_end/models/ai_assistance/AiAgent2.ts +3 -3
- package/front_end/models/ai_assistance/AiConversation.ts +21 -10
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +21 -10
- package/front_end/models/ai_assistance/ChangeManager.ts +2 -2
- package/front_end/models/ai_assistance/ExtensionScope.ts +6 -2
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +8 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
- package/front_end/models/badges/UserBadges.ts +31 -17
- package/front_end/models/bindings/NetworkProject.ts +16 -4
- package/front_end/models/emulation/DeviceModeModel.ts +67 -5
- package/front_end/models/extensions/RecorderPluginManager.ts +10 -6
- package/front_end/models/har/Log.snapshot.txt +193 -0
- package/front_end/models/har/Log.ts +3 -2
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +7 -5
- package/front_end/models/source_map_scopes/NamesResolver.ts +36 -30
- package/front_end/models/stack_trace/StackTrace.ts +17 -0
- package/front_end/panels/application/IndexedDBModel.ts +0 -10
- package/front_end/panels/application/IndexedDBViews.ts +240 -164
- package/front_end/panels/application/SharedStorageModel.ts +0 -10
- package/front_end/panels/application/components/AdsView.ts +23 -0
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +1 -1
- package/front_end/panels/application/components/adsView.css +21 -1
- package/front_end/panels/application/indexedDBViews.css +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +43 -1
- package/front_end/panels/network/RequestInitiatorView.ts +24 -2
- package/front_end/panels/network/networkLogView.css +5 -0
- package/front_end/panels/network/requestInitiatorViewTree.css +5 -0
- package/front_end/panels/profiler/HeapProfileView.ts +198 -79
- package/front_end/panels/recorder/README.md +1 -2
- package/front_end/panels/recorder/RecorderPanel.ts +1749 -17
- package/front_end/panels/recorder/recorder.ts +0 -2
- package/front_end/panels/settings/AISettingsTab.ts +13 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/spinners/Spinner.ts +29 -32
- package/front_end/ui/components/spinners/spinner.css +32 -84
- package/front_end/ui/legacy/Treeoutline.ts +14 -6
- package/front_end/ui/legacy/UIUtils.ts +25 -10
- package/front_end/ui/legacy/Widget.ts +17 -10
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +36 -7
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +63 -68
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/objectValue.css +2 -1
- package/front_end/ui/legacy/inspectorCommon.css +4 -4
- package/front_end/ui/lit/lit.ts +1 -0
- package/front_end/ui/lit/render.ts +44 -10
- package/front_end/ui/lit/strip-whitespace.ts +23 -2
- package/package.json +1 -1
- package/front_end/panels/recorder/RecorderController.ts +0 -1759
- /package/front_end/panels/recorder/{recorderController.css → recorderPanel.css} +0 -0
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import '../../../ui/legacy/components/data_grid/data_grid.js';
|
|
6
6
|
|
|
7
|
+
import * as Common from '../../../core/common/common.js';
|
|
7
8
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
8
9
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
9
10
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
@@ -14,6 +15,7 @@ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
|
14
15
|
import adsViewStyles from './adsView.css.js';
|
|
15
16
|
|
|
16
17
|
const {html} = Lit;
|
|
18
|
+
const {bindToSetting} = UI.UIUtils;
|
|
17
19
|
|
|
18
20
|
const UIStrings = {
|
|
19
21
|
/**
|
|
@@ -74,6 +76,19 @@ const UIStrings = {
|
|
|
74
76
|
* @description Accessible name for the ad iframes table.
|
|
75
77
|
*/
|
|
76
78
|
adIframes: 'Ad iframes',
|
|
79
|
+
/**
|
|
80
|
+
* @description Title for the settings section.
|
|
81
|
+
*/
|
|
82
|
+
settings: 'Settings',
|
|
83
|
+
/**
|
|
84
|
+
* @description The name of a checkbox setting. This setting highlights the
|
|
85
|
+
* rendering elements for ads that are found on the page.
|
|
86
|
+
*/
|
|
87
|
+
highlightAds: 'Highlight ads',
|
|
88
|
+
/**
|
|
89
|
+
* @description Explanation text for the 'Highlight ads' setting.
|
|
90
|
+
*/
|
|
91
|
+
highlightsElementsRedDetectedToBe: 'Highlights elements (red) detected to be ads.',
|
|
77
92
|
} as const;
|
|
78
93
|
|
|
79
94
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/AdsView.ts', UIStrings);
|
|
@@ -206,6 +221,14 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
206
221
|
</table>
|
|
207
222
|
</devtools-data-grid>
|
|
208
223
|
</div>
|
|
224
|
+
<div class="settings-title">${i18nString(UIStrings.settings)}</div>
|
|
225
|
+
<devtools-checkbox class="setting-container"
|
|
226
|
+
${bindToSetting(Common.Settings.Settings.instance().moduleSetting('show-ad-highlights'))}>
|
|
227
|
+
<div class="setting-text-container">
|
|
228
|
+
<div class="setting-label">${i18nString(UIStrings.highlightAds)}</div>
|
|
229
|
+
<div class="setting-explanation">${i18nString(UIStrings.highlightsElementsRedDetectedToBe)}</div>
|
|
230
|
+
</div>
|
|
231
|
+
</devtools-checkbox>
|
|
209
232
|
</div>
|
|
210
233
|
`, target);
|
|
211
234
|
// clang-format on
|
|
@@ -36,7 +36,7 @@ const UIStrings = {
|
|
|
36
36
|
/**
|
|
37
37
|
* @description Text in Shared Storage Events View of the Application panel
|
|
38
38
|
* Scope of shared storage event such as 'window', 'sharedStorageWorklet',
|
|
39
|
-
*
|
|
39
|
+
* or 'header'.
|
|
40
40
|
*/
|
|
41
41
|
eventScope: 'Access Scope',
|
|
42
42
|
/**
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.metrics-title,
|
|
63
|
-
.ad-frames-title
|
|
63
|
+
.ad-frames-title,
|
|
64
|
+
.settings-title {
|
|
64
65
|
color: var(--sys-color-on-surface);
|
|
65
66
|
flex: 0 0 auto;
|
|
66
67
|
font-weight: bold;
|
|
@@ -83,3 +84,22 @@
|
|
|
83
84
|
resize: vertical;
|
|
84
85
|
overflow: hidden;
|
|
85
86
|
}
|
|
87
|
+
|
|
88
|
+
devtools-checkbox.setting-container {
|
|
89
|
+
/*
|
|
90
|
+
* Apply negative margins here to offset the default devtools-checkbox style
|
|
91
|
+
* to align this component with the rest of the Ads panel layout.
|
|
92
|
+
*/
|
|
93
|
+
margin: 0 0 -6px -6px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.setting-text-container {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.setting-explanation {
|
|
102
|
+
color: var(--sys-color-token-subtle);
|
|
103
|
+
white-space: break-spaces;
|
|
104
|
+
margin-top: 0;
|
|
105
|
+
}
|
|
@@ -47,6 +47,7 @@ import * as Bindings from '../../models/bindings/bindings.js';
|
|
|
47
47
|
import type * as HAR from '../../models/har/har.js';
|
|
48
48
|
import * as Logs from '../../models/logs/logs.js';
|
|
49
49
|
import type * as NetworkTimeCalculator from '../../models/network_time_calculator/network_time_calculator.js';
|
|
50
|
+
import * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
50
51
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
51
52
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
52
53
|
import {createIcon} from '../../ui/kit/kit.js';
|
|
@@ -343,6 +344,16 @@ const UIStrings = {
|
|
|
343
344
|
* @description Text in Network Data Grid Node of the Network panel. Noun. Refers to a potentially blocking resource.
|
|
344
345
|
*/
|
|
345
346
|
potentiallyBlocking: 'Potentially blocking',
|
|
347
|
+
/**
|
|
348
|
+
* @description Text indicating a request originated from the DevTools console. Used as a subtitle in the
|
|
349
|
+
* Initiator column.
|
|
350
|
+
*/
|
|
351
|
+
console: 'Console',
|
|
352
|
+
/**
|
|
353
|
+
* @description Tooltip for the console icon in the Network panel, indicating a request was initiated
|
|
354
|
+
* from the Console.
|
|
355
|
+
*/
|
|
356
|
+
requestOriginatedFromConsole: 'Request originated from Console',
|
|
346
357
|
|
|
347
358
|
} as const;
|
|
348
359
|
const str_ = i18n.i18n.registerUIStrings('panels/network/NetworkDataGridNode.ts', UIStrings);
|
|
@@ -1009,6 +1020,29 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1009
1020
|
return aValue.localeCompare(bValue) || aRequest.identityCompare(bRequest);
|
|
1010
1021
|
}
|
|
1011
1022
|
|
|
1023
|
+
static isConsoleOriginated(request: SDK.NetworkRequest.NetworkRequest): boolean {
|
|
1024
|
+
const resourceType = request.resourceType();
|
|
1025
|
+
if (resourceType !== Common.ResourceType.resourceTypes.Fetch &&
|
|
1026
|
+
resourceType !== Common.ResourceType.resourceTypes.XHR) {
|
|
1027
|
+
return false;
|
|
1028
|
+
}
|
|
1029
|
+
const initiator = request.initiator();
|
|
1030
|
+
if (!initiator || initiator.type !== Protocol.Network.InitiatorType.Script) {
|
|
1031
|
+
return false;
|
|
1032
|
+
}
|
|
1033
|
+
if (initiator.url) {
|
|
1034
|
+
return false;
|
|
1035
|
+
}
|
|
1036
|
+
if (!initiator.stack) {
|
|
1037
|
+
return false;
|
|
1038
|
+
}
|
|
1039
|
+
return StackTrace.StackTrace.isConsoleOriginated(initiator.stack);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
private isConsoleOriginated(): boolean {
|
|
1043
|
+
return NetworkRequestNode.isConsoleOriginated(this.requestInternal);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1012
1046
|
override showingInitiatorChainChanged(): void {
|
|
1013
1047
|
const showInitiatorChain = this.showingInitiatorChain();
|
|
1014
1048
|
|
|
@@ -1340,6 +1374,13 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1340
1374
|
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
1341
1375
|
render(iconElement, cell);
|
|
1342
1376
|
|
|
1377
|
+
// render Console icon if this request originated from Console
|
|
1378
|
+
if (this.isConsoleOriginated()) {
|
|
1379
|
+
const consoleIcon = createIcon('terminal', 'network-console-icon');
|
|
1380
|
+
UI.Tooltip.Tooltip.install(consoleIcon, i18nString(UIStrings.requestOriginatedFromConsole));
|
|
1381
|
+
cell.appendChild(consoleIcon);
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1343
1384
|
// render Ask AI button
|
|
1344
1385
|
const aiButtonContainer = this.createAiButtonIfAvailable();
|
|
1345
1386
|
if (aiButtonContainer) {
|
|
@@ -1590,7 +1631,8 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1590
1631
|
}
|
|
1591
1632
|
UI.Tooltip.Tooltip.install((this.linkifiedInitiatorAnchor), '');
|
|
1592
1633
|
cell.appendChild(this.linkifiedInitiatorAnchor);
|
|
1593
|
-
this.appendSubtitle(cell,
|
|
1634
|
+
this.appendSubtitle(cell,
|
|
1635
|
+
this.isConsoleOriginated() ? i18nString(UIStrings.console) : i18nString(UIStrings.script));
|
|
1594
1636
|
cell.classList.add('network-script-initiated');
|
|
1595
1637
|
break;
|
|
1596
1638
|
}
|
|
@@ -12,6 +12,7 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
|
12
12
|
import {Directives, html, type LitTemplate, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
13
13
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
14
14
|
|
|
15
|
+
import {NetworkRequestNode} from './NetworkDataGridNode.js';
|
|
15
16
|
import requestInitiatorViewStyles from './requestInitiatorView.css.js';
|
|
16
17
|
import requestInitiatorViewTreeStyles from './requestInitiatorViewTree.css.js';
|
|
17
18
|
|
|
@@ -30,6 +31,10 @@ const UIStrings = {
|
|
|
30
31
|
* @description Title of a section in Request Initiator view of the Network Panel
|
|
31
32
|
*/
|
|
32
33
|
requestInitiatorChain: 'Request initiator chain',
|
|
34
|
+
/**
|
|
35
|
+
* @description Label shown in the initiator chain when a request was initiated from the Console.
|
|
36
|
+
*/
|
|
37
|
+
console: 'Console',
|
|
33
38
|
} as const;
|
|
34
39
|
const str_ = i18n.i18n.registerUIStrings('panels/network/RequestInitiatorView.ts', UIStrings);
|
|
35
40
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -51,6 +56,7 @@ export interface ViewInput {
|
|
|
51
56
|
initiatorGraph: Logs.NetworkLog.InitiatorGraph;
|
|
52
57
|
stackTrace: StackTrace.StackTrace.StackTrace|null;
|
|
53
58
|
request: SDK.NetworkRequest.NetworkRequest;
|
|
59
|
+
isConsoleOriginated: boolean;
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
|
|
@@ -83,6 +89,11 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
83
89
|
stackTrace: input.stackTrace,
|
|
84
90
|
})}
|
|
85
91
|
</li>
|
|
92
|
+
${input.isConsoleOriginated ? html`
|
|
93
|
+
<li role="treeitem" class="console-origin-label">
|
|
94
|
+
${i18nString(UIStrings.console)}
|
|
95
|
+
</li>
|
|
96
|
+
` : nothing}
|
|
86
97
|
</ul>
|
|
87
98
|
</li>
|
|
88
99
|
`;
|
|
@@ -167,13 +178,21 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
167
178
|
${i18nString(UIStrings.requestInitiatorChain)}
|
|
168
179
|
${hasInitiatorChain ? html`
|
|
169
180
|
<ul role="group">
|
|
170
|
-
${
|
|
181
|
+
${input.isConsoleOriginated ? html`
|
|
182
|
+
<li role="treeitem" aria-expanded="true" open>
|
|
183
|
+
<span>${i18nString(UIStrings.console)}</span>
|
|
184
|
+
<ul role="group">
|
|
185
|
+
${renderInitiatorNodes(initiators, 0, initiatorGraph.initiated, visited)}
|
|
186
|
+
</ul>
|
|
187
|
+
</li>` :
|
|
188
|
+
renderInitiatorNodes(initiators, 0, initiatorGraph.initiated, visited)}
|
|
171
189
|
</ul>` : nothing}
|
|
172
190
|
</li>`;
|
|
173
191
|
// clang-format on
|
|
174
192
|
};
|
|
175
193
|
|
|
176
|
-
const hasInitiatorChain =
|
|
194
|
+
const hasInitiatorChain =
|
|
195
|
+
input.initiatorGraph.initiators.size > 1 || input.initiatorGraph.initiated.size > 1 || input.isConsoleOriginated;
|
|
177
196
|
|
|
178
197
|
// clang-format off
|
|
179
198
|
render(html`
|
|
@@ -242,10 +261,13 @@ export class RequestInitiatorView extends UI.Widget.VBox {
|
|
|
242
261
|
.createStackTraceFromProtocolRuntime(rawStack, target);
|
|
243
262
|
}
|
|
244
263
|
|
|
264
|
+
const isConsoleOriginated = NetworkRequestNode.isConsoleOriginated(this.request);
|
|
265
|
+
|
|
245
266
|
const viewInput: ViewInput = {
|
|
246
267
|
initiatorGraph,
|
|
247
268
|
stackTrace,
|
|
248
269
|
request: this.request,
|
|
270
|
+
isConsoleOriginated,
|
|
249
271
|
};
|
|
250
272
|
|
|
251
273
|
this.#view(viewInput, undefined, this.contentElement);
|
|
@@ -262,12 +262,17 @@ td.time-column {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
.data-grid-data-grid-node devtools-icon[name="arrow-up-down-circle"],
|
|
265
|
+
.data-grid-data-grid-node devtools-icon.network-console-icon,
|
|
265
266
|
.network-log-grid.data-grid.small .icon {
|
|
266
267
|
width: 16px;
|
|
267
268
|
height: 16px;
|
|
268
269
|
vertical-align: sub;
|
|
269
270
|
}
|
|
270
271
|
|
|
272
|
+
.data-grid-data-grid-node devtools-icon.network-console-icon {
|
|
273
|
+
margin-right: 3px;
|
|
274
|
+
}
|
|
275
|
+
|
|
271
276
|
.image-network-icon-preview {
|
|
272
277
|
inset: 0;
|
|
273
278
|
margin: auto;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
padding: 4px;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
.console-origin-label {
|
|
21
|
+
color: var(--sys-color-token-subtle);
|
|
22
|
+
padding: 2px 4px 2px 20px;
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
.request-initiator-view-section-title:focus-visible {
|
|
21
26
|
background-color: var(--sys-color-state-focus-highlight);
|
|
22
27
|
}
|