chrome-devtools-frontend 1.0.1676824 → 1.0.1678416
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/AUTHORS +1 -0
- package/front_end/core/common/EventTarget.ts +0 -5
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +5 -0
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +8 -6
- package/front_end/core/sdk/DebuggerModel.ts +43 -28
- package/front_end/core/sdk/EmulationModel.ts +2 -1
- package/front_end/core/sdk/NetworkManager.ts +16 -2
- package/front_end/core/sdk/OverlayModel.ts +19 -9
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +10 -4
- package/front_end/core/sdk/SDKSettings.ts +117 -0
- package/front_end/core/sdk/sdk-meta.ts +0 -431
- package/front_end/devtools_compatibility.js +1 -0
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +6 -5
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +14 -15
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +157 -0
- package/front_end/entrypoints/main/MainImpl.ts +13 -12
- package/front_end/entrypoints/shell/shell.ts +0 -1
- package/front_end/foundation/Universe.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -7
- package/front_end/generated/SupportedCSSProperties.ts +32 -0
- package/front_end/generated/protocol-mapping.d.ts +13 -21
- package/front_end/generated/protocol-proxy-api.d.ts +12 -17
- package/front_end/generated/protocol.ts +8 -18
- package/front_end/models/ai_assistance/AiAgent2.ts +36 -2
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +13 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +8 -0
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +0 -11
- package/front_end/models/ai_assistance/skills/accessibility.md +7 -0
- package/front_end/models/ai_assistance/skills/performance.md +8 -2
- package/front_end/models/ai_assistance/tools/GetDetailedCallTree.ts +107 -0
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +122 -0
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +127 -0
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +17 -3
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +89 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +4 -0
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +8 -0
- package/front_end/models/comment_manager/CommentManager.ts +141 -0
- package/front_end/models/comment_manager/comment_manager.ts +9 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -5
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +25 -0
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -0
- package/front_end/panels/accessibility/accessibility.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +68 -13
- package/front_end/panels/ai_assistance/components/chatMessage.css +6 -0
- package/front_end/panels/application/ApplicationPanelSidebar.ts +10 -4
- package/front_end/panels/application/StorageView.ts +116 -45
- package/front_end/panels/application/application-meta.ts +11 -0
- package/front_end/panels/application/components/AdsView.ts +1 -1
- package/front_end/panels/common/ExtensionPanel.ts +9 -8
- package/front_end/panels/console/ConsolePanel.ts +4 -0
- package/front_end/panels/console/ConsolePrompt.ts +12 -0
- package/front_end/panels/console/ConsoleView.ts +11 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +37 -13
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewModel.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +2 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +455 -372
- package/front_end/panels/elements/StylePropertyTreeElement.ts +16 -15
- package/front_end/panels/elements/elements-meta.ts +152 -10
- package/front_end/panels/elements/elements.ts +0 -2
- package/front_end/panels/emulation/DeviceModeView.ts +9 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -2
- package/front_end/panels/network/BinaryResourceView.ts +134 -81
- package/front_end/panels/network/EventSourceMessagesView.ts +10 -10
- package/front_end/panels/network/FetchHeaderCommenting.ts +291 -0
- package/front_end/panels/network/NetworkConfigView.ts +10 -10
- package/front_end/panels/network/NetworkDataGridNode.ts +14 -14
- package/front_end/panels/network/NetworkItemView.ts +27 -28
- package/front_end/panels/network/NetworkLogView.ts +137 -38
- package/front_end/panels/network/NetworkLogViewColumns.ts +35 -35
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +5 -5
- package/front_end/panels/network/RequestCookiesView.ts +4 -4
- package/front_end/panels/network/RequestHeadersView.ts +5 -5
- package/front_end/panels/network/RequestPayloadView.ts +3 -3
- package/front_end/panels/network/RequestTimingView.ts +8 -8
- package/front_end/panels/network/ResourceChunkView.ts +1 -1
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -1
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +16 -16
- package/front_end/panels/network/binaryResourceView.css +14 -12
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +2 -2
- package/front_end/panels/network/components/HeaderSectionRow.ts +1 -1
- package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -2
- package/front_end/panels/network/network-meta.ts +1 -1
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -1
- package/front_end/panels/sources/BreakpointsView.ts +2 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/NavigatorView.ts +2 -1
- package/front_end/panels/sources/SourcesPanel.ts +23 -73
- package/front_end/panels/sources/SourcesView.ts +248 -157
- package/front_end/panels/sources/TabbedEditorContainer.ts +118 -23
- package/front_end/panels/sources/UISourceCodeFrame.ts +2 -1
- package/front_end/panels/sources/sources-meta.ts +52 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +4 -35
- package/front_end/ui/comments/{CommentManager.ts → CommentOverlayManager.ts} +52 -57
- package/front_end/ui/comments/CommentsOverlayWidget.ts +31 -18
- package/front_end/ui/comments/comments.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +0 -56
- package/front_end/ui/legacy/View.ts +10 -4
- package/front_end/ui/legacy/Widget.ts +10 -1
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +2 -1
- package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +5 -4
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +251 -61
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +38 -20
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +4 -1
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +35 -4
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +22 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +6 -6
- package/front_end/panels/elements/ElementsTreeOutlineRenderer.ts +0 -89
- package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -27
package/AUTHORS
CHANGED
|
@@ -112,6 +112,7 @@ Varun Varada <varuncvarada@gmail.com>
|
|
|
112
112
|
Vishwa Kalubowila <vishwa.kalubowila@codimite.com>
|
|
113
113
|
Vitali Zaidman <vzaidman@gmail.com>
|
|
114
114
|
Will Hernandez <w.hernandez.code@gmail.com>
|
|
115
|
+
Yao Wu <ywu16212@gmail.com>
|
|
115
116
|
Yeol Park <peary2@gmail.com>
|
|
116
117
|
Yisi(一丝) <yiorsi@gmail.com>
|
|
117
118
|
Yoichiro Hibara <hibarayoichiro871@gmail.com>
|
|
@@ -40,11 +40,6 @@ export interface EventTarget<Events> {
|
|
|
40
40
|
...[eventData]: EventPayloadToRestParameters<Events, T>): void;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export function fireEvent(name: string, detail: unknown = {}, target: HTMLElement|Window = window): void {
|
|
44
|
-
const evt = new CustomEvent(name, {bubbles: true, cancelable: true, detail});
|
|
45
|
-
target.dispatchEvent(evt);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
43
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
44
|
export interface EventTargetEvent<T, Events = any> {
|
|
50
45
|
data: T;
|
|
@@ -557,5 +557,6 @@ export const enum EnumeratedHistogram {
|
|
|
557
557
|
SwatchActivated = 'DevTools.SwatchActivated',
|
|
558
558
|
BuiltInAiAvailability = 'DevTools.BuiltInAiAvailability',
|
|
559
559
|
ResendRequest = 'DevTools.ResendRequest',
|
|
560
|
+
EditResendRequest = 'DevTools.EditResendRequest',
|
|
560
561
|
// LINT.ThenChange(/front_end/devtools_compatibility.js:EnumeratedHistogram)
|
|
561
562
|
}
|
|
@@ -36,6 +36,11 @@ export class UserMetrics {
|
|
|
36
36
|
ResendRequestType.MAX_VALUE);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
editResendRequest(type: ResendRequestType): void {
|
|
40
|
+
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.EditResendRequest, type,
|
|
41
|
+
ResendRequestType.MAX_VALUE);
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
keybindSetSettingChanged(keybindSet: string): void {
|
|
40
45
|
const value = KeybindSetSettings[keybindSet as keyof typeof KeybindSetSettings] || 0;
|
|
41
46
|
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.KeybindSetSettingChanged, value,
|
|
@@ -540,6 +540,10 @@ interface HostConfigDevToolsComments {
|
|
|
540
540
|
enabled: boolean;
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
+
interface DevToolsAriaLiveRecording {
|
|
544
|
+
enabled: boolean;
|
|
545
|
+
}
|
|
546
|
+
|
|
543
547
|
/**
|
|
544
548
|
* The host configuration that we expect from the DevTools back-end.
|
|
545
549
|
*
|
|
@@ -595,6 +599,7 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
|
|
|
595
599
|
devToolsAdsPanel: DevToolsAdsPanel,
|
|
596
600
|
devToolsUseGcaApi: UseGcaApi,
|
|
597
601
|
devToolsPlusButton: DevToolsPlusButton,
|
|
602
|
+
devToolsAriaLiveRecording: DevToolsAriaLiveRecording,
|
|
598
603
|
devToolsInstrumentationBreakpoints: DevToolsInstrumentationBreakpoints,
|
|
599
604
|
extensionsOnChromeUrls: ExtensionsOnChromeUrls,
|
|
600
605
|
devToolsComments: HostConfigDevToolsComments,
|
|
@@ -456,13 +456,14 @@ export class ColorMixMatcher extends matcherBase(ColorMixMatch) {
|
|
|
456
456
|
return null;
|
|
457
457
|
}
|
|
458
458
|
const computedValueArgs = ASTUtils.callArgs(value);
|
|
459
|
-
if (computedValueArgs.length !== 3) {
|
|
459
|
+
if (computedValueArgs.length !== 2 && computedValueArgs.length !== 3) {
|
|
460
460
|
return null;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
const [space, color1, color2] = computedValueArgs;
|
|
464
|
-
// Verify that all arguments are there, and that
|
|
465
|
-
if (space.length
|
|
463
|
+
const [space, color1, color2] = computedValueArgs.length === 3 ? computedValueArgs : [[], ...computedValueArgs];
|
|
464
|
+
// Verify that all arguments are there, and that an optional interpolation method starts with a literal `in`.
|
|
465
|
+
if ((space.length > 0 &&
|
|
466
|
+
(space.length < 2 || computedValueTree.text(ASTUtils.stripComments(space).next().value) !== 'in')) ||
|
|
466
467
|
color1.length < 1 || color2.length < 1) {
|
|
467
468
|
return null;
|
|
468
469
|
}
|
|
@@ -483,10 +484,11 @@ export class ColorMixMatcher extends matcherBase(ColorMixMatch) {
|
|
|
483
484
|
}
|
|
484
485
|
|
|
485
486
|
const args = ASTUtils.callArgs(node);
|
|
486
|
-
if (args.length !==
|
|
487
|
+
if (args.length !== computedValueArgs.length) {
|
|
487
488
|
return null;
|
|
488
489
|
}
|
|
489
|
-
|
|
490
|
+
const [authoredSpace, authoredColor1, authoredColor2] = args.length === 3 ? args : [[], ...args];
|
|
491
|
+
return new ColorMixMatch(matching.ast.text(node), node, authoredSpace, authoredColor1, authoredColor2);
|
|
490
492
|
}
|
|
491
493
|
}
|
|
492
494
|
|
|
@@ -16,9 +16,12 @@ import {type EvaluationOptions, type EvaluationResult, type ExecutionContext, Ru
|
|
|
16
16
|
import {Script} from './Script.js';
|
|
17
17
|
import {SDKModel} from './SDKModel.js';
|
|
18
18
|
import {
|
|
19
|
+
breakpointsActiveSettingDescriptor,
|
|
20
|
+
disableAsyncStackTracesSettingDescriptor,
|
|
19
21
|
jsSourceMapsEnabledSettingDescriptor,
|
|
20
22
|
pauseOnCaughtExceptionSettingDescriptor,
|
|
21
23
|
pauseOnExceptionEnabledSettingDescriptor,
|
|
24
|
+
pauseOnUncaughtExceptionSettingDescriptor,
|
|
22
25
|
} from './SDKSettings.js';
|
|
23
26
|
import {SourceMap} from './SourceMap.js';
|
|
24
27
|
import {SourceMapManager} from './SourceMapManager.js';
|
|
@@ -155,6 +158,12 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
155
158
|
#selectedCallFrame: CallFrame|null = null;
|
|
156
159
|
#debuggerEnabled = false;
|
|
157
160
|
#debuggerId: string|null = null;
|
|
161
|
+
readonly #pauseOnExceptionEnabledSetting: Common.Settings.Setting<boolean>;
|
|
162
|
+
readonly #pauseOnCaughtExceptionSetting: Common.Settings.Setting<boolean>;
|
|
163
|
+
readonly #pauseOnUncaughtExceptionSetting: Common.Settings.Setting<boolean>;
|
|
164
|
+
readonly #disableAsyncStackTracesSetting: Common.Settings.Setting<boolean>;
|
|
165
|
+
readonly #breakpointsActiveSetting: Common.Settings.Setting<boolean>;
|
|
166
|
+
readonly #jsSourceMapsEnabledSetting: Common.Settings.Setting<boolean>;
|
|
158
167
|
readonly #skipAllPausesSetting: Common.Settings.Setting<boolean>;
|
|
159
168
|
#skipAllPausesTimeout?: ReturnType<typeof setTimeout>;
|
|
160
169
|
#beforePausedCallback: ((arg0: DebuggerPausedDetails, stepOver: Location|null) => Promise<boolean>)|null = null;
|
|
@@ -186,24 +195,27 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
186
195
|
compiledURL, sourceMappingURL, payload, target.targetManager().getConsole(), script));
|
|
187
196
|
|
|
188
197
|
const settings = this.target().targetManager().settings;
|
|
198
|
+
this.#pauseOnExceptionEnabledSetting = settings.resolve(pauseOnExceptionEnabledSettingDescriptor);
|
|
199
|
+
this.#pauseOnExceptionEnabledSetting.addChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
200
|
+
this.#pauseOnCaughtExceptionSetting = settings.resolve(pauseOnCaughtExceptionSettingDescriptor);
|
|
201
|
+
this.#pauseOnCaughtExceptionSetting.addChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
202
|
+
this.#pauseOnUncaughtExceptionSetting = settings.resolve(pauseOnUncaughtExceptionSettingDescriptor);
|
|
203
|
+
this.#pauseOnUncaughtExceptionSetting.addChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
204
|
+
this.#disableAsyncStackTracesSetting = settings.resolve(disableAsyncStackTracesSettingDescriptor);
|
|
205
|
+
this.#disableAsyncStackTracesSetting.addChangeListener(this.asyncStackTracesStateChanged, this);
|
|
206
|
+
this.#breakpointsActiveSetting = settings.resolve(breakpointsActiveSettingDescriptor);
|
|
207
|
+
this.#breakpointsActiveSetting.addChangeListener(this.breakpointsActiveChanged, this);
|
|
189
208
|
this.#skipAllPausesSetting = settings.resolve(skipAllPausesSettingDescriptor);
|
|
190
|
-
settings.resolve(pauseOnExceptionEnabledSettingDescriptor)
|
|
191
|
-
.addChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
192
|
-
settings.resolve(pauseOnCaughtExceptionSettingDescriptor)
|
|
193
|
-
.addChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
194
209
|
this.#skipAllPausesSetting.addChangeListener(this.skipAllPausesChanged, this);
|
|
195
|
-
|
|
196
|
-
settings.
|
|
197
|
-
|
|
210
|
+
|
|
211
|
+
this.#jsSourceMapsEnabledSetting = settings.resolve(jsSourceMapsEnabledSettingDescriptor);
|
|
212
|
+
this.#jsSourceMapsEnabledSetting.addChangeListener(this.jsSourceMapsStateChanged, this);
|
|
213
|
+
this.#sourceMapManager.setEnabled(this.#jsSourceMapsEnabledSetting.get());
|
|
198
214
|
|
|
199
215
|
if (!target.suspended()) {
|
|
200
216
|
void this.enableDebugger();
|
|
201
217
|
}
|
|
202
218
|
|
|
203
|
-
this.#sourceMapManager.setEnabled(settings.resolve(jsSourceMapsEnabledSettingDescriptor).get());
|
|
204
|
-
settings.resolve(jsSourceMapsEnabledSettingDescriptor)
|
|
205
|
-
.addChangeListener(event => this.#sourceMapManager.setEnabled((event.data as boolean)));
|
|
206
|
-
|
|
207
219
|
const resourceTreeModel = (target.model(ResourceTreeModel) as ResourceTreeModel);
|
|
208
220
|
if (resourceTreeModel) {
|
|
209
221
|
resourceTreeModel.addEventListener(ResourceTreeModelEvents.FrameNavigated, this.onFrameNavigated, this);
|
|
@@ -281,10 +293,9 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
281
293
|
instrumentation: Protocol.Debugger.SetInstrumentationBreakpointRequestInstrumentation.BeforeScriptExecution,
|
|
282
294
|
});
|
|
283
295
|
}
|
|
284
|
-
const settings = this.target().targetManager().settings;
|
|
285
296
|
this.pauseOnExceptionStateChanged();
|
|
286
297
|
void this.asyncStackTracesStateChanged();
|
|
287
|
-
if (!
|
|
298
|
+
if (!this.#breakpointsActiveSetting.get()) {
|
|
288
299
|
this.breakpointsActiveChanged();
|
|
289
300
|
}
|
|
290
301
|
this.dispatchEventToListeners(Events.DebuggerWasEnabled, this);
|
|
@@ -386,12 +397,15 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
386
397
|
);
|
|
387
398
|
}
|
|
388
399
|
|
|
400
|
+
private jsSourceMapsStateChanged(): void {
|
|
401
|
+
this.#sourceMapManager.setEnabled(this.#jsSourceMapsEnabledSetting.get());
|
|
402
|
+
}
|
|
403
|
+
|
|
389
404
|
private pauseOnExceptionStateChanged(): void {
|
|
390
|
-
const
|
|
391
|
-
const pauseOnCaughtEnabled = settings.resolve(pauseOnCaughtExceptionSettingDescriptor).get();
|
|
405
|
+
const pauseOnCaughtEnabled = this.#pauseOnCaughtExceptionSetting.get();
|
|
392
406
|
let state: Protocol.Debugger.SetPauseOnExceptionsRequestState;
|
|
393
407
|
|
|
394
|
-
const pauseOnUncaughtEnabled =
|
|
408
|
+
const pauseOnUncaughtEnabled = this.#pauseOnUncaughtExceptionSetting.get();
|
|
395
409
|
if (pauseOnCaughtEnabled && pauseOnUncaughtEnabled) {
|
|
396
410
|
state = Protocol.Debugger.SetPauseOnExceptionsRequestState.All;
|
|
397
411
|
} else if (pauseOnCaughtEnabled) {
|
|
@@ -406,15 +420,13 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
406
420
|
|
|
407
421
|
private asyncStackTracesStateChanged(): Promise<Protocol.ProtocolResponseWithError> {
|
|
408
422
|
const maxAsyncStackChainDepth = 32;
|
|
409
|
-
const
|
|
410
|
-
const enabled = !settings.moduleSetting('disable-async-stack-traces').get() && this.#debuggerEnabled;
|
|
423
|
+
const enabled = !this.#disableAsyncStackTracesSetting.get() && this.#debuggerEnabled;
|
|
411
424
|
const maxDepth = enabled ? maxAsyncStackChainDepth : 0;
|
|
412
425
|
return this.agent.invoke_setAsyncCallStackDepth({maxDepth});
|
|
413
426
|
}
|
|
414
427
|
|
|
415
428
|
private breakpointsActiveChanged(): void {
|
|
416
|
-
|
|
417
|
-
void this.agent.invoke_setBreakpointsActive({active: settings.moduleSetting('breakpoints-active').get()});
|
|
429
|
+
void this.agent.invoke_setBreakpointsActive({active: this.#breakpointsActiveSetting.get()});
|
|
418
430
|
}
|
|
419
431
|
|
|
420
432
|
setComputeAutoStepRangesCallback(callback: ((arg0: StepMode, arg1: CallFrame) => Promise<LocationRange[]>)|null):
|
|
@@ -648,6 +660,11 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
648
660
|
return;
|
|
649
661
|
}
|
|
650
662
|
|
|
663
|
+
if (this.#skipAllPausesSetting.get()) {
|
|
664
|
+
this.resume();
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
|
|
651
668
|
const pausedDetails =
|
|
652
669
|
new DebuggerPausedDetails(this, callFrames, reason, auxData, breakpointIds, asyncStackTrace, asyncStackTraceId);
|
|
653
670
|
|
|
@@ -665,8 +682,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
665
682
|
} else {
|
|
666
683
|
void this.stepInto();
|
|
667
684
|
}
|
|
668
|
-
} else {
|
|
669
|
-
Common.EventTarget.fireEvent('DevTools.DebuggerPaused');
|
|
670
685
|
}
|
|
671
686
|
}
|
|
672
687
|
|
|
@@ -898,13 +913,13 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
898
913
|
if (this.#debuggerId) {
|
|
899
914
|
debuggerIdToModel.delete(this.#debuggerId);
|
|
900
915
|
}
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
.removeChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
904
|
-
settings.resolve(pauseOnCaughtExceptionSettingDescriptor)
|
|
905
|
-
.removeChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
916
|
+
this.#pauseOnExceptionEnabledSetting.removeChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
917
|
+
this.#pauseOnCaughtExceptionSetting.removeChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
906
918
|
this.#skipAllPausesSetting.removeChangeListener(this.skipAllPausesChanged, this);
|
|
907
|
-
|
|
919
|
+
this.#pauseOnUncaughtExceptionSetting.removeChangeListener(this.pauseOnExceptionStateChanged, this);
|
|
920
|
+
this.#disableAsyncStackTracesSetting.removeChangeListener(this.asyncStackTracesStateChanged, this);
|
|
921
|
+
this.#breakpointsActiveSetting.removeChangeListener(this.breakpointsActiveChanged, this);
|
|
922
|
+
this.#jsSourceMapsEnabledSetting.removeChangeListener(this.jsSourceMapsStateChanged, this);
|
|
908
923
|
}
|
|
909
924
|
|
|
910
925
|
override async suspendModel(): Promise<void> {
|
|
@@ -9,6 +9,7 @@ import {CSSModel} from './CSSModel.js';
|
|
|
9
9
|
import type {MultitargetNetworkManager} from './NetworkManager.js';
|
|
10
10
|
import {Events, OverlayModel} from './OverlayModel.js';
|
|
11
11
|
import {SDKModel} from './SDKModel.js';
|
|
12
|
+
import {javaScriptDisabledSettingDescriptor} from './SDKSettings.js';
|
|
12
13
|
import {Capability, type Target} from './Target.js';
|
|
13
14
|
|
|
14
15
|
export const enum DataSaverOverride {
|
|
@@ -52,7 +53,7 @@ export class EmulationModel extends SDKModel<EmulationModelEventTypes> implement
|
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
const settings = this.target().targetManager().settings;
|
|
55
|
-
const disableJavascriptSetting = settings.
|
|
56
|
+
const disableJavascriptSetting = settings.resolve(javaScriptDisabledSettingDescriptor);
|
|
56
57
|
disableJavascriptSetting.addChangeListener(
|
|
57
58
|
async () =>
|
|
58
59
|
await this.#emulationAgent.invoke_setScriptExecutionDisabled({value: disableJavascriptSetting.get()}));
|
|
@@ -134,6 +134,13 @@ const FULL_FIDELITY_RESEND_TYPES = new Set([
|
|
|
134
134
|
Common.ResourceType.resourceTypes.SourceMapStyleSheet,
|
|
135
135
|
]);
|
|
136
136
|
|
|
137
|
+
/** Resource types eligible for resend but with reduced fidelity. */
|
|
138
|
+
const PARTIAL_FIDELITY_RESEND_TYPES = new Set([
|
|
139
|
+
Common.ResourceType.resourceTypes.Document,
|
|
140
|
+
Common.ResourceType.resourceTypes.Prefetch,
|
|
141
|
+
Common.ResourceType.resourceTypes.Ping,
|
|
142
|
+
]);
|
|
143
|
+
|
|
137
144
|
const CONNECTION_TYPES = new Map([
|
|
138
145
|
['2g', Protocol.Network.ConnectionType.Cellular2g],
|
|
139
146
|
['3g', Protocol.Network.ConnectionType.Cellular3g],
|
|
@@ -211,11 +218,18 @@ export class NetworkManager extends SDKModel<EventTypes> {
|
|
|
211
218
|
return requestToManagerMap.get(request) || null;
|
|
212
219
|
}
|
|
213
220
|
|
|
214
|
-
static canResendRequest(request: NetworkRequest): boolean {
|
|
221
|
+
static canResendRequest(request: NetworkRequest, fullFidelity: boolean): boolean {
|
|
215
222
|
if (!requestToManagerMap.get(request) || !request.backendRequestId() || request.isRedirect()) {
|
|
216
223
|
return false;
|
|
217
224
|
}
|
|
218
|
-
|
|
225
|
+
const type = request.resourceType();
|
|
226
|
+
if (FULL_FIDELITY_RESEND_TYPES.has(type)) {
|
|
227
|
+
return true;
|
|
228
|
+
}
|
|
229
|
+
if (!fullFidelity && PARTIAL_FIDELITY_RESEND_TYPES.has(type)) {
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
return false;
|
|
219
233
|
}
|
|
220
234
|
|
|
221
235
|
static replayRequest(request: NetworkRequest): void {
|
|
@@ -14,6 +14,16 @@ import {DeferredDOMNode, DOMModel, type DOMNode, DOMNodeEvents, Events as DOMMod
|
|
|
14
14
|
import {OverlayPersistentHighlighter} from './OverlayPersistentHighlighter.js';
|
|
15
15
|
import type {RemoteObject} from './RemoteObject.js';
|
|
16
16
|
import {SDKModel} from './SDKModel.js';
|
|
17
|
+
import {
|
|
18
|
+
apcaSettingDescriptor,
|
|
19
|
+
showAdHighlightsSettingDescriptor,
|
|
20
|
+
showDebugBordersSettingDescriptor,
|
|
21
|
+
showFPSCounterSettingDescriptor,
|
|
22
|
+
showLayoutShiftRegionsSettingDescriptor,
|
|
23
|
+
showMetricsRulersSettingDescriptor,
|
|
24
|
+
showPaintRectsSettingDescriptor,
|
|
25
|
+
showScrollBottleneckRectsSettingDescriptor,
|
|
26
|
+
} from './SDKSettings.js';
|
|
17
27
|
import {Capability, type Target} from './Target.js';
|
|
18
28
|
import type {TargetManager} from './TargetManager.js';
|
|
19
29
|
|
|
@@ -126,12 +136,12 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
|
|
|
126
136
|
this.#defaultHighlighter = new DefaultHighlighter(this);
|
|
127
137
|
this.#highlighter = this.#defaultHighlighter;
|
|
128
138
|
|
|
129
|
-
this.#showPaintRectsSetting = settings.
|
|
130
|
-
this.#showLayoutShiftRegionsSetting = settings.
|
|
131
|
-
this.#showAdHighlightsSetting = settings.
|
|
132
|
-
this.#showDebugBordersSetting = settings.
|
|
133
|
-
this.#showFPSCounterSetting = settings.
|
|
134
|
-
this.#showScrollBottleneckRectsSetting = settings.
|
|
139
|
+
this.#showPaintRectsSetting = settings.resolve(showPaintRectsSettingDescriptor);
|
|
140
|
+
this.#showLayoutShiftRegionsSetting = settings.resolve(showLayoutShiftRegionsSettingDescriptor);
|
|
141
|
+
this.#showAdHighlightsSetting = settings.resolve(showAdHighlightsSettingDescriptor);
|
|
142
|
+
this.#showDebugBordersSetting = settings.resolve(showDebugBordersSettingDescriptor);
|
|
143
|
+
this.#showFPSCounterSetting = settings.resolve(showFPSCounterSettingDescriptor);
|
|
144
|
+
this.#showScrollBottleneckRectsSetting = settings.resolve(showScrollBottleneckRectsSettingDescriptor);
|
|
135
145
|
|
|
136
146
|
if (!target.suspended()) {
|
|
137
147
|
void this.overlayAgent.invoke_enable();
|
|
@@ -563,7 +573,7 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
|
|
|
563
573
|
private buildHighlightConfig(mode: string|undefined = 'all', showDetailedToolip: boolean|undefined = false):
|
|
564
574
|
Protocol.Overlay.HighlightConfig {
|
|
565
575
|
const settings = this.target().targetManager().settings;
|
|
566
|
-
const showRulers = settings.
|
|
576
|
+
const showRulers = settings.resolve(showMetricsRulersSettingDescriptor).get();
|
|
567
577
|
const highlightConfig: Protocol.Overlay.HighlightConfig = {
|
|
568
578
|
showInfo: mode === 'all' || mode === 'container-outline',
|
|
569
579
|
showRulers,
|
|
@@ -573,8 +583,8 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
|
|
|
573
583
|
gridHighlightConfig: {},
|
|
574
584
|
flexContainerHighlightConfig: {},
|
|
575
585
|
flexItemHighlightConfig: {},
|
|
576
|
-
contrastAlgorithm: settings.
|
|
577
|
-
|
|
586
|
+
contrastAlgorithm: settings.resolve(apcaSettingDescriptor).get() ? Protocol.Overlay.ContrastAlgorithm.Apca :
|
|
587
|
+
Protocol.Overlay.ContrastAlgorithm.Aa,
|
|
578
588
|
};
|
|
579
589
|
|
|
580
590
|
if (mode === 'all' || mode === 'content') {
|
|
@@ -8,6 +8,12 @@ import * as Platform from '../platform/platform.js';
|
|
|
8
8
|
|
|
9
9
|
import type {DOMModel} from './DOMModel.js';
|
|
10
10
|
import {OverlayColorGenerator} from './OverlayColorGenerator.js';
|
|
11
|
+
import {
|
|
12
|
+
extendGridLinesSettingDescriptor,
|
|
13
|
+
showGridAreasSettingDescriptor,
|
|
14
|
+
showGridLineLabelsSettingDescriptor,
|
|
15
|
+
showGridTrackSizesSettingDescriptor,
|
|
16
|
+
} from './SDKSettings.js';
|
|
11
17
|
|
|
12
18
|
export const enum HighlightType {
|
|
13
19
|
FLEX = 'FLEX',
|
|
@@ -57,10 +63,10 @@ export class OverlayPersistentHighlighter {
|
|
|
57
63
|
|
|
58
64
|
this.#persistentHighlightSetting =
|
|
59
65
|
settings.createLocalSetting<PersistentHighlightSettingItem[]>('persistent-highlight-setting', []);
|
|
60
|
-
this.#showGridLineLabelsSetting = settings.
|
|
61
|
-
this.#extendGridLinesSetting = settings.
|
|
62
|
-
this.#showGridAreasSetting = settings.
|
|
63
|
-
this.#showGridTrackSizesSetting = settings.
|
|
66
|
+
this.#showGridLineLabelsSetting = settings.resolve(showGridLineLabelsSettingDescriptor);
|
|
67
|
+
this.#extendGridLinesSetting = settings.resolve(extendGridLinesSettingDescriptor);
|
|
68
|
+
this.#showGridAreasSetting = settings.resolve(showGridAreasSettingDescriptor);
|
|
69
|
+
this.#showGridTrackSizesSetting = settings.resolve(showGridTrackSizesSettingDescriptor);
|
|
64
70
|
|
|
65
71
|
this.#showGridLineLabelsSetting.addChangeListener(this.onSettingChange, this);
|
|
66
72
|
this.#extendGridLinesSetting.addChangeListener(this.onSettingChange, this);
|
|
@@ -36,3 +36,120 @@ export const pauseOnCaughtExceptionSettingDescriptor: Common.Settings.SettingDes
|
|
|
36
36
|
type: Common.Settings.SettingType.BOOLEAN,
|
|
37
37
|
defaultValue: false,
|
|
38
38
|
};
|
|
39
|
+
|
|
40
|
+
export const pauseOnUncaughtExceptionSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
41
|
+
name: 'pause-on-uncaught-exception',
|
|
42
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
43
|
+
defaultValue: false,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const javaScriptDisabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
47
|
+
name: 'java-script-disabled',
|
|
48
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
49
|
+
defaultValue: false,
|
|
50
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const disableAsyncStackTracesSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
54
|
+
name: 'disable-async-stack-traces',
|
|
55
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
56
|
+
defaultValue: false,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const breakpointsActiveSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
60
|
+
name: 'breakpoints-active',
|
|
61
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
62
|
+
defaultValue: true,
|
|
63
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const showMetricsRulersSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
67
|
+
name: 'show-metrics-rulers',
|
|
68
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
69
|
+
defaultValue: false,
|
|
70
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const apcaSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
74
|
+
name: 'apca',
|
|
75
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
76
|
+
defaultValue: false,
|
|
77
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const showGridAreasSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
81
|
+
name: 'show-grid-areas',
|
|
82
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
83
|
+
defaultValue: false,
|
|
84
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const showGridTrackSizesSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
88
|
+
name: 'show-grid-track-sizes',
|
|
89
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
90
|
+
defaultValue: false,
|
|
91
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const extendGridLinesSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
95
|
+
name: 'extend-grid-lines',
|
|
96
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
97
|
+
defaultValue: false,
|
|
98
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const showGridLineLabelsSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
102
|
+
name: 'show-grid-line-labels',
|
|
103
|
+
type: Common.Settings.SettingType.ENUM,
|
|
104
|
+
defaultValue: 'lineNumbers',
|
|
105
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const showPaintRectsSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
109
|
+
name: 'show-paint-rects',
|
|
110
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
111
|
+
defaultValue: false,
|
|
112
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const showLayoutShiftRegionsSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
116
|
+
name: 'show-layout-shift-regions',
|
|
117
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
118
|
+
defaultValue: false,
|
|
119
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export const showAdHighlightsSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
123
|
+
name: 'show-ad-highlights',
|
|
124
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
125
|
+
defaultValue: false,
|
|
126
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const showDebugBordersSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
130
|
+
name: 'show-debug-borders',
|
|
131
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
132
|
+
defaultValue: false,
|
|
133
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const showFPSCounterSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
137
|
+
name: 'show-fps-counter',
|
|
138
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
139
|
+
defaultValue: false,
|
|
140
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export const showScrollBottleneckRectsSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
144
|
+
name: 'show-scroll-bottleneck-rects',
|
|
145
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
146
|
+
defaultValue: false,
|
|
147
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export const emulatePageFocusSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
151
|
+
name: 'emulate-page-focus',
|
|
152
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
153
|
+
defaultValue: false,
|
|
154
|
+
storageType: Common.Settings.SettingStorageType.LOCAL,
|
|
155
|
+
};
|