chrome-devtools-frontend 1.0.1657110 → 1.0.1660788
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +125 -0
- package/.agents/skills/migrate-chromium-test/SKILL.md +15 -70
- package/.agents/skills/repro-flaky-tests/SKILL.md +53 -0
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +37 -18
- package/.agents/skills/version-control/SKILL.md +8 -1
- package/AUTHORS +1 -0
- package/SECURITY.md +3 -0
- package/docs/get_the_code.md +6 -0
- package/front_end/Images/src/ads.svg +1 -0
- package/front_end/Tests.js +6 -6
- package/front_end/core/common/Gzip.ts +12 -5
- package/front_end/core/common/ResourceType.ts +19 -19
- package/front_end/core/common/Revealer.ts +15 -15
- package/front_end/core/common/SettingRegistration.ts +19 -19
- package/front_end/core/host/AidaClient.ts +35 -9
- package/front_end/core/host/GdpClient.ts +10 -7
- package/front_end/core/platform/StringUtilities.ts +35 -0
- package/front_end/core/sdk/AccessibilityModel.snapshot.txt +17 -0
- package/front_end/core/sdk/AccessibilityModel.ts +132 -2
- package/front_end/core/sdk/CPUThrottlingManager.ts +8 -5
- package/front_end/core/sdk/CSSMetadata.ts +110 -16
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -5
- package/front_end/core/sdk/ConsoleModel.ts +5 -5
- package/front_end/core/sdk/DOMDebuggerModel.ts +5 -1
- package/front_end/core/sdk/DOMModel.ts +32 -18
- package/front_end/core/sdk/NetworkManager.ts +58 -14
- package/front_end/core/sdk/NetworkRequest.ts +37 -1
- package/front_end/core/sdk/OverlayModel.ts +45 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +6 -7
- package/front_end/core/sdk/ScreenCaptureModel.ts +2 -2
- package/front_end/core/sdk/ServerTiming.ts +17 -13
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +4 -2
- package/front_end/core/sdk/ServiceWorkerManager.ts +19 -5
- package/front_end/core/sdk/TargetManager.ts +10 -1
- package/front_end/core/sdk/TraceObject.ts +4 -2
- package/front_end/core/sdk/sdk-meta.ts +170 -0
- package/front_end/design_system_tokens.css +0 -5
- package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +13 -4
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +5 -2
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +23 -4
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +33 -10
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +8 -3
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +4 -4
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -2
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +36 -37
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +15 -33
- package/front_end/entrypoints/js_app/js_app.ts +6 -5
- package/front_end/entrypoints/main/GlobalAiButton.ts +4 -4
- package/front_end/entrypoints/main/MainImpl.ts +25 -55
- package/front_end/entrypoints/main/main-meta.ts +50 -50
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +5 -5
- package/front_end/entrypoints/node_app/app/NodeMain.ts +3 -3
- package/front_end/entrypoints/node_app/node_app.ts +10 -9
- package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
- package/front_end/foundation/Universe.ts +76 -6
- package/front_end/generated/InspectorBackendCommands.ts +3 -3
- package/front_end/generated/SupportedCSSProperties.js +19 -12
- package/front_end/generated/protocol.ts +7 -1
- package/front_end/models/ai_assistance/AiConversation.ts +19 -17
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +37 -14
- package/front_end/models/ai_assistance/AiUtils.ts +38 -42
- package/front_end/models/ai_assistance/agents/AiAgent.ts +5 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +7 -5
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +270 -286
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +20 -0
- package/front_end/models/ai_assistance/performance/AICallTree.ts +3 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +3 -2
- package/front_end/models/autofill_manager/AutofillManager.ts +3 -1
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +8 -5
- package/front_end/models/bindings/CompilerScriptMapping.ts +2 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +15 -16
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +6 -4
- package/front_end/models/bindings/FileUtils.ts +11 -12
- package/front_end/models/bindings/NetworkProject.ts +4 -0
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +2 -1
- package/front_end/models/bindings/ResourceUtils.ts +1 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +8 -5
- package/front_end/models/emulation/DeviceModeModel.ts +14 -14
- package/front_end/models/emulation/EmulatedDevices.ts +392 -11
- package/front_end/models/extensions/ExtensionAPI.ts +6 -6
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +13 -12
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +1 -1
- package/front_end/models/issues_manager/ClientHintIssue.ts +1 -1
- package/front_end/models/issues_manager/ConnectionAllowlistIssue.ts +1 -1
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +7 -7
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +2 -2
- package/front_end/models/issues_manager/CookieIssue.ts +6 -7
- package/front_end/models/issues_manager/CorsIssue.ts +3 -3
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +2 -2
- package/front_end/models/issues_manager/DeprecationIssue.ts +3 -3
- package/front_end/models/issues_manager/EmailVerificationRequestIssue.ts +1 -1
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +1 -1
- package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +1 -1
- package/front_end/models/issues_manager/GenericIssue.ts +7 -7
- package/front_end/models/issues_manager/HeavyAdIssue.ts +3 -3
- package/front_end/models/issues_manager/Issue.ts +8 -8
- package/front_end/models/issues_manager/MixedContentIssue.ts +1 -1
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +3 -3
- package/front_end/models/issues_manager/QuirksModeIssue.ts +1 -1
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +2 -2
- package/front_end/models/issues_manager/SelectivePermissionsInterventionIssue.ts +2 -2
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +2 -2
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +1 -1
- package/front_end/models/issues_manager/UnencodedDigestIssue.ts +3 -3
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
- package/front_end/models/stack_trace/StackTraceModel.ts +3 -3
- package/front_end/models/text_utils/ContentData.ts +27 -0
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +21 -5
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -14
- package/front_end/models/web_mcp/WebMCPModel.ts +24 -6
- package/front_end/models/workspace/IgnoreListManager.ts +6 -6
- package/front_end/models/workspace/UISourceCode.ts +3 -3
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +23 -12
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -22
- package/front_end/panels/ai_assistance/ExportConversation.ts +3 -4
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +3 -3
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -0
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +2 -2
- package/front_end/panels/animation/AnimationTimeline.ts +17 -19
- package/front_end/panels/animation/AnimationUI.ts +5 -5
- package/front_end/panels/animation/animation-meta.ts +2 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +13 -4
- package/front_end/panels/application/BackgroundServiceView.ts +2 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -6
- package/front_end/panels/application/IndexedDBViews.ts +245 -262
- package/front_end/panels/application/OpenedWindowDetailsView.ts +1 -1
- package/front_end/panels/application/ResourcesPanel.ts +9 -2
- package/front_end/panels/application/ServiceWorkersView.ts +252 -211
- package/front_end/panels/application/StorageView.ts +97 -33
- package/front_end/panels/application/WebMCPView.ts +15 -1
- package/front_end/panels/application/components/AdsView.ts +1 -1
- package/front_end/panels/application/indexedDBViews.css +38 -9
- package/front_end/panels/application/preloading/helper/PreloadingForward.ts +2 -1
- package/front_end/panels/application/resourcesSidebar.css +5 -0
- package/front_end/panels/application/storageView.css +26 -9
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +5 -1
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +8 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionServer.ts +119 -14
- package/front_end/panels/console/ConsoleContextSelector.ts +4 -4
- package/front_end/panels/console/ConsolePinPane.ts +12 -12
- package/front_end/panels/console/ConsolePrompt.ts +6 -6
- package/front_end/panels/console/ConsoleSidebar.ts +7 -7
- package/front_end/panels/console/ConsoleView.ts +45 -44
- package/front_end/panels/console/ConsoleViewMessage.ts +40 -40
- package/front_end/panels/console/SymbolizedErrorWidget.ts +2 -1
- package/front_end/panels/console/console-meta.ts +34 -34
- package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -2
- package/front_end/panels/coverage/CoverageListView.ts +28 -28
- package/front_end/panels/coverage/CoverageModel.ts +2 -1
- package/front_end/panels/coverage/CoverageView.ts +23 -23
- package/front_end/panels/coverage/coverage-meta.ts +5 -5
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +36 -36
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +6 -6
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +6 -6
- package/front_end/panels/css_overview/css_overview-meta.ts +2 -2
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +20 -21
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +6 -8
- package/front_end/panels/developer_resources/developer_resources-meta.ts +2 -2
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +8 -102
- package/front_end/panels/elements/AccessibilityTreeView.ts +163 -70
- package/front_end/panels/elements/ElementsPanel.ts +17 -11
- package/front_end/panels/elements/ElementsTreeElement.ts +49 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +4 -4
- package/front_end/panels/elements/LayoutPane.ts +1 -1
- package/front_end/panels/elements/MetricsSidebarPane.ts +100 -34
- package/front_end/panels/elements/StylePropertiesSection.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +7 -18
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +2 -2
- package/front_end/panels/elements/components/QueryContainer.ts +1 -1
- package/front_end/panels/issues/AffectedDirectivesView.ts +1 -1
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -1
- package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
- package/front_end/panels/media/EventDisplayTable.ts +2 -2
- package/front_end/panels/media/EventTimelineView.ts +4 -4
- package/front_end/panels/media/MainView.ts +4 -4
- package/front_end/panels/media/PlayerDetailView.ts +5 -5
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/media/PlayerMessagesView.ts +12 -12
- package/front_end/panels/media/PlayerPropertiesView.ts +17 -17
- package/front_end/panels/network/NetworkDataGridNode.ts +124 -36
- package/front_end/panels/network/NetworkLogView.ts +11 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +18 -0
- package/front_end/panels/network/NetworkPanel.ts +2 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -3
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestPayloadView.ts +53 -7
- package/front_end/panels/network/RequestPreviewView.ts +7 -1
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/network/forward/UIFilter.ts +1 -0
- package/front_end/panels/network/networkPanel.css +1 -0
- package/front_end/panels/network/networkTimingTable.css +1 -1
- package/front_end/panels/network/requestPayloadView.css +10 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +12 -12
- package/front_end/panels/performance_monitor/performance_monitor-meta.ts +7 -7
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +2 -2
- package/front_end/panels/profiler/HeapProfileView.ts +563 -51
- package/front_end/panels/profiler/HeapSnapshotView.ts +15 -9
- package/front_end/panels/profiler/ProfilesPanel.ts +13 -7
- package/front_end/panels/profiler/WritableProfileHeader.ts +152 -0
- package/front_end/panels/profiler/profiler.ts +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +10 -10
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +28 -32
- package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +1 -1
- package/front_end/panels/recorder/RecorderController.ts +15 -15
- package/front_end/panels/recorder/RecorderEvents.ts +8 -0
- package/front_end/panels/recorder/components/CreateRecordingView.ts +11 -11
- package/front_end/panels/recorder/components/ExtensionView.ts +74 -83
- package/front_end/panels/recorder/components/RecordingListView.ts +3 -3
- package/front_end/panels/recorder/components/RecordingView.ts +13 -10
- package/front_end/panels/recorder/components/ReplaySection.ts +9 -9
- package/front_end/panels/recorder/components/StepEditor.ts +352 -321
- package/front_end/panels/recorder/components/StepView.ts +36 -37
- package/front_end/panels/recorder/components/recordingView.css +1 -1
- package/front_end/panels/recorder/models/RecorderSettings.ts +2 -2
- package/front_end/panels/recorder/recorder-meta.ts +7 -7
- package/front_end/panels/screencast/ScreencastApp.ts +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +12 -12
- package/front_end/panels/search/SearchResultsPane.ts +4 -4
- package/front_end/panels/search/SearchView.ts +20 -20
- package/front_end/panels/security/SecurityModel.ts +7 -7
- package/front_end/panels/security/SecurityPanel.ts +99 -107
- package/front_end/panels/security/SecurityPanelSidebar.ts +7 -7
- package/front_end/panels/security/security-meta.ts +2 -2
- package/front_end/panels/sensors/LocationsSettingsTab.ts +19 -19
- package/front_end/panels/sensors/SensorsView.ts +27 -27
- package/front_end/panels/sensors/sensors-meta.ts +13 -167
- package/front_end/panels/settings/AISettingsTab.ts +98 -56
- package/front_end/panels/settings/EditFileSystemView.ts +2 -2
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -20
- package/front_end/panels/settings/KeybindsSettingsTab.ts +20 -21
- package/front_end/panels/settings/SettingsScreen.ts +11 -11
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +5 -5
- package/front_end/panels/settings/components/SyncSection.ts +12 -12
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +13 -13
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +31 -31
- package/front_end/panels/settings/emulation/emulation-meta.ts +1 -1
- package/front_end/panels/settings/settings-meta.ts +14 -14
- package/front_end/panels/sources/NavigatorView.ts +7 -6
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +83 -37
- package/front_end/panels/sources/SourcesNavigator.ts +20 -18
- package/front_end/panels/sources/SourcesView.ts +10 -1
- package/front_end/panels/sources/scopeChainSidebarPane.css +12 -4
- package/front_end/panels/sources/sources-meta.ts +4 -4
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -2
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -1
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +2 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +2 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +4 -2
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +4 -2
- package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -1
- package/front_end/panels/utils/utils.ts +7 -3
- package/front_end/panels/web_audio/WebAudioView.ts +17 -18
- package/front_end/panels/web_audio/web_audio-meta.ts +3 -3
- package/front_end/panels/webauthn/WebauthnPane.ts +10 -10
- package/front_end/panels/whats_new/ReleaseNoteView.ts +1 -1
- package/front_end/panels/whats_new/whats_new-meta.ts +11 -11
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lit/lib/async-directive.d.ts +2 -1
- package/front_end/third_party/lit/lib/async-directive.js +1 -1
- package/front_end/third_party/lit/lib/async-directive.js.map +1 -1
- package/front_end/third_party/lit/lib/decorators.d.ts +2 -1
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.d.ts +2 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.d.ts +2 -1
- package/front_end/third_party/lit/lib/directives.js +8 -8
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +2 -1
- package/front_end/third_party/lit/lib/lit.js +1 -1
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.d.ts +2 -1
- package/front_end/third_party/lit/lib/static-html.js +1 -1
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/package.json +2 -2
- package/front_end/third_party/lit/rebuild.sh +1 -1
- package/front_end/third_party/lit/src/async-directive.ts +5 -0
- package/front_end/ui/components/dialogs/Dialog.ts +1 -1
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -1
- package/front_end/ui/components/dialogs/shortcutDialog.css +15 -12
- package/front_end/ui/components/diff_view/DiffView.ts +2 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +5 -5
- package/front_end/ui/components/lists/List.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +5 -5
- package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
- package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +3 -3
- package/front_end/ui/components/text_editor/config.ts +2 -2
- package/front_end/ui/components/tree_outline/TreeOutline.ts +34 -1
- package/front_end/ui/legacy/ReportView.ts +5 -0
- package/front_end/ui/legacy/Treeoutline.ts +18 -0
- package/front_end/ui/legacy/View.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +2 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +8 -3
- package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +100 -36
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +7 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +5 -0
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +4 -2
- package/front_end/ui/legacy/inspectorCommon.css +5 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
- package/mcp/mcp.ts +2 -0
- package/package.json +4 -4
- package/front_end/panels/profiler/ProfileView.ts +0 -610
|
@@ -184,7 +184,7 @@ const UIStrings = {
|
|
|
184
184
|
/**
|
|
185
185
|
* @description Cell title in Network Data Grid Node of the Network panel
|
|
186
186
|
*/
|
|
187
|
-
earlyHints: '
|
|
187
|
+
earlyHints: 'Early-hints',
|
|
188
188
|
/**
|
|
189
189
|
* @description Text in Network Data Grid Node of the Network panel
|
|
190
190
|
*/
|
|
@@ -654,7 +654,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
654
654
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
655
655
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
656
656
|
if (!aRequest || !bRequest) {
|
|
657
|
-
return !aRequest ? -1 : 1;
|
|
657
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
658
658
|
}
|
|
659
659
|
const aRemoteAddress = aRequest.remoteAddress();
|
|
660
660
|
const bRemoteAddress = bRequest.remoteAddress();
|
|
@@ -672,7 +672,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
672
672
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
673
673
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
674
674
|
if (!aRequest || !bRequest) {
|
|
675
|
-
return !aRequest ? -1 : 1;
|
|
675
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
676
676
|
}
|
|
677
677
|
if (bRequest.cached() && !aRequest.cached()) {
|
|
678
678
|
return 1;
|
|
@@ -688,7 +688,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
688
688
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
689
689
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
690
690
|
if (!aRequest || !bRequest) {
|
|
691
|
-
return !aRequest ? -1 : 1;
|
|
691
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
692
692
|
}
|
|
693
693
|
|
|
694
694
|
const aRequestNumber = NetworkRequestNode.requestNumber(aRequest);
|
|
@@ -701,7 +701,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
701
701
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
702
702
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
703
703
|
if (!aRequest || !bRequest) {
|
|
704
|
-
return !aRequest ? -1 : 1;
|
|
704
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
705
705
|
}
|
|
706
706
|
const aSimpleType = a.displayType();
|
|
707
707
|
const bSimpleType = b.displayType();
|
|
@@ -720,7 +720,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
720
720
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
721
721
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
722
722
|
if (!aRequest || !bRequest) {
|
|
723
|
-
return !aRequest ? -1 : 1;
|
|
723
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
724
724
|
}
|
|
725
725
|
const aHasInitiatorCell = a instanceof NetworkRequestNode && a.initiatorCell;
|
|
726
726
|
const bHasInitiatorCell = b instanceof NetworkRequestNode && b.initiatorCell;
|
|
@@ -744,7 +744,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
744
744
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
745
745
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
746
746
|
if (!aRequest || !bRequest) {
|
|
747
|
-
return !aRequest ? -1 : 1;
|
|
747
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
748
748
|
}
|
|
749
749
|
const aClientSecurityState = aRequest.clientSecurityState();
|
|
750
750
|
const bClientSecurityState = bRequest.clientSecurityState();
|
|
@@ -758,7 +758,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
758
758
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
759
759
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
760
760
|
if (!aRequest || !bRequest) {
|
|
761
|
-
return !aRequest ? -1 : 1;
|
|
761
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
762
762
|
}
|
|
763
763
|
return aRequest.remoteAddressSpace().localeCompare(bRequest.remoteAddressSpace());
|
|
764
764
|
}
|
|
@@ -768,7 +768,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
768
768
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
769
769
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
770
770
|
if (!aRequest || !bRequest) {
|
|
771
|
-
return !aRequest ? -1 : 1;
|
|
771
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
772
772
|
}
|
|
773
773
|
const aScore = aRequest.includedRequestCookies().length;
|
|
774
774
|
const bScore = bRequest.includedRequestCookies().length;
|
|
@@ -781,7 +781,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
781
781
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
782
782
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
783
783
|
if (!aRequest || !bRequest) {
|
|
784
|
-
return !aRequest ? -1 : 1;
|
|
784
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
785
785
|
}
|
|
786
786
|
const aScore = aRequest.responseCookies ? aRequest.responseCookies.length : 0;
|
|
787
787
|
const bScore = bRequest.responseCookies ? bRequest.responseCookies.length : 0;
|
|
@@ -793,7 +793,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
793
793
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
794
794
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
795
795
|
if (!aRequest || !bRequest) {
|
|
796
|
-
return !aRequest ? -1 : 1;
|
|
796
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
797
797
|
}
|
|
798
798
|
const aPriority = aRequest.priority();
|
|
799
799
|
let aScore: number = aPriority ? PerfUI.NetworkPriorities.networkPriorityWeight(aPriority) : 0;
|
|
@@ -810,7 +810,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
810
810
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
811
811
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
812
812
|
if (!aRequest || !bRequest) {
|
|
813
|
-
return !aRequest ? -1 : 1;
|
|
813
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
814
814
|
}
|
|
815
815
|
const aIsAdRelated = aRequest.isAdRelated();
|
|
816
816
|
const bIsAdRelated = bRequest.isAdRelated();
|
|
@@ -823,12 +823,29 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
823
823
|
return aRequest.identityCompare(bRequest);
|
|
824
824
|
}
|
|
825
825
|
|
|
826
|
-
static
|
|
826
|
+
static IsPreloadedComparator(a: NetworkNode, b: NetworkNode): number {
|
|
827
827
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
828
828
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
829
|
+
if (!aRequest && !bRequest) {
|
|
830
|
+
return 0;
|
|
831
|
+
}
|
|
829
832
|
if (!aRequest || !bRequest) {
|
|
830
833
|
return !aRequest ? -1 : 1;
|
|
831
834
|
}
|
|
835
|
+
const aIsPreloaded = aRequest.isLinkPreload();
|
|
836
|
+
const bIsPreloaded = bRequest.isLinkPreload();
|
|
837
|
+
if (aIsPreloaded === bIsPreloaded) {
|
|
838
|
+
return aRequest.identityCompare(bRequest);
|
|
839
|
+
}
|
|
840
|
+
return aIsPreloaded ? 1 : -1;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
static RenderBlockingComparator(a: NetworkNode, b: NetworkNode): number {
|
|
844
|
+
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
845
|
+
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
846
|
+
if (!aRequest || !bRequest) {
|
|
847
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
848
|
+
}
|
|
832
849
|
const order = [
|
|
833
850
|
Protocol.Network.RenderBlockingBehavior.InBodyParserBlocking,
|
|
834
851
|
Protocol.Network.RenderBlockingBehavior.Blocking,
|
|
@@ -842,6 +859,55 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
842
859
|
return aOrder - bOrder;
|
|
843
860
|
}
|
|
844
861
|
|
|
862
|
+
static ExecutionContextComparator(a: NetworkNode, b: NetworkNode): number {
|
|
863
|
+
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
864
|
+
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
865
|
+
if (!aRequest || !bRequest) {
|
|
866
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
867
|
+
}
|
|
868
|
+
const aContext = NetworkRequestNode.getExecutionContextDescription(aRequest);
|
|
869
|
+
const bContext = NetworkRequestNode.getExecutionContextDescription(bRequest);
|
|
870
|
+
return aContext.localeCompare(bContext);
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
static getExecutionContextDescription(request: SDK.NetworkRequest.NetworkRequest): string {
|
|
874
|
+
const requestTarget = SDK.NetworkManager.NetworkManager.forRequest(request)?.target();
|
|
875
|
+
|
|
876
|
+
if (requestTarget) {
|
|
877
|
+
const targetType = requestTarget.type();
|
|
878
|
+
if (targetType === SDK.Target.Type.ServiceWorker || targetType === SDK.Target.Type.Worker ||
|
|
879
|
+
targetType === SDK.Target.Type.SHARED_WORKER) {
|
|
880
|
+
const runtimeModel = requestTarget.model(SDK.RuntimeModel.RuntimeModel);
|
|
881
|
+
if (runtimeModel) {
|
|
882
|
+
const defaultContextLabel = runtimeModel.executionContexts().find(c => c.isDefault)?.label();
|
|
883
|
+
if (defaultContextLabel) {
|
|
884
|
+
return defaultContextLabel;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
return requestTarget.name() || '';
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
const frame = SDK.ResourceTreeModel.ResourceTreeModel.frameForRequest(request);
|
|
892
|
+
if (!frame) {
|
|
893
|
+
return '';
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
if (requestTarget) {
|
|
897
|
+
const runtimeModel = requestTarget.model(SDK.RuntimeModel.RuntimeModel);
|
|
898
|
+
if (runtimeModel) {
|
|
899
|
+
const frameContextLabel = runtimeModel.executionContexts()
|
|
900
|
+
.find(context => context.frameId === request.frameId && context.isDefault)
|
|
901
|
+
?.label();
|
|
902
|
+
if (frameContextLabel) {
|
|
903
|
+
return frameContextLabel;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
return frame.displayName();
|
|
909
|
+
}
|
|
910
|
+
|
|
845
911
|
static RequestPropertyComparator(propertyName: string, a: NetworkNode, b: NetworkNode): number {
|
|
846
912
|
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
847
913
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -850,7 +916,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
850
916
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
851
917
|
const bRequest = (b.requestOrFirstKnownChildRequest() as any);
|
|
852
918
|
if (!aRequest || !bRequest) {
|
|
853
|
-
return !aRequest ? -1 : 1;
|
|
919
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
854
920
|
}
|
|
855
921
|
const aValue = aRequest[propertyName];
|
|
856
922
|
const bValue = bRequest[propertyName];
|
|
@@ -864,7 +930,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
864
930
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
865
931
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
866
932
|
if (!aRequest || !bRequest) {
|
|
867
|
-
return !aRequest ? -1 : 1;
|
|
933
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
868
934
|
}
|
|
869
935
|
const aURL = aRequest.url();
|
|
870
936
|
const bURL = bRequest.url();
|
|
@@ -880,7 +946,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
880
946
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
881
947
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
882
948
|
if (!aRequest || !bRequest) {
|
|
883
|
-
return !aRequest ? -1 : 1;
|
|
949
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
884
950
|
}
|
|
885
951
|
// Use the provided callback to get the header value
|
|
886
952
|
const aValue = String(getHeaderValue(aRequest, propertyName) || '');
|
|
@@ -903,7 +969,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
903
969
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
904
970
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
905
971
|
if (!aRequest || !bRequest) {
|
|
906
|
-
return !aRequest ? -1 : 1;
|
|
972
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
907
973
|
}
|
|
908
974
|
const aRawValue = aRequest.responseHeaderValue(propertyName);
|
|
909
975
|
const aValue = (aRawValue !== undefined) ? parseFloat(aRawValue) : -Infinity;
|
|
@@ -920,7 +986,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
920
986
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
921
987
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
922
988
|
if (!aRequest || !bRequest) {
|
|
923
|
-
return !aRequest ? -1 : 1;
|
|
989
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
924
990
|
}
|
|
925
991
|
const aHeader = aRequest.responseHeaderValue(propertyName);
|
|
926
992
|
const bHeader = bRequest.responseHeaderValue(propertyName);
|
|
@@ -936,10 +1002,7 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
936
1002
|
const aRequest = a.requestOrFirstKnownChildRequest();
|
|
937
1003
|
const bRequest = b.requestOrFirstKnownChildRequest();
|
|
938
1004
|
if (!aRequest || !bRequest) {
|
|
939
|
-
|
|
940
|
-
return 0;
|
|
941
|
-
}
|
|
942
|
-
return !aRequest ? -1 : 1;
|
|
1005
|
+
return !aRequest ? !bRequest ? 0 : -1 : 1;
|
|
943
1006
|
}
|
|
944
1007
|
const aValue = aRequest.overrideTypes.join(', ');
|
|
945
1008
|
const bValue = bRequest.overrideTypes.join(', ');
|
|
@@ -1001,10 +1064,6 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1001
1064
|
const resourceType = this.requestInternal.resourceType();
|
|
1002
1065
|
let simpleType = resourceType.name();
|
|
1003
1066
|
|
|
1004
|
-
if (this.requestInternal.fromEarlyHints()) {
|
|
1005
|
-
return i18nString(UIStrings.earlyHints);
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
1067
|
if (resourceType === Common.ResourceType.resourceTypes.Other ||
|
|
1009
1068
|
resourceType === Common.ResourceType.resourceTypes.Image) {
|
|
1010
1069
|
simpleType = mimeType.replace(/^(application|image)\//, '');
|
|
@@ -1038,16 +1097,20 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1038
1097
|
return this.requestInternal.resourceType() === Common.ResourceType.resourceTypes.Prefetch;
|
|
1039
1098
|
}
|
|
1040
1099
|
|
|
1100
|
+
private isPreload(): boolean {
|
|
1101
|
+
return this.requestInternal.isPreloadRequest();
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1041
1104
|
throttlingConditions(): SDK.NetworkManager.AppliedNetworkConditions|undefined {
|
|
1042
1105
|
return SDK.NetworkManager.MultitargetNetworkManager.instance().appliedRequestConditions(this.requestInternal);
|
|
1043
1106
|
}
|
|
1044
1107
|
|
|
1045
1108
|
override isWarning(): boolean {
|
|
1046
|
-
return this.isFailed() && this.isPrefetch();
|
|
1109
|
+
return this.isFailed() && (this.isPrefetch() || this.isPreload());
|
|
1047
1110
|
}
|
|
1048
1111
|
|
|
1049
1112
|
override isError(): boolean {
|
|
1050
|
-
return this.isFailed() && !this.isPrefetch();
|
|
1113
|
+
return this.isFailed() && !this.isPrefetch() && !this.isPreload();
|
|
1051
1114
|
}
|
|
1052
1115
|
|
|
1053
1116
|
override createCells(trElement: HTMLElement): void {
|
|
@@ -1137,6 +1200,10 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1137
1200
|
this.setTextAndTitle(cell, this.requestInternal.isAdRelated().toLocaleString());
|
|
1138
1201
|
break;
|
|
1139
1202
|
}
|
|
1203
|
+
case 'is-preloaded': {
|
|
1204
|
+
this.setTextAndTitle(cell, this.requestInternal.isLinkPreload().toLocaleString());
|
|
1205
|
+
break;
|
|
1206
|
+
}
|
|
1140
1207
|
case 'render-blocking': {
|
|
1141
1208
|
this.renderRenderBlockingCell(cell);
|
|
1142
1209
|
break;
|
|
@@ -1207,6 +1274,10 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1207
1274
|
this.setTextAndTitle(cell, this.requestInternal.overrideTypes.join(', '));
|
|
1208
1275
|
break;
|
|
1209
1276
|
}
|
|
1277
|
+
case 'execution-context': {
|
|
1278
|
+
this.renderExecutionContextCell(cell);
|
|
1279
|
+
break;
|
|
1280
|
+
}
|
|
1210
1281
|
default: {
|
|
1211
1282
|
const columnConfig = this.dataGrid?.columns[columnId];
|
|
1212
1283
|
if (columnConfig) {
|
|
@@ -1551,9 +1622,17 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1551
1622
|
}
|
|
1552
1623
|
|
|
1553
1624
|
default: {
|
|
1554
|
-
|
|
1625
|
+
// Early hints are not technically an InitiatorType in Chromium but
|
|
1626
|
+
// probably should be (it is in Resource Timing). See:
|
|
1627
|
+
// https://chromium-review.googlesource.com/c/chromium/src/+/5348938/comments/7cf39a37_dae12d06
|
|
1628
|
+
// But to developers it IS the initiator and more useful to know than
|
|
1629
|
+
// the default "other" that otherwise shows for early-hint requests.
|
|
1630
|
+
const initiatorText =
|
|
1631
|
+
request.fromEarlyHints() ? i18nString(UIStrings.earlyHints) : i18nString(UIStrings.otherC);
|
|
1632
|
+
|
|
1633
|
+
UI.Tooltip.Tooltip.install(cell, initiatorText);
|
|
1555
1634
|
cell.classList.add('network-dim-cell');
|
|
1556
|
-
cell.appendChild(document.createTextNode(
|
|
1635
|
+
cell.appendChild(document.createTextNode(initiatorText));
|
|
1557
1636
|
}
|
|
1558
1637
|
}
|
|
1559
1638
|
}
|
|
@@ -1587,18 +1666,22 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1587
1666
|
}
|
|
1588
1667
|
UI.Tooltip.Tooltip.install(cell, tooltipText);
|
|
1589
1668
|
cell.classList.add('network-dim-cell');
|
|
1669
|
+
} else if (this.requestInternal.fetchedViaServiceWorker) {
|
|
1670
|
+
// Checked before the no-matching-route fallback below: a request that
|
|
1671
|
+
// matches no router rule falls back to the fetch handler, so it can
|
|
1672
|
+
// still be fulfilled by the ServiceWorker.
|
|
1673
|
+
UI.UIUtils.createTextChild(cell, i18nString(UIStrings.serviceWorker));
|
|
1674
|
+
UI.Tooltip.Tooltip.install(cell, i18nString(UIStrings.servedFromServiceWorkerResource, {PH1: resourceSize}));
|
|
1675
|
+
cell.classList.add('network-dim-cell');
|
|
1590
1676
|
} else if (this.requestInternal.serviceWorkerRouterInfo) {
|
|
1591
|
-
// ServiceWorker routers are registered, but the request
|
|
1592
|
-
// because no matching router
|
|
1677
|
+
// ServiceWorker routers are registered, but the request fell back to the
|
|
1678
|
+
// network because no matching router rule was found and the fetch
|
|
1679
|
+
// handler did not provide the response.
|
|
1593
1680
|
const transferSize = i18n.ByteUtilities.formatBytesToKb(this.requestInternal.transferSize);
|
|
1594
1681
|
UI.UIUtils.createTextChild(cell, transferSize);
|
|
1595
1682
|
UI.Tooltip.Tooltip.install(
|
|
1596
1683
|
cell,
|
|
1597
1684
|
i18nString(UIStrings.servedFromNetworkMissingServiceWorkerRoute, {PH1: transferSize, PH2: resourceSize}));
|
|
1598
|
-
} else if (this.requestInternal.fetchedViaServiceWorker) {
|
|
1599
|
-
UI.UIUtils.createTextChild(cell, i18nString(UIStrings.serviceWorker));
|
|
1600
|
-
UI.Tooltip.Tooltip.install(cell, i18nString(UIStrings.servedFromServiceWorkerResource, {PH1: resourceSize}));
|
|
1601
|
-
cell.classList.add('network-dim-cell');
|
|
1602
1685
|
} else if (this.requestInternal.redirectSourceSignedExchangeInfoHasNoErrors()) {
|
|
1603
1686
|
UI.UIUtils.createTextChild(cell, i18n.i18n.lockedString('(signed-exchange)'));
|
|
1604
1687
|
UI.Tooltip.Tooltip.install(cell, i18nString(UIStrings.servedFromSignedHttpExchange, {PH1: resourceSize}));
|
|
@@ -1643,6 +1726,11 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1643
1726
|
}
|
|
1644
1727
|
}
|
|
1645
1728
|
|
|
1729
|
+
private renderExecutionContextCell(cell: HTMLElement): void {
|
|
1730
|
+
const contextDescription = NetworkRequestNode.getExecutionContextDescription(this.requestInternal);
|
|
1731
|
+
this.setTextAndTitle(cell, contextDescription);
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1646
1734
|
private appendSubtitle(cellElement: Element, subtitleText: string, alwaysVisible = false, tooltipText = ''): void {
|
|
1647
1735
|
const subtitleElement = document.createElement('div');
|
|
1648
1736
|
subtitleElement.classList.add('network-cell-subtitle');
|
|
@@ -47,6 +47,7 @@ import * as Logs from '../../models/logs/logs.js';
|
|
|
47
47
|
import * as NetworkTimeCalculator from '../../models/network_time_calculator/network_time_calculator.js';
|
|
48
48
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
49
49
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
50
|
+
import * as Workspace from '../../models/workspace/workspace.js';
|
|
50
51
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
51
52
|
import * as Sources from '../../panels/sources/sources.js';
|
|
52
53
|
import * as Adorners from '../../ui/components/adorners/adorners.js';
|
|
@@ -776,6 +777,10 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
776
777
|
return request.initiatedByServiceWorker();
|
|
777
778
|
}
|
|
778
779
|
|
|
780
|
+
private static linkPreloadRequestFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {
|
|
781
|
+
return request.isLinkPreload();
|
|
782
|
+
}
|
|
783
|
+
|
|
779
784
|
private static requestResponseHeaderFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {
|
|
780
785
|
return request.responseHeaderValue(value) !== undefined;
|
|
781
786
|
}
|
|
@@ -1061,6 +1066,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
1061
1066
|
NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.SERVICE_WORKER_INTERCEPTED);
|
|
1062
1067
|
this.suggestionBuilder.addItem(
|
|
1063
1068
|
NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.SERVICE_WORKER_INITIATED);
|
|
1069
|
+
this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.PRELOAD);
|
|
1064
1070
|
this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.LargerThan, '100');
|
|
1065
1071
|
this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.LargerThan, '10k');
|
|
1066
1072
|
this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.LargerThan, '1M');
|
|
@@ -2060,7 +2066,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
2060
2066
|
const url = mainTarget.inspectedURL();
|
|
2061
2067
|
const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);
|
|
2062
2068
|
const filename = (parsedURL ? parsedURL.host : 'network-log') as Platform.DevToolsPath.RawPathString;
|
|
2063
|
-
const stream = new Bindings.FileUtils.FileOutputStream();
|
|
2069
|
+
const stream = new Bindings.FileUtils.FileOutputStream(Workspace.FileManager.FileManager.instance());
|
|
2064
2070
|
|
|
2065
2071
|
if (!await stream.open(Common.ParsedURL.ParsedURL.concatenate(filename, '.har'))) {
|
|
2066
2072
|
return;
|
|
@@ -2082,7 +2088,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
2082
2088
|
await Common.Revealer.reveal(requestLocation);
|
|
2083
2089
|
} else { // If folder for local overrides has not been provided yet
|
|
2084
2090
|
UI.InspectorView.InspectorView.instance().displaySelectOverrideFolderInfobar(async () => {
|
|
2085
|
-
await Sources.SourcesNavigator.OverridesNavigatorView.
|
|
2091
|
+
await Sources.SourcesNavigator.OverridesNavigatorView.setupNewWorkspace();
|
|
2086
2092
|
await networkPersistenceManager.getOrCreateHeadersUISourceCodeFromUrl(request.url());
|
|
2087
2093
|
await Common.Revealer.reveal(requestLocation);
|
|
2088
2094
|
});
|
|
@@ -2206,6 +2212,9 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
2206
2212
|
if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.SERVICE_WORKER_INITIATED) {
|
|
2207
2213
|
return NetworkLogView.initiatedByServiceWorkerFilter;
|
|
2208
2214
|
}
|
|
2215
|
+
if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.PRELOAD) {
|
|
2216
|
+
return NetworkLogView.linkPreloadRequestFilter;
|
|
2217
|
+
}
|
|
2209
2218
|
break;
|
|
2210
2219
|
|
|
2211
2220
|
case NetworkForward.UIFilter.FilterType.LargerThan:
|
|
@@ -161,6 +161,14 @@ const UIStrings = {
|
|
|
161
161
|
* @description Text in Network Log View Columns of the Network panel
|
|
162
162
|
*/
|
|
163
163
|
renderBlocking: 'Render-blocking',
|
|
164
|
+
/**
|
|
165
|
+
* @description Text to show whether a request is preloaded
|
|
166
|
+
*/
|
|
167
|
+
isPreloaded: 'Preloaded',
|
|
168
|
+
/**
|
|
169
|
+
* @description Column header in the Network log view of the Network panel
|
|
170
|
+
*/
|
|
171
|
+
executionContext: 'Execution context',
|
|
164
172
|
} as const;
|
|
165
173
|
const str_ = i18n.i18n.registerUIStrings('panels/network/NetworkLogViewColumns.ts', UIStrings);
|
|
166
174
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -1221,6 +1229,16 @@ const DEFAULT_COLUMNS = [
|
|
|
1221
1229
|
title: i18nLazyString(UIStrings.renderBlocking),
|
|
1222
1230
|
sortingFunction: NetworkRequestNode.RenderBlockingComparator,
|
|
1223
1231
|
},
|
|
1232
|
+
{
|
|
1233
|
+
id: 'is-preloaded',
|
|
1234
|
+
title: i18nLazyString(UIStrings.isPreloaded),
|
|
1235
|
+
sortingFunction: NetworkRequestNode.IsPreloadedComparator,
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
id: 'execution-context',
|
|
1239
|
+
title: i18nLazyString(UIStrings.executionContext),
|
|
1240
|
+
sortingFunction: NetworkRequestNode.ExecutionContextComparator,
|
|
1241
|
+
},
|
|
1224
1242
|
// This header is a placeholder to let datagrid know that it can be sorted by this column, but never shown.
|
|
1225
1243
|
{
|
|
1226
1244
|
id: 'waterfall',
|
|
@@ -805,7 +805,8 @@ export class NetworkPanel extends UI.Panel.Panel implements
|
|
|
805
805
|
return;
|
|
806
806
|
}
|
|
807
807
|
if (target instanceof Workspace.UISourceCode.UISourceCode) {
|
|
808
|
-
const resource = SDK.ResourceTreeModel.ResourceTreeModel.resourceForURL(
|
|
808
|
+
const resource = SDK.ResourceTreeModel.ResourceTreeModel.resourceForURL(
|
|
809
|
+
SDK.TargetManager.TargetManager.instance(), target.url());
|
|
809
810
|
if (resource?.request) {
|
|
810
811
|
appendRevealItem(resource.request);
|
|
811
812
|
} else {
|
|
@@ -112,9 +112,7 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
112
112
|
styleMap.set(
|
|
113
113
|
NetworkTimeCalculator.RequestTimeRangeNames.PROXY,
|
|
114
114
|
{fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.PROXY]});
|
|
115
|
-
styleMap.set(
|
|
116
|
-
NetworkTimeCalculator.RequestTimeRangeNames.BLOCKING,
|
|
117
|
-
{fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.BLOCKING]});
|
|
115
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.BLOCKING, {fillStyle: '--network-waterfall-blocking'});
|
|
118
116
|
styleMap.set(
|
|
119
117
|
NetworkTimeCalculator.RequestTimeRangeNames.PUSH,
|
|
120
118
|
{fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.PUSH]});
|
|
@@ -6,7 +6,7 @@ import '../../ui/components/lists/lists.js';
|
|
|
6
6
|
import '../../ui/components/tooltips/tooltips.js';
|
|
7
7
|
import '../../ui/legacy/legacy.js';
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import * as Common from '../../core/common/common.js';
|
|
10
10
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
11
11
|
import * as Platform from '../../core/platform/platform.js';
|
|
12
12
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
@@ -541,7 +541,7 @@ export class RequestConditionsDrawer extends UI.Widget.VBox {
|
|
|
541
541
|
this.#cancelEdit(this.#editingCondition);
|
|
542
542
|
}
|
|
543
543
|
const condition = SDK.NetworkManager.RequestCondition.createFromSetting(
|
|
544
|
-
{url: Platform.DevToolsPath.EmptyUrlString, enabled: true});
|
|
544
|
+
{url: Platform.DevToolsPath.EmptyUrlString, enabled: true}, Common.Settings.Settings.instance());
|
|
545
545
|
this.#editingCondition = condition;
|
|
546
546
|
this.requestUpdate();
|
|
547
547
|
}
|
|
@@ -35,7 +35,9 @@
|
|
|
35
35
|
import * as Common from '../../core/common/common.js';
|
|
36
36
|
import * as Host from '../../core/host/host.js';
|
|
37
37
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
38
|
+
import * as Platform from '../../core/platform/platform.js';
|
|
38
39
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
40
|
+
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
39
41
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
40
42
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
41
43
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
@@ -43,9 +45,10 @@ import objectPropertiesSectionStyles from '../../ui/legacy/components/object_ui/
|
|
|
43
45
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
44
46
|
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
|
45
47
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
46
|
-
import {Directives, html, type LitTemplate, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
48
|
+
import {Directives, html, type LitTemplate, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
47
49
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
48
50
|
|
|
51
|
+
import {BinaryResourceView} from './BinaryResourceView.js';
|
|
49
52
|
import requestPayloadTreeStyles from './requestPayloadTree.css.js';
|
|
50
53
|
import requestPayloadViewStyles from './requestPayloadView.css.js';
|
|
51
54
|
import {ShowMoreDetailsWidget} from './ShowMoreDetailsWidget.js';
|
|
@@ -120,6 +123,10 @@ interface ViewInput {
|
|
|
120
123
|
formParameters: SDK.NetworkRequest.NameValue[]|undefined;
|
|
121
124
|
queryString: string|null;
|
|
122
125
|
queryParameters: SDK.NetworkRequest.NameValue[]|null;
|
|
126
|
+
|
|
127
|
+
/** Raw binary content data for the request body (when base64-encoded by backend). */
|
|
128
|
+
binaryPayloadContentData: TextUtils.ContentData.ContentData|null;
|
|
129
|
+
requestUrl: Platform.DevToolsPath.UrlString;
|
|
123
130
|
}
|
|
124
131
|
|
|
125
132
|
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
@@ -273,7 +280,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
273
280
|
</li>
|
|
274
281
|
<li
|
|
275
282
|
role=treeitem
|
|
276
|
-
?hidden=${!input.formData || Boolean(input.formParameters)}
|
|
283
|
+
?hidden=${!input.formData || Boolean(input.formParameters) || Boolean(input.binaryPayloadContentData)}
|
|
277
284
|
jslog=${VisualLogging.section().context('request-payload')}
|
|
278
285
|
@contextmenu=${onContextMenu(input.viewJSONPayloadSource, input.setViewJSONPayloadSource,
|
|
279
286
|
/* includeURLDecodingOption*/ false)}
|
|
@@ -289,7 +296,21 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
289
296
|
</ul>
|
|
290
297
|
</li>
|
|
291
298
|
</ul>
|
|
292
|
-
`}></devtools-tree
|
|
299
|
+
`}></devtools-tree>
|
|
300
|
+
${input.binaryPayloadContentData ? html`
|
|
301
|
+
<div class="raw-payload-section"
|
|
302
|
+
jslog=${VisualLogging.section().context('binary-request-payload')}>
|
|
303
|
+
${widget(element => {
|
|
304
|
+
const streamingContent = TextUtils.StreamingContentData.StreamingContentData.from(
|
|
305
|
+
input.binaryPayloadContentData as TextUtils.ContentData.ContentData);
|
|
306
|
+
return new BinaryResourceView(
|
|
307
|
+
streamingContent,
|
|
308
|
+
input.requestUrl,
|
|
309
|
+
Common.ResourceType.resourceTypes.XHR,
|
|
310
|
+
element);
|
|
311
|
+
})}
|
|
312
|
+
</div>` : nothing}
|
|
313
|
+
`, target, {
|
|
293
314
|
container: {
|
|
294
315
|
classes: ['request-payload-view'],
|
|
295
316
|
attributes: {
|
|
@@ -304,10 +325,12 @@ export class RequestPayloadView extends UI.Widget.VBox {
|
|
|
304
325
|
#decodeRequestParameters = true;
|
|
305
326
|
#formData?: string;
|
|
306
327
|
#formParameters?: SDK.NetworkRequest.NameValue[];
|
|
328
|
+
#binaryPayloadContentData: TextUtils.ContentData.ContentData|null = null;
|
|
307
329
|
#view: View;
|
|
308
330
|
#viewJSONPayloadSource = false;
|
|
309
331
|
#viewFormParamSource = false;
|
|
310
332
|
#viewQueryParamSource = false;
|
|
333
|
+
#refreshFormDataPromiseForTest = Promise.resolve();
|
|
311
334
|
|
|
312
335
|
constructor(target?: HTMLElement, view = DEFAULT_VIEW) {
|
|
313
336
|
super();
|
|
@@ -330,18 +353,22 @@ export class RequestPayloadView extends UI.Widget.VBox {
|
|
|
330
353
|
}
|
|
331
354
|
|
|
332
355
|
this.requestUpdate();
|
|
333
|
-
|
|
356
|
+
this.#refreshFormData();
|
|
334
357
|
}
|
|
335
358
|
|
|
336
359
|
get request(): SDK.NetworkRequest.NetworkRequest|undefined {
|
|
337
360
|
return this.#request;
|
|
338
361
|
}
|
|
339
362
|
|
|
363
|
+
get refreshFormDataPromiseForTest(): Promise<void> {
|
|
364
|
+
return this.#refreshFormDataPromiseForTest;
|
|
365
|
+
}
|
|
366
|
+
|
|
340
367
|
override wasShown(): void {
|
|
341
368
|
super.wasShown();
|
|
342
369
|
this.request?.addEventListener(SDK.NetworkRequest.Events.REQUEST_HEADERS_CHANGED, this.#refreshFormData, this);
|
|
343
370
|
|
|
344
|
-
|
|
371
|
+
this.#refreshFormData();
|
|
345
372
|
}
|
|
346
373
|
|
|
347
374
|
override willHide(): void {
|
|
@@ -396,16 +423,35 @@ export class RequestPayloadView extends UI.Widget.VBox {
|
|
|
396
423
|
copyValue: (value: string): void => {
|
|
397
424
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue);
|
|
398
425
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(value);
|
|
399
|
-
}
|
|
426
|
+
},
|
|
427
|
+
binaryPayloadContentData: this.#binaryPayloadContentData,
|
|
428
|
+
requestUrl: this.request?.url() ?? Platform.DevToolsPath.EmptyUrlString,
|
|
400
429
|
};
|
|
401
430
|
this.#view(input, {}, this.element);
|
|
402
431
|
}
|
|
403
432
|
|
|
404
|
-
|
|
433
|
+
#refreshFormData(): void {
|
|
434
|
+
this.#refreshFormDataPromiseForTest = this.#doRefreshFormData();
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
async #doRefreshFormData(): Promise<void> {
|
|
405
438
|
this.#formData = await this.request?.requestFormData() ?? undefined;
|
|
406
439
|
if (this.#formData) {
|
|
407
440
|
this.#formParameters = await this.request?.formParameters() ?? undefined;
|
|
408
441
|
}
|
|
442
|
+
|
|
443
|
+
// Fetch raw binary content data for the request body when the backend
|
|
444
|
+
// returns base64-encoded data. This enables the binary viewer (hex,
|
|
445
|
+
// base64, utf-8) in the Payload tab for compressed/binary bodies.
|
|
446
|
+
this.#binaryPayloadContentData = null;
|
|
447
|
+
if (this.request && !this.#formParameters) {
|
|
448
|
+
const contentData = await this.request.requestFormDataContentData();
|
|
449
|
+
if (!TextUtils.ContentData.ContentData.isError(contentData) && !contentData.isTextContent &&
|
|
450
|
+
contentData.createdFromBase64) {
|
|
451
|
+
this.#binaryPayloadContentData = contentData;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
409
455
|
this.requestUpdate();
|
|
410
456
|
}
|
|
411
457
|
|
|
@@ -10,6 +10,7 @@ import type * as SDK from '../../core/sdk/sdk.js';
|
|
|
10
10
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
11
11
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
12
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
|
+
import {render} from '../../ui/lit/lit.js';
|
|
13
14
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
14
15
|
|
|
15
16
|
import {RequestHTMLView} from './RequestHTMLView.js';
|
|
@@ -47,7 +48,12 @@ export class RequestPreviewView extends UI.Widget.VBox {
|
|
|
47
48
|
}
|
|
48
49
|
const toolbar = this.element.createChild('devtools-toolbar', 'network-item-preview-toolbar');
|
|
49
50
|
void view.toolbarItems().then(items => {
|
|
50
|
-
|
|
51
|
+
if (Array.isArray(items)) {
|
|
52
|
+
items.map(item => toolbar.appendToolbarItem(item));
|
|
53
|
+
} else {
|
|
54
|
+
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
55
|
+
render(items, toolbar);
|
|
56
|
+
}
|
|
51
57
|
});
|
|
52
58
|
return view;
|
|
53
59
|
}
|
|
@@ -568,7 +568,7 @@ export class ResponseHeaderSection extends ResponseHeaderSectionBase {
|
|
|
568
568
|
await networkPersistenceManager.getOrCreateHeadersUISourceCodeFromUrl(requestUrl);
|
|
569
569
|
} else { // If folder for local overrides has not been provided yet
|
|
570
570
|
UI.InspectorView.InspectorView.instance().displaySelectOverrideFolderInfobar(async () => {
|
|
571
|
-
await Sources.SourcesNavigator.OverridesNavigatorView.
|
|
571
|
+
await Sources.SourcesNavigator.OverridesNavigatorView.setupNewWorkspace();
|
|
572
572
|
await networkPersistenceManager.getOrCreateHeadersUISourceCodeFromUrl(requestUrl);
|
|
573
573
|
});
|
|
574
574
|
}
|
|
@@ -34,6 +34,7 @@ export const enum IsFilterType {
|
|
|
34
34
|
FROM_CACHE = 'from-cache',
|
|
35
35
|
SERVICE_WORKER_INTERCEPTED = 'service-worker-intercepted',
|
|
36
36
|
SERVICE_WORKER_INITIATED = 'service-worker-initiated',
|
|
37
|
+
PRELOAD = 'preloaded',
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export const enum MixedContentFilterValues {
|