chrome-devtools-frontend 1.0.1657855 → 1.0.1661063
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/evaluate-ai-css-completion/SKILL.md +133 -0
- package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +76 -0
- package/.agents/skills/migrate-chromium-test/SKILL.md +15 -70
- 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/eslint.config.mjs +7 -0
- package/extension-api/ExtensionAPI.d.ts +88 -0
- package/front_end/Tests.js +6 -6
- package/front_end/core/common/Gzip.ts +12 -5
- package/front_end/core/host/AidaClient.ts +35 -9
- package/front_end/core/host/GdpClient.ts +10 -7
- package/front_end/core/host/InspectorFrontendHost.ts +1 -0
- package/front_end/core/host/InspectorFrontendHostStub.ts +2 -0
- package/front_end/core/platform/StringUtilities.ts +55 -4
- 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 +10 -5
- 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 +7 -1
- package/front_end/core/sdk/DOMModel.ts +33 -18
- package/front_end/core/sdk/DebuggerModel.ts +4 -4
- package/front_end/core/sdk/EventBreakpointsModel.ts +2 -0
- package/front_end/core/sdk/FrameManager.ts +1 -0
- package/front_end/core/sdk/IsolateManager.ts +1 -0
- package/front_end/core/sdk/NetworkManager.ts +59 -11
- package/front_end/core/sdk/NetworkRequest.ts +38 -1
- package/front_end/core/sdk/OverlayModel.ts +45 -6
- package/front_end/core/sdk/PageResourceLoader.ts +2 -0
- 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/SourceMap.ts +5 -5
- package/front_end/core/sdk/SourceMapManager.ts +3 -2
- package/front_end/core/sdk/TargetManager.ts +14 -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/formatter_worker/FormattedContentBuilder.ts +5 -2
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +26 -4
- 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 +20 -22
- package/front_end/entrypoints/main/main-meta.ts +42 -42
- package/front_end/entrypoints/node_app/node_app.ts +3 -2
- package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
- package/front_end/foundation/Universe.ts +44 -1
- package/front_end/generated/InspectorBackendCommands.ts +2 -2
- package/front_end/generated/SupportedCSSProperties.js +19 -12
- package/front_end/generated/protocol.ts +3 -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/CompilerScriptMapping.ts +7 -7
- package/front_end/models/bindings/ContentProviderBasedProject.ts +4 -4
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +5 -5
- package/front_end/models/bindings/DefaultScriptMapping.ts +3 -3
- package/front_end/models/bindings/NetworkProject.ts +5 -10
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +2 -1
- package/front_end/models/bindings/ResourceMapping.ts +3 -4
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -3
- package/front_end/models/bindings/ResourceUtils.ts +1 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +11 -9
- package/front_end/models/bindings/StylesSourceMapping.ts +3 -3
- package/front_end/models/bindings/TempFile.ts +8 -3
- package/front_end/models/emulation/EmulatedDevices.ts +389 -8
- package/front_end/models/extensions/ExtensionAPI.ts +116 -52
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +13 -12
- package/front_end/models/formatter/ScriptFormatter.ts +8 -11
- 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 +27 -16
- 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 +11 -12
- package/front_end/models/issues_manager/IssueAggregator.ts +0 -9
- package/front_end/models/issues_manager/IssueResolver.ts +2 -2
- package/front_end/models/issues_manager/IssuesManager.ts +136 -137
- 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/issues_manager/issues_manager.ts +0 -2
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +5 -0
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +13 -10
- 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/WorkspaceImpl.ts +10 -1
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +10 -4
- 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 +9 -1
- 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 +4 -3
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -6
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/IndexedDBViews.ts +220 -266
- 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 +53 -44
- package/front_end/panels/application/components/AdsView.ts +201 -30
- package/front_end/panels/application/components/adsView.css +25 -0
- package/front_end/panels/application/indexedDBViews.css +38 -9
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -2
- package/front_end/panels/application/preloading/helper/PreloadingForward.ts +2 -1
- 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 +1 -1
- package/front_end/panels/console/ConsolePinPane.ts +2 -2
- package/front_end/panels/console/ConsolePrompt.ts +2 -2
- package/front_end/panels/console/ConsoleView.ts +3 -2
- package/front_end/panels/console/PromptBuilder.ts +2 -1
- package/front_end/panels/console/SymbolizedErrorWidget.ts +2 -1
- 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 +22 -22
- 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 +1 -1
- 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 +4 -1
- 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/emulation/DeviceModeView.ts +52 -70
- package/front_end/panels/issues/AffectedDirectivesView.ts +1 -1
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -1
- package/front_end/panels/issues/IssueView.ts +0 -2
- package/front_end/panels/issues/IssuesPane.ts +1 -8
- package/front_end/panels/js_timeline/js_timeline-meta.ts +3 -2
- package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +3 -3
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +5 -5
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +4 -4
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +6 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +3 -3
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +8 -9
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +2 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +124 -36
- package/front_end/panels/network/NetworkLogView.ts +9 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +18 -0
- package/front_end/panels/network/NetworkPanel.ts +2 -1
- package/front_end/panels/network/RequestPayloadView.ts +68 -20
- package/front_end/panels/network/RequestPreviewView.ts +7 -1
- package/front_end/panels/network/RequestTimingView.ts +95 -127
- 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/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 +14 -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/recorder/{components/ControlButton.ts → ControlButton.ts} +9 -10
- package/front_end/panels/recorder/{components/CreateRecordingView.ts → CreateRecordingView.ts} +59 -58
- package/front_end/panels/recorder/ExtensionView.ts +123 -0
- package/front_end/panels/recorder/RecorderController.ts +102 -92
- package/front_end/panels/recorder/{components/RecordingListView.ts → RecordingListView.ts} +22 -23
- package/front_end/panels/recorder/{components/RecordingView.ts → RecordingView.ts} +99 -96
- package/front_end/panels/recorder/{components/ReplaySection.ts → ReplaySection.ts} +20 -20
- package/front_end/panels/recorder/{components/SelectorPicker.ts → SelectorPicker.ts} +13 -13
- package/front_end/panels/recorder/{components/StepEditor.ts → StepEditor.ts} +367 -336
- package/front_end/panels/recorder/{components/StepView.ts → StepView.ts} +48 -49
- package/front_end/panels/recorder/{components/TimelineSection.ts → TimelineSection.ts} +2 -2
- package/front_end/panels/recorder/models/RecorderSettings.ts +2 -2
- package/front_end/panels/recorder/recorder-meta.ts +7 -7
- package/front_end/panels/recorder/recorder.ts +23 -1
- package/front_end/panels/recorder/{components/recordingView.css → recordingView.css} +1 -1
- package/front_end/panels/recorder/util/util.ts +113 -0
- 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/InplaceFormatterEditorAction.ts +2 -2
- 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 +22 -21
- package/front_end/panels/sources/SourcesView.ts +10 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -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/IsolateSelector.ts +10 -8
- 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 +20 -8
- package/front_end/panels/timeline/TimelineUIUtils.ts +149 -131
- 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/timeline/timeline-meta.ts +3 -2
- 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/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/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 +6 -0
- package/front_end/ui/legacy/View.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +14 -15
- 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 +106 -38
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +7 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +2 -1
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +4 -2
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +10 -1
- package/front_end/ui/legacy/inspectorCommon.css +5 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/mcp.ts +2 -0
- package/package.json +4 -4
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +0 -247
- package/front_end/models/issues_manager/descriptions/arInsecureContext.md +0 -7
- package/front_end/models/issues_manager/descriptions/arInvalidInfoHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +0 -6
- package/front_end/models/issues_manager/descriptions/arNoRegisterOsSourceHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNoRegisterOsTriggerHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNoRegisterSourceHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNoRegisterTriggerHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNoWebOrOsSupport.md +0 -4
- package/front_end/models/issues_manager/descriptions/arOsSourceIgnored.md +0 -18
- package/front_end/models/issues_manager/descriptions/arOsTriggerIgnored.md +0 -19
- package/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +0 -8
- package/front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +0 -9
- package/front_end/models/issues_manager/descriptions/arSourceIgnored.md +0 -13
- package/front_end/models/issues_manager/descriptions/arTriggerIgnored.md +0 -12
- package/front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +0 -10
- package/front_end/models/issues_manager/descriptions/arWebAndOsHeaders.md +0 -11
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +0 -182
- package/front_end/panels/profiler/ProfileView.ts +0 -611
- package/front_end/panels/recorder/components/ExtensionView.ts +0 -132
- package/front_end/panels/recorder/components/components.ts +0 -25
- package/front_end/panels/recorder/components/util.ts +0 -116
- /package/front_end/panels/recorder/{components/controlButton.css → controlButton.css} +0 -0
- /package/front_end/panels/recorder/{components/createRecordingView.css → createRecordingView.css} +0 -0
- /package/front_end/panels/recorder/{components/extensionView.css → extensionView.css} +0 -0
- /package/front_end/panels/recorder/{components/recordingListView.css → recordingListView.css} +0 -0
- /package/front_end/panels/recorder/{components/replaySection.css → replaySection.css} +0 -0
- /package/front_end/panels/recorder/{components/selectorPicker.css → selectorPicker.css} +0 -0
- /package/front_end/panels/recorder/{components/startView.css → startView.css} +0 -0
- /package/front_end/panels/recorder/{components/stepEditor.css → stepEditor.css} +0 -0
- /package/front_end/panels/recorder/{components/stepView.css → stepView.css} +0 -0
- /package/front_end/panels/recorder/{components/timelineSection.css → timelineSection.css} +0 -0
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
17
17
|
/**
|
|
18
|
-
|
|
18
|
+
* @description Title for HTTP Unencoded Digest specification URL.
|
|
19
19
|
*/
|
|
20
20
|
unencodedDigestHeader: 'HTTP Unencoded Digest specification',
|
|
21
21
|
/**
|
|
22
|
-
|
|
22
|
+
* @description Title for the URL of the integration of unencoded-digest and SRI.
|
|
23
23
|
*/
|
|
24
|
-
integrityIntegration: 'Server-
|
|
24
|
+
integrityIntegration: 'Server-initiated integrity checks',
|
|
25
25
|
} as const;
|
|
26
26
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/UnencodedDigestIssue.ts', UIStrings);
|
|
27
27
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import * as AttributionReportingIssue from './AttributionReportingIssue.js';
|
|
6
5
|
import * as CheckFormsIssuesTrigger from './CheckFormsIssuesTrigger.js';
|
|
7
6
|
import * as ClientHintIssue from './ClientHintIssue.js';
|
|
8
7
|
import * as ConnectionAllowlistIssue from './ConnectionAllowlistIssue.js';
|
|
@@ -37,7 +36,6 @@ import * as StylesheetLoadingIssue from './StylesheetLoadingIssue.js';
|
|
|
37
36
|
import * as UnencodedDigestIssue from './UnencodedDigestIssue.js';
|
|
38
37
|
|
|
39
38
|
export {
|
|
40
|
-
AttributionReportingIssue,
|
|
41
39
|
CheckFormsIssuesTrigger,
|
|
42
40
|
ClientHintIssue,
|
|
43
41
|
ConnectionAllowlistIssue,
|
|
@@ -8386,6 +8386,10 @@ export const NativeFunctions = [
|
|
|
8386
8386
|
name: "getTypeMapping",
|
|
8387
8387
|
signatures: [["?ns"]]
|
|
8388
8388
|
},
|
|
8389
|
+
{
|
|
8390
|
+
name: "markConditional",
|
|
8391
|
+
signatures: [["markName"]]
|
|
8392
|
+
},
|
|
8389
8393
|
{
|
|
8390
8394
|
name: "PerformanceMark",
|
|
8391
8395
|
signatures: [["markName","?markOptions"]]
|
|
@@ -8448,7 +8452,7 @@ export const NativeFunctions = [
|
|
|
8448
8452
|
},
|
|
8449
8453
|
{
|
|
8450
8454
|
name: "executeTool",
|
|
8451
|
-
signatures: [["tool","
|
|
8455
|
+
signatures: [["tool","inputArguments","?options"]]
|
|
8452
8456
|
},
|
|
8453
8457
|
{
|
|
8454
8458
|
name: "TaskController",
|
|
@@ -6,6 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as Root from '../../core/root/root.js';
|
|
9
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
|
9
10
|
import type {ContentDataOrError} from '../text_utils/ContentData.js';
|
|
10
11
|
import type {SearchMatch} from '../text_utils/ContentProvider.js';
|
|
11
12
|
import * as Workspace from '../workspace/workspace.js';
|
|
@@ -168,6 +169,10 @@ export class FileSystem implements Workspace.Workspace.Project {
|
|
|
168
169
|
uiSourceCodes(): Iterable<Workspace.UISourceCode.UISourceCode> {
|
|
169
170
|
return [];
|
|
170
171
|
}
|
|
172
|
+
|
|
173
|
+
target(): SDK.Target.Target|null {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
171
176
|
}
|
|
172
177
|
|
|
173
178
|
/**
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import type * as Common from '../../core/common/common.js';
|
|
5
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
6
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
8
|
import * as Bindings from '../bindings/bindings.js';
|
|
@@ -41,8 +42,9 @@ interface InputData {
|
|
|
41
42
|
|
|
42
43
|
const inputCache = new WeakMap<Workspace.UISourceCode.UISourceCode, Promise<InputData>>();
|
|
43
44
|
|
|
44
|
-
async function prepareInput(uiSourceCode: Workspace.UISourceCode.UISourceCode, content: string
|
|
45
|
-
|
|
45
|
+
async function prepareInput(uiSourceCode: Workspace.UISourceCode.UISourceCode, content: string,
|
|
46
|
+
settings: Common.Settings.Settings): Promise<InputData> {
|
|
47
|
+
const formattedContent = await format(uiSourceCode, content, settings);
|
|
46
48
|
const text = new TextUtils.Text.Text(formattedContent ? formattedContent.formattedContent : content);
|
|
47
49
|
let performanceData = uiSourceCode.getDecorationData(Workspace.UISourceCode.DecoratorType.PERFORMANCE) as
|
|
48
50
|
Workspace.UISourceCode.LineColumnProfileMap |
|
|
@@ -59,14 +61,14 @@ async function prepareInput(uiSourceCode: Workspace.UISourceCode.UISourceCode, c
|
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
/** Formatting and parsing line endings for Text is expensive, so cache it. */
|
|
62
|
-
async function prepareInputAndCache(
|
|
63
|
-
|
|
64
|
+
async function prepareInputAndCache(uiSourceCode: Workspace.UISourceCode.UISourceCode, content: string,
|
|
65
|
+
settings: Common.Settings.Settings): Promise<InputData> {
|
|
64
66
|
let cachedPromise = inputCache.get(uiSourceCode);
|
|
65
67
|
if (cachedPromise) {
|
|
66
68
|
return await cachedPromise;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
cachedPromise = prepareInput(uiSourceCode, content);
|
|
71
|
+
cachedPromise = prepareInput(uiSourceCode, content, settings);
|
|
70
72
|
inputCache.set(uiSourceCode, cachedPromise);
|
|
71
73
|
return await cachedPromise;
|
|
72
74
|
}
|
|
@@ -224,7 +226,7 @@ export async function getFunctionCodeFromLocation(
|
|
|
224
226
|
const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
|
|
225
227
|
const projects = debuggerWorkspaceBinding.workspace.projectsForType(Workspace.Workspace.projectTypes.Network);
|
|
226
228
|
for (const project of projects) {
|
|
227
|
-
if (
|
|
229
|
+
if (project.target() !== target) {
|
|
228
230
|
continue;
|
|
229
231
|
}
|
|
230
232
|
uiSourceCode = project.uiSourceCodeForURL(url);
|
|
@@ -246,8 +248,8 @@ export async function getFunctionCodeFromLocation(
|
|
|
246
248
|
return await getFunctionCodeFromRawLocation(rawLocation, options);
|
|
247
249
|
}
|
|
248
250
|
|
|
249
|
-
async function format(uiSourceCode: Workspace.UISourceCode.UISourceCode, content: string
|
|
250
|
-
|
|
251
|
+
async function format(uiSourceCode: Workspace.UISourceCode.UISourceCode, content: string,
|
|
252
|
+
settings: Common.Settings.Settings): Promise<Formatter.ScriptFormatter.FormattedContent|null> {
|
|
251
253
|
const contentType = uiSourceCode.contentType();
|
|
252
254
|
const shouldFormat = !contentType.isFromSourceMap() && (contentType.isDocument() || contentType.isScript()) &&
|
|
253
255
|
TextUtils.TextUtils.isMinified(content);
|
|
@@ -255,7 +257,7 @@ async function format(uiSourceCode: Workspace.UISourceCode.UISourceCode, content
|
|
|
255
257
|
return null;
|
|
256
258
|
}
|
|
257
259
|
|
|
258
|
-
return await Formatter.ScriptFormatter.formatScriptContent(contentType.canonicalMimeType(), content, '\t');
|
|
260
|
+
return await Formatter.ScriptFormatter.formatScriptContent(settings, contentType.canonicalMimeType(), content, '\t');
|
|
259
261
|
}
|
|
260
262
|
|
|
261
263
|
/**
|
|
@@ -275,6 +277,7 @@ export async function getFunctionCodeFromRawLocation(
|
|
|
275
277
|
return null;
|
|
276
278
|
}
|
|
277
279
|
|
|
278
|
-
const
|
|
280
|
+
const settings = rawLocation.debuggerModel.target().targetManager().settings;
|
|
281
|
+
const inputData = await prepareInputAndCache(functionBounds.uiSourceCode, content, settings);
|
|
279
282
|
return createFunctionCode(inputData, functionBounds, options);
|
|
280
283
|
}
|
|
@@ -38,9 +38,9 @@ export class StackTraceModel extends SDK.SDKModel.SDKModel<unknown> {
|
|
|
38
38
|
readonly #trie = new Trie();
|
|
39
39
|
readonly #mutex = new Common.Mutex.Mutex();
|
|
40
40
|
|
|
41
|
-
/** @returns the {@link StackTraceModel} for the target
|
|
41
|
+
/** @returns the {@link StackTraceModel} for the target. Throws if the target or its model cannot be found. */
|
|
42
42
|
static #modelForTarget(target: SDK.Target.Target|null|undefined): StackTraceModel {
|
|
43
|
-
const model =
|
|
43
|
+
const model = target?.model(StackTraceModel);
|
|
44
44
|
if (!model) {
|
|
45
45
|
throw new Error('Unable to find StackTraceModel');
|
|
46
46
|
}
|
|
@@ -161,7 +161,7 @@ export class StackTraceModel extends SDK.SDKModel.SDKModel<unknown> {
|
|
|
161
161
|
// Skip empty async fragments, they don't add value.
|
|
162
162
|
continue;
|
|
163
163
|
}
|
|
164
|
-
const model = StackTraceModel.#modelForTarget(target);
|
|
164
|
+
const model = StackTraceModel.#modelForTarget(target ?? this.target().targetManager().primaryPageTarget());
|
|
165
165
|
const targetDebuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);
|
|
166
166
|
const asyncFrames = asyncStackTrace.callFrames.map((frame): RawFrame => {
|
|
167
167
|
const isWasm = targetDebuggerModel?.isWasm(frame.scriptId) ?? false;
|
|
@@ -59,6 +59,33 @@ export class ContentData {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
static async fromCompressedBase64(data: string, mimeType: string, charset?: string,
|
|
63
|
+
contentEncoding?: string): Promise<ContentData> {
|
|
64
|
+
const normalizedEncoding = contentEncoding?.toLowerCase();
|
|
65
|
+
if (!normalizedEncoding) {
|
|
66
|
+
return new ContentData(data, true, mimeType, charset);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
let contentAsBase64 = data;
|
|
70
|
+
try {
|
|
71
|
+
const bytes = Common.Base64.decode(data);
|
|
72
|
+
let decompressed: ArrayBuffer|null = null;
|
|
73
|
+
if (normalizedEncoding.includes('gzip') && Common.Gzip.isGzip(bytes.buffer)) {
|
|
74
|
+
decompressed = await Common.Gzip.decompressToBuffer(bytes.buffer);
|
|
75
|
+
} else if (normalizedEncoding.includes('deflate')) {
|
|
76
|
+
decompressed = await Common.Gzip.decompressDeflateToBuffer(bytes.buffer);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (decompressed) {
|
|
80
|
+
contentAsBase64 = await Common.Base64.encode(decompressed);
|
|
81
|
+
}
|
|
82
|
+
} catch (e) {
|
|
83
|
+
console.warn('Failed to decompress base64 content data:', e);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return new ContentData(contentAsBase64, true, mimeType, charset);
|
|
87
|
+
}
|
|
88
|
+
|
|
62
89
|
/**
|
|
63
90
|
* Returns the data as base64.
|
|
64
91
|
*
|
|
@@ -72,9 +72,13 @@ export class SamplesIntegrator {
|
|
|
72
72
|
#lockedJsStackDepth: number[] = [];
|
|
73
73
|
/**
|
|
74
74
|
* Used to keep track when samples should be integrated even if they
|
|
75
|
-
* are not children of invocation trace events. This is
|
|
76
|
-
*
|
|
77
|
-
*
|
|
75
|
+
* are not children of invocation trace events. This is used in two cases:
|
|
76
|
+
* 1. We start tracing half-way through, so we miss the start of JS
|
|
77
|
+
* invocation events.
|
|
78
|
+
* 2. On threads (like Web Workers) without real JS invocation parent events,
|
|
79
|
+
* but where trace events (like SchedulePostMessage) integrate stack traces.
|
|
80
|
+
* Enabling fake JS mode allows subsequent samples to be processed and
|
|
81
|
+
* eventually correct the stack, preventing a deadlock.
|
|
78
82
|
*/
|
|
79
83
|
#fakeJSInvocation = false;
|
|
80
84
|
/**
|
|
@@ -153,7 +157,7 @@ export class SamplesIntegrator {
|
|
|
153
157
|
this.#onProfileCall(event, parentEvent);
|
|
154
158
|
continue;
|
|
155
159
|
}
|
|
156
|
-
this.#onTraceEventStart(event);
|
|
160
|
+
this.#onTraceEventStart(event, parentEvent);
|
|
157
161
|
stack.push(event);
|
|
158
162
|
}
|
|
159
163
|
while (stack.length) {
|
|
@@ -166,7 +170,7 @@ export class SamplesIntegrator {
|
|
|
166
170
|
return this.#constructedProfileCalls;
|
|
167
171
|
}
|
|
168
172
|
|
|
169
|
-
#onTraceEventStart(event: Types.Events.Event): void {
|
|
173
|
+
#onTraceEventStart(event: Types.Events.Event, parent?: Types.Events.Event): void {
|
|
170
174
|
// Top level events cannot be nested into JS frames so we reset
|
|
171
175
|
// the stack when we find one.
|
|
172
176
|
if (event.name === Types.Events.Name.RUN_MICROTASKS || event.name === Types.Events.Name.RUN_TASK) {
|
|
@@ -180,6 +184,18 @@ export class SamplesIntegrator {
|
|
|
180
184
|
this.#fakeJSInvocation = false;
|
|
181
185
|
}
|
|
182
186
|
this.#extractStackTrace(event);
|
|
187
|
+
if (extractSampleTraceId(event)) {
|
|
188
|
+
const hasJSInvocationParent = parent && Types.Events.isJSInvocationEvent(parent);
|
|
189
|
+
if (!hasJSInvocationParent) {
|
|
190
|
+
// If the event has a sampleTraceId (meaning it has a stack trace) but
|
|
191
|
+
// no JS invocation parent, we enter fake JS mode. This ensures that
|
|
192
|
+
// subsequent samples on this thread are processed, allowing the stack
|
|
193
|
+
// to be correctly updated/truncated. Without this, subsequent samples
|
|
194
|
+
// would be ignored because the stack is non-empty but we are not
|
|
195
|
+
// considered to be in JS.
|
|
196
|
+
this.#fakeJSInvocation = true;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
183
199
|
// Keep track of the call frames in the stack before the event
|
|
184
200
|
// happened. For the duration of this event, these frames cannot
|
|
185
201
|
// change (none can be terminated before this event finishes).
|
|
@@ -8,7 +8,7 @@ import type * as Protocol from '../../generated/protocol.js';
|
|
|
8
8
|
import * as Bindings from '../bindings/bindings.js';
|
|
9
9
|
import * as SourceMapScopes from '../source_map_scopes/source_map_scopes.js';
|
|
10
10
|
import * as Trace from '../trace/trace.js';
|
|
11
|
-
import * as Workspace from '../workspace/workspace.js';
|
|
11
|
+
import type * as Workspace from '../workspace/workspace.js';
|
|
12
12
|
|
|
13
13
|
interface ResolvedCodeLocationData {
|
|
14
14
|
name: string|null;
|
|
@@ -26,6 +26,9 @@ export class SourceMappingsUpdated extends Event {
|
|
|
26
26
|
export const resolvedCodeLocationDataNames = new Map<string, ResolvedCodeLocationData|null>();
|
|
27
27
|
|
|
28
28
|
export class SourceMapsResolver extends EventTarget {
|
|
29
|
+
readonly #debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding;
|
|
30
|
+
readonly #targetManager: SDK.TargetManager.TargetManager;
|
|
31
|
+
|
|
29
32
|
private executionContextNamesByOrigin = new Map<Platform.DevToolsPath.UrlString, string>();
|
|
30
33
|
#parsedTrace: Trace.TraceModel.ParsedTrace;
|
|
31
34
|
#entityMapper: Trace.EntityMapper.EntityMapper|null = null;
|
|
@@ -39,10 +42,18 @@ export class SourceMapsResolver extends EventTarget {
|
|
|
39
42
|
// those workers too.
|
|
40
43
|
#debuggerModelsToListen = new Set<SDK.DebuggerModel.DebuggerModel>();
|
|
41
44
|
|
|
42
|
-
constructor(
|
|
45
|
+
constructor(
|
|
46
|
+
parsedTrace: Trace.TraceModel.ParsedTrace,
|
|
47
|
+
entityMapper?: Trace.EntityMapper.EntityMapper,
|
|
48
|
+
debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding =
|
|
49
|
+
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),
|
|
50
|
+
targetManager: SDK.TargetManager.TargetManager = SDK.TargetManager.TargetManager.instance(),
|
|
51
|
+
) {
|
|
43
52
|
super();
|
|
44
53
|
this.#parsedTrace = parsedTrace;
|
|
45
54
|
this.#entityMapper = entityMapper ?? null;
|
|
55
|
+
this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
|
|
56
|
+
this.#targetManager = targetManager;
|
|
46
57
|
}
|
|
47
58
|
|
|
48
59
|
static clearResolvedNodeNames(): void {
|
|
@@ -85,8 +96,11 @@ export class SourceMapsResolver extends EventTarget {
|
|
|
85
96
|
return SourceMapsResolver.resolvedCodeLocationForCallFrame(callFrame as Protocol.Runtime.CallFrame);
|
|
86
97
|
}
|
|
87
98
|
|
|
88
|
-
static resolvedURLForEntry(
|
|
89
|
-
|
|
99
|
+
static resolvedURLForEntry(
|
|
100
|
+
parsedTrace: Trace.TraceModel.ParsedTrace,
|
|
101
|
+
entry: Trace.Types.Events.Event,
|
|
102
|
+
workspace: Workspace.Workspace.WorkspaceImpl,
|
|
103
|
+
): Platform.DevToolsPath.UrlString|null {
|
|
90
104
|
const resolvedCallFrameURL =
|
|
91
105
|
SourceMapsResolver.resolvedCodeLocationForEntry(entry)?.devtoolsLocation?.uiSourceCode.url();
|
|
92
106
|
if (resolvedCallFrameURL) {
|
|
@@ -97,13 +111,16 @@ export class SourceMapsResolver extends EventTarget {
|
|
|
97
111
|
// to the URL value contained in the event itself, if any.
|
|
98
112
|
const url = Trace.Handlers.Helpers.getNonResolvedURL(entry, parsedTrace.data);
|
|
99
113
|
if (url) {
|
|
100
|
-
return
|
|
114
|
+
return workspace.uiSourceCodeForURL(url)?.url() ?? url;
|
|
101
115
|
}
|
|
102
116
|
return null;
|
|
103
117
|
}
|
|
104
118
|
|
|
105
|
-
static codeLocationForEntry(
|
|
106
|
-
|
|
119
|
+
static codeLocationForEntry(
|
|
120
|
+
parsedTrace: Trace.TraceModel.ParsedTrace,
|
|
121
|
+
entry: Trace.Types.Events.Event,
|
|
122
|
+
workspace: Workspace.Workspace.WorkspaceImpl,
|
|
123
|
+
): {url: Platform.DevToolsPath.UrlString, line?: number, column?: number}|null {
|
|
107
124
|
const uiLocation = SourceMapsResolver.resolvedCodeLocationForEntry(entry)?.devtoolsLocation;
|
|
108
125
|
if (uiLocation) {
|
|
109
126
|
return {url: uiLocation.uiSourceCode.url(), line: uiLocation.lineNumber, column: uiLocation.columnNumber};
|
|
@@ -121,7 +138,7 @@ export class SourceMapsResolver extends EventTarget {
|
|
|
121
138
|
// Lastly, look for just a url.
|
|
122
139
|
let url = Trace.Handlers.Helpers.getNonResolvedURL(entry, parsedTrace.data);
|
|
123
140
|
if (url) {
|
|
124
|
-
url =
|
|
141
|
+
url = workspace.uiSourceCodeForURL(url)?.url() ?? url;
|
|
125
142
|
}
|
|
126
143
|
if (url) {
|
|
127
144
|
return {url};
|
|
@@ -209,9 +226,7 @@ export class SourceMapsResolver extends EventTarget {
|
|
|
209
226
|
const location = debuggerModel &&
|
|
210
227
|
new SDK.DebuggerModel.Location(
|
|
211
228
|
debuggerModel, node.callFrame.scriptId, node.callFrame.lineNumber, node.callFrame.columnNumber);
|
|
212
|
-
const uiLocation = location &&
|
|
213
|
-
await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(
|
|
214
|
-
location);
|
|
229
|
+
const uiLocation = location && await this.#debuggerWorkspaceBinding.rawLocationToUILocation(location);
|
|
215
230
|
updatedMappings ||= Boolean(uiLocation);
|
|
216
231
|
if (uiLocation?.uiSourceCode.url() && this.#entityMapper) {
|
|
217
232
|
// Update mappings for the related events of the entity.
|
|
@@ -253,13 +268,13 @@ export class SourceMapsResolver extends EventTarget {
|
|
|
253
268
|
#targetForThread(tid: Trace.Types.Events.ThreadID): SDK.Target.Target|null {
|
|
254
269
|
const maybeWorkerId = this.#parsedTrace.data.Workers.workerIdByThread.get(tid);
|
|
255
270
|
if (maybeWorkerId) {
|
|
256
|
-
return
|
|
271
|
+
return this.#targetManager.targetById(maybeWorkerId);
|
|
257
272
|
}
|
|
258
|
-
return
|
|
273
|
+
return this.#targetManager.primaryPageTarget();
|
|
259
274
|
}
|
|
260
275
|
|
|
261
276
|
#updateExtensionNames(): void {
|
|
262
|
-
for (const runtimeModel of
|
|
277
|
+
for (const runtimeModel of this.#targetManager.models(SDK.RuntimeModel.RuntimeModel)) {
|
|
263
278
|
for (const context of runtimeModel.executionContexts()) {
|
|
264
279
|
this.executionContextNamesByOrigin.set(context.origin, context.name);
|
|
265
280
|
}
|
|
@@ -37,9 +37,14 @@ export class Result {
|
|
|
37
37
|
|
|
38
38
|
get symbolizedError(): Promise<Bindings.SymbolizedError.SymbolizedError|null>|undefined {
|
|
39
39
|
if (!this.#symbolizedError) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
if (this.#exception) {
|
|
41
|
+
const target = this.#exception.runtimeModel().target();
|
|
42
|
+
const debuggerWorkspaceBinding =
|
|
43
|
+
target.targetManager().context.get(Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding);
|
|
44
|
+
this.#symbolizedError = debuggerWorkspaceBinding.createSymbolizedError(this.#exception);
|
|
45
|
+
} else {
|
|
46
|
+
this.#symbolizedError = Promise.resolve(null);
|
|
47
|
+
}
|
|
43
48
|
}
|
|
44
49
|
return this.#symbolizedError;
|
|
45
50
|
}
|
|
@@ -61,9 +66,11 @@ export class Tool {
|
|
|
61
66
|
constructor(tool: Protocol.WebMCP.Tool, target: SDK.Target.Target) {
|
|
62
67
|
this.#target = new WeakRef(target);
|
|
63
68
|
this.#protocolTool = tool;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
if (tool.stackTrace) {
|
|
70
|
+
const debuggerWorkspaceBinding =
|
|
71
|
+
target.targetManager().context.get(Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding);
|
|
72
|
+
this.#stackTrace = debuggerWorkspaceBinding.createStackTraceFromProtocolRuntime(tool.stackTrace, target);
|
|
73
|
+
}
|
|
67
74
|
}
|
|
68
75
|
|
|
69
76
|
get stackTrace(): Promise<StackTrace.StackTrace.StackTrace>|undefined {
|
|
@@ -90,6 +97,17 @@ export class Tool {
|
|
|
90
97
|
return (typeof rawSchema === 'object' && rawSchema !== null) ? rawSchema as JSONSchema7 : {};
|
|
91
98
|
}
|
|
92
99
|
|
|
100
|
+
get flags(): Array<keyof Protocol.WebMCP.Annotation> {
|
|
101
|
+
const annotations = this.#protocolTool.annotations;
|
|
102
|
+
if (!annotations) {
|
|
103
|
+
return [];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return (Object.keys(annotations) as Array<keyof Protocol.WebMCP.Annotation>)
|
|
107
|
+
.filter(key => annotations[key] === true)
|
|
108
|
+
.sort();
|
|
109
|
+
}
|
|
110
|
+
|
|
93
111
|
get frame(): SDK.ResourceTreeModel.ResourceTreeFrame|undefined {
|
|
94
112
|
return this.#target.deref()
|
|
95
113
|
?.model(SDK.ResourceTreeModel.ResourceTreeModel)
|
|
@@ -13,27 +13,27 @@ import {projectTypes} from './WorkspaceImpl.js';
|
|
|
13
13
|
|
|
14
14
|
const UIStrings = {
|
|
15
15
|
/**
|
|
16
|
-
* @description Text to stop preventing the debugger from stepping into library code
|
|
16
|
+
* @description Text to stop preventing the debugger from stepping into library code.
|
|
17
17
|
*/
|
|
18
18
|
removeFromIgnoreList: 'Remove from ignore list',
|
|
19
19
|
/**
|
|
20
|
-
* @description Text for scripts that should not be stepped into when debugging
|
|
20
|
+
* @description Text for scripts that should not be stepped into when debugging.
|
|
21
21
|
*/
|
|
22
22
|
addScriptToIgnoreList: 'Add script to ignore list',
|
|
23
23
|
/**
|
|
24
|
-
* @description Text for directories whose scripts should not be stepped into when debugging
|
|
24
|
+
* @description Text for directories whose scripts should not be stepped into when debugging.
|
|
25
25
|
*/
|
|
26
26
|
addDirectoryToIgnoreList: 'Add directory to ignore list',
|
|
27
27
|
/**
|
|
28
|
-
* @description A context menu item in the Call Stack
|
|
28
|
+
* @description A context menu item in the Call Stack sidebar of the Sources panel.
|
|
29
29
|
*/
|
|
30
30
|
addAllContentScriptsToIgnoreList: 'Add all extension scripts to ignore list',
|
|
31
31
|
/**
|
|
32
|
-
* @description A context menu item in the Call Stack
|
|
32
|
+
* @description A context menu item in the Call Stack sidebar of the Sources panel.
|
|
33
33
|
*/
|
|
34
34
|
addAllThirdPartyScriptsToIgnoreList: 'Add all third-party scripts to ignore list',
|
|
35
35
|
/**
|
|
36
|
-
* @description A context menu item in the Call Stack
|
|
36
|
+
* @description A context menu item in the Call Stack sidebar of the Sources panel.
|
|
37
37
|
*/
|
|
38
38
|
addAllAnonymousScriptsToIgnoreList: 'Add all anonymous scripts to ignore list',
|
|
39
39
|
} as const;
|
|
@@ -14,13 +14,13 @@ import {Events as WorkspaceImplEvents, type Project} from './WorkspaceImpl.js';
|
|
|
14
14
|
|
|
15
15
|
const UIStrings = {
|
|
16
16
|
/**
|
|
17
|
-
* @description Text for the index of something
|
|
17
|
+
* @description Text for the index of something.
|
|
18
18
|
*/
|
|
19
19
|
index: '(index)',
|
|
20
20
|
/**
|
|
21
|
-
* @description Text in
|
|
21
|
+
* @description Text in UISourceCode of the DevTools local workspace.
|
|
22
22
|
*/
|
|
23
|
-
thisFileWasChangedExternally: 'This file was changed externally.
|
|
23
|
+
thisFileWasChangedExternally: 'This file was changed externally. Reload?',
|
|
24
24
|
} as const;
|
|
25
25
|
const str_ = i18n.i18n.registerUIStrings('models/workspace/UISourceCode.ts', UIStrings);
|
|
26
26
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as Root from '../../core/root/root.js';
|
|
8
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
|
8
9
|
import type * as TextUtils from '../text_utils/text_utils.js';
|
|
9
10
|
|
|
10
11
|
import type {SearchConfig} from './SearchConfig.js';
|
|
@@ -54,6 +55,7 @@ export interface Project {
|
|
|
54
55
|
* @returns an iterator for the sources provided by this project.
|
|
55
56
|
*/
|
|
56
57
|
uiSourceCodes(): Iterable<UISourceCode>;
|
|
58
|
+
target(): SDK.Target.Target|null;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
/* eslint-disable @typescript-eslint/naming-convention -- Used by web_tests. */
|
|
@@ -74,12 +76,15 @@ export abstract class ProjectStore implements Project {
|
|
|
74
76
|
readonly #type: projectTypes;
|
|
75
77
|
readonly #displayName: string;
|
|
76
78
|
readonly #uiSourceCodes = new Map<Platform.DevToolsPath.UrlString, UISourceCode>();
|
|
79
|
+
readonly #target: SDK.Target.Target|null = null;
|
|
77
80
|
|
|
78
|
-
constructor(workspace: WorkspaceImpl, id: string, type: projectTypes, displayName: string
|
|
81
|
+
constructor(workspace: WorkspaceImpl, id: string, type: projectTypes, displayName: string,
|
|
82
|
+
target: SDK.Target.Target|null = null) {
|
|
79
83
|
this.#workspace = workspace;
|
|
80
84
|
this.#id = id;
|
|
81
85
|
this.#type = type;
|
|
82
86
|
this.#displayName = displayName;
|
|
87
|
+
this.#target = target;
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
id(): string {
|
|
@@ -135,6 +140,10 @@ export abstract class ProjectStore implements Project {
|
|
|
135
140
|
return this.#uiSourceCodes.values();
|
|
136
141
|
}
|
|
137
142
|
|
|
143
|
+
target(): SDK.Target.Target|null {
|
|
144
|
+
return this.#target;
|
|
145
|
+
}
|
|
146
|
+
|
|
138
147
|
renameUISourceCode(uiSourceCode: UISourceCode, newName: string): void {
|
|
139
148
|
const oldPath = uiSourceCode.url();
|
|
140
149
|
const newPath = uiSourceCode.parentURL() ?
|
|
@@ -19,6 +19,7 @@ interface DiffResponse {
|
|
|
19
19
|
export class WorkspaceDiffImpl extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
20
20
|
readonly #persistence: Persistence.Persistence.PersistenceImpl;
|
|
21
21
|
readonly #networkPersistenceManager: Persistence.NetworkPersistenceManager.NetworkPersistenceManager;
|
|
22
|
+
readonly #settings: Common.Settings.Settings;
|
|
22
23
|
readonly #diffs = new WeakMap<Workspace.UISourceCode.UISourceCode, UISourceCodeDiff>();
|
|
23
24
|
/** used in web tests */
|
|
24
25
|
private readonly loadingUISourceCodes =
|
|
@@ -30,10 +31,12 @@ export class WorkspaceDiffImpl extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
30
31
|
persistence: Persistence.Persistence.PersistenceImpl = Persistence.Persistence.PersistenceImpl.instance(),
|
|
31
32
|
networkPersistenceManager: Persistence.NetworkPersistenceManager.NetworkPersistenceManager =
|
|
32
33
|
Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance(),
|
|
34
|
+
settings: Common.Settings.Settings = Common.Settings.Settings.instance(),
|
|
33
35
|
) {
|
|
34
36
|
super();
|
|
35
37
|
this.#persistence = persistence;
|
|
36
38
|
this.#networkPersistenceManager = networkPersistenceManager;
|
|
39
|
+
this.#settings = settings;
|
|
37
40
|
workspace.addEventListener(Workspace.Workspace.Events.WorkingCopyChanged, this.#uiSourceCodeChanged, this);
|
|
38
41
|
workspace.addEventListener(Workspace.Workspace.Events.WorkingCopyCommitted, this.#uiSourceCodeChanged, this);
|
|
39
42
|
workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, this.#uiSourceCodeAdded, this);
|
|
@@ -63,7 +66,7 @@ export class WorkspaceDiffImpl extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
63
66
|
#uiSourceCodeDiff(uiSourceCode: Workspace.UISourceCode.UISourceCode): UISourceCodeDiff {
|
|
64
67
|
let diff = this.#diffs.get(uiSourceCode);
|
|
65
68
|
if (!diff) {
|
|
66
|
-
diff = new UISourceCodeDiff(uiSourceCode, this.#networkPersistenceManager);
|
|
69
|
+
diff = new UISourceCodeDiff(uiSourceCode, this.#networkPersistenceManager, this.#settings);
|
|
67
70
|
this.#diffs.set(uiSourceCode, diff);
|
|
68
71
|
}
|
|
69
72
|
return diff;
|
|
@@ -205,16 +208,19 @@ export interface EventTypes {
|
|
|
205
208
|
export class UISourceCodeDiff extends Common.ObjectWrapper.ObjectWrapper<UISourceCodeDiffEventTypes> {
|
|
206
209
|
#uiSourceCode: Workspace.UISourceCode.UISourceCode;
|
|
207
210
|
readonly #networkPersistenceManager: Persistence.NetworkPersistenceManager.NetworkPersistenceManager;
|
|
211
|
+
readonly #settings: Common.Settings.Settings;
|
|
208
212
|
#requestDiffPromise: Promise<DiffResponse|null>|null = null;
|
|
209
213
|
#pendingChanges: number|null = null;
|
|
210
214
|
dispose = false;
|
|
211
215
|
constructor(
|
|
212
216
|
uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
213
217
|
networkPersistenceManager: Persistence.NetworkPersistenceManager.NetworkPersistenceManager,
|
|
218
|
+
settings: Common.Settings.Settings = Common.Settings.Settings.instance(),
|
|
214
219
|
) {
|
|
215
220
|
super();
|
|
216
221
|
this.#uiSourceCode = uiSourceCode;
|
|
217
222
|
this.#networkPersistenceManager = networkPersistenceManager;
|
|
223
|
+
this.#settings = settings;
|
|
218
224
|
uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.#uiSourceCodeChanged, this);
|
|
219
225
|
uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted, this.#uiSourceCodeChanged, this);
|
|
220
226
|
}
|
|
@@ -293,11 +299,11 @@ export class UISourceCodeDiff extends Common.ObjectWrapper.ObjectWrapper<UISourc
|
|
|
293
299
|
return null;
|
|
294
300
|
}
|
|
295
301
|
|
|
296
|
-
baseline = (await FormatterModule.ScriptFormatter.format(
|
|
297
|
-
|
|
302
|
+
baseline = (await FormatterModule.ScriptFormatter.format(this.#settings, this.#uiSourceCode.contentType(),
|
|
303
|
+
this.#uiSourceCode.mimeType(), baseline))
|
|
298
304
|
.formattedContent;
|
|
299
305
|
const formatCurrentResult = await FormatterModule.ScriptFormatter.format(
|
|
300
|
-
this.#uiSourceCode.contentType(), this.#uiSourceCode.mimeType(), current);
|
|
306
|
+
this.#settings, this.#uiSourceCode.contentType(), this.#uiSourceCode.mimeType(), current);
|
|
301
307
|
current = formatCurrentResult.formattedContent;
|
|
302
308
|
const formattedCurrentMapping = formatCurrentResult.formattedMapping;
|
|
303
309
|
const reNewline = /\r\n?|\n/;
|