chrome-devtools-frontend 1.0.939277 → 1.0.941095
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/.stylelintrc.json +1 -7
- package/config/gni/all_devtools_files.gni +0 -1
- package/config/gni/devtools_grd_files.gni +2 -0
- package/docs/triage_guidelines.md +13 -11
- package/front_end/Tests.js +47 -0
- package/front_end/core/host/InspectorFrontendHostAPI.ts +5 -0
- package/front_end/core/host/UserMetrics.ts +72 -0
- package/front_end/core/i18n/locales/en-US.json +42 -9
- package/front_end/core/i18n/locales/en-XL.json +42 -9
- package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
- package/front_end/core/root/Runtime.ts +4 -0
- package/front_end/core/sdk/CategorizedBreakpoint.ts +35 -0
- package/front_end/core/sdk/DOMDebuggerModel.ts +28 -42
- package/front_end/core/sdk/EventBreakpointsModel.ts +178 -0
- package/front_end/core/sdk/Target.ts +2 -1
- package/front_end/core/sdk/sdk.ts +4 -0
- package/front_end/devtools_compatibility.js +5 -0
- package/front_end/entrypoints/main/MainImpl.ts +6 -3
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/entrypoints/shell/shell.js +1 -0
- package/front_end/entrypoints/shell/shell.json +0 -1
- package/front_end/models/logs/LogManager.ts +1 -0
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
- package/front_end/panels/application/BackForwardCacheView.ts +24 -24
- package/front_end/panels/browser_debugger/CSPViolationBreakpointsSidebarPane.ts +2 -2
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +7 -7
- package/front_end/panels/browser_debugger/EventListenerBreakpointsSidebarPane.ts +14 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +6 -8
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +7 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -1
- package/front_end/panels/issues/IssueKindView.ts +22 -4
- package/front_end/panels/lighthouse/LighthouseController.ts +10 -33
- package/front_end/panels/lighthouse/LighthousePanel.ts +2 -1
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +2 -1
- package/front_end/panels/network/NetworkLogView.ts +3 -0
- package/front_end/panels/network/RequestPayloadView.ts +2 -0
- package/front_end/panels/network/requestPayloadTree.css +5 -0
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
- package/front_end/panels/settings/components/SyncSection.ts +25 -4
- package/front_end/panels/sources/DebuggerPausedMessage.ts +14 -7
- package/front_end/panels/sources/SourcesPanel.ts +9 -5
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +1 -1
- package/front_end/ui/components/buttons/Button.ts +11 -0
- package/front_end/ui/components/buttons/button.css +4 -0
- package/front_end/ui/components/docs/button/basic.ts +10 -0
- package/front_end/ui/components/docs/panel_feedback/basic.html +25 -0
- package/front_end/ui/components/docs/panel_feedback/basic.ts +20 -0
- package/front_end/ui/components/helpers/get-stylesheet.ts +1 -0
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +100 -0
- package/front_end/ui/components/panel_feedback/panelFeedback.css +76 -0
- package/front_end/ui/components/panel_feedback/panel_feedback.ts +5 -0
- package/front_end/ui/components/report_view/reportValue.css +1 -0
- package/front_end/ui/legacy/softContextMenu.css +1 -0
- package/package.json +2 -2
- package/scripts/eslint_rules/lib/check_component_naming.js +1 -1
- package/scripts/eslint_rules/lib/enforce_custom_event_names.js +1 -1
- package/scripts/eslint_rules/lib/l10n_no_i18nString_calls_module_instantiation.js +1 -1
- package/scripts/eslint_rules/lib/no_underscored_properties.js +1 -1
- package/front_end/entrypoints/main/module.json +0 -5
|
@@ -7,6 +7,7 @@ import * as i18n from '../i18n/i18n.js';
|
|
|
7
7
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
|
8
8
|
import * as Protocol from '../../generated/protocol.js';
|
|
9
9
|
|
|
10
|
+
import {CategorizedBreakpoint} from './CategorizedBreakpoint.js';
|
|
10
11
|
import type {Location} from './DebuggerModel.js';
|
|
11
12
|
import type {DOMNode} from './DOMModel.js';
|
|
12
13
|
import {DOMModel, Events as DOMModelEvents} from './DOMModel.js';
|
|
@@ -690,38 +691,6 @@ export namespace EventListener {
|
|
|
690
691
|
}
|
|
691
692
|
}
|
|
692
693
|
|
|
693
|
-
export class CategorizedBreakpoint {
|
|
694
|
-
readonly #categoryInternal: string;
|
|
695
|
-
titleInternal: string;
|
|
696
|
-
enabledInternal: boolean;
|
|
697
|
-
|
|
698
|
-
constructor(category: string, title: string) {
|
|
699
|
-
this.#categoryInternal = category;
|
|
700
|
-
this.titleInternal = title;
|
|
701
|
-
this.enabledInternal = false;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
category(): string {
|
|
705
|
-
return this.#categoryInternal;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
enabled(): boolean {
|
|
709
|
-
return this.enabledInternal;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
setEnabled(enabled: boolean): void {
|
|
713
|
-
this.enabledInternal = enabled;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
title(): string {
|
|
717
|
-
return this.titleInternal;
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
setTitle(title: string): void {
|
|
721
|
-
this.titleInternal = title;
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
|
|
725
694
|
export class CSPViolationBreakpoint extends CategorizedBreakpoint {
|
|
726
695
|
readonly #typeInternal: Protocol.DOMDebugger.CSPViolationType;
|
|
727
696
|
constructor(category: string, title: string, type: Protocol.DOMDebugger.CSPViolationType) {
|
|
@@ -734,7 +703,7 @@ export class CSPViolationBreakpoint extends CategorizedBreakpoint {
|
|
|
734
703
|
}
|
|
735
704
|
}
|
|
736
705
|
|
|
737
|
-
export class
|
|
706
|
+
export class DOMEventListenerBreakpoint extends CategorizedBreakpoint {
|
|
738
707
|
readonly instrumentationName: string;
|
|
739
708
|
readonly eventName: string;
|
|
740
709
|
readonly eventTargetNames: string[];
|
|
@@ -784,7 +753,7 @@ export class DOMDebuggerManager implements SDKModelObserver<DOMDebuggerModel> {
|
|
|
784
753
|
readonly #xhrBreakpointsSetting: Common.Settings.Setting<{url: string, enabled: boolean}[]>;
|
|
785
754
|
readonly #xhrBreakpointsInternal: Map<string, boolean>;
|
|
786
755
|
readonly #cspViolationsToBreakOn: CSPViolationBreakpoint[];
|
|
787
|
-
readonly #eventListenerBreakpointsInternal:
|
|
756
|
+
readonly #eventListenerBreakpointsInternal: DOMEventListenerBreakpoint[];
|
|
788
757
|
|
|
789
758
|
constructor() {
|
|
790
759
|
this.#xhrBreakpointsSetting = Common.Settings.Settings.instance().createLocalSetting('xhrBreakpoints', []);
|
|
@@ -861,7 +830,24 @@ export class DOMDebuggerManager implements SDKModelObserver<DOMDebuggerModel> {
|
|
|
861
830
|
this.createEventListenerBreakpoints(
|
|
862
831
|
i18nString(UIStrings.keyboard), ['keydown', 'keyup', 'keypress', 'input'], ['*']);
|
|
863
832
|
this.createEventListenerBreakpoints(
|
|
864
|
-
i18nString(UIStrings.load),
|
|
833
|
+
i18nString(UIStrings.load),
|
|
834
|
+
[
|
|
835
|
+
'load',
|
|
836
|
+
'beforeunload',
|
|
837
|
+
'unload',
|
|
838
|
+
'abort',
|
|
839
|
+
'error',
|
|
840
|
+
'hashchange',
|
|
841
|
+
'popstate',
|
|
842
|
+
'navigate',
|
|
843
|
+
'navigatesuccess',
|
|
844
|
+
'navigateerror',
|
|
845
|
+
'currentchange',
|
|
846
|
+
'navigateto',
|
|
847
|
+
'navigatefrom',
|
|
848
|
+
'finish',
|
|
849
|
+
'dispose',
|
|
850
|
+
],
|
|
865
851
|
['*']);
|
|
866
852
|
this.createEventListenerBreakpoints(
|
|
867
853
|
i18nString(UIStrings.mouse),
|
|
@@ -933,19 +919,19 @@ export class DOMDebuggerManager implements SDKModelObserver<DOMDebuggerModel> {
|
|
|
933
919
|
private createInstrumentationBreakpoints(category: string, instrumentationNames: string[]): void {
|
|
934
920
|
for (const instrumentationName of instrumentationNames) {
|
|
935
921
|
this.#eventListenerBreakpointsInternal.push(
|
|
936
|
-
new
|
|
922
|
+
new DOMEventListenerBreakpoint(instrumentationName, '', [], category, instrumentationName));
|
|
937
923
|
}
|
|
938
924
|
}
|
|
939
925
|
|
|
940
926
|
private createEventListenerBreakpoints(category: string, eventNames: string[], eventTargetNames: string[]): void {
|
|
941
927
|
for (const eventName of eventNames) {
|
|
942
928
|
this.#eventListenerBreakpointsInternal.push(
|
|
943
|
-
new
|
|
929
|
+
new DOMEventListenerBreakpoint('', eventName, eventTargetNames, category, eventName));
|
|
944
930
|
}
|
|
945
931
|
}
|
|
946
932
|
|
|
947
|
-
private resolveEventListenerBreakpointInternal(eventName: string, eventTargetName?: string):
|
|
948
|
-
|null {
|
|
933
|
+
private resolveEventListenerBreakpointInternal(eventName: string, eventTargetName?: string):
|
|
934
|
+
DOMEventListenerBreakpoint|null {
|
|
949
935
|
const instrumentationPrefix = 'instrumentation:';
|
|
950
936
|
const listenerPrefix = 'listener:';
|
|
951
937
|
let instrumentationName = '';
|
|
@@ -958,7 +944,7 @@ export class DOMDebuggerManager implements SDKModelObserver<DOMDebuggerModel> {
|
|
|
958
944
|
return null;
|
|
959
945
|
}
|
|
960
946
|
eventTargetName = (eventTargetName || '*').toLowerCase();
|
|
961
|
-
let result:
|
|
947
|
+
let result: DOMEventListenerBreakpoint|null = null;
|
|
962
948
|
for (const breakpoint of this.#eventListenerBreakpointsInternal) {
|
|
963
949
|
if (instrumentationName && breakpoint.instrumentationName === instrumentationName) {
|
|
964
950
|
result = breakpoint;
|
|
@@ -975,7 +961,7 @@ export class DOMDebuggerManager implements SDKModelObserver<DOMDebuggerModel> {
|
|
|
975
961
|
return result;
|
|
976
962
|
}
|
|
977
963
|
|
|
978
|
-
eventListenerBreakpoints():
|
|
964
|
+
eventListenerBreakpoints(): DOMEventListenerBreakpoint[] {
|
|
979
965
|
return this.#eventListenerBreakpointsInternal.slice();
|
|
980
966
|
}
|
|
981
967
|
|
|
@@ -1008,7 +994,7 @@ export class DOMDebuggerManager implements SDKModelObserver<DOMDebuggerModel> {
|
|
|
1008
994
|
resolveEventListenerBreakpoint(auxData: {
|
|
1009
995
|
eventName: string,
|
|
1010
996
|
targetName: string,
|
|
1011
|
-
}):
|
|
997
|
+
}): DOMEventListenerBreakpoint|null {
|
|
1012
998
|
return this.resolveEventListenerBreakpointInternal(auxData['eventName'], auxData['targetName']);
|
|
1013
999
|
}
|
|
1014
1000
|
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import type * as Common from '../common/common.js';
|
|
6
|
+
import * as i18n from '../i18n/i18n.js';
|
|
7
|
+
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
|
8
|
+
|
|
9
|
+
import {CategorizedBreakpoint} from './CategorizedBreakpoint.js';
|
|
10
|
+
import type {Target} from './Target.js';
|
|
11
|
+
import {Capability} from './Target.js';
|
|
12
|
+
import {SDKModel} from './SDKModel.js';
|
|
13
|
+
import type {SDKModelObserver} from './TargetManager.js';
|
|
14
|
+
import {TargetManager} from './TargetManager.js';
|
|
15
|
+
|
|
16
|
+
const UIStrings = {
|
|
17
|
+
/**
|
|
18
|
+
* @description Category of breakpoints
|
|
19
|
+
*/
|
|
20
|
+
auctionWorklet: 'Ad Auction Worklet',
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @description Name of a breakpoint type.
|
|
24
|
+
* https://github.com/WICG/turtledove/blob/main/FLEDGE.md#32-on-device-bidding
|
|
25
|
+
*/
|
|
26
|
+
beforeBidderWorkletBiddingStart: 'Bidder Bidding Phase Start',
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description Name of a breakpoint type.
|
|
30
|
+
* https://github.com/WICG/turtledove/blob/main/FLEDGE.md#52-buyer-reporting-on-render-and-ad-events
|
|
31
|
+
*/
|
|
32
|
+
beforeBidderWorkletReportingStart: 'Bidder Reporting Phase Start',
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @description Name of a breakpoint type.
|
|
36
|
+
* https://github.com/WICG/turtledove/blob/main/FLEDGE.md#23-scoring-bids
|
|
37
|
+
*/
|
|
38
|
+
beforeSellerWorkletScoringStart: 'Seller Scoring Phase Start',
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description Name of a breakpoint type.
|
|
42
|
+
* https://github.com/WICG/turtledove/blob/main/FLEDGE.md#51-seller-reporting-on-render
|
|
43
|
+
*/
|
|
44
|
+
beforeSellerWorkletReportingStart: 'Seller Reporting Phase Start',
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const str_ = i18n.i18n.registerUIStrings('core/sdk/EventBreakpointsModel.ts', UIStrings);
|
|
48
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
49
|
+
|
|
50
|
+
const enum InstrumentationNames {
|
|
51
|
+
BeforeBidderWorkletBiddingStart = 'beforeBidderWorkletBiddingStart',
|
|
52
|
+
BeforeBidderWorkletReportingStart = 'beforeBidderWorkletReportingStart',
|
|
53
|
+
BeforeSellerWorkletScoringStart = 'beforeSellerWorkletScoringStart',
|
|
54
|
+
BeforeSellerWorkletReportingStart = 'beforeSellerWorkletReportingStart',
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function getTitleForInstrumentationName(instrumentationName: InstrumentationNames): Common.UIString.LocalizedString {
|
|
58
|
+
switch (instrumentationName) {
|
|
59
|
+
case InstrumentationNames.BeforeBidderWorkletBiddingStart:
|
|
60
|
+
return i18nString(UIStrings.beforeBidderWorkletBiddingStart);
|
|
61
|
+
|
|
62
|
+
case InstrumentationNames.BeforeBidderWorkletReportingStart:
|
|
63
|
+
return i18nString(UIStrings.beforeBidderWorkletReportingStart);
|
|
64
|
+
|
|
65
|
+
case InstrumentationNames.BeforeSellerWorkletScoringStart:
|
|
66
|
+
return i18nString(UIStrings.beforeSellerWorkletScoringStart);
|
|
67
|
+
|
|
68
|
+
case InstrumentationNames.BeforeSellerWorkletReportingStart:
|
|
69
|
+
return i18nString(UIStrings.beforeSellerWorkletReportingStart);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export class EventBreakpointsModel extends SDKModel<void> {
|
|
74
|
+
readonly agent: ProtocolProxyApi.EventBreakpointsApi;
|
|
75
|
+
|
|
76
|
+
constructor(target: Target) {
|
|
77
|
+
super(target);
|
|
78
|
+
this.agent = target.eventBreakpointsAgent();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// This implementation (as opposed to similar class in DOMDebuggerModel) is for
|
|
83
|
+
// instrumentation breakpoints in targets that run JS but do not have a DOM.
|
|
84
|
+
class EventListenerBreakpoint extends CategorizedBreakpoint {
|
|
85
|
+
readonly instrumentationName: string;
|
|
86
|
+
constructor(instrumentationName: InstrumentationNames, category: string) {
|
|
87
|
+
super(category, getTitleForInstrumentationName(instrumentationName));
|
|
88
|
+
this.instrumentationName = instrumentationName;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
setEnabled(enabled: boolean): void {
|
|
92
|
+
if (this.enabled() === enabled) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
super.setEnabled(enabled);
|
|
96
|
+
for (const model of TargetManager.instance().models(EventBreakpointsModel)) {
|
|
97
|
+
this.updateOnModel(model);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
updateOnModel(model: EventBreakpointsModel): void {
|
|
102
|
+
if (this.enabled()) {
|
|
103
|
+
model.agent.invoke_setInstrumentationBreakpoint({eventName: this.instrumentationName});
|
|
104
|
+
} else {
|
|
105
|
+
model.agent.invoke_removeInstrumentationBreakpoint({eventName: this.instrumentationName});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
static readonly instrumentationPrefix = 'instrumentation:';
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let eventBreakpointManagerInstance: EventBreakpointsManager;
|
|
113
|
+
|
|
114
|
+
export class EventBreakpointsManager implements SDKModelObserver<EventBreakpointsModel> {
|
|
115
|
+
readonly #eventListenerBreakpointsInternal: EventListenerBreakpoint[] = [];
|
|
116
|
+
|
|
117
|
+
constructor() {
|
|
118
|
+
this.createInstrumentationBreakpoints(i18nString(UIStrings.auctionWorklet), [
|
|
119
|
+
InstrumentationNames.BeforeBidderWorkletBiddingStart,
|
|
120
|
+
InstrumentationNames.BeforeBidderWorkletReportingStart,
|
|
121
|
+
InstrumentationNames.BeforeSellerWorkletScoringStart,
|
|
122
|
+
InstrumentationNames.BeforeSellerWorkletReportingStart,
|
|
123
|
+
]);
|
|
124
|
+
|
|
125
|
+
TargetManager.instance().observeModels(EventBreakpointsModel, this);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
static instance(opts: {
|
|
129
|
+
forceNew: boolean|null,
|
|
130
|
+
} = {forceNew: null}): EventBreakpointsManager {
|
|
131
|
+
const {forceNew} = opts;
|
|
132
|
+
if (!eventBreakpointManagerInstance || forceNew) {
|
|
133
|
+
eventBreakpointManagerInstance = new EventBreakpointsManager();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return eventBreakpointManagerInstance;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
private createInstrumentationBreakpoints(category: string, instrumentationNames: InstrumentationNames[]): void {
|
|
140
|
+
for (const instrumentationName of instrumentationNames) {
|
|
141
|
+
this.#eventListenerBreakpointsInternal.push(new EventListenerBreakpoint(instrumentationName, category));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
eventListenerBreakpoints(): EventListenerBreakpoint[] {
|
|
146
|
+
return this.#eventListenerBreakpointsInternal.slice();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
resolveEventListenerBreakpointTitle(auxData: {
|
|
150
|
+
eventName: string,
|
|
151
|
+
}): string|null {
|
|
152
|
+
const breakpoint = this.resolveEventListenerBreakpoint(auxData);
|
|
153
|
+
return breakpoint ? breakpoint.title() : null;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
resolveEventListenerBreakpoint(auxData: {eventName: string}): EventListenerBreakpoint|null {
|
|
157
|
+
const eventName = auxData.eventName;
|
|
158
|
+
if (!eventName.startsWith(EventListenerBreakpoint.instrumentationPrefix)) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const instrumentationName = eventName.substring(EventListenerBreakpoint.instrumentationPrefix.length);
|
|
163
|
+
return this.#eventListenerBreakpointsInternal.find(b => b.instrumentationName === instrumentationName) || null;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
modelAdded(eventBreakpointModel: EventBreakpointsModel): void {
|
|
167
|
+
for (const breakpoint of this.#eventListenerBreakpointsInternal) {
|
|
168
|
+
if (breakpoint.enabled()) {
|
|
169
|
+
breakpoint.updateOnModel(eventBreakpointModel);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
modelRemoved(_eventBreakpointModel: EventBreakpointsModel): void {
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
SDKModel.register(EventBreakpointsModel, {capabilities: Capability.EventBreakpoints, autostart: false});
|
|
@@ -67,7 +67,7 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
|
67
67
|
this.#capabilitiesMask = Capability.JS;
|
|
68
68
|
break;
|
|
69
69
|
case Type.AuctionWorklet:
|
|
70
|
-
this.#capabilitiesMask = Capability.JS;
|
|
70
|
+
this.#capabilitiesMask = Capability.JS | Capability.EventBreakpoints;
|
|
71
71
|
break;
|
|
72
72
|
case Type.Browser:
|
|
73
73
|
this.#capabilitiesMask = Capability.Target | Capability.IO;
|
|
@@ -249,5 +249,6 @@ export enum Capability {
|
|
|
249
249
|
WebAuthn = 1 << 16,
|
|
250
250
|
IO = 1 << 17,
|
|
251
251
|
Media = 1 << 18,
|
|
252
|
+
EventBreakpoints = 1 << 19,
|
|
252
253
|
None = 0,
|
|
253
254
|
}
|
|
@@ -11,6 +11,7 @@ import './NetworkManager.js';
|
|
|
11
11
|
import './RuntimeModel.js';
|
|
12
12
|
|
|
13
13
|
import * as AccessibilityModel from './AccessibilityModel.js';
|
|
14
|
+
import * as CategorizedBreakpoint from './CategorizedBreakpoint.js';
|
|
14
15
|
import * as ChildTargetManager from './ChildTargetManager.js';
|
|
15
16
|
import * as CompilerSourceMappingContentProvider from './CompilerSourceMappingContentProvider.js';
|
|
16
17
|
import * as Connections from './Connections.js';
|
|
@@ -37,6 +38,7 @@ import * as DebuggerModel from './DebuggerModel.js';
|
|
|
37
38
|
import * as DOMDebuggerModel from './DOMDebuggerModel.js';
|
|
38
39
|
import * as DOMModel from './DOMModel.js';
|
|
39
40
|
import * as EmulationModel from './EmulationModel.js';
|
|
41
|
+
import * as EventBreakpointsModel from './EventBreakpointsModel.js';
|
|
40
42
|
import * as FilmStripModel from './FilmStripModel.js';
|
|
41
43
|
import * as FrameManager from './FrameManager.js';
|
|
42
44
|
import * as HeapProfilerModel from './HeapProfilerModel.js';
|
|
@@ -76,6 +78,7 @@ import * as WebAuthnModel from './WebAuthnModel.js';
|
|
|
76
78
|
|
|
77
79
|
export {
|
|
78
80
|
AccessibilityModel,
|
|
81
|
+
CategorizedBreakpoint,
|
|
79
82
|
ChildTargetManager,
|
|
80
83
|
CompilerSourceMappingContentProvider,
|
|
81
84
|
Connections,
|
|
@@ -102,6 +105,7 @@ export {
|
|
|
102
105
|
DOMDebuggerModel,
|
|
103
106
|
DOMModel,
|
|
104
107
|
EmulationModel,
|
|
108
|
+
EventBreakpointsModel,
|
|
105
109
|
FilmStripModel,
|
|
106
110
|
FrameManager,
|
|
107
111
|
HeapProfilerModel,
|
|
@@ -396,6 +396,11 @@
|
|
|
396
396
|
LinearMemoryInspectorTarget: 'DevTools.LinearMemoryInspector.Target',
|
|
397
397
|
Language: 'DevTools.Language',
|
|
398
398
|
ConsoleShowsCorsErrors: 'DevTools.ConsoleShowsCorsErrors',
|
|
399
|
+
RecordingEdited: 'DevTools.RecordingEdited',
|
|
400
|
+
RecordingExported: 'DevTools.RecordingExported',
|
|
401
|
+
RecordingReplayFinished: 'DevTools.RecordingReplayFinished',
|
|
402
|
+
RecordingReplayStarted: 'DevTools.RecordingReplayStarted',
|
|
403
|
+
RecordingToggled: 'DevTools.RecordingToggled',
|
|
399
404
|
};
|
|
400
405
|
|
|
401
406
|
/**
|
|
@@ -149,7 +149,10 @@ export class MainImpl {
|
|
|
149
149
|
this.createSettings(prefs);
|
|
150
150
|
await this.requestAndRegisterLocaleData();
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.SYNC_SETTINGS)) {
|
|
153
|
+
Host.userMetrics.syncSetting(
|
|
154
|
+
Common.Settings.Settings.instance().moduleSetting<boolean>('sync_preferences').get());
|
|
155
|
+
}
|
|
153
156
|
|
|
154
157
|
this.createAppUI();
|
|
155
158
|
}
|
|
@@ -270,8 +273,8 @@ export class MainImpl {
|
|
|
270
273
|
'keyboardShortcutEditor', 'Enable keyboard shortcut editor', true,
|
|
271
274
|
'https://developer.chrome.com/blog/new-in-devtools-88/#keyboard-shortcuts');
|
|
272
275
|
|
|
273
|
-
// Back-
|
|
274
|
-
Root.Runtime.experiments.register('bfcacheDebugging', 'Enable
|
|
276
|
+
// Back-Forward Cache
|
|
277
|
+
Root.Runtime.experiments.register('bfcacheDebugging', 'Enable Back-Forward Cache debugging support');
|
|
275
278
|
|
|
276
279
|
// Timeline
|
|
277
280
|
Root.Runtime.experiments.register('timelineEventInitiators', 'Timeline: event initiators');
|
|
@@ -223,8 +223,6 @@ let loadedInspectorMainModule: (typeof InspectorMain|undefined);
|
|
|
223
223
|
|
|
224
224
|
async function loadMainModule(): Promise<typeof Main> {
|
|
225
225
|
if (!loadedMainModule) {
|
|
226
|
-
// Side-effect import resources in module.json
|
|
227
|
-
await Root.Runtime.Runtime.instance().loadModulePromise('entrypoints/main');
|
|
228
226
|
loadedMainModule = await import('./main.js');
|
|
229
227
|
}
|
|
230
228
|
return loadedMainModule;
|
|
@@ -754,6 +752,7 @@ function filterLocalesForSettings(): string[] {
|
|
|
754
752
|
|
|
755
753
|
Common.Settings.registerSettingExtension({
|
|
756
754
|
category: Common.Settings.SettingCategory.APPEARANCE,
|
|
755
|
+
storageType: Common.Settings.SettingStorageType.Synced,
|
|
757
756
|
settingName: 'language',
|
|
758
757
|
settingType: Common.Settings.SettingType.ENUM,
|
|
759
758
|
title: i18nLazyString(UIStrings.language),
|
|
@@ -49,6 +49,7 @@ export class LogManager implements SDK.TargetManager.SDKModelObserver<SDK.LogMod
|
|
|
49
49
|
timestamp: entry.timestamp,
|
|
50
50
|
workerId: entry.workerId,
|
|
51
51
|
category: entry.category,
|
|
52
|
+
affectedResources: entry.networkRequestId ? {requestId: entry.networkRequestId} : undefined,
|
|
52
53
|
};
|
|
53
54
|
const consoleMessage = new SDK.ConsoleModel.ConsoleMessage(
|
|
54
55
|
target.model(SDK.RuntimeModel.RuntimeModel), entry.source, entry.level, entry.text, details);
|
|
@@ -446,7 +446,7 @@ export class AXBreadcrumb {
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
if (this.axNodeInternal.hasOnlyUnloadedChildren()) {
|
|
449
|
+
if (!this.axNodeInternal.ignored() && this.axNodeInternal.hasOnlyUnloadedChildren()) {
|
|
450
450
|
this.nodeElementInternal.classList.add('children-unloaded');
|
|
451
451
|
UI.ARIAUtils.setExpanded(this.nodeElementInternal, false);
|
|
452
452
|
}
|
|
@@ -673,7 +673,7 @@ export class AXNodeIgnoredReasonTreeElement extends AXNodePropertyTreeElement {
|
|
|
673
673
|
reasonElement = i18n.i18n.getFormatLocalizedString(str_, UIStrings.elementIsNotVisible, {});
|
|
674
674
|
break;
|
|
675
675
|
case 'presentationalRole': {
|
|
676
|
-
const role = axNode && axNode.role() || '';
|
|
676
|
+
const role = axNode && axNode.role()?.value || '';
|
|
677
677
|
const rolePresentationSpan = document.createElement('span', {is: 'source-code'}).textContent = 'role=' + role;
|
|
678
678
|
reasonElement =
|
|
679
679
|
i18n.i18n.getFormatLocalizedString(str_, UIStrings.elementHasPlaceholder, {PH1: rolePresentationSpan});
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
20
20
|
/**
|
|
21
21
|
*@description Text in Application Panel Sidebar of the Application panel
|
|
22
22
|
*/
|
|
23
|
-
backForwardCache: 'Back-
|
|
23
|
+
backForwardCache: 'Back-Forward Cache',
|
|
24
24
|
/**
|
|
25
25
|
*@description A context menu item in the Application Panel Sidebar of the Application panel
|
|
26
26
|
*/
|
|
@@ -17,67 +17,67 @@ import backForwardCacheViewStyles from './backForwardCacheView.css.js';
|
|
|
17
17
|
|
|
18
18
|
const UIStrings = {
|
|
19
19
|
/**
|
|
20
|
-
* @description Title text in Back-
|
|
20
|
+
* @description Title text in Back-Forward Cache view of the Application panel
|
|
21
21
|
*/
|
|
22
22
|
mainFrame: 'Main Frame',
|
|
23
23
|
/**
|
|
24
|
-
* @description Title text in Back-
|
|
24
|
+
* @description Title text in Back-Forward Cache view of the Application panel
|
|
25
25
|
*/
|
|
26
|
-
backForwardCacheTitle: 'Back-
|
|
26
|
+
backForwardCacheTitle: 'Back-Forward Cache',
|
|
27
27
|
/**
|
|
28
28
|
* @description Status text for the status of the main frame
|
|
29
29
|
*/
|
|
30
30
|
unavailable: 'unavailable',
|
|
31
31
|
/**
|
|
32
|
-
* @description Entry name text in the Back-
|
|
32
|
+
* @description Entry name text in the Back-Forward Cache view of the Application panel
|
|
33
33
|
*/
|
|
34
34
|
url: 'URL',
|
|
35
35
|
/**
|
|
36
|
-
* @description Entry name text in the Back-
|
|
36
|
+
* @description Entry name text in the Back-Forward Cache view of the Application panel
|
|
37
37
|
*/
|
|
38
|
-
bfcacheStatus: 'Back-
|
|
38
|
+
bfcacheStatus: 'Back-Forward Cache Status',
|
|
39
39
|
/**
|
|
40
|
-
* @description Status text for the status of the
|
|
40
|
+
* @description Status text for the status of the Back-Forward Cache status
|
|
41
41
|
*/
|
|
42
42
|
unknown: 'unknown',
|
|
43
43
|
/**
|
|
44
|
-
* @description Status text for the status of the
|
|
45
|
-
* the
|
|
44
|
+
* @description Status text for the status of the Back-Forward Cache status indicating that
|
|
45
|
+
* the Back-Forward Cache was not used and a normal navigation occured instead.
|
|
46
46
|
*/
|
|
47
|
-
normalNavigation: 'Normal navigation (Not restored from
|
|
47
|
+
normalNavigation: 'Normal navigation (Not restored from Back-Forward Cache)',
|
|
48
48
|
/**
|
|
49
|
-
* @description Status text for the status of the
|
|
50
|
-
* the
|
|
49
|
+
* @description Status text for the status of the Back-Forward Cache status indicating that
|
|
50
|
+
* the Back-Forward Cache was used to restore the page instead of reloading it.
|
|
51
51
|
*/
|
|
52
|
-
restoredFromBFCache: 'Restored from
|
|
52
|
+
restoredFromBFCache: 'Restored from Back-Forward Cache',
|
|
53
53
|
/**
|
|
54
54
|
* @description Label for a list of reasons which prevent the page from being eligible for
|
|
55
|
-
*
|
|
56
|
-
* page eligible for
|
|
55
|
+
* Back-Forward Cache. These reasons are actionable i.e. they can be cleaned up to make the
|
|
56
|
+
* page eligible for Back-Forward Cache.
|
|
57
57
|
*/
|
|
58
58
|
pageSupportNeeded: 'Actionable',
|
|
59
59
|
/**
|
|
60
60
|
* @description Explanation for actionable items which prevent the page from being eligible
|
|
61
|
-
* for
|
|
61
|
+
* for Back-Forward Cache.
|
|
62
62
|
*/
|
|
63
63
|
pageSupportNeededExplanation:
|
|
64
|
-
'These reasons are actionable i.e. they can be cleaned up to make the page eligible for
|
|
64
|
+
'These reasons are actionable i.e. they can be cleaned up to make the page eligible for Back-Forward Cache.',
|
|
65
65
|
/**
|
|
66
66
|
* @description Label for a list of reasons which prevent the page from being eligible for
|
|
67
|
-
*
|
|
68
|
-
* cleaned up by developers to make the page eligible for
|
|
67
|
+
* Back-Forward Cache. These reasons are circumstantial / not actionable i.e. they cannot be
|
|
68
|
+
* cleaned up by developers to make the page eligible for Back-Forward Cache.
|
|
69
69
|
*/
|
|
70
70
|
circumstantial: 'Not Actionable',
|
|
71
71
|
/**
|
|
72
72
|
* @description Explanation for circumstantial/non-actionable items which prevent the page from being eligible
|
|
73
|
-
* for
|
|
73
|
+
* for Back-Forward Cache.
|
|
74
74
|
*/
|
|
75
75
|
circumstantialExplanation:
|
|
76
76
|
'These reasons are not actionable i.e. caching was prevented by something outside of the direct control of the page.',
|
|
77
77
|
/**
|
|
78
78
|
* @description Label for a list of reasons which prevent the page from being eligible for
|
|
79
|
-
*
|
|
80
|
-
* of chrome they will not prevent
|
|
79
|
+
* Back-Forward Cache. These reasons are pending support by chrome i.e. in a future version
|
|
80
|
+
* of chrome they will not prevent Back-Forward Cache usage anymore.
|
|
81
81
|
*/
|
|
82
82
|
supportPending: 'Pending Support',
|
|
83
83
|
/**
|
|
@@ -86,10 +86,10 @@ const UIStrings = {
|
|
|
86
86
|
runTest: 'Run Test',
|
|
87
87
|
/**
|
|
88
88
|
* @description Explanation for 'pending support' items which prevent the page from being eligible
|
|
89
|
-
* for
|
|
89
|
+
* for Back-Forward Cache.
|
|
90
90
|
*/
|
|
91
91
|
supportPendingExplanation:
|
|
92
|
-
'Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for
|
|
92
|
+
'Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for Back-Forward Cache in a future version of Chrome.',
|
|
93
93
|
};
|
|
94
94
|
const str_ = i18n.i18n.registerUIStrings('panels/application/BackForwardCacheView.ts', UIStrings);
|
|
95
95
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -26,14 +26,14 @@ export class CSPViolationBreakpointsSidebarPane extends CategorizedBreakpointsSi
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
protected getBreakpointFromPausedDetails(details: SDK.DebuggerModel.DebuggerPausedDetails):
|
|
29
|
-
SDK.
|
|
29
|
+
SDK.CategorizedBreakpoint.CategorizedBreakpoint|null {
|
|
30
30
|
const breakpointType = details.auxData && details.auxData['violationType'] ? details.auxData['violationType'] : '';
|
|
31
31
|
const breakpoints = SDK.DOMDebuggerModel.DOMDebuggerManager.instance().cspViolationBreakpoints();
|
|
32
32
|
const breakpoint = breakpoints.find(x => x.type() === breakpointType);
|
|
33
33
|
return breakpoint ? breakpoint : null;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
protected toggleBreakpoint(breakpoint: SDK.
|
|
36
|
+
protected toggleBreakpoint(breakpoint: SDK.CategorizedBreakpoint.CategorizedBreakpoint, enabled: boolean): void {
|
|
37
37
|
breakpoint.setEnabled(enabled);
|
|
38
38
|
SDK.DOMDebuggerModel.DOMDebuggerManager.instance().updateCSPViolationBreakpoints();
|
|
39
39
|
}
|
|
@@ -24,10 +24,10 @@ export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
|
24
24
|
readonly #viewId: string;
|
|
25
25
|
readonly #detailsPausedReason: Protocol.Debugger.PausedEventReason;
|
|
26
26
|
readonly #categories: Map<string, Item>;
|
|
27
|
-
readonly #breakpoints: Map<SDK.
|
|
27
|
+
readonly #breakpoints: Map<SDK.CategorizedBreakpoint.CategorizedBreakpoint, Item>;
|
|
28
28
|
#highlightedElement?: HTMLLIElement;
|
|
29
29
|
constructor(
|
|
30
|
-
categories: string[], breakpoints: SDK.
|
|
30
|
+
categories: string[], breakpoints: SDK.CategorizedBreakpoint.CategorizedBreakpoint[], viewId: string,
|
|
31
31
|
detailsPausedReason: Protocol.Debugger.PausedEventReason) {
|
|
32
32
|
super(true);
|
|
33
33
|
this.#categoriesTreeOutline = new UI.TreeOutline.TreeOutlineInShadow();
|
|
@@ -66,7 +66,7 @@ export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
|
66
66
|
return this.#categories;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
get breakpoints(): Map<SDK.
|
|
69
|
+
get breakpoints(): Map<SDK.CategorizedBreakpoint.CategorizedBreakpoint, Item> {
|
|
70
70
|
return this.#breakpoints;
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -96,7 +96,7 @@ export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
|
96
96
|
this.#categories.set(name, {element: treeElement, checkbox: labelNode.checkboxElement});
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
protected createBreakpoint(breakpoint: SDK.
|
|
99
|
+
protected createBreakpoint(breakpoint: SDK.CategorizedBreakpoint.CategorizedBreakpoint): void {
|
|
100
100
|
const labelNode = UI.UIUtils.CheckboxLabel.create(breakpoint.title());
|
|
101
101
|
labelNode.classList.add('source-code');
|
|
102
102
|
labelNode.checkboxElement.addEventListener('click', this.breakpointCheckboxClicked.bind(this, breakpoint), true);
|
|
@@ -124,7 +124,7 @@ export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
protected getBreakpointFromPausedDetails(_details: SDK.DebuggerModel.DebuggerPausedDetails):
|
|
127
|
-
SDK.
|
|
127
|
+
SDK.CategorizedBreakpoint.CategorizedBreakpoint|null {
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -180,11 +180,11 @@ export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
protected toggleBreakpoint(breakpoint: SDK.
|
|
183
|
+
protected toggleBreakpoint(breakpoint: SDK.CategorizedBreakpoint.CategorizedBreakpoint, enabled: boolean): void {
|
|
184
184
|
breakpoint.setEnabled(enabled);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
private breakpointCheckboxClicked(breakpoint: SDK.
|
|
187
|
+
private breakpointCheckboxClicked(breakpoint: SDK.CategorizedBreakpoint.CategorizedBreakpoint): void {
|
|
188
188
|
const item = this.#breakpoints.get(breakpoint);
|
|
189
189
|
if (!item) {
|
|
190
190
|
return;
|