chrome-devtools-frontend 1.0.1025631 → 1.0.1027150
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/config/owner/LIGHTHOUSE_OWNERS +1 -1
- package/docs/triage_guidelines.md +1 -122
- package/front_end/core/common/ResourceType.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +24 -0
- package/front_end/core/i18n/locales/en-XL.json +24 -0
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/DOMModel.ts +5 -0
- package/front_end/core/sdk/NetworkManager.ts +24 -3
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/SourceMap.ts +22 -6
- package/front_end/core/sdk/sdk-meta.ts +7 -0
- package/front_end/devtools_compatibility.js +1 -0
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +6 -3
- package/front_end/entrypoints/main/MainImpl.ts +5 -0
- package/front_end/generated/ARIAProperties.js +723 -723
- package/front_end/generated/InspectorBackendCommands.js +5 -3
- package/front_end/generated/SupportedCSSProperties.js +2843 -2832
- package/front_end/generated/protocol-mapping.d.ts +14 -0
- package/front_end/generated/protocol-proxy-api.d.ts +10 -0
- package/front_end/generated/protocol.ts +67 -0
- package/front_end/legacy_test_runner/sources_test_runner/DebuggerTestRunner.js +1 -1
- package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +38 -11
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +7 -1
- package/front_end/models/bindings/IgnoreListManager.ts +35 -22
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +1 -1
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +1 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +79 -67
- package/front_end/models/source_map_scopes/NamesResolver.ts +34 -0
- package/front_end/models/text_utils/TextRange.ts +8 -0
- package/front_end/models/timeline_model/TimelineModel.ts +18 -1
- package/front_end/panels/console/consoleView.css +4 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +18 -34
- package/front_end/panels/elements/TopLayerContainer.ts +51 -29
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +45 -50
- package/front_end/panels/elements/elementsTreeOutline.css +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -0
- package/front_end/panels/lighthouse/LighthousePanel.ts +2 -0
- package/front_end/panels/network/NetworkDataGridNode.ts +1 -2
- package/front_end/panels/security/SecurityPanel.ts +52 -0
- package/front_end/panels/security/originView.css +1 -1
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +16 -0
- package/front_end/panels/sources/CallStackSidebarPane.ts +45 -16
- package/front_end/panels/sources/DebuggerPlugin.ts +8 -2
- package/front_end/panels/sources/callStackSidebarPane.css +15 -9
- package/front_end/panels/sources/navigatorTree.css +3 -3
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +6 -0
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
- package/front_end/ui/components/docs/building-ui-documentation/CreatingComponents.md +172 -1
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +15 -16
- package/front_end/ui/components/panel_feedback/previewToggle.css +13 -15
- package/front_end/ui/components/text_editor/TextEditor.ts +3 -0
- package/front_end/ui/legacy/ListControl.ts +4 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +13 -3
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +5 -4
- package/package.json +1 -1
@@ -45,6 +45,7 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
45
45
|
static readonly litTagName = LitHtml.literal`devtools-elements-breadcrumbs`;
|
46
46
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
47
47
|
readonly #resizeObserver = new ResizeObserver(() => this.#checkForOverflowOnResize());
|
48
|
+
readonly #renderBound = this.#render.bind(this);
|
48
49
|
|
49
50
|
#crumbsData: readonly DOMNode[] = [];
|
50
51
|
#selectedDOMNode: Readonly<DOMNode>|null = null;
|
@@ -61,7 +62,7 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
61
62
|
this.#selectedDOMNode = data.selectedNode;
|
62
63
|
this.#crumbsData = data.crumbs;
|
63
64
|
this.#userHasManuallyScrolled = false;
|
64
|
-
void this.#
|
65
|
+
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#renderBound);
|
65
66
|
}
|
66
67
|
|
67
68
|
disconnectedCallback(): void {
|
@@ -104,12 +105,6 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
104
105
|
}
|
105
106
|
}
|
106
107
|
|
107
|
-
async #update(): Promise<void> {
|
108
|
-
await this.#render();
|
109
|
-
this.#engageResizeObserver();
|
110
|
-
void this.#ensureSelectedNodeIsVisible();
|
111
|
-
}
|
112
|
-
|
113
108
|
#onCrumbMouseMove(node: DOMNode): () => void {
|
114
109
|
return (): void => node.highlightNode();
|
115
110
|
}
|
@@ -267,53 +262,53 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
267
262
|
`;
|
268
263
|
}
|
269
264
|
|
270
|
-
|
265
|
+
#render(): void {
|
271
266
|
const crumbs = crumbsToRender(this.#crumbsData, this.#selectedDOMNode);
|
272
267
|
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
<
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
// clang-format on
|
314
|
-
});
|
268
|
+
// Disabled until https://crbug.com/1079231 is fixed.
|
269
|
+
// clang-format off
|
270
|
+
LitHtml.render(LitHtml.html`
|
271
|
+
<nav class="crumbs" aria-label=${i18nString(UIStrings.breadcrumbs)}>
|
272
|
+
${this.#renderOverflowButton('left', this.#userScrollPosition === 'start')}
|
273
|
+
|
274
|
+
<div class="crumbs-window" @scroll=${this.#onCrumbsWindowScroll}>
|
275
|
+
<ul class="crumbs-scroll-container">
|
276
|
+
${crumbs.map(crumb => {
|
277
|
+
const crumbClasses = {
|
278
|
+
crumb: true,
|
279
|
+
selected: crumb.selected,
|
280
|
+
};
|
281
|
+
// eslint-disable-next-line rulesdir/ban_a_tags_in_lit_html
|
282
|
+
return LitHtml.html`
|
283
|
+
<li class=${LitHtml.Directives.classMap(crumbClasses)}
|
284
|
+
data-node-id=${crumb.node.id}
|
285
|
+
data-crumb="true"
|
286
|
+
>
|
287
|
+
<a href="#"
|
288
|
+
draggable=false
|
289
|
+
class="crumb-link"
|
290
|
+
@click=${this.#onCrumbClick(crumb.node)}
|
291
|
+
@mousemove=${this.#onCrumbMouseMove(crumb.node)}
|
292
|
+
@mouseleave=${this.#onCrumbMouseLeave(crumb.node)}
|
293
|
+
@focus=${this.#onCrumbFocus(crumb.node)}
|
294
|
+
@blur=${this.#onCrumbBlur(crumb.node)}
|
295
|
+
><${NodeText.NodeText.NodeText.litTagName} data-node-title=${crumb.title.main} .data=${{
|
296
|
+
nodeTitle: crumb.title.main,
|
297
|
+
nodeId: crumb.title.extras.id,
|
298
|
+
nodeClasses: crumb.title.extras.classes,
|
299
|
+
} as NodeText.NodeText.NodeTextData}></${NodeText.NodeText.NodeText.litTagName}></a>
|
300
|
+
</li>`;
|
301
|
+
})}
|
302
|
+
</ul>
|
303
|
+
</div>
|
304
|
+
${this.#renderOverflowButton('right', this.#userScrollPosition === 'end')}
|
305
|
+
</nav>
|
306
|
+
`, this.#shadow, { host: this });
|
307
|
+
// clang-format on
|
315
308
|
|
316
309
|
void this.#checkForOverflow();
|
310
|
+
this.#engageResizeObserver();
|
311
|
+
void this.#ensureSelectedNodeIsVisible();
|
317
312
|
}
|
318
313
|
|
319
314
|
async #ensureSelectedNodeIsVisible(): Promise<void> {
|
@@ -309,6 +309,9 @@ export class LighthouseController extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
309
309
|
return '';
|
310
310
|
}
|
311
311
|
const usageData = await mainTarget.storageAgent().invoke_getUsageAndQuota({origin});
|
312
|
+
if (usageData.getError()) {
|
313
|
+
return '';
|
314
|
+
}
|
312
315
|
const locations = usageData.usageBreakdown.filter(usage => usage.usage)
|
313
316
|
.map(usage => STORAGE_TYPE_NAMES.get(usage.storageType))
|
314
317
|
.map(i18nStringFn => i18nStringFn ? i18nStringFn() : undefined)
|
@@ -308,6 +308,8 @@ export class LighthousePanel extends UI.Panel.Panel {
|
|
308
308
|
const reportContainer = this.auditResultsElement.createChild('div', 'lh-vars lh-root lh-devtools');
|
309
309
|
// @ts-ignore Expose LHR on DOM for e2e tests
|
310
310
|
reportContainer._lighthouseResultForTesting = lighthouseResult;
|
311
|
+
// @ts-ignore Expose Artifacts on DOM for e2e tests
|
312
|
+
reportContainer._lighthouseArtifactsForTesting = artifacts;
|
311
313
|
|
312
314
|
const dom = new LighthouseReport.DOM(this.auditResultsElement.ownerDocument as Document, reportContainer);
|
313
315
|
const renderer = new LighthouseReportRenderer(dom) as LighthouseReport.ReportRenderer;
|
@@ -1043,8 +1043,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
1043
1043
|
const secondIconElement = document.createElement('img');
|
1044
1044
|
secondIconElement.classList.add('icon');
|
1045
1045
|
secondIconElement.alt = i18nString(UIStrings.webBundleInnerRequest);
|
1046
|
-
secondIconElement.src = 'Images/ic_file_webbundle_inner_request.svg';
|
1047
|
-
new URL('../../Images/ic_file_webbundle_inner_request.svg', import.meta.url).toString();
|
1046
|
+
secondIconElement.src = new URL('../../Images/ic_file_webbundle_inner_request.svg', import.meta.url).toString();
|
1048
1047
|
|
1049
1048
|
const networkManager = SDK.NetworkManager.NetworkManager.forRequest(this.requestInternal);
|
1050
1049
|
if (webBundleInnerRequestInfo.bundleRequestId && networkManager) {
|
@@ -329,6 +329,16 @@ const UIStrings = {
|
|
329
329
|
*/
|
330
330
|
cipher: 'Cipher',
|
331
331
|
/**
|
332
|
+
*@description Text in Security Panel that refers to the signature algorithm
|
333
|
+
*used by the server for authenticate in the TLS handshake.
|
334
|
+
*/
|
335
|
+
serverSignature: 'Server signature',
|
336
|
+
/**
|
337
|
+
*@description Text in Security Panel that refers to whether the ClientHello
|
338
|
+
*message in the TLS handshake was encrypted.
|
339
|
+
*/
|
340
|
+
encryptedClientHello: 'Encrypted ClientHello',
|
341
|
+
/**
|
332
342
|
*@description Sct div text content in Security Panel of the Security panel
|
333
343
|
*/
|
334
344
|
certificateTransparency: 'Certificate Transparency',
|
@@ -442,12 +452,42 @@ const UIStrings = {
|
|
442
452
|
*@example {2} PH1
|
443
453
|
*/
|
444
454
|
showMoreSTotal: 'Show more ({PH1} total)',
|
455
|
+
/**
|
456
|
+
*@description Shown when a field refers to an option that is unknown to the frontend.
|
457
|
+
*/
|
458
|
+
unknownField: 'unknown',
|
459
|
+
/**
|
460
|
+
*@description Shown when a field refers to a TLS feature which was enabled.
|
461
|
+
*/
|
462
|
+
enabled: 'enabled',
|
445
463
|
};
|
446
464
|
const str_ = i18n.i18n.registerUIStrings('panels/security/SecurityPanel.ts', UIStrings);
|
447
465
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
448
466
|
|
449
467
|
let securityPanelInstance: SecurityPanel;
|
450
468
|
|
469
|
+
// See https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-signaturescheme
|
470
|
+
// This contains signature schemes supported by Chrome.
|
471
|
+
const SignatureSchemeStrings = new Map([
|
472
|
+
// The full name for these schemes is RSASSA-PKCS1-v1_5, sometimes
|
473
|
+
// "PKCS#1 v1.5", but those are very long, so let "RSA" vs "RSA-PSS"
|
474
|
+
// disambiguate.
|
475
|
+
[0x0201, 'RSA with SHA-1'],
|
476
|
+
[0x0401, 'RSA with SHA-256'],
|
477
|
+
[0x0501, 'RSA with SHA-384'],
|
478
|
+
[0x0601, 'RSA with SHA-512'],
|
479
|
+
|
480
|
+
// We omit the curve from these names because in TLS 1.2 these code points
|
481
|
+
// were not specific to a curve. Saying "P-256" for a server that used a P-384
|
482
|
+
// key with SHA-256 in TLS 1.2 would be confusing.
|
483
|
+
[0x0403, 'ECDSA with SHA-256'],
|
484
|
+
[0x0503, 'ECDSA with SHA-384'],
|
485
|
+
|
486
|
+
[0x0804, 'RSA-PSS with SHA-256'],
|
487
|
+
[0x0805, 'RSA-PSS with SHA-384'],
|
488
|
+
[0x0806, 'RSA-PSS with SHA-512'],
|
489
|
+
]);
|
490
|
+
|
451
491
|
export class SecurityPanel extends UI.Panel.PanelWithSidebar implements
|
452
492
|
SDK.TargetManager.SDKModelObserver<SecurityModel> {
|
453
493
|
private readonly mainView: SecurityMainView;
|
@@ -1466,11 +1506,23 @@ export class SecurityOriginView extends UI.Widget.VBox {
|
|
1466
1506
|
table.addRow(i18nString(UIStrings.keyExchange), originState.securityDetails.keyExchangeGroup);
|
1467
1507
|
}
|
1468
1508
|
|
1509
|
+
if (originState.securityDetails.serverSignatureAlgorithm) {
|
1510
|
+
// See https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-signaturescheme
|
1511
|
+
let sigString = SignatureSchemeStrings.get(originState.securityDetails.serverSignatureAlgorithm);
|
1512
|
+
sigString ??=
|
1513
|
+
i18nString(UIStrings.unknownField) + ' (' + originState.securityDetails.serverSignatureAlgorithm + ')';
|
1514
|
+
table.addRow(i18nString(UIStrings.serverSignature), sigString);
|
1515
|
+
}
|
1516
|
+
|
1469
1517
|
table.addRow(
|
1470
1518
|
i18nString(UIStrings.cipher),
|
1471
1519
|
originState.securityDetails.cipher +
|
1472
1520
|
(originState.securityDetails.mac ? ' with ' + originState.securityDetails.mac : ''));
|
1473
1521
|
|
1522
|
+
if (originState.securityDetails.encryptedClientHello) {
|
1523
|
+
table.addRow(i18nString(UIStrings.encryptedClientHello), i18nString(UIStrings.enabled));
|
1524
|
+
}
|
1525
|
+
|
1474
1526
|
// Create the certificate section outside the callback, so that it appears in the right place.
|
1475
1527
|
const certificateSection = this.element.createChild('div', 'origin-view-section');
|
1476
1528
|
const certificateDiv = certificateSection.createChild('div', 'origin-view-section-title');
|
@@ -26,6 +26,15 @@ const UIStrings = {
|
|
26
26
|
*/
|
27
27
|
ignoreListContentScriptsExtension: 'Add content scripts to ignore list (extension scripts in the page)',
|
28
28
|
/**
|
29
|
+
*@description Text in Framework Ignore List Settings Tab of the Settings
|
30
|
+
*/
|
31
|
+
automaticallyIgnoreListKnownThirdPartyScripts: 'Automatically add known third-party scripts to ignore list',
|
32
|
+
/**
|
33
|
+
*@description Text in Framework Ignore List Settings Tab of the Settings
|
34
|
+
*/
|
35
|
+
automaticallyIgnoreListKnownThirdPartyScriptsTooltip:
|
36
|
+
'Add sources from the `x_google_ignoreList` field from source maps to the ignore list',
|
37
|
+
/**
|
29
38
|
*@description Ignore List label in Framework Ignore List Settings Tab of the Settings
|
30
39
|
*/
|
31
40
|
ignoreList: 'Ignore List',
|
@@ -98,6 +107,13 @@ export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox implements
|
|
98
107
|
Common.Settings.Settings.instance().moduleSetting('skipContentScripts'), true));
|
99
108
|
UI.Tooltip.Tooltip.install(ignoreListContentScripts, i18nString(UIStrings.ignoreListContentScriptsExtension));
|
100
109
|
|
110
|
+
const automaticallyIgnoreList = this.contentElement.createChild('div', 'automatically-ignore-list');
|
111
|
+
automaticallyIgnoreList.appendChild(UI.SettingsUI.createSettingCheckbox(
|
112
|
+
i18nString(UIStrings.automaticallyIgnoreListKnownThirdPartyScripts),
|
113
|
+
Common.Settings.Settings.instance().moduleSetting('automaticallyIgnoreListKnownThirdPartyScripts'), true));
|
114
|
+
UI.Tooltip.Tooltip.install(
|
115
|
+
automaticallyIgnoreList, i18nString(UIStrings.automaticallyIgnoreListKnownThirdPartyScriptsTooltip));
|
116
|
+
|
101
117
|
this.ignoreListLabel = i18nString(UIStrings.ignoreList);
|
102
118
|
this.disabledLabel = i18nString(UIStrings.disabled);
|
103
119
|
|
@@ -34,6 +34,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
34
34
|
import * as SDK from '../../core/sdk/sdk.js';
|
35
35
|
import * as Bindings from '../../models/bindings/bindings.js';
|
36
36
|
import * as Persistence from '../../models/persistence/persistence.js';
|
37
|
+
import * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';
|
37
38
|
import * as Workspace from '../../models/workspace/workspace.js';
|
38
39
|
import * as UI from '../../ui/legacy/legacy.js';
|
39
40
|
|
@@ -106,6 +107,7 @@ let callstackSidebarPaneInstance: CallStackSidebarPane;
|
|
106
107
|
export class CallStackSidebarPane extends UI.View.SimpleView implements UI.ContextFlavorListener.ContextFlavorListener,
|
107
108
|
UI.ListControl.ListDelegate<Item> {
|
108
109
|
private readonly ignoreListMessageElement: Element;
|
110
|
+
private readonly ignoreListCheckboxElement: HTMLInputElement;
|
109
111
|
private readonly notPausedMessageElement: HTMLElement;
|
110
112
|
private readonly callFrameWarningsElement: HTMLElement;
|
111
113
|
private readonly items: UI.ListModel.ListModel<Item>;
|
@@ -118,18 +120,20 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
118
120
|
private readonly updateItemThrottler: Common.Throttler.Throttler;
|
119
121
|
private readonly scheduledForUpdateItems: Set<Item>;
|
120
122
|
private muteActivateItem?: boolean;
|
123
|
+
private lastDebuggerModel: SDK.DebuggerModel.DebuggerModel|null = null;
|
121
124
|
|
122
125
|
private constructor() {
|
123
126
|
super(i18nString(UIStrings.callStack), true);
|
124
127
|
|
125
|
-
this.ignoreListMessageElement
|
128
|
+
({element: this.ignoreListMessageElement, checkbox: this.ignoreListCheckboxElement} =
|
129
|
+
this.createIgnoreListMessageElementAndCheckbox());
|
126
130
|
this.contentElement.appendChild(this.ignoreListMessageElement);
|
127
131
|
|
128
132
|
this.notPausedMessageElement = this.contentElement.createChild('div', 'gray-info-message');
|
129
133
|
this.notPausedMessageElement.textContent = i18nString(UIStrings.notPaused);
|
130
134
|
this.notPausedMessageElement.tabIndex = -1;
|
131
135
|
|
132
|
-
this.callFrameWarningsElement = this.contentElement.createChild('div', '
|
136
|
+
this.callFrameWarningsElement = this.contentElement.createChild('div', 'call-frame-warnings-message');
|
133
137
|
const icon = UI.Icon.Icon.create('smallicon-warning', 'call-frame-warning-icon');
|
134
138
|
this.callFrameWarningsElement.appendChild(icon);
|
135
139
|
this.callFrameWarningsElement.appendChild(document.createTextNode(i18nString(UIStrings.callFrameWarnings)));
|
@@ -178,6 +182,7 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
178
182
|
|
179
183
|
flavorChanged(_object: Object|null): void {
|
180
184
|
this.showIgnoreListed = false;
|
185
|
+
this.ignoreListCheckboxElement.checked = false;
|
181
186
|
this.maxAsyncStackChainDepth = defaultMaxAsyncStackChainDepth;
|
182
187
|
this.update();
|
183
188
|
}
|
@@ -186,6 +191,24 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
186
191
|
this.update();
|
187
192
|
}
|
188
193
|
|
194
|
+
private setSourceMapSubscription(debuggerModel: SDK.DebuggerModel.DebuggerModel|null): void {
|
195
|
+
// Shortcut for the case when we are listening to the same model.
|
196
|
+
if (this.lastDebuggerModel === debuggerModel) {
|
197
|
+
return;
|
198
|
+
}
|
199
|
+
|
200
|
+
if (this.lastDebuggerModel) {
|
201
|
+
this.lastDebuggerModel.sourceMapManager().removeEventListener(
|
202
|
+
SDK.SourceMapManager.Events.SourceMapAttached, this.debugInfoAttached, this);
|
203
|
+
}
|
204
|
+
|
205
|
+
this.lastDebuggerModel = debuggerModel;
|
206
|
+
if (this.lastDebuggerModel) {
|
207
|
+
this.lastDebuggerModel.sourceMapManager().addEventListener(
|
208
|
+
SDK.SourceMapManager.Events.SourceMapAttached, this.debugInfoAttached, this);
|
209
|
+
}
|
210
|
+
}
|
211
|
+
|
189
212
|
private update(): void {
|
190
213
|
void this.updateThrottler.schedule(() => this.doUpdate());
|
191
214
|
}
|
@@ -196,6 +219,7 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
196
219
|
this.callFrameWarningsElement.classList.add('hidden');
|
197
220
|
|
198
221
|
const details = UI.Context.Context.instance().flavor(SDK.DebuggerModel.DebuggerPausedDetails);
|
222
|
+
this.setSourceMapSubscription(details?.debuggerModel ?? null);
|
199
223
|
if (!details) {
|
200
224
|
this.notPausedMessageElement.classList.remove('hidden');
|
201
225
|
this.ignoreListMessageElement.classList.add('hidden');
|
@@ -256,6 +280,9 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
256
280
|
}
|
257
281
|
this.showMoreMessageElement.classList.toggle('hidden', !asyncStackTrace);
|
258
282
|
this.items.replaceAll(items);
|
283
|
+
for (const item of this.items) {
|
284
|
+
this.refreshItem(item);
|
285
|
+
}
|
259
286
|
if (this.maxAsyncStackChainDepth === defaultMaxAsyncStackChainDepth) {
|
260
287
|
this.list.selectNextItem(true /* canWrap */, false /* center */);
|
261
288
|
const selectedItem = this.list.selectedItem();
|
@@ -283,6 +310,7 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
283
310
|
}
|
284
311
|
this.ignoreListMessageElement.classList.toggle('hidden', true);
|
285
312
|
} else {
|
313
|
+
this.showIgnoreListed = this.ignoreListCheckboxElement.checked;
|
286
314
|
const itemsSet = new Set<Item>(items);
|
287
315
|
let hasIgnoreListed = false;
|
288
316
|
for (let i = 0; i < this.items.length; ++i) {
|
@@ -292,7 +320,7 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
292
320
|
}
|
293
321
|
hasIgnoreListed = hasIgnoreListed || item.isIgnoreListed;
|
294
322
|
}
|
295
|
-
this.ignoreListMessageElement.classList.toggle('hidden',
|
323
|
+
this.ignoreListMessageElement.classList.toggle('hidden', !hasIgnoreListed);
|
296
324
|
}
|
297
325
|
delete this.muteActivateItem;
|
298
326
|
});
|
@@ -365,24 +393,24 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
365
393
|
return true;
|
366
394
|
}
|
367
395
|
|
368
|
-
private
|
396
|
+
private createIgnoreListMessageElementAndCheckbox(): {element: Element, checkbox: HTMLInputElement} {
|
369
397
|
const element = document.createElement('div');
|
370
398
|
element.classList.add('ignore-listed-message');
|
371
|
-
element.createChild('
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
399
|
+
const label = element.createChild('label');
|
400
|
+
label.classList.add('ignore-listed-message-label');
|
401
|
+
const checkbox = label.createChild('input') as HTMLInputElement;
|
402
|
+
checkbox.tabIndex = 0;
|
403
|
+
checkbox.type = 'checkbox';
|
404
|
+
checkbox.classList.add('ignore-listed-checkbox');
|
405
|
+
label.append(i18nString(UIStrings.showIgnorelistedFrames));
|
376
406
|
const showAll = (): void => {
|
377
|
-
this.showIgnoreListed =
|
407
|
+
this.showIgnoreListed = checkbox.checked;
|
378
408
|
for (const item of this.items) {
|
379
409
|
this.refreshItem(item);
|
380
410
|
}
|
381
|
-
this.ignoreListMessageElement.classList.toggle('hidden', true);
|
382
411
|
};
|
383
|
-
|
384
|
-
|
385
|
-
return element;
|
412
|
+
checkbox.addEventListener('click', showAll);
|
413
|
+
return {element, checkbox};
|
386
414
|
}
|
387
415
|
|
388
416
|
private createShowMoreMessageElement(): Element {
|
@@ -465,7 +493,7 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
465
493
|
const canIgnoreList =
|
466
494
|
Bindings.IgnoreListManager.IgnoreListManager.instance().canIgnoreListUISourceCode(uiSourceCode);
|
467
495
|
const isIgnoreListed =
|
468
|
-
Bindings.IgnoreListManager.IgnoreListManager.instance().
|
496
|
+
Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(uiSourceCode.url());
|
469
497
|
const isContentScript = uiSourceCode.project().type() === Workspace.Workspace.projectTypes.ContentScripts;
|
470
498
|
|
471
499
|
const manager = Bindings.IgnoreListManager.IgnoreListManager.instance();
|
@@ -572,7 +600,8 @@ export class Item {
|
|
572
600
|
static async createForDebuggerCallFrame(
|
573
601
|
frame: SDK.DebuggerModel.CallFrame, locationPool: Bindings.LiveLocation.LiveLocationPool,
|
574
602
|
updateDelegate: (arg0: Item) => void): Promise<Item> {
|
575
|
-
const
|
603
|
+
const name = await SourceMapScopes.NamesResolver.resolveFrameFunctionName(frame) ?? frame.functionName;
|
604
|
+
const item = new Item(UI.UIUtils.beautifyFunctionName(name), updateDelegate);
|
576
605
|
await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createCallFrameLiveLocation(
|
577
606
|
frame.location(), item.update.bind(item), locationPool);
|
578
607
|
return item;
|
@@ -235,6 +235,9 @@ export class DebuggerPlugin extends Plugin {
|
|
235
235
|
Common.Settings.Settings.instance()
|
236
236
|
.moduleSetting('skipContentScripts')
|
237
237
|
.addChangeListener(this.showIgnoreListInfobarIfNeeded, this);
|
238
|
+
Common.Settings.Settings.instance()
|
239
|
+
.moduleSetting('automaticallyIgnoreListKnownThirdPartyScripts')
|
240
|
+
.addChangeListener(this.showIgnoreListInfobarIfNeeded, this);
|
238
241
|
|
239
242
|
UI.Context.Context.instance().addFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);
|
240
243
|
this.liveLocationPool = new Bindings.LiveLocation.LiveLocationPool();
|
@@ -365,7 +368,7 @@ export class DebuggerPlugin extends Plugin {
|
|
365
368
|
return;
|
366
369
|
}
|
367
370
|
const projectType = uiSourceCode.project().type();
|
368
|
-
if (!Bindings.IgnoreListManager.IgnoreListManager.instance().
|
371
|
+
if (!Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(uiSourceCode.url())) {
|
369
372
|
this.hideIgnoreListInfobar();
|
370
373
|
return;
|
371
374
|
}
|
@@ -513,7 +516,7 @@ export class DebuggerPlugin extends Plugin {
|
|
513
516
|
|
514
517
|
if (this.uiSourceCode.project().type() === Workspace.Workspace.projectTypes.Network &&
|
515
518
|
Common.Settings.Settings.instance().moduleSetting('jsSourceMapsEnabled').get() &&
|
516
|
-
!Bindings.IgnoreListManager.IgnoreListManager.instance().
|
519
|
+
!Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(this.uiSourceCode.url())) {
|
517
520
|
if (this.scriptFileForDebuggerModel.size) {
|
518
521
|
const scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile =
|
519
522
|
this.scriptFileForDebuggerModel.values().next().value;
|
@@ -1625,6 +1628,9 @@ export class DebuggerPlugin extends Plugin {
|
|
1625
1628
|
Common.Settings.Settings.instance()
|
1626
1629
|
.moduleSetting('skipContentScripts')
|
1627
1630
|
.removeChangeListener(this.showIgnoreListInfobarIfNeeded, this);
|
1631
|
+
Common.Settings.Settings.instance()
|
1632
|
+
.moduleSetting('automaticallyIgnoreListKnownThirdPartyScripts')
|
1633
|
+
.removeChangeListener(this.showIgnoreListInfobarIfNeeded, this);
|
1628
1634
|
super.dispose();
|
1629
1635
|
|
1630
1636
|
UI.Context.Context.instance().removeFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* found in the LICENSE file.
|
5
5
|
*/
|
6
6
|
|
7
|
-
.
|
7
|
+
.call-frame-warnings-message {
|
8
8
|
--override-ignore-message-background-color: #ffffc2;
|
9
9
|
|
10
10
|
text-align: center;
|
@@ -14,6 +14,16 @@
|
|
14
14
|
background-color: var(--override-ignore-message-background-color);
|
15
15
|
}
|
16
16
|
|
17
|
+
.ignore-listed-message {
|
18
|
+
padding: 1px;
|
19
|
+
}
|
20
|
+
|
21
|
+
.ignore-listed-message-label {
|
22
|
+
color: var(--color-text-secondary);
|
23
|
+
align-items: center;
|
24
|
+
display: flex;
|
25
|
+
}
|
26
|
+
|
17
27
|
.-theme-with-dark-background .ignore-listed-message,
|
18
28
|
:host-context(.-theme-with-dark-background) .ignore-listed-message {
|
19
29
|
--override-ignore-message-background-color: rgb(72 72 0);
|
@@ -23,14 +33,6 @@
|
|
23
33
|
margin-left: 5px;
|
24
34
|
}
|
25
35
|
|
26
|
-
.ignore-listed-message > .link {
|
27
|
-
margin-left: 5px;
|
28
|
-
}
|
29
|
-
|
30
|
-
.ignore-listed-message > .link:focus {
|
31
|
-
outline-width: unset;
|
32
|
-
}
|
33
|
-
|
34
36
|
.show-more-message {
|
35
37
|
text-align: center;
|
36
38
|
font-style: italic;
|
@@ -80,6 +82,10 @@
|
|
80
82
|
background-color: var(--legacy-focus-bg-color);
|
81
83
|
}
|
82
84
|
|
85
|
+
.ignore-listed-checkbox:focus-visible {
|
86
|
+
outline-width: unset;
|
87
|
+
}
|
88
|
+
|
83
89
|
.call-frame-item:not(.async-header):hover {
|
84
90
|
background-color: var(--color-background-elevation-1);
|
85
91
|
}
|
@@ -121,9 +121,9 @@
|
|
121
121
|
background: var(--override-image-font-tree-item-color);
|
122
122
|
}
|
123
123
|
|
124
|
-
.navigator-sm-folder-tree-item .tree-element-title,
|
125
|
-
.navigator-sm-script-tree-item .tree-element-title,
|
126
|
-
.navigator-sm-stylesheet-tree-item .tree-element-title {
|
124
|
+
.tree-outline:not(:has(.navigator-deployed-tree-item)) .navigator-sm-folder-tree-item .tree-element-title,
|
125
|
+
.tree-outline:not(:has(.navigator-deployed-tree-item)) .navigator-sm-script-tree-item .tree-element-title,
|
126
|
+
.tree-outline:not(:has(.navigator-deployed-tree-item)) .navigator-sm-stylesheet-tree-item .tree-element-title {
|
127
127
|
font-style: italic;
|
128
128
|
}
|
129
129
|
|
@@ -10,6 +10,12 @@
|
|
10
10
|
opacity: 0%;
|
11
11
|
}
|
12
12
|
|
13
|
+
:host-context(.-theme-with-dark-background) .watch-expression-delete-button {
|
14
|
+
/* This is a workaround due to a sprite with hardcoded color.
|
15
|
+
It should no longer be necessary after we update icons. */
|
16
|
+
filter: brightness(1.5);
|
17
|
+
}
|
18
|
+
|
13
19
|
.right-aligned {
|
14
20
|
right: 16px;
|
15
21
|
}
|
@@ -701,7 +701,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
701
701
|
}
|
702
702
|
|
703
703
|
private isIgnoreListedURL(url: Platform.DevToolsPath.UrlString): boolean {
|
704
|
-
return Bindings.IgnoreListManager.IgnoreListManager.instance().
|
704
|
+
return Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(url);
|
705
705
|
}
|
706
706
|
|
707
707
|
private appendAsyncEventsGroup(
|