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
|
@@ -501,21 +501,11 @@ export class HeapSnapshotNode implements HeapSnapshotItem {
|
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
#detachednessAndClassIndex(): number {
|
|
504
|
-
|
|
505
|
-
const nodeDetachednessAndClassIndexOffset = snapshot.nodeDetachednessAndClassIndexOffset;
|
|
506
|
-
return nodeDetachednessAndClassIndexOffset !== -1 ?
|
|
507
|
-
snapshot.nodes.getValue(nodeIndex + nodeDetachednessAndClassIndexOffset) :
|
|
508
|
-
(snapshot.detachednessAndClassIndexArray as Uint32Array)[nodeIndex / snapshot.nodeFieldCount];
|
|
504
|
+
return this.snapshot.detachednessAndClassIndexArray[this.nodeIndex / this.snapshot.nodeFieldCount];
|
|
509
505
|
}
|
|
510
506
|
|
|
511
507
|
#setDetachednessAndClassIndex(value: number): void {
|
|
512
|
-
|
|
513
|
-
const nodeDetachednessAndClassIndexOffset = snapshot.nodeDetachednessAndClassIndexOffset;
|
|
514
|
-
if (nodeDetachednessAndClassIndexOffset !== -1) {
|
|
515
|
-
snapshot.nodes.setValue(nodeIndex + nodeDetachednessAndClassIndexOffset, value);
|
|
516
|
-
} else {
|
|
517
|
-
(snapshot.detachednessAndClassIndexArray as Uint32Array)[nodeIndex / snapshot.nodeFieldCount] = value;
|
|
518
|
-
}
|
|
508
|
+
this.snapshot.detachednessAndClassIndexArray[this.nodeIndex / this.snapshot.nodeFieldCount] = value;
|
|
519
509
|
}
|
|
520
510
|
|
|
521
511
|
detachedness(): HeapSnapshotModel.HeapSnapshotModel.DOMLinkState {
|
|
@@ -1010,7 +1000,7 @@ export abstract class HeapSnapshot {
|
|
|
1010
1000
|
#ignoredEdgesInRetainersView = new Set<number>();
|
|
1011
1001
|
#nodeDistancesForRetainersView: Int32Array|undefined;
|
|
1012
1002
|
#edgeNamesThatAreNotWeakMaps: Platform.TypedArrayUtilities.BitVector;
|
|
1013
|
-
detachednessAndClassIndexArray
|
|
1003
|
+
detachednessAndClassIndexArray!: Uint32Array;
|
|
1014
1004
|
nodeNativeContextAttribution!: Int32Array;
|
|
1015
1005
|
#nativeContextSizes!: HeapSnapshotModel.HeapSnapshotModel.NativeContextSizes;
|
|
1016
1006
|
#nativeContextOrdinals!: number[];
|
|
@@ -1092,6 +1082,7 @@ export abstract class HeapSnapshot {
|
|
|
1092
1082
|
this.#progress.updateStatus('Building retainers…');
|
|
1093
1083
|
const resultsFromSecondWorker = this.startInitStep1InSecondThread(secondWorker);
|
|
1094
1084
|
this.#progress.updateStatus('Propagating DOM state…');
|
|
1085
|
+
this.initDetachednessAndClassIndex();
|
|
1095
1086
|
this.propagateDOMState();
|
|
1096
1087
|
this.#progress.updateStatus('Calculating node flags…');
|
|
1097
1088
|
this.calculateFlags();
|
|
@@ -2400,12 +2391,6 @@ export abstract class HeapSnapshot {
|
|
|
2400
2391
|
nodeRegExpType,
|
|
2401
2392
|
} = this;
|
|
2402
2393
|
|
|
2403
|
-
// If the snapshot doesn't contain a detachedness field in each node, then
|
|
2404
|
-
// allocate a separate array so there is somewhere to store the class index.
|
|
2405
|
-
if (this.nodeDetachednessAndClassIndexOffset === -1) {
|
|
2406
|
-
this.detachednessAndClassIndexArray = new Uint32Array(nodeCount);
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
2394
|
// We'll add some new values to the `strings` array during the processing below.
|
|
2410
2395
|
// This map lets us easily find the index for each added string.
|
|
2411
2396
|
const stringTable = new Map<string, number>();
|
|
@@ -2707,6 +2692,49 @@ export abstract class HeapSnapshot {
|
|
|
2707
2692
|
return this.#nativeContextSizes;
|
|
2708
2693
|
}
|
|
2709
2694
|
|
|
2695
|
+
getRetainedByContextSummary(): HeapSnapshotModel.HeapSnapshotModel.RetainedByContextSummary {
|
|
2696
|
+
// Use the exact same implementation here as aggregateWithFilter('objectsRetainedByContexts').
|
|
2697
|
+
const isRetainedByContext = this.createNamedFilter('objectsRetainedByContexts');
|
|
2698
|
+
|
|
2699
|
+
let contextCount = 0;
|
|
2700
|
+
let retainedByContextSize = 0;
|
|
2701
|
+
let retainedByContextCount = 0;
|
|
2702
|
+
let notRetainedByContextSize = 0;
|
|
2703
|
+
let notRetainedByContextCount = 0;
|
|
2704
|
+
|
|
2705
|
+
const node = this.rootNode();
|
|
2706
|
+
const {nodes, nodeFieldCount, nodeSelfSizeOffset: selfSizeOffset} = this;
|
|
2707
|
+
const nodesLength = nodes.length;
|
|
2708
|
+
|
|
2709
|
+
for (let nodeIndex = 0; nodeIndex < nodesLength; nodeIndex += nodeFieldCount) {
|
|
2710
|
+
const selfSize = nodes.getValue(nodeIndex + selfSizeOffset);
|
|
2711
|
+
if (!selfSize) {
|
|
2712
|
+
continue;
|
|
2713
|
+
}
|
|
2714
|
+
node.nodeIndex = nodeIndex;
|
|
2715
|
+
if (isRetainedByContext(node)) {
|
|
2716
|
+
retainedByContextCount++;
|
|
2717
|
+
retainedByContextSize += selfSize;
|
|
2718
|
+
} else {
|
|
2719
|
+
notRetainedByContextCount++;
|
|
2720
|
+
notRetainedByContextSize += selfSize;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
if (this.isContextObject(node)) {
|
|
2724
|
+
contextCount++;
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
return {
|
|
2729
|
+
contextCount,
|
|
2730
|
+
retainedByContextSize,
|
|
2731
|
+
retainedByContextCount,
|
|
2732
|
+
notRetainedByContextSize,
|
|
2733
|
+
notRetainedByContextCount,
|
|
2734
|
+
totalSize: retainedByContextSize + notRetainedByContextSize,
|
|
2735
|
+
};
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2710
2738
|
nodeNativeContext(nodeIndex: number): number {
|
|
2711
2739
|
const ordinal = nodeIndex / this.nodeFieldCount;
|
|
2712
2740
|
const nativeContextOrdinal = this.nodeNativeContextAttribution[ordinal];
|
|
@@ -2987,6 +3015,30 @@ export abstract class HeapSnapshot {
|
|
|
2987
3015
|
return null;
|
|
2988
3016
|
}
|
|
2989
3017
|
|
|
3018
|
+
private initDetachednessAndClassIndex(): void {
|
|
3019
|
+
this.detachednessAndClassIndexArray = new Uint32Array(this.nodeCount);
|
|
3020
|
+
if (this.nodeDetachednessAndClassIndexOffset !== -1) {
|
|
3021
|
+
// Seed this array from the detachedness field of the snapshot.
|
|
3022
|
+
const {nodeFieldCount, nodeDetachednessAndClassIndexOffset: offset} = this;
|
|
3023
|
+
for (let i = 0; i < this.nodeCount; ++i) {
|
|
3024
|
+
this.detachednessAndClassIndexArray[i] = Number(this.nodes.getValue(i * nodeFieldCount + offset));
|
|
3025
|
+
}
|
|
3026
|
+
} else {
|
|
3027
|
+
// For old snapshots, treat native objects named 'Detached ...' as detached.
|
|
3028
|
+
const node = this.rootNode();
|
|
3029
|
+
const nodesLength = this.nodes.length;
|
|
3030
|
+
const {nodeFieldCount, nodeNativeType, nodeTypeOffset} = this;
|
|
3031
|
+
for (let nodeIndex = 0; nodeIndex < nodesLength; nodeIndex += nodeFieldCount) {
|
|
3032
|
+
if (this.nodes.getValue(nodeIndex + nodeTypeOffset) === nodeNativeType) {
|
|
3033
|
+
node.nodeIndex = nodeIndex;
|
|
3034
|
+
if (node.name().startsWith('Detached ')) {
|
|
3035
|
+
node.setDetachedness(HeapSnapshotModel.HeapSnapshotModel.DOMLinkState.DETACHED);
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
|
|
2990
3042
|
/**
|
|
2991
3043
|
* The phase propagates whether a node is attached or detached through the
|
|
2992
3044
|
* graph and adjusts the low-level representation of nodes.
|
|
@@ -3292,11 +3344,58 @@ export abstract class HeapSnapshot {
|
|
|
3292
3344
|
return null;
|
|
3293
3345
|
}
|
|
3294
3346
|
|
|
3295
|
-
createEdgesProvider(nodeIndex: number
|
|
3347
|
+
createEdgesProvider(nodeIndex: number,
|
|
3348
|
+
options?: HeapSnapshotModel.HeapSnapshotModel.HeapEdgesQueryOptions): HeapSnapshotEdgesProvider {
|
|
3296
3349
|
const node = this.createNode(nodeIndex);
|
|
3297
|
-
const
|
|
3350
|
+
const defaultFilter = this.containmentEdgesFilter();
|
|
3351
|
+
const minRetainedSize = options?.minRetainedSize;
|
|
3352
|
+
const excludePrimitives = options?.excludePrimitives ?? false;
|
|
3353
|
+
|
|
3354
|
+
let filter: ((arg0: HeapSnapshotEdge) => boolean)|null = defaultFilter;
|
|
3355
|
+
|
|
3356
|
+
if (minRetainedSize !== undefined || excludePrimitives) {
|
|
3357
|
+
filter = (edge: HeapSnapshotEdge): boolean => {
|
|
3358
|
+
if (defaultFilter && !defaultFilter(edge)) {
|
|
3359
|
+
return false;
|
|
3360
|
+
}
|
|
3361
|
+
const targetNode = edge.node();
|
|
3362
|
+
if (minRetainedSize !== undefined && targetNode.retainedSize() < minRetainedSize) {
|
|
3363
|
+
return false;
|
|
3364
|
+
}
|
|
3365
|
+
if (excludePrimitives) {
|
|
3366
|
+
const rawType = targetNode.rawType();
|
|
3367
|
+
if (rawType === this.nodeNumberType) {
|
|
3368
|
+
return false;
|
|
3369
|
+
}
|
|
3370
|
+
if (rawType === this.nodeNativeType) {
|
|
3371
|
+
const targetName = targetNode.rawName();
|
|
3372
|
+
if (targetName === 'undefined' || targetName === 'null' || targetName === 'true' ||
|
|
3373
|
+
targetName === 'false') {
|
|
3374
|
+
return false;
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
return true;
|
|
3379
|
+
};
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3298
3382
|
const indexProvider = new HeapSnapshotEdgeIndexProvider(this);
|
|
3299
|
-
|
|
3383
|
+
const provider = new HeapSnapshotEdgesProvider(this, filter, node.edges(), indexProvider);
|
|
3384
|
+
|
|
3385
|
+
if (options?.sortBy) {
|
|
3386
|
+
const sortBy = options.sortBy;
|
|
3387
|
+
let comparator: HeapSnapshotModel.HeapSnapshotModel.ComparatorConfig;
|
|
3388
|
+
if (sortBy === 'selfSize') {
|
|
3389
|
+
comparator = new HeapSnapshotModel.HeapSnapshotModel.ComparatorConfig('selfSize', false, '!edgeName', true);
|
|
3390
|
+
} else if (sortBy === 'name') {
|
|
3391
|
+
comparator = new HeapSnapshotModel.HeapSnapshotModel.ComparatorConfig('!edgeName', true, 'retainedSize', false);
|
|
3392
|
+
} else {
|
|
3393
|
+
comparator = new HeapSnapshotModel.HeapSnapshotModel.ComparatorConfig('retainedSize', false, '!edgeName', true);
|
|
3394
|
+
}
|
|
3395
|
+
provider.sortAndRewind(comparator);
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
return provider;
|
|
3300
3399
|
}
|
|
3301
3400
|
|
|
3302
3401
|
createEdgesProviderForTest(nodeIndex: number, filter: ((arg0: HeapSnapshotEdge) => boolean)|null):
|
|
@@ -3512,6 +3611,97 @@ export abstract class HeapSnapshot {
|
|
|
3512
3611
|
return new HeapSnapshotNodesProvider(this, this.aggregatesWithFilter(nodeFilter)[classKey].idxs);
|
|
3513
3612
|
}
|
|
3514
3613
|
|
|
3614
|
+
queryObjects(queryOptions: HeapSnapshotModel.HeapSnapshotModel.HeapQueryOptions): HeapSnapshotNodesProvider {
|
|
3615
|
+
const {nodes, nodeFieldCount, retainedSizes} = this;
|
|
3616
|
+
const nodesLength = nodes.length;
|
|
3617
|
+
|
|
3618
|
+
const matchingIndexes: number[] = [];
|
|
3619
|
+
|
|
3620
|
+
const classNamePattern = queryOptions.className ? new RegExp(queryOptions.className, 'i') : null;
|
|
3621
|
+
const propertyNamePattern = queryOptions.propertyName ? new RegExp(queryOptions.propertyName, 'i') : null;
|
|
3622
|
+
const targetNodeType = queryOptions.nodeType ? queryOptions.nodeType.toLowerCase() : null;
|
|
3623
|
+
|
|
3624
|
+
const node = this.rootNode();
|
|
3625
|
+
|
|
3626
|
+
for (let nodeIndex = 0, ordinal = 0; nodeIndex < nodesLength; nodeIndex += nodeFieldCount, ordinal++) {
|
|
3627
|
+
node.nodeIndex = nodeIndex;
|
|
3628
|
+
|
|
3629
|
+
if (queryOptions.minSelfSize !== undefined && node.selfSize() < queryOptions.minSelfSize) {
|
|
3630
|
+
continue;
|
|
3631
|
+
}
|
|
3632
|
+
if (queryOptions.maxSelfSize !== undefined && node.selfSize() > queryOptions.maxSelfSize) {
|
|
3633
|
+
continue;
|
|
3634
|
+
}
|
|
3635
|
+
|
|
3636
|
+
const retainedSize = retainedSizes[ordinal];
|
|
3637
|
+
if (queryOptions.minRetainedSize !== undefined && retainedSize < queryOptions.minRetainedSize) {
|
|
3638
|
+
continue;
|
|
3639
|
+
}
|
|
3640
|
+
if (queryOptions.maxRetainedSize !== undefined && retainedSize > queryOptions.maxRetainedSize) {
|
|
3641
|
+
continue;
|
|
3642
|
+
}
|
|
3643
|
+
|
|
3644
|
+
if (queryOptions.isDetached !== undefined) {
|
|
3645
|
+
const isDetached = node.detachedness() === HeapSnapshotModel.HeapSnapshotModel.DOMLinkState.DETACHED;
|
|
3646
|
+
if (isDetached !== queryOptions.isDetached) {
|
|
3647
|
+
continue;
|
|
3648
|
+
}
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3651
|
+
if (classNamePattern) {
|
|
3652
|
+
const name = node.name();
|
|
3653
|
+
if (!classNamePattern.test(name)) {
|
|
3654
|
+
continue;
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
|
|
3658
|
+
if (targetNodeType) {
|
|
3659
|
+
const typeStr = node.type();
|
|
3660
|
+
if (typeStr.toLowerCase() !== targetNodeType) {
|
|
3661
|
+
continue;
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3665
|
+
if (propertyNamePattern) {
|
|
3666
|
+
let propMatch = false;
|
|
3667
|
+
for (const iter = node.edges(); iter.hasNext(); iter.next()) {
|
|
3668
|
+
if (propertyNamePattern.test(iter.edge.name())) {
|
|
3669
|
+
propMatch = true;
|
|
3670
|
+
break;
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3673
|
+
if (!propMatch) {
|
|
3674
|
+
continue;
|
|
3675
|
+
}
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3678
|
+
matchingIndexes.push(nodeIndex);
|
|
3679
|
+
}
|
|
3680
|
+
|
|
3681
|
+
const sortBy = queryOptions.sortBy ?? 'retainedSize';
|
|
3682
|
+
if (sortBy === 'retainedSize') {
|
|
3683
|
+
matchingIndexes.sort((a, b) => retainedSizes[b / nodeFieldCount] - retainedSizes[a / nodeFieldCount]);
|
|
3684
|
+
} else if (sortBy === 'selfSize') {
|
|
3685
|
+
matchingIndexes.sort((a, b) => {
|
|
3686
|
+
node.nodeIndex = b;
|
|
3687
|
+
const sizeB = node.selfSize();
|
|
3688
|
+
node.nodeIndex = a;
|
|
3689
|
+
const sizeA = node.selfSize();
|
|
3690
|
+
return sizeB - sizeA;
|
|
3691
|
+
});
|
|
3692
|
+
} else if (sortBy === 'id') {
|
|
3693
|
+
matchingIndexes.sort((a, b) => {
|
|
3694
|
+
node.nodeIndex = b;
|
|
3695
|
+
const idB = node.id();
|
|
3696
|
+
node.nodeIndex = a;
|
|
3697
|
+
const idA = node.id();
|
|
3698
|
+
return idA - idB;
|
|
3699
|
+
});
|
|
3700
|
+
}
|
|
3701
|
+
|
|
3702
|
+
return new HeapSnapshotNodesProvider(this, matchingIndexes);
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3515
3705
|
private maxJsNodeId(): number {
|
|
3516
3706
|
const nodeFieldCount = this.nodeFieldCount;
|
|
3517
3707
|
const nodes = this.nodes;
|
|
@@ -4196,7 +4386,7 @@ export class JSHeapSnapshot extends HeapSnapshot {
|
|
|
4196
4386
|
continue;
|
|
4197
4387
|
}
|
|
4198
4388
|
node.nodeIndex = nodeIndex;
|
|
4199
|
-
if (node.
|
|
4389
|
+
if (node.detachedness() === HeapSnapshotModel.HeapSnapshotModel.DOMLinkState.DETACHED) {
|
|
4200
4390
|
this.flags[ordinal] |= flag;
|
|
4201
4391
|
}
|
|
4202
4392
|
}
|
|
@@ -226,14 +226,14 @@ export class NodeIndicatorProvider implements UI.Toolbar.Provider {
|
|
|
226
226
|
|
|
227
227
|
export class SourcesPanelIndicator {
|
|
228
228
|
constructor() {
|
|
229
|
-
|
|
230
|
-
.
|
|
231
|
-
|
|
229
|
+
const disableJavascriptSetting =
|
|
230
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.javaScriptDisabledSettingDescriptor);
|
|
231
|
+
disableJavascriptSetting.addChangeListener(javaScriptDisabledChanged);
|
|
232
232
|
javaScriptDisabledChanged();
|
|
233
233
|
|
|
234
234
|
function javaScriptDisabledChanged(): void {
|
|
235
235
|
const warnings = [];
|
|
236
|
-
if (
|
|
236
|
+
if (disableJavascriptSetting.get()) {
|
|
237
237
|
warnings.push(i18nString(UIStrings.javascriptIsDisabled));
|
|
238
238
|
}
|
|
239
239
|
UI.InspectorView.InspectorView.instance().setPanelWarnings('sources', warnings);
|
|
@@ -254,7 +254,8 @@ export class BackendSettingsSync implements SDK.TargetManager.Observer {
|
|
|
254
254
|
this.#adBlockEnabledSetting = Common.Settings.Settings.instance().moduleSetting('network.ad-blocking-enabled');
|
|
255
255
|
this.#adBlockEnabledSetting.addChangeListener(this.#update, this);
|
|
256
256
|
|
|
257
|
-
this.#emulatePageFocusSetting =
|
|
257
|
+
this.#emulatePageFocusSetting =
|
|
258
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.emulatePageFocusSettingDescriptor);
|
|
258
259
|
this.#emulatePageFocusSetting.addChangeListener(this.#update, this);
|
|
259
260
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
260
261
|
SDK.ChildTargetManager.ChildTargetManager, SDK.ChildTargetManager.Events.TARGET_INFO_CHANGED,
|
|
@@ -8,6 +8,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
8
8
|
import * as Host from '../../core/host/host.js';
|
|
9
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
10
10
|
import * as Root from '../../core/root/root.js';
|
|
11
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
12
|
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
12
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
14
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -201,36 +202,34 @@ export class RenderingOptionsView extends UI.Widget.VBox {
|
|
|
201
202
|
|
|
202
203
|
this.element.setAttribute('jslog', `${VisualLogging.panel('rendering').track({resize: true})}`);
|
|
203
204
|
|
|
204
|
-
this.#appendCheckbox(
|
|
205
|
-
|
|
206
|
-
Common.Settings.Settings.instance().moduleSetting('show-paint-rects'));
|
|
205
|
+
this.#appendCheckbox(i18nString(UIStrings.paintFlashing), i18nString(UIStrings.highlightsAreasOfThePageGreen),
|
|
206
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.showPaintRectsSettingDescriptor));
|
|
207
207
|
this.#appendCheckbox(
|
|
208
208
|
i18nString(UIStrings.layoutShiftRegions), i18nString(UIStrings.highlightsAreasOfThePageBlueThat),
|
|
209
|
-
Common.Settings.Settings.instance().
|
|
209
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.showLayoutShiftRegionsSettingDescriptor));
|
|
210
210
|
this.#appendCheckbox(
|
|
211
211
|
i18nString(UIStrings.layerBorders), i18nString(UIStrings.showsLayerBordersOrangeoliveAnd),
|
|
212
|
-
Common.Settings.Settings.instance().
|
|
213
|
-
this.#appendCheckbox(
|
|
214
|
-
|
|
215
|
-
Common.Settings.Settings.instance().moduleSetting('show-fps-counter'));
|
|
212
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.showDebugBordersSettingDescriptor));
|
|
213
|
+
this.#appendCheckbox(i18nString(UIStrings.frameRenderingStats), i18nString(UIStrings.plotsFrameThroughputDropped),
|
|
214
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.showFPSCounterSettingDescriptor));
|
|
216
215
|
this.#appendCheckbox(
|
|
217
216
|
i18nString(UIStrings.scrollingPerformanceIssues), i18nString(UIStrings.highlightsElementsTealThatCan),
|
|
218
|
-
Common.Settings.Settings.instance().
|
|
217
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.showScrollBottleneckRectsSettingDescriptor));
|
|
219
218
|
|
|
220
219
|
// The 'Highlight ads' setting now lives in the Ads panel under Application.
|
|
221
220
|
// We display this legacy setting only when the Ads panel isn't enabled.
|
|
222
221
|
if (!Root.Runtime.hostConfig.devToolsAdsPanel?.enabled) {
|
|
223
|
-
this.#appendCheckbox(
|
|
224
|
-
|
|
222
|
+
this.#appendCheckbox(
|
|
223
|
+
i18nString(UIStrings.highlightAds), i18nString(UIStrings.highlightsElementsRedDetectedToBe),
|
|
224
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.showAdHighlightsSettingDescriptor));
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
this.#appendCheckbox(
|
|
228
228
|
i18nString(UIStrings.disableLocalFonts), i18nString(UIStrings.disablesLocalSourcesInFontface),
|
|
229
229
|
Common.Settings.Settings.instance().moduleSetting('local-fonts-disabled'));
|
|
230
|
-
this.#appendCheckbox(
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
{toggle: Host.UserMetrics.Action.ToggleEmulateFocusedPageFromRenderingTab});
|
|
230
|
+
this.#appendCheckbox(i18nString(UIStrings.emulateAFocusedPage), i18nString(UIStrings.emulatesAFocusedPage),
|
|
231
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.emulatePageFocusSettingDescriptor),
|
|
232
|
+
{toggle: Host.UserMetrics.Action.ToggleEmulateFocusedPageFromRenderingTab});
|
|
234
233
|
const autoDarkModeSetting = Common.Settings.Settings.instance().moduleSetting('emulate-auto-dark-mode');
|
|
235
234
|
this.#appendCheckbox(i18nString(UIStrings.emulateAutoDarkMode), i18nString(UIStrings.emulatesAutoDarkMode),
|
|
236
235
|
autoDarkModeSetting);
|
|
@@ -4,11 +4,69 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
8
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
|
+
import * as SettingsUI from '../../ui/settings/settings.js';
|
|
8
10
|
|
|
9
11
|
import type * as InspectorMain from './inspector_main.js';
|
|
10
12
|
|
|
11
13
|
const UIStrings = {
|
|
14
|
+
/**
|
|
15
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
16
|
+
*/
|
|
17
|
+
showPaintFlashingRectangles: 'Show paint flashing rectangles',
|
|
18
|
+
/**
|
|
19
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
20
|
+
*/
|
|
21
|
+
hidePaintFlashingRectangles: 'Hide paint flashing rectangles',
|
|
22
|
+
/**
|
|
23
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
24
|
+
*/
|
|
25
|
+
showLayoutShiftRegions: 'Show layout shift regions',
|
|
26
|
+
/**
|
|
27
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
28
|
+
*/
|
|
29
|
+
hideLayoutShiftRegions: 'Hide layout shift regions',
|
|
30
|
+
/**
|
|
31
|
+
* @description Text to highlight the rendering frames for ads.
|
|
32
|
+
*/
|
|
33
|
+
highlightAdFrames: 'Highlight ad frames',
|
|
34
|
+
/**
|
|
35
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
36
|
+
*/
|
|
37
|
+
doNotHighlightAdFrames: 'Do not highlight ad frames',
|
|
38
|
+
/**
|
|
39
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
40
|
+
*/
|
|
41
|
+
showLayerBorders: 'Show layer borders',
|
|
42
|
+
/**
|
|
43
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
44
|
+
*/
|
|
45
|
+
hideLayerBorders: 'Hide layer borders',
|
|
46
|
+
/**
|
|
47
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
48
|
+
*/
|
|
49
|
+
showFramesPerSecondFpsMeter: 'Show frames per second (FPS) meter',
|
|
50
|
+
/**
|
|
51
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
52
|
+
*/
|
|
53
|
+
hideFramesPerSecondFpsMeter: 'Hide frames per second (FPS) meter',
|
|
54
|
+
/**
|
|
55
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
56
|
+
*/
|
|
57
|
+
showScrollPerformanceBottlenecks: 'Show scroll performance bottlenecks',
|
|
58
|
+
/**
|
|
59
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu.
|
|
60
|
+
*/
|
|
61
|
+
hideScrollPerformanceBottlenecks: 'Hide scroll performance bottlenecks',
|
|
62
|
+
/**
|
|
63
|
+
* @description Title of a Rendering setting that can be invoked through the Command Menu.
|
|
64
|
+
*/
|
|
65
|
+
emulateAFocusedPage: 'Emulate a focused page',
|
|
66
|
+
/**
|
|
67
|
+
* @description Title of a Rendering setting that can be invoked through the Command Menu.
|
|
68
|
+
*/
|
|
69
|
+
doNotEmulateAFocusedPage: 'Do not emulate a focused page',
|
|
12
70
|
/**
|
|
13
71
|
* @description Title of the Rendering panel. The Rendering panel is a collection of settings that
|
|
14
72
|
* lets the user debug the rendering (i.e. how the website is drawn onto the screen) of the
|
|
@@ -253,3 +311,102 @@ UI.Toolbar.registerToolbarItem({
|
|
|
253
311
|
order: 97,
|
|
254
312
|
location: UI.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,
|
|
255
313
|
});
|
|
314
|
+
|
|
315
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.showPaintRectsSettingDescriptor, {
|
|
316
|
+
category: Common.Settings.SettingCategory.RENDERING,
|
|
317
|
+
options: [
|
|
318
|
+
{
|
|
319
|
+
value: true,
|
|
320
|
+
title: i18nLazyString(UIStrings.showPaintFlashingRectangles),
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
value: false,
|
|
324
|
+
title: i18nLazyString(UIStrings.hidePaintFlashingRectangles),
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.showLayoutShiftRegionsSettingDescriptor, {
|
|
330
|
+
category: Common.Settings.SettingCategory.RENDERING,
|
|
331
|
+
options: [
|
|
332
|
+
{
|
|
333
|
+
value: true,
|
|
334
|
+
title: i18nLazyString(UIStrings.showLayoutShiftRegions),
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
value: false,
|
|
338
|
+
title: i18nLazyString(UIStrings.hideLayoutShiftRegions),
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.showAdHighlightsSettingDescriptor, {
|
|
344
|
+
category: Common.Settings.SettingCategory.RENDERING,
|
|
345
|
+
options: [
|
|
346
|
+
{
|
|
347
|
+
value: true,
|
|
348
|
+
title: i18nLazyString(UIStrings.highlightAdFrames),
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
value: false,
|
|
352
|
+
title: i18nLazyString(UIStrings.doNotHighlightAdFrames),
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.showDebugBordersSettingDescriptor, {
|
|
358
|
+
category: Common.Settings.SettingCategory.RENDERING,
|
|
359
|
+
options: [
|
|
360
|
+
{
|
|
361
|
+
value: true,
|
|
362
|
+
title: i18nLazyString(UIStrings.showLayerBorders),
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
value: false,
|
|
366
|
+
title: i18nLazyString(UIStrings.hideLayerBorders),
|
|
367
|
+
},
|
|
368
|
+
],
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.showFPSCounterSettingDescriptor, {
|
|
372
|
+
category: Common.Settings.SettingCategory.RENDERING,
|
|
373
|
+
options: [
|
|
374
|
+
{
|
|
375
|
+
value: true,
|
|
376
|
+
title: i18nLazyString(UIStrings.showFramesPerSecondFpsMeter),
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
value: false,
|
|
380
|
+
title: i18nLazyString(UIStrings.hideFramesPerSecondFpsMeter),
|
|
381
|
+
},
|
|
382
|
+
],
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.showScrollBottleneckRectsSettingDescriptor, {
|
|
386
|
+
category: Common.Settings.SettingCategory.RENDERING,
|
|
387
|
+
options: [
|
|
388
|
+
{
|
|
389
|
+
value: true,
|
|
390
|
+
title: i18nLazyString(UIStrings.showScrollPerformanceBottlenecks),
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
value: false,
|
|
394
|
+
title: i18nLazyString(UIStrings.hideScrollPerformanceBottlenecks),
|
|
395
|
+
},
|
|
396
|
+
],
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.emulatePageFocusSettingDescriptor, {
|
|
400
|
+
category: Common.Settings.SettingCategory.RENDERING,
|
|
401
|
+
title: i18nLazyString(UIStrings.emulateAFocusedPage),
|
|
402
|
+
options: [
|
|
403
|
+
{
|
|
404
|
+
value: true,
|
|
405
|
+
title: i18nLazyString(UIStrings.emulateAFocusedPage),
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
value: false,
|
|
409
|
+
title: i18nLazyString(UIStrings.doNotEmulateAFocusedPage),
|
|
410
|
+
},
|
|
411
|
+
],
|
|
412
|
+
});
|
|
@@ -49,6 +49,7 @@ import * as Persistence from '../../models/persistence/persistence.js';
|
|
|
49
49
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
50
50
|
import * as PanelCommon from '../../panels/common/common.js';
|
|
51
51
|
import * as Snippets from '../../panels/snippets/snippets.js';
|
|
52
|
+
import type * as Comments from '../../ui/comments/comments.js';
|
|
52
53
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
53
54
|
import * as Snackbar from '../../ui/components/snackbars/snackbars.js';
|
|
54
55
|
import * as UIHelpers from '../../ui/helpers/helpers.js';
|
|
@@ -998,3 +999,34 @@ export class ReloadActionDelegate implements UI.ActionRegistration.ActionDelegat
|
|
|
998
999
|
return false;
|
|
999
1000
|
}
|
|
1000
1001
|
}
|
|
1002
|
+
|
|
1003
|
+
let activeOverlayManager: Comments.CommentOverlayManager.CommentOverlayManager|null = null;
|
|
1004
|
+
let activeOverlayWidget: Comments.CommentsOverlayWidget.CommentsOverlayWidget|null = null;
|
|
1005
|
+
|
|
1006
|
+
// Temporary for manual testing and experimentation.
|
|
1007
|
+
export async function comments(): Promise<Comments.CommentOverlayManager.CommentOverlayManager> {
|
|
1008
|
+
const Comments = await import('../../ui/comments/comments.js');
|
|
1009
|
+
const CommentManager = await import('../../models/comment_manager/comment_manager.js');
|
|
1010
|
+
const commentManager = CommentManager.CommentManager.CommentManager.instance();
|
|
1011
|
+
if (!activeOverlayManager || !activeOverlayWidget) {
|
|
1012
|
+
activeOverlayManager = new Comments.CommentOverlayManager.CommentOverlayManager(commentManager);
|
|
1013
|
+
activeOverlayWidget = new Comments.CommentsOverlayWidget.CommentsOverlayWidget(activeOverlayManager);
|
|
1014
|
+
activeOverlayWidget.markAsRoot();
|
|
1015
|
+
activeOverlayWidget.show(document.body);
|
|
1016
|
+
activeOverlayManager.start();
|
|
1017
|
+
commentManager.setCommentMode(true);
|
|
1018
|
+
return activeOverlayManager;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
const newMode = !commentManager.isCommentMode();
|
|
1022
|
+
commentManager.setCommentMode(newMode);
|
|
1023
|
+
if (newMode) {
|
|
1024
|
+
activeOverlayWidget.show(document.body);
|
|
1025
|
+
} else {
|
|
1026
|
+
activeOverlayWidget.detach();
|
|
1027
|
+
}
|
|
1028
|
+
return activeOverlayManager;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
// @ts-expect-error global helper for manual testing
|
|
1032
|
+
globalThis.comments = comments;
|
|
@@ -26,7 +26,6 @@ import '../../core/sdk/sdk-meta.js';
|
|
|
26
26
|
import '../../models/workspace/workspace-meta.js';
|
|
27
27
|
import '../../ui/legacy/components/source_frame/source_frame-meta.js';
|
|
28
28
|
import '../../panels/console_counters/console_counters-meta.js';
|
|
29
|
-
import '../../ui/legacy/components/object_ui/object_ui-meta.js';
|
|
30
29
|
import '../../panels/explain/explain-meta.js';
|
|
31
30
|
import '../../panels/ai_assistance/ai_assistance-meta.js';
|
|
32
31
|
import '../main/main.js';
|
|
@@ -11,6 +11,7 @@ import * as AutofillManager from '../models/autofill_manager/autofill_manager.js
|
|
|
11
11
|
import * as Badges from '../models/badges/badges.js';
|
|
12
12
|
import * as Bindings from '../models/bindings/bindings.js';
|
|
13
13
|
import * as Breakpoints from '../models/breakpoints/breakpoints.js';
|
|
14
|
+
import * as CommentManager from '../models/comment_manager/comment_manager.js';
|
|
14
15
|
import * as CrUXManager from '../models/crux-manager/crux-manager.js';
|
|
15
16
|
import * as Emulation from '../models/emulation/emulation.js';
|
|
16
17
|
import * as IssuesManager from '../models/issues_manager/issues_manager.js';
|
|
@@ -227,6 +228,9 @@ export class Universe {
|
|
|
227
228
|
const builtInAi = new AiAssistance.BuiltInAi.BuiltInAi();
|
|
228
229
|
context.set(AiAssistance.BuiltInAi.BuiltInAi, builtInAi);
|
|
229
230
|
|
|
231
|
+
const commentManager = new CommentManager.CommentManager.CommentManager();
|
|
232
|
+
context.set(CommentManager.CommentManager.CommentManager, commentManager);
|
|
233
|
+
|
|
230
234
|
this.autofillManager = new AutofillManager.AutofillManager.AutofillManager(targetManager, frameManager);
|
|
231
235
|
context.set(AutofillManager.AutofillManager.AutofillManager, this.autofillManager);
|
|
232
236
|
}
|
|
@@ -263,6 +267,10 @@ export class Universe {
|
|
|
263
267
|
return this.context.get(Breakpoints.BreakpointManager.BreakpointManager);
|
|
264
268
|
}
|
|
265
269
|
|
|
270
|
+
get commentManager(): CommentManager.CommentManager.CommentManager {
|
|
271
|
+
return this.context.get(CommentManager.CommentManager.CommentManager);
|
|
272
|
+
}
|
|
273
|
+
|
|
266
274
|
get cpuThrottlingManager(): SDK.CPUThrottlingManager.CPUThrottlingManager {
|
|
267
275
|
return this.context.get(SDK.CPUThrottlingManager.CPUThrottlingManager);
|
|
268
276
|
}
|