chrome-devtools-frontend 1.0.1675430 → 1.0.1678416
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/WATCHLISTS +0 -4
- package/front_end/core/common/EventTarget.ts +0 -5
- package/front_end/core/common/Settings.ts +0 -66
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +5 -0
- package/front_end/core/root/Runtime.ts +5 -5
- package/front_end/core/sdk/CSSMetadata.ts +5 -9
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +16 -34
- package/front_end/core/sdk/DebuggerModel.ts +92 -57
- package/front_end/core/sdk/EmulationModel.ts +2 -1
- package/front_end/core/sdk/NetworkManager.ts +16 -2
- package/front_end/core/sdk/OverlayModel.ts +19 -9
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +10 -4
- package/front_end/core/sdk/ResourceTreeModel.ts +20 -1
- package/front_end/core/sdk/SDKSettings.ts +117 -0
- package/front_end/core/sdk/Script.ts +9 -53
- package/front_end/core/sdk/sdk-meta.ts +0 -431
- package/front_end/devtools_compatibility.js +1 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +213 -23
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +6 -5
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +14 -15
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +157 -0
- package/front_end/entrypoints/main/MainImpl.ts +32 -0
- package/front_end/entrypoints/shell/shell.ts +0 -1
- package/front_end/foundation/Universe.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +8 -8
- package/front_end/generated/SupportedCSSProperties.ts +53 -4
- package/front_end/generated/protocol-mapping.d.ts +27 -21
- package/front_end/generated/protocol-proxy-api.d.ts +22 -17
- package/front_end/generated/protocol.ts +43 -18
- package/front_end/models/ai_assistance/AiAgent2.ts +47 -2
- package/front_end/models/ai_assistance/AiConversation.ts +22 -5
- package/front_end/models/ai_assistance/README.md +52 -26
- package/front_end/models/ai_assistance/agents/AiAgent.ts +54 -8
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +7 -194
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +21 -87
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +24 -0
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +124 -0
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +100 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +69 -1
- package/front_end/models/ai_assistance/skills/README.md +63 -1
- package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +4 -0
- package/front_end/models/ai_assistance/skills/accessibility.md +7 -0
- package/front_end/models/ai_assistance/skills/performance.md +15 -1
- package/front_end/models/ai_assistance/skills/sources.md +16 -0
- package/front_end/models/ai_assistance/skills/storage.md +31 -0
- package/front_end/models/ai_assistance/tools/GetDetailedCallTree.ts +107 -0
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +122 -0
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +127 -0
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +101 -0
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +83 -0
- package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +106 -0
- package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +104 -0
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +95 -0
- package/front_end/models/ai_assistance/tools/ListSources.ts +116 -0
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +89 -0
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +90 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +26 -1
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +22 -0
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +4 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +3 -201
- package/front_end/models/bindings/SASSSourceMapping.ts +6 -0
- package/front_end/models/breakpoints/BreakpointManager.ts +2 -49
- package/front_end/models/comment_manager/CommentManager.ts +141 -0
- package/front_end/models/comment_manager/comment_manager.ts +9 -0
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +27 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +10 -2
- package/front_end/models/issues_manager/descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -6
- package/front_end/models/persistence/IsolatedFileSystem.ts +7 -8
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -2
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/persistence/persistence-meta.ts +9 -9
- package/front_end/models/trace/types/TraceEvents.ts +36 -0
- package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -3
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +25 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +36 -36
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -0
- package/front_end/panels/accessibility/AccessibilityStrings.ts +168 -168
- package/front_end/panels/accessibility/SourceOrderView.ts +7 -7
- package/front_end/panels/accessibility/accessibility-meta.ts +2 -2
- package/front_end/panels/accessibility/accessibility.ts +2 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -3
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +92 -12
- package/front_end/panels/ai_assistance/components/chatMessage.css +6 -0
- package/front_end/panels/application/ApplicationPanelSidebar.ts +10 -4
- package/front_end/panels/application/IndexedDBViews.ts +65 -63
- package/front_end/panels/application/StorageView.ts +116 -45
- package/front_end/panels/application/WebMCPView.ts +16 -7
- package/front_end/panels/application/application-meta.ts +11 -0
- package/front_end/panels/application/components/AdsView.ts +1 -1
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +5 -5
- package/front_end/panels/common/BadgeNotification.ts +8 -8
- package/front_end/panels/common/ExtensionPanel.ts +9 -8
- package/front_end/panels/common/ExtensionServer.ts +21 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +16 -16
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -6
- package/front_end/panels/common/PersistenceUtils.ts +2 -2
- package/front_end/panels/common/common.ts +0 -97
- package/front_end/panels/console/ConsoleInsightTeaser.ts +2 -2
- package/front_end/panels/console/ConsolePanel.ts +4 -0
- package/front_end/panels/console/ConsolePinPane.ts +2 -2
- package/front_end/panels/console/ConsolePrompt.ts +12 -0
- package/front_end/panels/console/ConsoleView.ts +31 -20
- package/front_end/panels/console/ConsoleViewMessage.ts +37 -13
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewModel.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +2 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +455 -372
- package/front_end/panels/elements/LayoutPane.ts +2 -8
- package/front_end/panels/elements/StylePropertyTreeElement.ts +16 -15
- package/front_end/panels/elements/elements-meta.ts +152 -10
- package/front_end/panels/elements/elements.ts +0 -2
- package/front_end/panels/emulation/DeviceModeView.ts +9 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +8 -4
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +25 -14
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -2
- package/front_end/panels/media/PlayerMessagesView.ts +149 -68
- package/front_end/panels/network/BinaryResourceView.ts +134 -81
- package/front_end/panels/network/EventSourceMessagesView.ts +10 -10
- package/front_end/panels/network/FetchHeaderCommenting.ts +291 -0
- package/front_end/panels/network/NetworkConfigView.ts +10 -10
- package/front_end/panels/network/NetworkDataGridNode.ts +14 -14
- package/front_end/panels/network/NetworkItemView.ts +27 -28
- package/front_end/panels/network/NetworkLogView.ts +137 -38
- package/front_end/panels/network/NetworkLogViewColumns.ts +35 -35
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +2 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +5 -5
- package/front_end/panels/network/RequestCookiesView.ts +4 -4
- package/front_end/panels/network/RequestHeadersView.ts +5 -5
- package/front_end/panels/network/RequestPayloadView.ts +4 -3
- package/front_end/panels/network/RequestTimingView.ts +8 -8
- package/front_end/panels/network/ResourceChunkView.ts +1 -1
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -1
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +16 -16
- package/front_end/panels/network/binaryResourceView.css +14 -12
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +2 -2
- package/front_end/panels/network/components/HeaderSectionRow.ts +1 -1
- package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -2
- package/front_end/panels/network/network-meta.ts +1 -1
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +0 -2
- package/front_end/panels/profiler/heapProfiler.css +0 -9
- package/front_end/panels/recorder/RecorderPanel.ts +2 -3
- package/front_end/panels/screencast/ScreencastView.ts +148 -138
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -2
- package/front_end/panels/sources/BreakpointsView.ts +2 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +10 -59
- package/front_end/panels/sources/NavigatorView.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +23 -73
- package/front_end/panels/sources/SourcesView.ts +248 -157
- package/front_end/panels/sources/TabbedEditorContainer.ts +118 -23
- package/front_end/panels/sources/UISourceCodeFrame.ts +5 -9
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -2
- package/front_end/panels/sources/sources-meta.ts +52 -0
- package/front_end/panels/timeline/TimelineController.ts +36 -64
- package/front_end/panels/timeline/TimelinePanel.ts +11 -8
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
- package/front_end/panels/timeline/timelinePanel.css +0 -10
- package/front_end/panels/utils/utils.ts +7 -7
- package/front_end/services/tracing/PerformanceTracing.ts +5 -17
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/package.json +2 -2
- package/front_end/third_party/codemirror.next/rebuild.sh +4 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +430 -35
- package/front_end/ui/comments/CommentOverlayManager.ts +635 -0
- package/front_end/ui/comments/CommentsOverlayWidget.ts +134 -0
- package/front_end/ui/comments/comments.ts +4 -0
- package/front_end/ui/comments/commentsOverlay.css +49 -0
- package/front_end/{panels/common → ui/components/dialogs}/FreDialog.ts +6 -6
- package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +96 -0
- package/front_end/ui/components/dialogs/dialogs.ts +4 -0
- package/front_end/ui/components/settings/SettingCheckbox.ts +3 -3
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionDisclaimer.ts +13 -13
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -6
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionTeaser.ts +43 -46
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +22 -26
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationTeaser.ts +10 -10
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationUpgradeDialog.ts +5 -5
- package/front_end/ui/components/text_editor/text_editor.ts +4 -0
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +0 -56
- package/front_end/ui/legacy/View.ts +10 -4
- package/front_end/ui/legacy/Widget.ts +10 -1
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +2 -1
- package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +5 -4
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +11 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +507 -209
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +5 -0
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -16
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +5 -12
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +38 -20
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +12 -2
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +37 -6
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +22 -4
- package/front_end/ui/settings/SettingUIRegistration.ts +55 -6
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/mcp.ts +6 -1
- package/package.json +6 -6
- package/front_end/Images/toolbarResizerVertical.png +0 -0
- package/front_end/emulated_devices/MotoG4-landscape.svg +0 -155
- package/front_end/emulated_devices/MotoG4-portrait.svg +0 -155
- package/front_end/emulated_devices/Nexus5X-landscape.svg +0 -19
- package/front_end/emulated_devices/Nexus5X-portrait.svg +0 -19
- package/front_end/emulated_devices/Nexus6P-landscape.svg +0 -50
- package/front_end/emulated_devices/Nexus6P-portrait.svg +0 -54
- package/front_end/emulated_devices/google-nest-hub-horizontal.png +0 -0
- package/front_end/emulated_devices/google-nest-hub-max-horizontal.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png +0 -0
- package/front_end/emulated_devices/iPad-landscape.svg +0 -73
- package/front_end/emulated_devices/iPad-portrait.svg +0 -76
- package/front_end/emulated_devices/iPhone5-landscape.svg +0 -99
- package/front_end/emulated_devices/iPhone5-portrait.svg +0 -83
- package/front_end/emulated_devices/iPhone6-landscape.svg +0 -111
- package/front_end/emulated_devices/iPhone6-portrait.svg +0 -116
- package/front_end/emulated_devices/iPhone6Plus-landscape.svg +0 -118
- package/front_end/emulated_devices/iPhone6Plus-portrait.svg +0 -116
- package/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/README.md +0 -9
- package/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/optimized_images.gni +0 -53
- package/front_end/models/ai_assistance/agents/README.md +0 -136
- package/front_end/panels/elements/ElementsTreeOutlineRenderer.ts +0 -89
- package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -27
- /package/front_end/{panels/common → ui/components/dialogs}/freDialog.css +0 -0
- /package/front_end/{panels/common/common.css → ui/components/dialogs/typeToAllowDialog.css} +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionDisclaimer.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionTeaser.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationTeaser.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationUpgradeDialog.css +0 -0
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
|
-
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
8
|
-
import * as Root from '../../core/root/root.js';
|
|
9
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
8
|
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
11
|
-
import * as Protocol from '../../generated/protocol.js';
|
|
12
9
|
import * as Formatter from '../formatter/formatter.js';
|
|
13
10
|
import * as Workspace from '../workspace/workspace.js';
|
|
14
11
|
|
|
@@ -17,21 +14,6 @@ import {type DebuggerSourceMapping, DebuggerWorkspaceBinding} from './DebuggerWo
|
|
|
17
14
|
import {NetworkProject} from './NetworkProject.js';
|
|
18
15
|
import {metadataForURL} from './ResourceUtils.js';
|
|
19
16
|
|
|
20
|
-
const UIStrings = {
|
|
21
|
-
/**
|
|
22
|
-
* @description Error text displayed in the Console panel when editing a live script fails. LiveEdit is the name of the feature for editing code that is already running.
|
|
23
|
-
* @example {warning} PH1
|
|
24
|
-
*/
|
|
25
|
-
liveEditFailed: '`LiveEdit` failed: {PH1}',
|
|
26
|
-
/**
|
|
27
|
-
* @description Error text displayed in the Console panel when compiling a live-edited script fails. LiveEdit is the name of the feature for editing code that is already running.
|
|
28
|
-
* @example {connection lost} PH1
|
|
29
|
-
*/
|
|
30
|
-
liveEditCompileFailed: '`LiveEdit` compile failed: {PH1}',
|
|
31
|
-
} as const;
|
|
32
|
-
const str_ = i18n.i18n.registerUIStrings('models/bindings/ResourceScriptMapping.ts', UIStrings);
|
|
33
|
-
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
34
|
-
|
|
35
17
|
export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
36
18
|
readonly debuggerModel: SDK.DebuggerModel.DebuggerModel;
|
|
37
19
|
#workspace: Workspace.Workspace.WorkspaceImpl;
|
|
@@ -96,9 +78,6 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
|
96
78
|
if (!scriptFile) {
|
|
97
79
|
return null;
|
|
98
80
|
}
|
|
99
|
-
if ((scriptFile.hasDivergedFromVM() && !scriptFile.isMergingToVM()) || scriptFile.isDivergingFromVM()) {
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
81
|
if (scriptFile.script !== script) {
|
|
103
82
|
return null;
|
|
104
83
|
}
|
|
@@ -205,8 +184,7 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
|
205
184
|
}
|
|
206
185
|
|
|
207
186
|
private addScript(script: SDK.Script.Script): void {
|
|
208
|
-
|
|
209
|
-
if (script.isLiveEdit() || script.isBreakpointCondition) {
|
|
187
|
+
if (script.isBreakpointCondition) {
|
|
210
188
|
return;
|
|
211
189
|
}
|
|
212
190
|
|
|
@@ -272,10 +250,6 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
|
272
250
|
if (!uiSourceCode) {
|
|
273
251
|
continue;
|
|
274
252
|
}
|
|
275
|
-
const scriptFile = this.#uiSourceCodeToScriptFile.get(uiSourceCode);
|
|
276
|
-
if (scriptFile) {
|
|
277
|
-
scriptFile.dispose();
|
|
278
|
-
}
|
|
279
253
|
|
|
280
254
|
this.#uiSourceCodeToScriptFile.delete(uiSourceCode);
|
|
281
255
|
this.#scriptToUISourceCode.delete(script);
|
|
@@ -325,177 +299,17 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
|
325
299
|
}
|
|
326
300
|
}
|
|
327
301
|
|
|
328
|
-
export class ResourceScriptFile
|
|
302
|
+
export class ResourceScriptFile {
|
|
329
303
|
readonly #resourceScriptMapping: ResourceScriptMapping;
|
|
330
304
|
readonly uiSourceCode: Workspace.UISourceCode.UISourceCode;
|
|
331
305
|
readonly script: SDK.Script.Script|null;
|
|
332
|
-
|
|
333
|
-
#isDivergingFromVM?: boolean;
|
|
334
|
-
#hasDivergedFromVM?: boolean;
|
|
335
|
-
#isMergingToVM?: boolean;
|
|
336
|
-
#updateMutex = new Common.Mutex.Mutex();
|
|
306
|
+
|
|
337
307
|
constructor(
|
|
338
308
|
resourceScriptMapping: ResourceScriptMapping, uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
339
309
|
script: SDK.Script.Script) {
|
|
340
|
-
super();
|
|
341
310
|
this.#resourceScriptMapping = resourceScriptMapping;
|
|
342
311
|
this.uiSourceCode = uiSourceCode;
|
|
343
312
|
this.script = this.uiSourceCode.contentType().isScript() ? script : null;
|
|
344
|
-
|
|
345
|
-
this.uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.workingCopyChanged, this);
|
|
346
|
-
this.uiSourceCode.addEventListener(
|
|
347
|
-
Workspace.UISourceCode.Events.WorkingCopyCommitted, this.workingCopyCommitted, this);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
private isDiverged(): boolean {
|
|
351
|
-
if (this.uiSourceCode.isDirty()) {
|
|
352
|
-
return true;
|
|
353
|
-
}
|
|
354
|
-
if (!this.script) {
|
|
355
|
-
return false;
|
|
356
|
-
}
|
|
357
|
-
if (typeof this.#scriptSource === 'undefined' || this.#scriptSource === null) {
|
|
358
|
-
return false;
|
|
359
|
-
}
|
|
360
|
-
const workingCopy = this.uiSourceCode.workingCopy();
|
|
361
|
-
if (!workingCopy) {
|
|
362
|
-
return false;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// Match ignoring sourceURL.
|
|
366
|
-
if (!workingCopy.startsWith(this.#scriptSource.trimEnd())) {
|
|
367
|
-
return true;
|
|
368
|
-
}
|
|
369
|
-
const suffix = this.uiSourceCode.workingCopy().substr(this.#scriptSource.length);
|
|
370
|
-
return Boolean(suffix.length) && !suffix.match(SDK.Script.sourceURLRegex);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
private workingCopyChanged(): void {
|
|
374
|
-
void this.update();
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
private workingCopyCommitted(): void {
|
|
378
|
-
// This feature flag is for turning down live edit. If it's not present, we keep the feature enabled.
|
|
379
|
-
if (Root.Runtime.hostConfig.devToolsLiveEdit?.enabled === false) {
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
if (this.uiSourceCode.project().canSetFileContent()) {
|
|
384
|
-
return;
|
|
385
|
-
}
|
|
386
|
-
if (!this.script) {
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
const source = this.uiSourceCode.workingCopy();
|
|
391
|
-
void this.script.editSource(source).then(({status, exceptionDetails}) => {
|
|
392
|
-
void this.scriptSourceWasSet(source, status, exceptionDetails);
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
async scriptSourceWasSet(
|
|
397
|
-
source: string, status: Protocol.Debugger.SetScriptSourceResponseStatus,
|
|
398
|
-
exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<void> {
|
|
399
|
-
if (status === Protocol.Debugger.SetScriptSourceResponseStatus.Ok) {
|
|
400
|
-
this.#scriptSource = source;
|
|
401
|
-
}
|
|
402
|
-
await this.update();
|
|
403
|
-
|
|
404
|
-
if (status === Protocol.Debugger.SetScriptSourceResponseStatus.Ok) {
|
|
405
|
-
return;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
if (!exceptionDetails) {
|
|
409
|
-
// TODO(crbug.com/1334484): Instead of to the console, report these errors in an "info bar" at the bottom
|
|
410
|
-
// of the text editor, similar to e.g. source mapping errors.
|
|
411
|
-
// eslint-disable-next-line @devtools/no-instance-of-migrated-singletons
|
|
412
|
-
Common.Console.Console.instance().addMessage(
|
|
413
|
-
i18nString(UIStrings.liveEditFailed, {PH1: getErrorText(status)}), Common.Console.MessageLevel.WARNING);
|
|
414
|
-
return;
|
|
415
|
-
}
|
|
416
|
-
const messageText = i18nString(UIStrings.liveEditCompileFailed, {PH1: exceptionDetails.text});
|
|
417
|
-
this.uiSourceCode.addLineMessage(
|
|
418
|
-
Workspace.UISourceCode.Message.Level.ERROR, messageText, exceptionDetails.lineNumber,
|
|
419
|
-
exceptionDetails.columnNumber);
|
|
420
|
-
|
|
421
|
-
function getErrorText(status: Protocol.Debugger.SetScriptSourceResponseStatus): string {
|
|
422
|
-
switch (status) {
|
|
423
|
-
case Protocol.Debugger.SetScriptSourceResponseStatus.BlockedByActiveFunction:
|
|
424
|
-
return 'Functions that are on the stack (currently being executed) can’t be edited';
|
|
425
|
-
case Protocol.Debugger.SetScriptSourceResponseStatus.BlockedByActiveGenerator:
|
|
426
|
-
return 'Async functions/generators that are active can’t be edited';
|
|
427
|
-
case Protocol.Debugger.SetScriptSourceResponseStatus.BlockedByTopLevelEsModuleChange:
|
|
428
|
-
return 'The top level of JavaScript modules can’t be edited';
|
|
429
|
-
case Protocol.Debugger.SetScriptSourceResponseStatus.CompileError:
|
|
430
|
-
case Protocol.Debugger.SetScriptSourceResponseStatus.Ok:
|
|
431
|
-
throw new Error('Compile errors and Ok status must not be reported on the console');
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
private async update(): Promise<void> {
|
|
437
|
-
// Do not interleave "divergeFromVM" with "mergeToVM" calls.
|
|
438
|
-
const release = await this.#updateMutex.acquire();
|
|
439
|
-
const diverged = this.isDiverged();
|
|
440
|
-
if (diverged && !this.#hasDivergedFromVM) {
|
|
441
|
-
await this.divergeFromVM();
|
|
442
|
-
} else if (!diverged && this.#hasDivergedFromVM) {
|
|
443
|
-
await this.mergeToVM();
|
|
444
|
-
}
|
|
445
|
-
release();
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
private async divergeFromVM(): Promise<void> {
|
|
449
|
-
if (this.script) {
|
|
450
|
-
this.#isDivergingFromVM = true;
|
|
451
|
-
await this.#resourceScriptMapping.debuggerWorkspaceBinding.updateLocations(this.script);
|
|
452
|
-
this.#isDivergingFromVM = undefined;
|
|
453
|
-
this.#hasDivergedFromVM = true;
|
|
454
|
-
this.dispatchEventToListeners(ResourceScriptFile.Events.DID_DIVERGE_FROM_VM);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
private async mergeToVM(): Promise<void> {
|
|
459
|
-
if (this.script) {
|
|
460
|
-
this.#hasDivergedFromVM = undefined;
|
|
461
|
-
this.#isMergingToVM = true;
|
|
462
|
-
await this.#resourceScriptMapping.debuggerWorkspaceBinding.updateLocations(this.script);
|
|
463
|
-
this.#isMergingToVM = undefined;
|
|
464
|
-
this.dispatchEventToListeners(ResourceScriptFile.Events.DID_MERGE_TO_VM);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
hasDivergedFromVM(): boolean {
|
|
469
|
-
return Boolean(this.#hasDivergedFromVM);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
isDivergingFromVM(): boolean {
|
|
473
|
-
return Boolean(this.#isDivergingFromVM);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
isMergingToVM(): boolean {
|
|
477
|
-
return Boolean(this.#isMergingToVM);
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
checkMapping(): void {
|
|
481
|
-
if (!this.script || typeof this.#scriptSource !== 'undefined') {
|
|
482
|
-
this.mappingCheckedForTest();
|
|
483
|
-
return;
|
|
484
|
-
}
|
|
485
|
-
void this.script.requestContentData().then(content => {
|
|
486
|
-
this.#scriptSource = TextUtils.ContentData.ContentData.textOr(content, null);
|
|
487
|
-
void this.update().then(() => this.mappingCheckedForTest());
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
private mappingCheckedForTest(): void {
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
dispose(): void {
|
|
495
|
-
this.uiSourceCode.removeEventListener(
|
|
496
|
-
Workspace.UISourceCode.Events.WorkingCopyChanged, this.workingCopyChanged, this);
|
|
497
|
-
this.uiSourceCode.removeEventListener(
|
|
498
|
-
Workspace.UISourceCode.Events.WorkingCopyCommitted, this.workingCopyCommitted, this);
|
|
499
313
|
}
|
|
500
314
|
|
|
501
315
|
addSourceMapURL(sourceMapURL: Platform.DevToolsPath.UrlString): void {
|
|
@@ -527,15 +341,3 @@ export class ResourceScriptFile extends Common.ObjectWrapper.ObjectWrapper<Resou
|
|
|
527
341
|
return sources && 'missingSymbolFiles' in sources ? sources.missingSymbolFiles : null;
|
|
528
342
|
}
|
|
529
343
|
}
|
|
530
|
-
|
|
531
|
-
export namespace ResourceScriptFile {
|
|
532
|
-
export const enum Events {
|
|
533
|
-
DID_MERGE_TO_VM = 'DidMergeToVM',
|
|
534
|
-
DID_DIVERGE_FROM_VM = 'DidDivergeFromVM',
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
export interface EventTypes {
|
|
538
|
-
[Events.DID_MERGE_TO_VM]: void;
|
|
539
|
-
[Events.DID_DIVERGE_FROM_VM]: void;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
@@ -140,6 +140,12 @@ export class SASSSourceMapping implements SourceMapping {
|
|
|
140
140
|
return [];
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
static sourceMapURLsForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode):
|
|
144
|
+
Platform.DevToolsPath.UrlString[] {
|
|
145
|
+
const binding = uiSourceCodeToBinding.get(uiSourceCode);
|
|
146
|
+
return binding?.getReferringSourceMaps().map(sourceMap => sourceMap.url()) ?? [];
|
|
147
|
+
}
|
|
148
|
+
|
|
143
149
|
dispose(): void {
|
|
144
150
|
Common.EventTarget.removeEventListeners(this.#eventListeners);
|
|
145
151
|
this.#project.dispose();
|
|
@@ -8,7 +8,7 @@ import {assertNotNullOrUndefined} from '../../core/platform/platform.js';
|
|
|
8
8
|
import * as Root from '../../core/root/root.js';
|
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
10
|
import type * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
11
|
-
import * as Protocol from '../../generated/protocol.js';
|
|
11
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
12
12
|
import * as Bindings from '../bindings/bindings.js';
|
|
13
13
|
import * as Formatter from '../formatter/formatter.js';
|
|
14
14
|
import * as SourceMapScopes from '../source_map_scopes/source_map_scopes.js';
|
|
@@ -608,7 +608,6 @@ export class Breakpoint implements SDK.TargetManager.SDKModelObserver<SDK.Debugg
|
|
|
608
608
|
|
|
609
609
|
debuggerModel.addEventListener(SDK.DebuggerModel.Events.DebuggerWasEnabled, this.#onDebuggerEnabled, this);
|
|
610
610
|
debuggerModel.addEventListener(SDK.DebuggerModel.Events.DebuggerWasDisabled, this.#onDebuggerDisabled, this);
|
|
611
|
-
debuggerModel.addEventListener(SDK.DebuggerModel.Events.ScriptSourceWasEdited, this.#onScriptWasEdited, this);
|
|
612
611
|
}
|
|
613
612
|
|
|
614
613
|
modelRemoved(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {
|
|
@@ -622,7 +621,6 @@ export class Breakpoint implements SDK.TargetManager.SDKModelObserver<SDK.Debugg
|
|
|
622
621
|
#removeDebuggerModelListeners(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {
|
|
623
622
|
debuggerModel.removeEventListener(SDK.DebuggerModel.Events.DebuggerWasEnabled, this.#onDebuggerEnabled, this);
|
|
624
623
|
debuggerModel.removeEventListener(SDK.DebuggerModel.Events.DebuggerWasDisabled, this.#onDebuggerDisabled, this);
|
|
625
|
-
debuggerModel.removeEventListener(SDK.DebuggerModel.Events.ScriptSourceWasEdited, this.#onScriptWasEdited, this);
|
|
626
624
|
}
|
|
627
625
|
|
|
628
626
|
#onDebuggerEnabled(event: Common.EventTarget.EventTargetEvent<SDK.DebuggerModel.DebuggerModel>): void {
|
|
@@ -639,29 +637,6 @@ export class Breakpoint implements SDK.TargetManager.SDKModelObserver<SDK.Debugg
|
|
|
639
637
|
model?.cleanUpAfterDebuggerIsGone();
|
|
640
638
|
}
|
|
641
639
|
|
|
642
|
-
async #onScriptWasEdited(
|
|
643
|
-
event: Common.EventTarget
|
|
644
|
-
.EventTargetEvent<{script: SDK.Script.Script, status: Protocol.Debugger.SetScriptSourceResponseStatus}>):
|
|
645
|
-
Promise<void> {
|
|
646
|
-
const {source: debuggerModel, data: {script, status}} = event;
|
|
647
|
-
if (status !== Protocol.Debugger.SetScriptSourceResponseStatus.Ok) {
|
|
648
|
-
return;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
// V8 throws away breakpoints on all functions in a live edited script. Here we attempt to re-set them again at the
|
|
652
|
-
// same position. This is because we don't know what was edited and how the breakpoint should move, e.g. if the file
|
|
653
|
-
// was originally changed on the filesystem (via workspace).
|
|
654
|
-
// If the live edit originated in DevTools (in CodeMirror), then the `DebuggerPlugin` will remove the breakpoint
|
|
655
|
-
// wholesale and re-apply based on the diff.
|
|
656
|
-
|
|
657
|
-
console.assert(debuggerModel instanceof SDK.DebuggerModel.DebuggerModel);
|
|
658
|
-
const model = this.#modelBreakpoints.get(debuggerModel as SDK.DebuggerModel.DebuggerModel);
|
|
659
|
-
if (model?.wasSetIn(script.scriptId)) {
|
|
660
|
-
await model.resetBreakpoint();
|
|
661
|
-
void this.#updateModel(model);
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
|
|
665
640
|
modelBreakpoint(debuggerModel: SDK.DebuggerModel.DebuggerModel): ModelBreakpoint|undefined {
|
|
666
641
|
return this.#modelBreakpoints.get(debuggerModel);
|
|
667
642
|
}
|
|
@@ -966,11 +941,6 @@ export class ModelBreakpoint {
|
|
|
966
941
|
#cancelCallback = false;
|
|
967
942
|
#currentState: Breakpoint.State|null = null;
|
|
968
943
|
#breakpointIds: Protocol.Debugger.BreakpointId[] = [];
|
|
969
|
-
/**
|
|
970
|
-
* We track all the script IDs this ModelBreakpoint was actually set in. This allows us
|
|
971
|
-
* to properly reset this ModelBreakpoint after a script was live edited.
|
|
972
|
-
*/
|
|
973
|
-
#resolvedScriptIds = new Set<Protocol.Runtime.ScriptId>();
|
|
974
944
|
|
|
975
945
|
constructor(
|
|
976
946
|
debuggerModel: SDK.DebuggerModel.DebuggerModel, breakpoint: Breakpoint,
|
|
@@ -991,7 +961,6 @@ export class ModelBreakpoint {
|
|
|
991
961
|
|
|
992
962
|
this.#uiLocations.clear();
|
|
993
963
|
this.#liveLocations.disposeAll();
|
|
994
|
-
this.#resolvedScriptIds.clear();
|
|
995
964
|
}
|
|
996
965
|
|
|
997
966
|
async scheduleUpdateInDebugger(): Promise<ScheduleUpdateResult> {
|
|
@@ -1021,16 +990,6 @@ export class ModelBreakpoint {
|
|
|
1021
990
|
return result;
|
|
1022
991
|
}
|
|
1023
992
|
|
|
1024
|
-
private scriptDiverged(): boolean {
|
|
1025
|
-
for (const uiSourceCode of this.#breakpoint.getUiSourceCodes()) {
|
|
1026
|
-
const scriptFile = this.#debuggerWorkspaceBinding.scriptFile(uiSourceCode, this.#debuggerModel);
|
|
1027
|
-
if (scriptFile?.hasDivergedFromVM()) {
|
|
1028
|
-
return true;
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
return false;
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
993
|
async #updateInDebugger(): Promise<DebuggerUpdateResult> {
|
|
1035
994
|
if (this.#debuggerModel.target().isDisposed()) {
|
|
1036
995
|
this.cleanUpAfterDebuggerIsGone();
|
|
@@ -1042,7 +1001,7 @@ export class ModelBreakpoint {
|
|
|
1042
1001
|
|
|
1043
1002
|
// Calculate the new state.
|
|
1044
1003
|
let newState: Breakpoint.State|null = null;
|
|
1045
|
-
if (!this.#breakpoint.getIsRemoved() && this.#breakpoint.enabled()
|
|
1004
|
+
if (!this.#breakpoint.getIsRemoved() && this.#breakpoint.enabled()) {
|
|
1046
1005
|
let debuggerLocations: SDK.DebuggerModel.Location[] = [];
|
|
1047
1006
|
for (const uiSourceCode of this.#breakpoint.getUiSourceCodes()) {
|
|
1048
1007
|
const {lineNumber: uiLineNumber, columnNumber: uiColumnNumber} =
|
|
@@ -1226,7 +1185,6 @@ export class ModelBreakpoint {
|
|
|
1226
1185
|
}
|
|
1227
1186
|
|
|
1228
1187
|
private async addResolvedLocation(location: SDK.DebuggerModel.Location): Promise<ResolveLocationResult> {
|
|
1229
|
-
this.#resolvedScriptIds.add(location.scriptId);
|
|
1230
1188
|
const uiLocation = await this.#debuggerWorkspaceBinding.rawLocationToUILocation(location);
|
|
1231
1189
|
if (!uiLocation) {
|
|
1232
1190
|
return ResolveLocationResult.OK;
|
|
@@ -1249,11 +1207,6 @@ export class ModelBreakpoint {
|
|
|
1249
1207
|
this.didRemoveFromDebugger();
|
|
1250
1208
|
}
|
|
1251
1209
|
}
|
|
1252
|
-
|
|
1253
|
-
/** @returns true, iff this `ModelBreakpoint` was set (at some point) in `scriptId` */
|
|
1254
|
-
wasSetIn(scriptId: Protocol.Runtime.ScriptId): boolean {
|
|
1255
|
-
return this.#resolvedScriptIds.has(scriptId);
|
|
1256
|
-
}
|
|
1257
1210
|
}
|
|
1258
1211
|
|
|
1259
1212
|
/**
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Common from '../../core/common/common.js';
|
|
6
|
+
import * as Root from '../../core/root/root.js';
|
|
7
|
+
|
|
8
|
+
export interface EditorAnchorSignature {
|
|
9
|
+
/** 1-based line number for CodeMirror text editor anchors */
|
|
10
|
+
lineNumber: number;
|
|
11
|
+
/** File path associated with the editor */
|
|
12
|
+
filePath?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CommentAnchorSignature {
|
|
16
|
+
/** Visual logging tree path, e.g. "Panel: elements > Pane: styles > TreeOutline > TreeItem: color" */
|
|
17
|
+
vePath: string;
|
|
18
|
+
/** Normalized text content of the target node */
|
|
19
|
+
textSignature: string;
|
|
20
|
+
/** Text content of the parent container VE node for sibling disambiguation */
|
|
21
|
+
parentTextSignature?: string;
|
|
22
|
+
/** 0-indexed position among siblings sharing the same visual logging path */
|
|
23
|
+
siblingIndex?: number;
|
|
24
|
+
/** Optional backend RequestId for Network panel elements (`data-network-request-id`) */
|
|
25
|
+
networkRequestId?: string;
|
|
26
|
+
/** Optional backend NodeId for Elements panel DOM nodes (`data-backend-node-id`) */
|
|
27
|
+
backendNodeId?: number;
|
|
28
|
+
/** Optional editor anchor coordinates for CodeMirror text editors */
|
|
29
|
+
editor?: EditorAnchorSignature;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Comment {
|
|
33
|
+
author: 'DEVELOPER'|'AGENT';
|
|
34
|
+
text: string;
|
|
35
|
+
timestamp: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface CommentThread {
|
|
39
|
+
id: string;
|
|
40
|
+
anchor: CommentAnchorSignature;
|
|
41
|
+
comments: Comment[];
|
|
42
|
+
status: 'ACTIVE'|'RESOLVED';
|
|
43
|
+
changes?: Array<Record<string, unknown>>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface CommentManagerCreationOptions {
|
|
47
|
+
forceNew?: boolean|null;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const enum Events {
|
|
51
|
+
COMMENT_THREADS_CHANGED = 'CommentThreadsChanged',
|
|
52
|
+
COMMENT_MODE_CHANGED = 'CommentModeChanged',
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface EventTypes {
|
|
56
|
+
[Events.COMMENT_THREADS_CHANGED]: CommentThread[];
|
|
57
|
+
[Events.COMMENT_MODE_CHANGED]: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Headless model managing comment thread data, CRUD operations, and comment mode.
|
|
62
|
+
*/
|
|
63
|
+
export class CommentManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
64
|
+
readonly #commentThreads = new Map<string, CommentThread>();
|
|
65
|
+
#commentMode = false;
|
|
66
|
+
#nextId = 1;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* IMPORTANT: This method MUST only be called in MainImpl. All other components
|
|
70
|
+
* should receive CommentManager via dependency injection (INJECT or constructor argument).
|
|
71
|
+
*/
|
|
72
|
+
static instance(opts: CommentManagerCreationOptions = {forceNew: null}): CommentManager {
|
|
73
|
+
const {forceNew} = opts;
|
|
74
|
+
if (!Root.DevToolsContext.globalInstance().has(CommentManager) || forceNew) {
|
|
75
|
+
Root.DevToolsContext.globalInstance().set(CommentManager, new CommentManager());
|
|
76
|
+
}
|
|
77
|
+
return Root.DevToolsContext.globalInstance().get(CommentManager);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static removeInstance(): void {
|
|
81
|
+
Root.DevToolsContext.globalInstance().delete(CommentManager);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
setCommentMode(active: boolean): void {
|
|
85
|
+
if (this.#commentMode === active) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.#commentMode = active;
|
|
89
|
+
this.dispatchEventToListeners(Events.COMMENT_MODE_CHANGED, active);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
isCommentMode(): boolean {
|
|
93
|
+
return this.#commentMode;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
createCommentThread(
|
|
97
|
+
anchor: CommentAnchorSignature,
|
|
98
|
+
text: string,
|
|
99
|
+
author: 'DEVELOPER'|'AGENT' = 'DEVELOPER',
|
|
100
|
+
changes?: Array<Record<string, unknown>>,
|
|
101
|
+
): CommentThread {
|
|
102
|
+
const id = `comment-${this.#nextId++}`;
|
|
103
|
+
const thread: CommentThread = {
|
|
104
|
+
id,
|
|
105
|
+
anchor,
|
|
106
|
+
comments: [{
|
|
107
|
+
author,
|
|
108
|
+
text,
|
|
109
|
+
timestamp: Date.now(),
|
|
110
|
+
}],
|
|
111
|
+
status: 'ACTIVE',
|
|
112
|
+
changes,
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
this.#commentThreads.set(id, thread);
|
|
116
|
+
this.dispatchEventToListeners(Events.COMMENT_THREADS_CHANGED, this.getCommentThreads());
|
|
117
|
+
return thread;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
getCommentThread(id: string): CommentThread|undefined {
|
|
121
|
+
return this.#commentThreads.get(id);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
getCommentThreads(): CommentThread[] {
|
|
125
|
+
return Array.from(this.#commentThreads.values());
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
removeCommentThread(id: string): void {
|
|
129
|
+
if (!this.#commentThreads.has(id)) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this.#commentThreads.delete(id);
|
|
133
|
+
this.dispatchEventToListeners(Events.COMMENT_THREADS_CHANGED, this.getCommentThreads());
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
clear(): void {
|
|
137
|
+
this.setCommentMode(false);
|
|
138
|
+
this.#commentThreads.clear();
|
|
139
|
+
this.dispatchEventToListeners(Events.COMMENT_THREADS_CHANGED, []);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -335,6 +335,15 @@ export interface NativeContextSizes {
|
|
|
335
335
|
noAttributionSize: number;
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
+
export interface RetainedByContextSummary {
|
|
339
|
+
contextCount: number;
|
|
340
|
+
retainedByContextSize: number;
|
|
341
|
+
retainedByContextCount: number;
|
|
342
|
+
notRetainedByContextSize: number;
|
|
343
|
+
notRetainedByContextCount: number;
|
|
344
|
+
totalSize: number;
|
|
345
|
+
}
|
|
346
|
+
|
|
338
347
|
export const enum DOMLinkState {
|
|
339
348
|
UNKNOWN = 0,
|
|
340
349
|
ATTACHED = 1,
|
|
@@ -353,3 +362,21 @@ export interface ObjectInfo {
|
|
|
353
362
|
edgeCount: number;
|
|
354
363
|
retainerCount: number;
|
|
355
364
|
}
|
|
365
|
+
|
|
366
|
+
export interface HeapQueryOptions {
|
|
367
|
+
className?: string;
|
|
368
|
+
propertyName?: string;
|
|
369
|
+
nodeType?: string;
|
|
370
|
+
minRetainedSize?: number;
|
|
371
|
+
maxRetainedSize?: number;
|
|
372
|
+
minSelfSize?: number;
|
|
373
|
+
maxSelfSize?: number;
|
|
374
|
+
isDetached?: boolean;
|
|
375
|
+
sortBy?: 'retainedSize'|'selfSize'|'id';
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export interface HeapEdgesQueryOptions {
|
|
379
|
+
sortBy?: 'retainedSize'|'selfSize'|'name';
|
|
380
|
+
minRetainedSize?: number;
|
|
381
|
+
excludePrimitives?: boolean;
|
|
382
|
+
}
|
|
@@ -280,6 +280,10 @@ export class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
280
280
|
return this.callMethodPromise('getNativeContextSizes');
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
+
getRetainedByContextSummary(): Promise<HeapSnapshotModel.RetainedByContextSummary> {
|
|
284
|
+
return this.callMethodPromise('getRetainedByContextSummary');
|
|
285
|
+
}
|
|
286
|
+
|
|
283
287
|
aggregatesWithFilter(filter: HeapSnapshotModel.NodeFilter):
|
|
284
288
|
Promise<Record<string, HeapSnapshotModel.AggregatedInfo>> {
|
|
285
289
|
return this.callMethodPromise('aggregatesWithFilter', filter);
|
|
@@ -312,8 +316,8 @@ export class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
312
316
|
return this.callMethodPromise('getObjectInfo', nodeIndex);
|
|
313
317
|
}
|
|
314
318
|
|
|
315
|
-
createEdgesProvider(nodeIndex: number): HeapSnapshotProviderProxy {
|
|
316
|
-
return this.callFactoryMethod('createEdgesProvider', HeapSnapshotProviderProxy, nodeIndex);
|
|
319
|
+
createEdgesProvider(nodeIndex: number, options?: HeapSnapshotModel.HeapEdgesQueryOptions): HeapSnapshotProviderProxy {
|
|
320
|
+
return this.callFactoryMethod('createEdgesProvider', HeapSnapshotProviderProxy, nodeIndex, options);
|
|
317
321
|
}
|
|
318
322
|
|
|
319
323
|
createRetainingEdgesProvider(nodeIndex: number): HeapSnapshotProviderProxy {
|
|
@@ -336,6 +340,10 @@ export class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
336
340
|
return this.callFactoryMethod('createNodesProviderForClass', HeapSnapshotProviderProxy, classKey, nodeFilter);
|
|
337
341
|
}
|
|
338
342
|
|
|
343
|
+
queryObjects(queryOptions: HeapSnapshotModel.HeapQueryOptions): HeapSnapshotProviderProxy {
|
|
344
|
+
return this.callFactoryMethod('queryObjects', HeapSnapshotProviderProxy, queryOptions);
|
|
345
|
+
}
|
|
346
|
+
|
|
339
347
|
allocationTracesTops(): Promise<HeapSnapshotModel.SerializedAllocationNode[]> {
|
|
340
348
|
return this.callMethodPromise('allocationTracesTops');
|
|
341
349
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# A framed document did not accept its embedder's `Connection-Allowlist`.
|
|
2
|
+
|
|
3
|
+
An embedder can require a framed document to enforce a `Connection-Allowlist` by
|
|
4
|
+
setting the `connectionallowlist` attribute on the frame. The framed document
|
|
5
|
+
must agree, in one of two ways:
|
|
6
|
+
|
|
7
|
+
* by responding with an `Allow-Connection-Allowlist-From` header naming the
|
|
8
|
+
embedder's origin (or `*` to accept any embedder), which installs the
|
|
9
|
+
embedder's allowlist on the framed document, or
|
|
10
|
+
* by responding with a `Connection-Allowlist` header of its own that is at
|
|
11
|
+
least as strict as the one required, which is then enforced instead.
|
|
12
|
+
|
|
13
|
+
This response did neither, so it was not displayed.
|
|
14
|
+
|
|
15
|
+
For example, a document framed by an embedder requiring
|
|
16
|
+
`("https://cdn.example/")` may accept that requirement outright:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Allow-Connection-Allowlist-From: *
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
or satisfy it with an allowlist that is no more permissive:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Connection-Allowlist: ("https://cdn.example/")
|
|
26
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# A frame's `connectionallowlist` attribute was discarded.
|
|
2
|
+
|
|
3
|
+
An embedder can require a framed document to enforce a `Connection-Allowlist` by
|
|
4
|
+
setting the `connectionallowlist` attribute on the frame. When a requirement is
|
|
5
|
+
already in effect for the embedder itself, a nested frame's attribute may only
|
|
6
|
+
make that requirement stricter, never looser.
|
|
7
|
+
|
|
8
|
+
This frame's attribute allowed connections that the requirement it inherits from
|
|
9
|
+
an ancestor does not, so the attribute was discarded and the inherited
|
|
10
|
+
requirement applies unchanged.
|
|
11
|
+
|
|
12
|
+
For example, the nested frame below cannot re-admit `https://example.com/`, so
|
|
13
|
+
it inherits `("https://cdn.example/")` rather than the value it asked for:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
<!-- Framed by an ancestor that requires ("https://cdn.example/"): -->
|
|
17
|
+
<iframe connectionallowlist='("https://cdn.example/" "https://example.com/")'
|
|
18
|
+
src="..."></iframe>
|
|
19
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# The `Allow-Connection-Allowlist-From` header is invalid.
|
|
2
|
+
|
|
3
|
+
A document that is framed by an embedder requiring a `Connection-Allowlist` can
|
|
4
|
+
accept that requirement by responding with an `Allow-Connection-Allowlist-From`
|
|
5
|
+
header. The header's value must be either `*`, or a single serialized origin
|
|
6
|
+
naming the embedder whose requirement it is willing to accept.
|
|
7
|
+
|
|
8
|
+
This response's header was neither, so it could not be used to accept the
|
|
9
|
+
embedder's requirement.
|
|
10
|
+
|
|
11
|
+
For example, both of the following are valid:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Allow-Connection-Allowlist-From: *
|
|
15
|
+
Allow-Connection-Allowlist-From: https://example.com
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Note that an origin's serialization has no trailing slash, and carries no path,
|
|
19
|
+
query, or userinfo. Values like `https://example.com/` and
|
|
20
|
+
`https://user@example.com/path` are therefore rejected rather than being
|
|
21
|
+
silently reinterpreted as `https://example.com`.
|