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
|
@@ -58,13 +58,13 @@ const UIStrings = {
|
|
|
58
58
|
*/
|
|
59
59
|
clearSiteData: 'Clear site data',
|
|
60
60
|
/**
|
|
61
|
-
* @description
|
|
61
|
+
* @description Button text in the Storage View of the Application panel for clearing selected site-specific storage
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
clearSelected: 'Clear selected',
|
|
64
64
|
/**
|
|
65
|
-
* @description
|
|
65
|
+
* @description Announce message when the "clear site data" task is complete
|
|
66
66
|
*/
|
|
67
|
-
|
|
67
|
+
SiteDataCleared: 'Site data cleared',
|
|
68
68
|
/**
|
|
69
69
|
* @description Checkbox label in the Clear Storage section of the Storage View of the Application panel
|
|
70
70
|
*/
|
|
@@ -88,7 +88,7 @@ const UIStrings = {
|
|
|
88
88
|
/**
|
|
89
89
|
* @description Checkbox label in the Clear Storage section of the Storage View of the Application panel
|
|
90
90
|
*/
|
|
91
|
-
|
|
91
|
+
thirdPartyCookies: 'Third-party cookies',
|
|
92
92
|
/**
|
|
93
93
|
* @description Text for error message in Application Quota Override
|
|
94
94
|
* @example {Image} PH1
|
|
@@ -155,6 +155,7 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
155
155
|
private storageKey: string|null;
|
|
156
156
|
private settings: Map<Protocol.Storage.StorageType, Common.Settings.Setting<boolean>>;
|
|
157
157
|
private includeThirdPartyCookiesSetting: Common.Settings.Setting<boolean>;
|
|
158
|
+
private includeThirdPartyCookiesCheckbox: UI.UIUtils.CheckboxLabel;
|
|
158
159
|
private quotaRow: HTMLElement;
|
|
159
160
|
private quotaUsage: number|null;
|
|
160
161
|
private pieChart: PerfUI.PieChart.PieChart;
|
|
@@ -201,16 +202,59 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
201
202
|
this.includeThirdPartyCookiesSetting =
|
|
202
203
|
Common.Settings.Settings.instance().createSetting('clear-storage-include-third-party-cookies', false);
|
|
203
204
|
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
const clearSiteData = this.reportView.appendSection(i18nString(UIStrings.clearSiteData));
|
|
206
|
+
clearSiteData.element.setAttribute('jslog', `${VisualLogging.section('clear-storage')}`);
|
|
207
|
+
|
|
208
|
+
const clearSiteDataCheckboxesRow = clearSiteData.appendRow();
|
|
209
|
+
clearSiteDataCheckboxesRow.classList.add('clear-site-data-checkboxes-row');
|
|
210
|
+
const leftColumn = clearSiteDataCheckboxesRow.createChild('div', 'clear-site-data-checkbox-column');
|
|
211
|
+
this.appendSettingCheckbox(leftColumn, i18nString(UIStrings.cacheStorage),
|
|
212
|
+
Protocol.Storage.StorageType.Cache_storage, 'cache-storage-checkbox');
|
|
213
|
+
this.appendSettingCheckbox(leftColumn, i18nString(UIStrings.indexDB), Protocol.Storage.StorageType.Indexeddb,
|
|
214
|
+
'indexeddb-checkbox');
|
|
215
|
+
this.appendSettingCheckbox(leftColumn, i18nString(UIStrings.localAndSessionStorage),
|
|
216
|
+
Protocol.Storage.StorageType.Local_storage, 'local-and-session-storage-checkbox');
|
|
217
|
+
|
|
218
|
+
const rightColumn = clearSiteDataCheckboxesRow.createChild('div', 'clear-site-data-checkbox-column');
|
|
219
|
+
this.appendSettingCheckbox(rightColumn, i18nString(UIStrings.unregisterServiceWorker),
|
|
220
|
+
Protocol.Storage.StorageType.Service_workers, 'unregister-service-worker-checkbox');
|
|
221
|
+
const cookiesCheckbox = this.appendSettingCheckbox(rightColumn, i18nString(UIStrings.cookies),
|
|
222
|
+
Protocol.Storage.StorageType.Cookies, 'cookies-checkbox');
|
|
223
|
+
cookiesCheckbox.classList.add('cookies-row');
|
|
224
|
+
|
|
225
|
+
const includeThirdPartyCookiesRow = rightColumn.createChild('div', 'include-third-party-cookies-row');
|
|
226
|
+
this.includeThirdPartyCookiesCheckbox = SettingsUI.SettingsUI.createSettingCheckbox(
|
|
227
|
+
i18nString(UIStrings.thirdPartyCookies), this.includeThirdPartyCookiesSetting);
|
|
228
|
+
this.includeThirdPartyCookiesCheckbox.classList.add('third-party-cookies-checkbox');
|
|
229
|
+
includeThirdPartyCookiesRow.appendChild(this.includeThirdPartyCookiesCheckbox);
|
|
230
|
+
|
|
231
|
+
const clearButtonRow = clearSiteData.appendRow();
|
|
232
|
+
clearButtonRow.classList.add('clear-selected-button-row');
|
|
233
|
+
this.clearButton = UI.UIUtils.createTextButton(i18nString(UIStrings.clearSelected), this.clear.bind(this),
|
|
234
|
+
{jslogContext: 'storage.clear-site-data'});
|
|
207
235
|
this.clearButton.id = 'storage-view-clear-button';
|
|
208
|
-
|
|
236
|
+
clearButtonRow.appendChild(this.clearButton);
|
|
237
|
+
|
|
238
|
+
clearSiteData.markFieldListAsGroup();
|
|
209
239
|
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
240
|
+
const cookiesSetting = this.settings.get(Protocol.Storage.StorageType.Cookies);
|
|
241
|
+
if (cookiesSetting) {
|
|
242
|
+
cookiesSetting.addChangeListener(event => this.onCookiesSettingChanged(event.data));
|
|
243
|
+
}
|
|
244
|
+
this.includeThirdPartyCookiesSetting.addChangeListener(
|
|
245
|
+
event => this.onIncludeThirdPartyCookiesSettingChanged(event.data));
|
|
246
|
+
cookiesCheckbox.addEventListener('change', () => {
|
|
247
|
+
this.syncCheckboxAttributeState(cookiesCheckbox);
|
|
248
|
+
if (!cookiesCheckbox.checked && this.includeThirdPartyCookiesCheckbox.checked) {
|
|
249
|
+
this.includeThirdPartyCookiesCheckbox.click();
|
|
250
|
+
}
|
|
251
|
+
this.onCookiesSettingChanged(cookiesCheckbox.checked);
|
|
252
|
+
});
|
|
253
|
+
this.includeThirdPartyCookiesCheckbox.addEventListener('change', () => {
|
|
254
|
+
this.syncCheckboxAttributeState(this.includeThirdPartyCookiesCheckbox);
|
|
255
|
+
this.onIncludeThirdPartyCookiesSettingChanged(this.includeThirdPartyCookiesCheckbox.checked);
|
|
256
|
+
});
|
|
257
|
+
this.onCookiesSettingChanged(Boolean(cookiesSetting?.get()));
|
|
214
258
|
|
|
215
259
|
const quota = this.reportView.appendSection(i18nString(UIStrings.usage));
|
|
216
260
|
quota.element.setAttribute('jslog', `${VisualLogging.section('usage')}`);
|
|
@@ -257,31 +301,51 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
257
301
|
const errorMessageRow = quota.appendRow();
|
|
258
302
|
this.quotaOverrideErrorMessage = errorMessageRow.createChild('div', 'quota-override-error');
|
|
259
303
|
|
|
260
|
-
const application = this.reportView.appendSection(i18nString(UIStrings.application));
|
|
261
|
-
application.element.setAttribute('jslog', `${VisualLogging.section('application')}`);
|
|
262
|
-
this.appendItem(
|
|
263
|
-
application, i18nString(UIStrings.unregisterServiceWorker), Protocol.Storage.StorageType.Service_workers);
|
|
264
|
-
application.markFieldListAsGroup();
|
|
265
|
-
|
|
266
|
-
const storage = this.reportView.appendSection(i18nString(UIStrings.storageTitle));
|
|
267
|
-
storage.element.setAttribute('jslog', `${VisualLogging.section('storage')}`);
|
|
268
|
-
this.appendItem(storage, i18nString(UIStrings.localAndSessionStorage), Protocol.Storage.StorageType.Local_storage);
|
|
269
|
-
this.appendItem(storage, i18nString(UIStrings.indexDB), Protocol.Storage.StorageType.Indexeddb);
|
|
270
|
-
this.appendItem(storage, i18nString(UIStrings.cookies), Protocol.Storage.StorageType.Cookies);
|
|
271
|
-
this.appendItem(storage, i18nString(UIStrings.cacheStorage), Protocol.Storage.StorageType.Cache_storage);
|
|
272
|
-
storage.markFieldListAsGroup();
|
|
273
|
-
|
|
274
304
|
SDK.TargetManager.TargetManager.instance().observeTargets(this);
|
|
275
305
|
}
|
|
276
306
|
|
|
277
|
-
private
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
const row = section.appendRow();
|
|
307
|
+
private appendSettingCheckbox(container: HTMLElement, title: Platform.UIString.LocalizedString,
|
|
308
|
+
settingName: Protocol.Storage.StorageType,
|
|
309
|
+
className?: string): UI.UIUtils.CheckboxLabel {
|
|
281
310
|
const setting = this.settings.get(settingName);
|
|
282
|
-
if (setting) {
|
|
283
|
-
|
|
311
|
+
if (!setting) {
|
|
312
|
+
throw new Error(`Missing setting for storage type: ${settingName}`);
|
|
313
|
+
}
|
|
314
|
+
const checkbox = SettingsUI.SettingsUI.createSettingCheckbox(title, setting);
|
|
315
|
+
if (className) {
|
|
316
|
+
checkbox.classList.add(className);
|
|
284
317
|
}
|
|
318
|
+
container.appendChild(checkbox);
|
|
319
|
+
return checkbox;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
private onCookiesSettingChanged(cookiesEnabled: boolean): void {
|
|
323
|
+
if (!cookiesEnabled) {
|
|
324
|
+
this.includeThirdPartyCookiesCheckbox.toggleAttribute('checked', true);
|
|
325
|
+
this.includeThirdPartyCookiesCheckbox.toggleAttribute('checked', false);
|
|
326
|
+
if (this.includeThirdPartyCookiesSetting.get()) {
|
|
327
|
+
this.includeThirdPartyCookiesSetting.set(false);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
this.updateThirdPartyCookiesCheckboxState();
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
private onIncludeThirdPartyCookiesSettingChanged(includeThirdPartyCookiesEnabled: boolean): void {
|
|
334
|
+
const cookiesSetting = this.settings.get(Protocol.Storage.StorageType.Cookies);
|
|
335
|
+
if (includeThirdPartyCookiesEnabled && cookiesSetting && !cookiesSetting.get()) {
|
|
336
|
+
cookiesSetting.set(true);
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
this.updateThirdPartyCookiesCheckboxState();
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
private syncCheckboxAttributeState(checkbox: UI.UIUtils.CheckboxLabel): void {
|
|
343
|
+
checkbox.toggleAttribute('checked', checkbox.checked);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
private updateThirdPartyCookiesCheckboxState(): void {
|
|
347
|
+
const cookiesSetting = this.settings.get(Protocol.Storage.StorageType.Cookies);
|
|
348
|
+
this.includeThirdPartyCookiesCheckbox.disabled = !cookiesSetting?.get();
|
|
285
349
|
}
|
|
286
350
|
|
|
287
351
|
targetAdded(target: SDK.Target.Target): void {
|
|
@@ -194,6 +194,10 @@ const UIStrings = {
|
|
|
194
194
|
* @description Notice to display when a tool has been unregistered
|
|
195
195
|
*/
|
|
196
196
|
toolUnregisteredNotice: 'This tool has been unregistered',
|
|
197
|
+
/**
|
|
198
|
+
* @description Label for a list of tool flags or attributes
|
|
199
|
+
*/
|
|
200
|
+
flags: 'Flags',
|
|
197
201
|
} as const;
|
|
198
202
|
const str_ = i18n.i18n.registerUIStrings('panels/application/WebMCPView.ts', UIStrings);
|
|
199
203
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -1114,6 +1118,12 @@ const TOOL_DETAILS_VIEW = (input: ToolDetailsViewInput, output: undefined, targe
|
|
|
1114
1118
|
}
|
|
1115
1119
|
const tool = input.tool;
|
|
1116
1120
|
const origin = input.origin;
|
|
1121
|
+
const flags = tool.flags;
|
|
1122
|
+
const formatter = new Intl.ListFormat(i18n.DevToolsLocale.DevToolsLocale.instance().locale, {
|
|
1123
|
+
style: 'short',
|
|
1124
|
+
type: 'unit',
|
|
1125
|
+
});
|
|
1126
|
+
const formattedFlags = formatter.format(flags);
|
|
1117
1127
|
render(html`
|
|
1118
1128
|
<style>${webMCPViewStyles}</style>
|
|
1119
1129
|
<div class="tool-details-grid">
|
|
@@ -1121,6 +1131,10 @@ const TOOL_DETAILS_VIEW = (input: ToolDetailsViewInput, output: undefined, targe
|
|
|
1121
1131
|
<div class="value source-code">${tool.name}</div>
|
|
1122
1132
|
<div class="label">Description</div>
|
|
1123
1133
|
<div class="value">${tool.description}</div>
|
|
1134
|
+
${flags.length > 0 ? html`
|
|
1135
|
+
<div class="label">${i18nString(UIStrings.flags)}</div>
|
|
1136
|
+
<div class="value">${formattedFlags}</div>
|
|
1137
|
+
` : nothing}
|
|
1124
1138
|
${tool.frame ? html`
|
|
1125
1139
|
<div class="label">${i18nString(UIStrings.frame)}</div>
|
|
1126
1140
|
<div class="value">${Components.Linkifier.Linkifier.linkifyRevealable(tool.frame, tool.frame.displayName())}</div>
|
|
@@ -1223,7 +1237,7 @@ export class ToolDetailsWidget extends UI.Widget.Widget {
|
|
|
1223
1237
|
};
|
|
1224
1238
|
|
|
1225
1239
|
#clearHighlight = (): void => {
|
|
1226
|
-
SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();
|
|
1240
|
+
SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight(SDK.TargetManager.TargetManager.instance());
|
|
1227
1241
|
};
|
|
1228
1242
|
|
|
1229
1243
|
#revealNode = (node: SDK.DOMModel.DOMNode): void => {
|
|
@@ -80,7 +80,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
const formatCpu = (val: number): string => {
|
|
83
|
-
return i18n.TimeUtilities.
|
|
83
|
+
return i18n.TimeUtilities.millisToString(val);
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
const formatNetwork = (val: number): string => {
|
|
@@ -10,36 +10,37 @@
|
|
|
10
10
|
border-bottom: 1px solid var(--sys-color-divider);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.indexed-db-data-view
|
|
13
|
+
.indexed-db-data-view devtools-data-grid {
|
|
14
|
+
border: 0;
|
|
14
15
|
flex: auto;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
.indexed-db-data-view .data-grid .data-container tr:nth-last-child(1) {
|
|
18
|
+
:host-context(.indexed-db-data-view) .data-grid .data-container tr:nth-last-child(1) {
|
|
18
19
|
background-color: var(--sys-color-cdt-base-container);
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
.indexed-db-data-view .data-grid .data-container tr:nth-last-child(1) td {
|
|
22
|
+
:host-context(.indexed-db-data-view) .data-grid .data-container tr:nth-last-child(1) td {
|
|
22
23
|
border: 0;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
.indexed-db-data-view .data-grid .data-container tr:nth-last-child(2) td {
|
|
26
|
+
:host-context(.indexed-db-data-view) .data-grid .data-container tr:nth-last-child(2) td {
|
|
26
27
|
border-bottom: 1px solid var(--sys-color-divider);
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
.indexed-db-data-view .data-grid:focus .data-container tr.selected {
|
|
30
|
+
:host-context(.indexed-db-data-view) .data-grid:focus .data-container tr.selected {
|
|
30
31
|
background-color: var(--sys-color-tonal-container);
|
|
31
32
|
color: inherit;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
.indexed-db-data-view .section,
|
|
35
|
-
.indexed-db-data-view .section > .header,
|
|
36
|
-
.indexed-db-data-view .section > .header .title {
|
|
35
|
+
:host-context(.indexed-db-data-view) .section,
|
|
36
|
+
:host-context(.indexed-db-data-view) .section > .header,
|
|
37
|
+
:host-context(.indexed-db-data-view) .section > .header .title {
|
|
37
38
|
margin: 0;
|
|
38
39
|
min-height: inherit;
|
|
39
40
|
line-height: inherit;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
.indexed-db-data-view .data-grid .data-container td .section .header .title {
|
|
43
|
+
:host-context(.indexed-db-data-view) .data-grid .data-container td .section .header .title {
|
|
43
44
|
white-space: nowrap;
|
|
44
45
|
text-overflow: ellipsis;
|
|
45
46
|
overflow: hidden;
|
|
@@ -79,3 +80,31 @@
|
|
|
79
80
|
text-overflow: ellipsis;
|
|
80
81
|
overflow: hidden;
|
|
81
82
|
}
|
|
83
|
+
|
|
84
|
+
.object-store-summary-bar .separator {
|
|
85
|
+
padding: 0 0.5em;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.key-filter-input {
|
|
89
|
+
flex-grow: 0.5;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.stale-data-warning {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: 4px;
|
|
96
|
+
padding: 0 4px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.stale-data-warning .warning-icon {
|
|
100
|
+
--icon-color: var(--icon-warning);
|
|
101
|
+
|
|
102
|
+
width: 20px;
|
|
103
|
+
height: 20px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.data-grid-container {
|
|
107
|
+
flex: auto;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
}
|
|
@@ -54,7 +54,8 @@ function prefetchStatusCode(requestId: Protocol.Network.RequestId): number|undef
|
|
|
54
54
|
* Retrieves the HTTP status code for a prerender attempt.
|
|
55
55
|
*/
|
|
56
56
|
function prerenderStatusCode(loaderId: Protocol.Network.LoaderId): number|undefined {
|
|
57
|
-
const frame = SDK.ResourceTreeModel.ResourceTreeModel.frames(
|
|
57
|
+
const frame = SDK.ResourceTreeModel.ResourceTreeModel.frames(SDK.TargetManager.TargetManager.instance())
|
|
58
|
+
.find(f => f.loaderId === loaderId);
|
|
58
59
|
if (!frame) {
|
|
59
60
|
return undefined;
|
|
60
61
|
}
|
|
@@ -14,8 +14,24 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.clear-
|
|
18
|
-
display:
|
|
17
|
+
.clear-site-data-checkboxes-row {
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
20
|
+
gap: var(--sys-size-5) var(--sys-size-10);
|
|
21
|
+
align-items: start;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.clear-site-data-checkbox-column {
|
|
25
|
+
display: grid;
|
|
26
|
+
row-gap: var(--sys-size-5);
|
|
27
|
+
|
|
28
|
+
> devtools-checkbox {
|
|
29
|
+
margin-left: 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.clear-selected-button-row {
|
|
34
|
+
margin-top: var(--sys-size-7);
|
|
19
35
|
}
|
|
20
36
|
|
|
21
37
|
.link {
|
|
@@ -67,17 +83,18 @@
|
|
|
67
83
|
|
|
68
84
|
.clear-storage-header {
|
|
69
85
|
min-width: 400px;
|
|
86
|
+
/* Keep in sync with ui/legacy/checkboxTextLabel.css (12px input, 6px margins). */
|
|
87
|
+
--nested-checkbox-indent: 24px;
|
|
70
88
|
}
|
|
71
89
|
|
|
72
90
|
.report-content-box {
|
|
73
91
|
overflow: initial;
|
|
74
92
|
}
|
|
75
93
|
|
|
76
|
-
.include-third-party-cookies {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
margin-left: 10px;
|
|
94
|
+
.include-third-party-cookies-row {
|
|
95
|
+
margin-left: var(--nested-checkbox-indent);
|
|
96
|
+
|
|
97
|
+
> devtools-checkbox {
|
|
98
|
+
margin-left: 0;
|
|
99
|
+
}
|
|
83
100
|
}
|
|
@@ -65,7 +65,7 @@ const containerToBreakpointEntry = new WeakMap<Element, HTMLElement>();
|
|
|
65
65
|
|
|
66
66
|
const breakpointEntryToCheckbox = new WeakMap<Element, UI.UIUtils.CheckboxLabel>();
|
|
67
67
|
|
|
68
|
-
let xhrBreakpointsSidebarPaneInstance: XHRBreakpointsSidebarPane;
|
|
68
|
+
let xhrBreakpointsSidebarPaneInstance: XHRBreakpointsSidebarPane|null = null;
|
|
69
69
|
|
|
70
70
|
export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.ContextFlavorListener.ContextFlavorListener,
|
|
71
71
|
UI.Toolbar.ItemsProvider,
|
|
@@ -117,6 +117,10 @@ export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.Cont
|
|
|
117
117
|
return xhrBreakpointsSidebarPaneInstance;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
static removeInstance(): void {
|
|
121
|
+
xhrBreakpointsSidebarPaneInstance = null;
|
|
122
|
+
}
|
|
123
|
+
|
|
120
124
|
toolbarItems(): UI.Toolbar.ToolbarItem[] {
|
|
121
125
|
return [this.#addButton];
|
|
122
126
|
}
|
|
@@ -202,9 +202,10 @@ UI.ViewManager.registerViewExtension({
|
|
|
202
202
|
commandPrompt: i18nLazyString(UIStrings.showPage),
|
|
203
203
|
order: 2,
|
|
204
204
|
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
|
|
205
|
-
async loadView() {
|
|
205
|
+
async loadView(universe) {
|
|
206
206
|
const Sources = await loadSourcesModule();
|
|
207
|
-
return Sources.SourcesNavigator.NetworkNavigatorView.instance(
|
|
207
|
+
return Sources.SourcesNavigator.NetworkNavigatorView.instance(
|
|
208
|
+
{forceNew: null, networkProjectManager: universe.networkProjectManager});
|
|
208
209
|
},
|
|
209
210
|
});
|
|
210
211
|
|
|
@@ -216,9 +217,10 @@ UI.ViewManager.registerViewExtension({
|
|
|
216
217
|
order: 4,
|
|
217
218
|
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
|
|
218
219
|
condition: () => !Root.Runtime.Runtime.isTraceApp(),
|
|
219
|
-
async loadView() {
|
|
220
|
+
async loadView(universe) {
|
|
220
221
|
const Sources = await loadSourcesModule();
|
|
221
|
-
return Sources.SourcesNavigator.OverridesNavigatorView.instance(
|
|
222
|
+
return Sources.SourcesNavigator.OverridesNavigatorView.instance(
|
|
223
|
+
{forceNew: null, networkProjectManager: universe.networkProjectManager});
|
|
222
224
|
},
|
|
223
225
|
});
|
|
224
226
|
|
|
@@ -230,9 +232,9 @@ UI.ViewManager.registerViewExtension({
|
|
|
230
232
|
order: 5,
|
|
231
233
|
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
|
|
232
234
|
condition: () => Root.Runtime.getPathName() !== '/bundled/worker_app.html' && !Root.Runtime.Runtime.isTraceApp(),
|
|
233
|
-
async loadView() {
|
|
235
|
+
async loadView(universe) {
|
|
234
236
|
const Sources = await loadSourcesModule();
|
|
235
|
-
return new Sources.SourcesNavigator.ContentScriptsNavigatorView();
|
|
237
|
+
return new Sources.SourcesNavigator.ContentScriptsNavigatorView(universe.networkProjectManager);
|
|
236
238
|
},
|
|
237
239
|
});
|
|
238
240
|
|
|
@@ -134,7 +134,7 @@ export class DOMNodeLink extends UI.Widget.Widget {
|
|
|
134
134
|
this.#node?.highlight?.();
|
|
135
135
|
},
|
|
136
136
|
onMouseLeave: () => {
|
|
137
|
-
SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();
|
|
137
|
+
SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight(SDK.TargetManager.TargetManager.instance());
|
|
138
138
|
},
|
|
139
139
|
ariaDescription: options.ariaDescription,
|
|
140
140
|
};
|
|
@@ -337,7 +337,8 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
337
337
|
throw new Error('Received a message from an unregistered extension');
|
|
338
338
|
}
|
|
339
339
|
const endpoint = new Extensions.LanguageExtensionEndpoint.LanguageExtensionEndpoint(
|
|
340
|
-
registration.allowFileAccess, extensionOrigin, pluginName, {language, symbol_types: symbol_types_array}, port
|
|
340
|
+
registration.allowFileAccess, extensionOrigin, pluginName, {language, symbol_types: symbol_types_array}, port,
|
|
341
|
+
pluginManager);
|
|
341
342
|
pluginManager.addPlugin(endpoint);
|
|
342
343
|
return this.status.OK();
|
|
343
344
|
}
|
|
@@ -563,6 +564,7 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
563
564
|
return;
|
|
564
565
|
}
|
|
565
566
|
this.requests = new Map();
|
|
567
|
+
this.clearExtensionHeaders(event.data.inspectedURL());
|
|
566
568
|
this.enableExtensions();
|
|
567
569
|
const url = event.data.inspectedURL();
|
|
568
570
|
this.postNotification(Extensions.ExtensionAPI.PrivateAPI.Events.InspectedURLChanged, [url]);
|
|
@@ -664,16 +666,7 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
664
666
|
for (const name in message.headers) {
|
|
665
667
|
extensionHeaders.set(name, message.headers[name]);
|
|
666
668
|
}
|
|
667
|
-
|
|
668
|
-
for (const headers of this.extraHeaders.values()) {
|
|
669
|
-
for (const [name, value] of headers) {
|
|
670
|
-
if (name !== '__proto__' && typeof value === 'string') {
|
|
671
|
-
allHeaders[name] = value;
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
SDK.NetworkManager.MultitargetNetworkManager.instance().setExtraHTTPHeaders(allHeaders);
|
|
669
|
+
this.syncExtraHeaders();
|
|
677
670
|
return undefined;
|
|
678
671
|
}
|
|
679
672
|
|
|
@@ -1085,6 +1078,58 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1085
1078
|
return this.evaluate(expression, true, true, evaluateOptions, this.getExtensionOrigin(port), callback.bind(this));
|
|
1086
1079
|
}
|
|
1087
1080
|
|
|
1081
|
+
private harEntryReferencesBlockedURL(entry: HAR.Log.EntryDTO, extension: RegisteredExtension): boolean {
|
|
1082
|
+
const baseURL = entry.request.url;
|
|
1083
|
+
|
|
1084
|
+
// Helper to cleanly resolve and check permission
|
|
1085
|
+
const isBlocked = (url: string|undefined): boolean => {
|
|
1086
|
+
if (!url) {
|
|
1087
|
+
return false;
|
|
1088
|
+
}
|
|
1089
|
+
try {
|
|
1090
|
+
const absoluteURL = new URL(url, baseURL).toString() as Platform.DevToolsPath.UrlString;
|
|
1091
|
+
return !extension.isAllowedOnTarget(absoluteURL);
|
|
1092
|
+
} catch {
|
|
1093
|
+
return true; // Fallback safely: treat unparsable URLs as blocked
|
|
1094
|
+
}
|
|
1095
|
+
};
|
|
1096
|
+
|
|
1097
|
+
if (isBlocked(entry.response.redirectURL)) {
|
|
1098
|
+
return true;
|
|
1099
|
+
}
|
|
1100
|
+
if (entry._initiator) {
|
|
1101
|
+
if (isBlocked(entry._initiator.url)) {
|
|
1102
|
+
return true;
|
|
1103
|
+
}
|
|
1104
|
+
let stack = entry._initiator.stack;
|
|
1105
|
+
while (stack) {
|
|
1106
|
+
if (stack.callFrames.some(f => isBlocked(f.url))) {
|
|
1107
|
+
return true;
|
|
1108
|
+
}
|
|
1109
|
+
stack = stack.parent;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
for (const header of entry.response.headers) {
|
|
1113
|
+
const name = header.name.toLowerCase();
|
|
1114
|
+
if (name === 'location' || name === 'content-location') {
|
|
1115
|
+
if (isBlocked(header.value)) {
|
|
1116
|
+
return true;
|
|
1117
|
+
}
|
|
1118
|
+
} else if (name === 'refresh') {
|
|
1119
|
+
const match = header.value.match(/;\s*url\s*=\s*(.+)$/i);
|
|
1120
|
+
if (isBlocked(match?.[1]?.trim())) {
|
|
1121
|
+
return true;
|
|
1122
|
+
}
|
|
1123
|
+
} else if (name === 'link') {
|
|
1124
|
+
const urls = [...header.value.matchAll(/<([^>]+)>/g)].map(m => m[1]);
|
|
1125
|
+
if (urls.some(url => isBlocked(url))) {
|
|
1126
|
+
return true;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
return false;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1088
1133
|
private async onGetHAR(message: Extensions.ExtensionAPI.PrivateAPI.ExtensionServerRequestMessage, port: MessagePort):
|
|
1089
1134
|
Promise<Record|HAR.Log.LogDTO> {
|
|
1090
1135
|
if (message.command !== Extensions.ExtensionAPI.PrivateAPI.Commands.GetHAR) {
|
|
@@ -1093,10 +1138,16 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1093
1138
|
const requests =
|
|
1094
1139
|
Logs.NetworkLog.NetworkLog.instance().requests().filter(r => this.extensionAllowedOnContentProvider(r, port));
|
|
1095
1140
|
const harLog = await HAR.Log.Log.build(requests, {sanitize: false});
|
|
1141
|
+
const extension = this.registeredExtensions.get(this.getExtensionOrigin(port));
|
|
1142
|
+
if (!extension) {
|
|
1143
|
+
return this.status.E_FAILED('Extension disconnected');
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1096
1146
|
for (let i = 0; i < harLog.entries.length; ++i) {
|
|
1097
1147
|
// @ts-expect-error
|
|
1098
1148
|
harLog.entries[i]._requestId = this.requestId(requests[i]);
|
|
1099
1149
|
}
|
|
1150
|
+
harLog.entries = harLog.entries.filter(entry => !this.harEntryReferencesBlockedURL(entry, extension));
|
|
1100
1151
|
return harLog;
|
|
1101
1152
|
}
|
|
1102
1153
|
|
|
@@ -1236,7 +1287,8 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1236
1287
|
}
|
|
1237
1288
|
const {uiSourceCode} = resource;
|
|
1238
1289
|
if (!uiSourceCode.contentType().isDocumentOrScriptOrStyleSheet()) {
|
|
1239
|
-
const resource = SDK.ResourceTreeModel.ResourceTreeModel.resourceForURL(
|
|
1290
|
+
const resource = SDK.ResourceTreeModel.ResourceTreeModel.resourceForURL(
|
|
1291
|
+
SDK.TargetManager.TargetManager.instance(), url as Platform.DevToolsPath.UrlString);
|
|
1240
1292
|
if (!resource) {
|
|
1241
1293
|
return this.status.E_NOTFOUND(url);
|
|
1242
1294
|
}
|
|
@@ -1360,6 +1412,13 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1360
1412
|
|
|
1361
1413
|
private async notifyRequestFinished(event: Common.EventTarget.EventTargetEvent<SDK.NetworkRequest.NetworkRequest>):
|
|
1362
1414
|
Promise<void> {
|
|
1415
|
+
if (!this.extensionsEnabled) {
|
|
1416
|
+
return;
|
|
1417
|
+
}
|
|
1418
|
+
if (!this.subscribers.has(Extensions.ExtensionAPI.PrivateAPI.Events.NetworkRequestFinished)) {
|
|
1419
|
+
return;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1363
1422
|
const request = event.data;
|
|
1364
1423
|
const entry = await HAR.Log.Entry.build(request, {sanitize: false});
|
|
1365
1424
|
const networkManager = SDK.NetworkManager.NetworkManager.forRequest(request);
|
|
@@ -1367,7 +1426,8 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1367
1426
|
this.postNotification(
|
|
1368
1427
|
Extensions.ExtensionAPI.PrivateAPI.Events.NetworkRequestFinished, [this.requestId(request), entry],
|
|
1369
1428
|
extension => extension.isAllowedOnTarget(entry.request.url as Platform.DevToolsPath.UrlString) &&
|
|
1370
|
-
(!targetUrl || extension.isAllowedOnTarget(targetUrl))
|
|
1429
|
+
(!targetUrl || extension.isAllowedOnTarget(targetUrl)) &&
|
|
1430
|
+
!this.harEntryReferencesBlockedURL(entry, extension));
|
|
1371
1431
|
}
|
|
1372
1432
|
|
|
1373
1433
|
private notifyElementsSelectionChanged(): void {
|
|
@@ -1584,7 +1644,7 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1584
1644
|
found = (frame.url === url) ? frame : null;
|
|
1585
1645
|
return found;
|
|
1586
1646
|
}
|
|
1587
|
-
SDK.ResourceTreeModel.ResourceTreeModel.frames().some(hasMatchingURL);
|
|
1647
|
+
SDK.ResourceTreeModel.ResourceTreeModel.frames(SDK.TargetManager.TargetManager.instance()).some(hasMatchingURL);
|
|
1588
1648
|
return found;
|
|
1589
1649
|
}
|
|
1590
1650
|
|
|
@@ -1719,11 +1779,56 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1719
1779
|
|
|
1720
1780
|
private disableExtensions(): void {
|
|
1721
1781
|
this.extensionsEnabled = false;
|
|
1782
|
+
this.clearExtensionHeaders();
|
|
1722
1783
|
}
|
|
1723
1784
|
|
|
1724
1785
|
private enableExtensions(): void {
|
|
1725
1786
|
this.extensionsEnabled = true;
|
|
1726
1787
|
}
|
|
1788
|
+
|
|
1789
|
+
/**
|
|
1790
|
+
* Clear extension-injected HTTP headers that should not persist after
|
|
1791
|
+
* navigation to a disallowed URL. Optionally pass the new inspected URL
|
|
1792
|
+
* to selectively clear only headers from extensions not allowed on that URL;
|
|
1793
|
+
* when omitted, all extension headers are cleared unconditionally.
|
|
1794
|
+
*/
|
|
1795
|
+
private clearExtensionHeaders(inspectedURL?: Platform.DevToolsPath.UrlString): void {
|
|
1796
|
+
if (this.extraHeaders.size === 0) {
|
|
1797
|
+
return;
|
|
1798
|
+
}
|
|
1799
|
+
let cleared = false;
|
|
1800
|
+
if (inspectedURL) {
|
|
1801
|
+
for (const id of this.extraHeaders.keys()) {
|
|
1802
|
+
const extension = this.registeredExtensions.get(id);
|
|
1803
|
+
if (!extension || !extension.isAllowedOnTarget(inspectedURL)) {
|
|
1804
|
+
this.extraHeaders.delete(id);
|
|
1805
|
+
cleared = true;
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
} else {
|
|
1809
|
+
this.extraHeaders.clear();
|
|
1810
|
+
cleared = true;
|
|
1811
|
+
}
|
|
1812
|
+
if (cleared) {
|
|
1813
|
+
this.syncExtraHeaders();
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* Collect all extension-injected headers into a single object and push
|
|
1819
|
+
* them to the network layer.
|
|
1820
|
+
*/
|
|
1821
|
+
private syncExtraHeaders(): void {
|
|
1822
|
+
const allHeaders: Protocol.Network.Headers = Object.create(null);
|
|
1823
|
+
for (const headers of this.extraHeaders.values()) {
|
|
1824
|
+
for (const [name, value] of headers) {
|
|
1825
|
+
if (typeof value === 'string') {
|
|
1826
|
+
allHeaders[name] = value;
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
SDK.NetworkManager.MultitargetNetworkManager.instance().setExtraHTTPHeaders(allHeaders);
|
|
1831
|
+
}
|
|
1727
1832
|
}
|
|
1728
1833
|
|
|
1729
1834
|
export const enum Events {
|