chrome-devtools-frontend 1.0.1681498 → 1.0.1683520
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/eslint.config.mjs +8 -3
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/PreloadingModel.ts +44 -22
- package/front_end/core/sdk/RemoteObject.ts +4 -1
- package/front_end/core/sdk/RuntimeModel.ts +5 -5
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -1
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +5 -2
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +2 -10
- package/front_end/entrypoints/main/MainImpl.ts +13 -13
- package/front_end/entrypoints/main/main-meta.ts +4 -20
- package/front_end/entrypoints/shell/shell.ts +0 -2
- package/front_end/entrypoints/trace_app/trace_app.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +3 -1
- package/front_end/generated/protocol-mapping.d.ts +16 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +25 -1
- package/front_end/models/ai_assistance/ExtensionScope.ts +11 -12
- package/front_end/models/ai_assistance/agents/AiAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +2 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +8 -8
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -0
- package/front_end/models/formatter/ScriptFormatter.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +9 -1
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +4 -4
- package/front_end/models/logs/NetworkLog.ts +8 -1
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +4 -2
- package/front_end/models/stack_trace/StackTraceImpl.ts +1 -0
- package/front_end/models/trace/Name.ts +5 -5
- package/front_end/models/trace/Processor.ts +1 -0
- package/front_end/models/trace/Styles.ts +115 -115
- package/front_end/models/trace/extras/TraceTree.ts +2 -1
- package/front_end/models/trace/helpers/Network.ts +4 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +4 -2
- package/front_end/models/trace/insights/CharacterSet.ts +3 -3
- package/front_end/models/trace/insights/DOMSize.ts +1 -1
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +6 -2
- package/front_end/models/trace/insights/FontDisplay.ts +9 -3
- package/front_end/models/trace/insights/ForcedReflow.ts +4 -4
- package/front_end/models/trace/insights/INPBreakdown.ts +3 -4
- package/front_end/models/trace/insights/ImageDelivery.ts +2 -2
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +5 -5
- package/front_end/models/trace/insights/LegacyJavaScript.ts +7 -3
- package/front_end/models/trace/insights/ModernHTTP.ts +3 -3
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +13 -9
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/SlowCSSSelector.ts +29 -25
- package/front_end/models/trace/insights/ThirdParties.ts +13 -5
- package/front_end/models/trace/insights/Viewport.ts +4 -2
- package/front_end/models/workspace/IgnoreListManager.ts +53 -17
- package/front_end/panels/accessibility/ARIAAttributesView.ts +11 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +67 -53
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -2
- package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +2 -2
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +5 -5
- package/front_end/panels/animation/AnimationTimeline.ts +2 -0
- package/front_end/panels/application/preloading/PreloadingView.ts +9 -3
- package/front_end/panels/application/preloading/components/components.ts +2 -0
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +10 -11
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/common/ExtensionServer.ts +9 -10
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -4
- package/front_end/panels/elements/ElementStatePaneWidget.ts +3 -0
- package/front_end/panels/elements/ElementsPanel.ts +4 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +7 -1
- package/front_end/panels/elements/EventListenersWidget.ts +10 -11
- package/front_end/panels/issues/IssueView.ts +5 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -1
- package/front_end/panels/media/PlayerPropertiesView.ts +309 -416
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/network/NetworkPanel.ts +2 -1
- package/front_end/panels/network/RequestPayloadView.ts +5 -2
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -2
- package/front_end/panels/network/network-meta.ts +6 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -1
- package/front_end/panels/recorder/RecordingView.ts +89 -73
- package/front_end/panels/recorder/ReplaySection.ts +59 -40
- package/front_end/panels/recorder/injected/injected.ts +4 -0
- package/front_end/panels/security/SecurityPanel.ts +5 -6
- package/front_end/panels/security/SecurityPanelSidebar.ts +244 -204
- package/front_end/panels/security/security.ts +0 -4
- package/front_end/panels/settings/EditFileSystemView.ts +8 -7
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -14
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +10 -11
- package/front_end/panels/sources/SourcesPanel.ts +6 -3
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +5 -5
- package/front_end/panels/timeline/components/CWVMetrics.ts +1 -2
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +5 -5
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
- package/front_end/panels/timeline/components/Sidebar.ts +3 -3
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +3 -1
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +1 -2
- package/front_end/panels/timeline/components/insights/Cache.ts +1 -2
- package/front_end/panels/timeline/components/insights/CharacterSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -2
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -2
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +1 -2
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +1 -2
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +1 -2
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +13 -13
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +4 -4
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +1 -2
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +10 -8
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +3 -1
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +1 -2
- package/front_end/panels/timeline/components/insights/Viewport.ts +1 -2
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -2
- package/front_end/panels/timeline/timeline.ts +0 -2
- package/front_end/panels/web_audio/WebAudioView.ts +7 -7
- package/front_end/panels/webauthn/WebauthnPane.ts +9 -9
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/diff_view/DiffView.ts +2 -1
- package/front_end/ui/components/report_view/ReportView.docs.ts +2 -2
- package/front_end/ui/components/text_editor/config.ts +2 -1
- package/front_end/ui/components/text_editor/javascript.ts +12 -13
- package/front_end/ui/legacy/GlassPane.ts +38 -14
- package/front_end/ui/legacy/Treeoutline.ts +14 -3
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +21 -30
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +3 -8
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +15 -16
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +4 -4
- package/front_end/ui/legacy/components/utils/Linkifier.ts +8 -10
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +5 -2
- package/front_end/ui/settings/InspectorMainSettings.ts +19 -0
- package/front_end/ui/settings/MainSettings.ts +33 -0
- package/front_end/ui/settings/settings.ts +4 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +29 -0
- package/mcp/mcp.ts +0 -6
- package/package.json +1 -1
- package/front_end/models/logs/logs-meta.ts +0 -24
- package/front_end/models/workspace/workspace-meta.ts +0 -40
- package/front_end/panels/security/OriginTreeElement.ts +0 -60
- package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +0 -30
|
@@ -356,7 +356,8 @@ export class NetworkPanel extends UI.Panel.Panel implements
|
|
|
356
356
|
|
|
357
357
|
this.preserveLogSetting =
|
|
358
358
|
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.preserveNetworkLogSettingDescriptor);
|
|
359
|
-
this.recordLogSetting =
|
|
359
|
+
this.recordLogSetting =
|
|
360
|
+
Common.Settings.Settings.instance().resolve(Logs.NetworkLog.recordNetworkLogSettingDescriptor);
|
|
360
361
|
this.recordLogSetting.addChangeListener(({data}) => this.toggleRecord(data));
|
|
361
362
|
|
|
362
363
|
this.throttlingSelect = this.createThrottlingConditionsSelect();
|
|
@@ -203,7 +203,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
203
203
|
});
|
|
204
204
|
objectTree.expanded = true;
|
|
205
205
|
return html`
|
|
206
|
-
<li role=treeitem class="source-code object-properties-section-root-element object-properties-section" open>
|
|
206
|
+
<li role=treeitem class="source-code object-properties-section-root-element object-properties-section" toggle-on-click open>
|
|
207
207
|
${object.description}
|
|
208
208
|
${object.hasChildren ? ObjectUI.ObjectPropertiesSection.renderObjectTree(objectTree) : nothing}
|
|
209
209
|
</li>
|
|
@@ -241,13 +241,14 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
241
241
|
|
|
242
242
|
// clang-format off
|
|
243
243
|
render(html`<style>${requestPayloadViewStyles}</style>
|
|
244
|
-
<devtools-tree dense class=request-payload-tree .template=${html`
|
|
244
|
+
<devtools-tree dense show-selection-on-keyboard-focus class=request-payload-tree .template=${html`
|
|
245
245
|
<style>${objectValueStyles}</style>
|
|
246
246
|
<style>${objectPropertiesSectionStyles}</style>
|
|
247
247
|
<style>${requestPayloadTreeStyles}</style>
|
|
248
248
|
<ul role=tree>
|
|
249
249
|
<li
|
|
250
250
|
role=treeitem
|
|
251
|
+
toggle-on-click
|
|
251
252
|
?hidden=${!input.queryParameters}
|
|
252
253
|
jslog=${VisualLogging.section().context('query-string')}
|
|
253
254
|
@contextmenu=${onContextMenu(
|
|
@@ -280,6 +281,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
280
281
|
</li>
|
|
281
282
|
<li
|
|
282
283
|
role=treeitem
|
|
284
|
+
toggle-on-click
|
|
283
285
|
?hidden=${!input.formData || !input.formParameters}
|
|
284
286
|
jslog=${VisualLogging.section().context('form-data')}
|
|
285
287
|
@contextmenu=${onContextMenu(
|
|
@@ -311,6 +313,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
311
313
|
</li>
|
|
312
314
|
<li
|
|
313
315
|
role=treeitem
|
|
316
|
+
toggle-on-click
|
|
314
317
|
?hidden=${!input.formData || Boolean(input.formParameters) || Boolean(input.binaryPayloadContentData)}
|
|
315
318
|
jslog=${VisualLogging.section().context('request-payload')}
|
|
316
319
|
@contextmenu=${onContextMenu(
|
|
@@ -7,7 +7,6 @@ import * as Common from '../../../core/common/common.js';
|
|
|
7
7
|
import * as Host from '../../../core/host/host.js';
|
|
8
8
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
9
9
|
import * as Platform from '../../../core/platform/platform.js';
|
|
10
|
-
import type {NameValue} from '../../../core/sdk/NetworkRequest.js';
|
|
11
10
|
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
12
11
|
import * as TextUtils from '../../../core/text_utils/text_utils.js';
|
|
13
12
|
import * as Protocol from '../../../generated/protocol.js';
|
|
@@ -91,7 +90,7 @@ class ResponseHeaderSectionBase extends HTMLElement {
|
|
|
91
90
|
protected readonly shadow = this.attachShadow({mode: 'open'});
|
|
92
91
|
protected headerDetails: HeaderDetailsDescriptor[] = [];
|
|
93
92
|
|
|
94
|
-
protected setHeaders(headers: NameValue[]): void {
|
|
93
|
+
protected setHeaders(headers: SDK.NetworkRequest.NameValue[]): void {
|
|
95
94
|
headers.sort(function(a, b) {
|
|
96
95
|
return Platform.StringUtilities.compare(a.name.toLowerCase(), b.name.toLowerCase());
|
|
97
96
|
});
|
|
@@ -7,6 +7,7 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as Root from '../../core/root/root.js';
|
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
|
+
import * as Logs from '../../models/logs/logs.js';
|
|
10
11
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
11
12
|
import * as PanelCommon from '../../panels/common/common.js';
|
|
12
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
@@ -545,6 +546,11 @@ SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.preserveNetworkLogSett
|
|
|
545
546
|
],
|
|
546
547
|
});
|
|
547
548
|
|
|
549
|
+
SettingsUI.SettingUIRegistration.register(Logs.NetworkLog.recordNetworkLogSettingDescriptor, {
|
|
550
|
+
category: Common.Settings.SettingCategory.NETWORK,
|
|
551
|
+
title: i18nLazyString(UIStrings.recordNetworkLog),
|
|
552
|
+
});
|
|
553
|
+
|
|
548
554
|
UI.ViewManager.registerLocationResolver({
|
|
549
555
|
name: UI.ViewManager.ViewLocationValues.NETWORK_SIDEBAR,
|
|
550
556
|
category: UI.ViewManager.ViewLocationCategory.NETWORK,
|
|
@@ -86,8 +86,9 @@ const DEFAULT_VIEW: PerformanceMonitorView = (input, output, target) => {
|
|
|
86
86
|
chartsInfo: input.chartsInfo,
|
|
87
87
|
metrics: input.metrics,
|
|
88
88
|
})} class=${classMap({suspended: input.suspended})}></devtools-widget>
|
|
89
|
-
<div class="perfmon-chart-container ${classMap({suspended: input.suspended})}">
|
|
89
|
+
<div class="perfmon-chart-container ${classMap({suspended: input.suspended})}" jslog=${VisualLogging.section('perfmon-chart')}>
|
|
90
90
|
<canvas tabindex="-1" aria-label=${i18nString(UIStrings.graphsDisplayingARealtimeViewOf)}
|
|
91
|
+
jslog=${VisualLogging.canvas('perfmon-canvas')}
|
|
91
92
|
.width=${Math.round(input.width * window.devicePixelRatio)} .height=${input.height}
|
|
92
93
|
style="height:${input.height / window.devicePixelRatio}px" ${ref(e => {
|
|
93
94
|
if (e) {
|
|
@@ -26,7 +26,6 @@ import type * as Converters from './converters/converters.js';
|
|
|
26
26
|
import type * as Extensions from './extensions/extensions.js';
|
|
27
27
|
import {ExtensionView} from './ExtensionView.js';
|
|
28
28
|
import * as Models from './models/models.js';
|
|
29
|
-
import {PlayRecordingSpeed} from './models/RecordingPlayer.js';
|
|
30
29
|
import * as Actions from './recorder-actions/recorder-actions.js';
|
|
31
30
|
import recordingViewStyles from './recordingView.css.js';
|
|
32
31
|
import {ReplaySection} from './ReplaySection.js';
|
|
@@ -174,7 +173,7 @@ export const enum TargetPanel {
|
|
|
174
173
|
|
|
175
174
|
export interface PlayRecordingEvent {
|
|
176
175
|
targetPanel: TargetPanel;
|
|
177
|
-
speed: PlayRecordingSpeed;
|
|
176
|
+
speed: Models.RecordingPlayer.PlayRecordingSpeed;
|
|
178
177
|
extension?: Extensions.ExtensionManager.Extension;
|
|
179
178
|
}
|
|
180
179
|
|
|
@@ -769,8 +768,13 @@ interface ViewInput {
|
|
|
769
768
|
getStepState: (step: Models.Schema.Step) => State;
|
|
770
769
|
onAbortReplay: () => void;
|
|
771
770
|
onMeasurePerformanceClick: (event: Event) => void;
|
|
772
|
-
onTogglePlaying: (
|
|
773
|
-
|
|
771
|
+
onTogglePlaying: (
|
|
772
|
+
speed: Models.RecordingPlayer.PlayRecordingSpeed,
|
|
773
|
+
extension?: Extensions.ExtensionManager.Extension,
|
|
774
|
+
) => void;
|
|
775
|
+
onCodeFormatChange: (
|
|
776
|
+
event: Menus.SelectMenu.SelectMenuItemSelectedEvent,
|
|
777
|
+
) => void;
|
|
774
778
|
onCopyStep: (step: Models.Schema.Step) => void;
|
|
775
779
|
onEditTitleButtonClick: (event: Event) => void;
|
|
776
780
|
onNetworkConditionsChange: (event: Event) => void;
|
|
@@ -781,8 +785,14 @@ interface ViewInput {
|
|
|
781
785
|
onTimeoutInput: (event: Event) => void;
|
|
782
786
|
onTitleBlur: (event: Event) => void;
|
|
783
787
|
onTitleInputKeyDown: (event: KeyboardEvent) => void;
|
|
784
|
-
onStepChanged?: (
|
|
785
|
-
|
|
788
|
+
onStepChanged?: (
|
|
789
|
+
currentStep: Models.Schema.Step,
|
|
790
|
+
newStep: Models.Schema.Step,
|
|
791
|
+
) => void;
|
|
792
|
+
onAddStep?: (
|
|
793
|
+
stepOrSection: Models.Schema.Step|Models.Section.Section,
|
|
794
|
+
position: AddStepPosition,
|
|
795
|
+
) => void;
|
|
786
796
|
onRemoveStep?: (step: Models.Schema.Step) => void;
|
|
787
797
|
onAddBreakpoint?: (index: number) => void;
|
|
788
798
|
onRemoveBreakpoint?: (index: number) => void;
|
|
@@ -935,72 +945,78 @@ export class RecordingView extends UI.Widget.Widget {
|
|
|
935
945
|
].find(converter => converter.getId() === this.#converterId) ??
|
|
936
946
|
this.builtInConverters[0];
|
|
937
947
|
|
|
938
|
-
this.#view(
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
948
|
+
this.#view(
|
|
949
|
+
{
|
|
950
|
+
breakpointIndexes: this.breakpointIndexes,
|
|
951
|
+
builtInConverters: this.builtInConverters,
|
|
952
|
+
converterId: this.#converterId,
|
|
953
|
+
converterName: converter?.getFormatName(),
|
|
954
|
+
currentError: this.currentError ?? null,
|
|
955
|
+
currentStep: this.currentStep ?? null,
|
|
956
|
+
editorState: this.#editorState ?? null,
|
|
957
|
+
extensionConverters: this.extensionConverters,
|
|
958
|
+
extensionDescriptor: this.extensionDescriptor,
|
|
959
|
+
isRecording: this.isRecording,
|
|
960
|
+
isTitleInvalid: this.#isTitleInvalid,
|
|
961
|
+
lastReplayResult: this.lastReplayResult ?? null,
|
|
962
|
+
recorderSettings: this.#recorderSettings ?? null,
|
|
963
|
+
recording: this.recording,
|
|
964
|
+
recordingTogglingInProgress: this.recordingTogglingInProgress,
|
|
965
|
+
replayAllowed: this.replayAllowed,
|
|
966
|
+
replayExtensions: this.replayExtensions ?? [],
|
|
967
|
+
replaySettingsExpanded: this.#replaySettingsExpanded,
|
|
968
|
+
replayState: this.replayState,
|
|
969
|
+
sections: this.sections,
|
|
970
|
+
selectedStep: this.#selectedStep ?? null,
|
|
971
|
+
settings: this.settings ?? null,
|
|
972
|
+
showCodeView: this.#showCodeView,
|
|
973
|
+
|
|
974
|
+
onAddAssertion: () => {
|
|
975
|
+
this.onAddAssertion?.();
|
|
976
|
+
},
|
|
977
|
+
onRecordingFinished: () => {
|
|
978
|
+
this.onRecordingFinished?.();
|
|
979
|
+
},
|
|
980
|
+
getSectionState: this.#getSectionState.bind(this),
|
|
981
|
+
getStepState: this.#getStepState.bind(this),
|
|
982
|
+
onAbortReplay: () => {
|
|
983
|
+
this.onAbortReplay?.();
|
|
984
|
+
},
|
|
985
|
+
onMeasurePerformanceClick: this.#handleMeasurePerformanceClickEvent.bind(this),
|
|
986
|
+
onTogglePlaying: (
|
|
987
|
+
speed: Models.RecordingPlayer.PlayRecordingSpeed,
|
|
988
|
+
extension?: Extensions.ExtensionManager.Extension,
|
|
989
|
+
) => {
|
|
990
|
+
this.onPlayRecording?.({
|
|
991
|
+
targetPanel: TargetPanel.DEFAULT,
|
|
992
|
+
speed,
|
|
993
|
+
extension,
|
|
994
|
+
});
|
|
995
|
+
},
|
|
996
|
+
onStepChanged: (currentStep, newStep) => this.onStepChanged?.(currentStep, newStep),
|
|
997
|
+
onAddStep: (stepOrSection, position) => this.onAddStep?.(stepOrSection, position),
|
|
998
|
+
onRemoveStep: step => this.onRemoveStep?.(step),
|
|
999
|
+
onAddBreakpoint: index => this.onAddBreakpoint?.(index),
|
|
1000
|
+
onRemoveBreakpoint: index => this.onRemoveBreakpoint?.(index),
|
|
1001
|
+
onAttributeRequested: send => this.onAttributeRequested?.(send),
|
|
1002
|
+
onCodeFormatChange: this.#onCodeFormatChange.bind(this),
|
|
1003
|
+
onCopyStep: this.#onCopyStepEvent.bind(this),
|
|
1004
|
+
onEditTitleButtonClick: this.#onEditTitleButtonClick.bind(this),
|
|
1005
|
+
onNetworkConditionsChange: this.#onNetworkConditionsChange.bind(this),
|
|
1006
|
+
onReplaySettingsKeydown: this.#onReplaySettingsKeydown.bind(this),
|
|
1007
|
+
onSelectMenuLabelClick: this.#onSelectMenuLabelClick.bind(this),
|
|
1008
|
+
onStepClick: this.#onStepClick.bind(this),
|
|
1009
|
+
onStepHover: this.#onStepHover.bind(this),
|
|
1010
|
+
onTimeoutInput: this.#onTimeoutInput.bind(this),
|
|
1011
|
+
onTitleBlur: this.#onTitleBlur.bind(this),
|
|
1012
|
+
onTitleInputKeyDown: this.#onTitleInputKeyDown.bind(this),
|
|
1013
|
+
onToggleReplaySettings: this.#onToggleReplaySettings.bind(this),
|
|
1014
|
+
onWrapperClick: this.#onWrapperClick.bind(this),
|
|
1015
|
+
showCodeToggle: this.showCodeToggle.bind(this),
|
|
1016
|
+
},
|
|
1017
|
+
this.#viewOutput,
|
|
1018
|
+
this.contentElement,
|
|
1019
|
+
);
|
|
1004
1020
|
}
|
|
1005
1021
|
|
|
1006
1022
|
override wasShown(): void {
|
|
@@ -1217,7 +1233,7 @@ export class RecordingView extends UI.Widget.Widget {
|
|
|
1217
1233
|
|
|
1218
1234
|
this.onPlayRecording?.({
|
|
1219
1235
|
targetPanel: TargetPanel.PERFORMANCE_PANEL,
|
|
1220
|
-
speed: PlayRecordingSpeed.NORMAL,
|
|
1236
|
+
speed: Models.RecordingPlayer.PlayRecordingSpeed.NORMAL,
|
|
1221
1237
|
});
|
|
1222
1238
|
}
|
|
1223
1239
|
|
|
@@ -11,7 +11,6 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
11
11
|
|
|
12
12
|
import type * as Extensions from './extensions/extensions.js';
|
|
13
13
|
import * as Models from './models/models.js';
|
|
14
|
-
import {PlayRecordingSpeed} from './models/RecordingPlayer.js';
|
|
15
14
|
import * as Actions from './recorder-actions/recorder-actions.js';
|
|
16
15
|
import replaySectionStyles from './replaySection.css.js';
|
|
17
16
|
|
|
@@ -72,9 +71,13 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
72
71
|
|
|
73
72
|
const REPLAY_EXTENSION_PREFIX = 'extension';
|
|
74
73
|
|
|
75
|
-
function isPlayRecordingSpeed(
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
function isPlayRecordingSpeed(
|
|
75
|
+
string: string,
|
|
76
|
+
): string is Models.RecordingPlayer.PlayRecordingSpeed {
|
|
77
|
+
return (string === Models.RecordingPlayer.PlayRecordingSpeed.NORMAL ||
|
|
78
|
+
string === Models.RecordingPlayer.PlayRecordingSpeed.SLOW ||
|
|
79
|
+
string === Models.RecordingPlayer.PlayRecordingSpeed.VERY_SLOW ||
|
|
80
|
+
string === Models.RecordingPlayer.PlayRecordingSpeed.EXTREMELY_SLOW);
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
interface Item {
|
|
@@ -190,7 +193,10 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
190
193
|
* select menu + a button.
|
|
191
194
|
*/
|
|
192
195
|
export class ReplaySection extends UI.Widget.Widget {
|
|
193
|
-
onStartReplay?: (
|
|
196
|
+
onStartReplay?: (
|
|
197
|
+
speed: Models.RecordingPlayer.PlayRecordingSpeed,
|
|
198
|
+
extension?: Extensions.ExtensionManager.Extension,
|
|
199
|
+
) => void;
|
|
194
200
|
|
|
195
201
|
#disabled = false;
|
|
196
202
|
#settings?: Models.RecorderSettings.RecorderSettings;
|
|
@@ -209,7 +215,9 @@ export class ReplaySection extends UI.Widget.Widget {
|
|
|
209
215
|
this.performUpdate();
|
|
210
216
|
}
|
|
211
217
|
|
|
212
|
-
set replayExtensions(
|
|
218
|
+
set replayExtensions(
|
|
219
|
+
replayExtensions: Extensions.ExtensionManager.Extension[],
|
|
220
|
+
) {
|
|
213
221
|
this.#replayExtensions = replayExtensions;
|
|
214
222
|
this.#groups = this.#computeGroups();
|
|
215
223
|
this.performUpdate();
|
|
@@ -236,8 +244,10 @@ export class ReplaySection extends UI.Widget.Widget {
|
|
|
236
244
|
disabled: this.#disabled,
|
|
237
245
|
groups: this.#groups,
|
|
238
246
|
selectedItem,
|
|
239
|
-
actionTitle:
|
|
240
|
-
|
|
247
|
+
actionTitle: Models.Tooltip.getTooltipForActions(
|
|
248
|
+
selectedItem.label(),
|
|
249
|
+
Actions.RecorderActions.REPLAY_RECORDING,
|
|
250
|
+
),
|
|
241
251
|
onButtonClick: () => this.#onStartReplay(),
|
|
242
252
|
onItemSelected: (item: string) => this.#onItemSelected(item),
|
|
243
253
|
},
|
|
@@ -247,35 +257,37 @@ export class ReplaySection extends UI.Widget.Widget {
|
|
|
247
257
|
}
|
|
248
258
|
|
|
249
259
|
#computeGroups(): Group[] {
|
|
250
|
-
const groups: Group[] = [
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
260
|
+
const groups: Group[] = [
|
|
261
|
+
{
|
|
262
|
+
name: i18nString(UIStrings.speedGroup),
|
|
263
|
+
items: [
|
|
264
|
+
{
|
|
265
|
+
value: Models.RecordingPlayer.PlayRecordingSpeed.NORMAL,
|
|
266
|
+
buttonIconName: 'play',
|
|
267
|
+
buttonLabel: () => i18nString(UIStrings.ReplayNormalButtonLabel),
|
|
268
|
+
label: () => i18nString(UIStrings.ReplayNormalItemLabel),
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
value: Models.RecordingPlayer.PlayRecordingSpeed.SLOW,
|
|
272
|
+
buttonIconName: 'play',
|
|
273
|
+
buttonLabel: () => i18nString(UIStrings.ReplaySlowButtonLabel),
|
|
274
|
+
label: () => i18nString(UIStrings.ReplaySlowItemLabel),
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
value: Models.RecordingPlayer.PlayRecordingSpeed.VERY_SLOW,
|
|
278
|
+
buttonIconName: 'play',
|
|
279
|
+
buttonLabel: () => i18nString(UIStrings.ReplayVerySlowButtonLabel),
|
|
280
|
+
label: () => i18nString(UIStrings.ReplayVerySlowItemLabel),
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
value: Models.RecordingPlayer.PlayRecordingSpeed.EXTREMELY_SLOW,
|
|
284
|
+
buttonIconName: 'play',
|
|
285
|
+
buttonLabel: () => i18nString(UIStrings.ReplayExtremelySlowButtonLabel),
|
|
286
|
+
label: () => i18nString(UIStrings.ReplayExtremelySlowItemLabel),
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
},
|
|
290
|
+
];
|
|
279
291
|
if (this.#replayExtensions.length) {
|
|
280
292
|
groups.push({
|
|
281
293
|
name: i18nString(UIStrings.extensionGroup),
|
|
@@ -308,20 +320,27 @@ export class ReplaySection extends UI.Widget.Widget {
|
|
|
308
320
|
const value = this.#settings?.replayExtension || this.#settings?.speed || '';
|
|
309
321
|
if (value.startsWith(REPLAY_EXTENSION_PREFIX)) {
|
|
310
322
|
const origin = value.substring(REPLAY_EXTENSION_PREFIX.length);
|
|
311
|
-
const extension = this.#replayExtensions.find(
|
|
323
|
+
const extension = this.#replayExtensions.find(
|
|
324
|
+
ext => ext.getOrigin() === origin,
|
|
325
|
+
);
|
|
312
326
|
if (extension) {
|
|
313
327
|
if (this.#settings) {
|
|
314
328
|
this.#settings.replayExtension = REPLAY_EXTENSION_PREFIX + extension.getOrigin();
|
|
315
329
|
}
|
|
316
330
|
if (this.onStartReplay) {
|
|
317
|
-
this.onStartReplay(
|
|
331
|
+
this.onStartReplay(
|
|
332
|
+
Models.RecordingPlayer.PlayRecordingSpeed.NORMAL,
|
|
333
|
+
extension,
|
|
334
|
+
);
|
|
318
335
|
}
|
|
319
336
|
this.performUpdate();
|
|
320
337
|
return;
|
|
321
338
|
}
|
|
322
339
|
}
|
|
323
340
|
if (this.onStartReplay) {
|
|
324
|
-
this.onStartReplay(
|
|
341
|
+
this.onStartReplay(
|
|
342
|
+
this.#settings ? this.#settings.speed : Models.RecordingPlayer.PlayRecordingSpeed.NORMAL,
|
|
343
|
+
);
|
|
325
344
|
}
|
|
326
345
|
this.performUpdate();
|
|
327
346
|
}
|
|
@@ -5,8 +5,12 @@
|
|
|
5
5
|
import * as RecordingClient from './RecordingClient.js';
|
|
6
6
|
import * as SelectorPicker from './SelectorPicker.js';
|
|
7
7
|
import type {AccessibilityBindings} from './selectors/ARIASelector.js';
|
|
8
|
+
import {findMinMax} from './selectors/CSSSelector.js';
|
|
8
9
|
import type * as Step from './Step.js';
|
|
9
10
|
|
|
11
|
+
// Exported for testing
|
|
12
|
+
export {findMinMax};
|
|
13
|
+
|
|
10
14
|
declare global {
|
|
11
15
|
interface Window {
|
|
12
16
|
stopShortcut(payload: string): void;
|
|
@@ -18,7 +18,6 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
18
18
|
|
|
19
19
|
import lockIconStyles from './lockIcon.css.js';
|
|
20
20
|
import mainViewStyles from './mainView.css.js';
|
|
21
|
-
import {ShowOriginEvent} from './OriginTreeElement.js';
|
|
22
21
|
import originViewStyles from './originView.css.js';
|
|
23
22
|
import {
|
|
24
23
|
Events,
|
|
@@ -580,13 +579,13 @@ export class SecurityPanel extends UI.Panel.Panel implements SDK.TargetManager.S
|
|
|
580
579
|
|
|
581
580
|
this.mainView = new SecurityMainView();
|
|
582
581
|
this.mainView.panel = this;
|
|
583
|
-
this.
|
|
584
|
-
if (
|
|
585
|
-
this.showOrigin(
|
|
582
|
+
this.sidebar.onShowOrigin = (origin: Platform.DevToolsPath.UrlString|null) => {
|
|
583
|
+
if (origin) {
|
|
584
|
+
this.showOrigin(origin);
|
|
586
585
|
} else {
|
|
587
586
|
this.setVisibleView(this.mainView);
|
|
588
587
|
}
|
|
589
|
-
}
|
|
588
|
+
};
|
|
590
589
|
|
|
591
590
|
this.lastResponseReceivedForLoaderId = new Map();
|
|
592
591
|
|
|
@@ -641,7 +640,7 @@ export class SecurityPanel extends UI.Panel.Panel implements SDK.TargetManager.S
|
|
|
641
640
|
}
|
|
642
641
|
|
|
643
642
|
private updateVisibleSecurityState(visibleSecurityState: PageVisibleSecurityState): void {
|
|
644
|
-
this.sidebar.
|
|
643
|
+
this.sidebar.updateOverviewSecurityState(visibleSecurityState.securityState);
|
|
645
644
|
this.mainView.updateVisibleSecurityState(visibleSecurityState);
|
|
646
645
|
}
|
|
647
646
|
|