chrome-devtools-frontend 1.0.1512349 → 1.0.1513662
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/docs/cookbook/release_management.md +15 -13
- package/docs/get_the_code.md +114 -35
- package/front_end/core/common/Color.ts +40 -44
- package/front_end/core/common/Console.ts +4 -4
- package/front_end/core/common/ParsedURL.ts +14 -14
- package/front_end/core/common/ResourceType.ts +20 -20
- package/front_end/core/common/SegmentedRange.ts +13 -14
- package/front_end/core/common/Settings.ts +4 -4
- package/front_end/core/common/StringOutputStream.ts +4 -4
- package/front_end/core/host/GdpClient.ts +38 -0
- package/front_end/core/host/InspectorFrontendHost.ts +4 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/host/ResourceLoader.ts +2 -2
- package/front_end/core/host/UserMetrics.ts +0 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +9 -9
- package/front_end/core/root/Runtime.ts +5 -2
- package/front_end/core/sdk/AccessibilityModel.ts +48 -48
- package/front_end/core/sdk/AnimationModel.ts +78 -79
- package/front_end/core/sdk/CPUProfilerModel.ts +5 -5
- package/front_end/core/sdk/CPUThrottlingManager.ts +17 -17
- package/front_end/core/sdk/CSSMatchedStyles.ts +44 -44
- package/front_end/core/sdk/CSSMedia.ts +22 -22
- package/front_end/core/sdk/CSSModel.ts +4 -4
- package/front_end/core/sdk/CSSProperty.ts +9 -9
- package/front_end/core/sdk/CSSPropertyParser.ts +1 -2
- package/front_end/core/sdk/CSSRule.ts +3 -3
- package/front_end/core/sdk/CSSStyleDeclaration.ts +27 -28
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +13 -13
- package/front_end/core/sdk/CategorizedBreakpoint.ts +4 -4
- package/front_end/core/sdk/ChildTargetManager.ts +6 -6
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +4 -4
- package/front_end/core/sdk/ConsoleModel.ts +24 -24
- package/front_end/core/sdk/Cookie.ts +16 -16
- package/front_end/core/sdk/CookieParser.ts +6 -6
- package/front_end/core/sdk/DOMDebuggerModel.ts +88 -89
- package/front_end/core/sdk/DOMModel.ts +113 -113
- package/front_end/core/sdk/DebuggerModel.ts +102 -103
- package/front_end/core/sdk/EmulationModel.ts +6 -6
- package/front_end/core/sdk/EventBreakpointsModel.ts +5 -5
- package/front_end/core/sdk/HeapProfilerModel.ts +5 -5
- package/front_end/core/sdk/IsolateManager.ts +26 -26
- package/front_end/core/sdk/LayerTreeBase.ts +29 -30
- package/front_end/core/sdk/OverlayModel.ts +6 -6
- package/front_end/core/sdk/Resource.ts +43 -43
- package/front_end/core/sdk/ResourceTreeModel.ts +58 -61
- package/front_end/core/sdk/RuntimeModel.ts +12 -13
- package/front_end/core/sdk/SDKModel.ts +3 -3
- package/front_end/core/sdk/Script.ts +17 -17
- package/front_end/core/sdk/SecurityOriginManager.ts +14 -14
- package/front_end/core/sdk/ServerTiming.ts +2 -2
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +15 -15
- package/front_end/core/sdk/ServiceWorkerManager.ts +19 -24
- package/front_end/core/sdk/SourceMap.ts +10 -10
- package/front_end/core/sdk/StorageKeyManager.ts +12 -12
- package/front_end/core/sdk/Target.ts +33 -34
- package/front_end/core/sdk/TargetManager.ts +20 -20
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +8 -8
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -24
- package/front_end/entrypoints/main/GlobalAiButton.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +16 -14
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/generated/InspectorBackendCommands.js +3 -2
- package/front_end/generated/SupportedCSSProperties.js +20 -0
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +20 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -16
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +127 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +149 -26
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +9 -10
- package/front_end/models/badges/AiExplorerBadge.ts +21 -0
- package/front_end/models/badges/Badge.ts +3 -5
- package/front_end/models/badges/CodeWhispererBadge.ts +21 -0
- package/front_end/models/badges/DOMDetectiveBadge.ts +4 -3
- package/front_end/models/badges/SpeedsterBadge.ts +6 -4
- package/front_end/models/badges/StarterBadge.ts +4 -3
- package/front_end/models/badges/UserBadges.ts +29 -3
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +6 -6
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +18 -18
- package/front_end/models/bindings/FileUtils.ts +15 -15
- package/front_end/models/bindings/ResourceScriptMapping.ts +14 -14
- package/front_end/models/elements/ElementUpdateRecord.ts +11 -11
- package/front_end/models/emulation/DeviceModeModel.ts +123 -131
- package/front_end/models/emulation/EmulatedDevices.ts +22 -22
- package/front_end/models/extensions/ExtensionPanel.ts +24 -24
- package/front_end/models/extensions/ExtensionServer.ts +4 -4
- package/front_end/models/javascript_metadata/NativeFunctions.js +14 -2
- package/front_end/models/persistence/IsolatedFileSystem.ts +18 -19
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +13 -13
- package/front_end/models/trace/EventsSerializer.ts +5 -5
- package/front_end/models/trace/LanternComputationData.ts +10 -10
- package/front_end/models/trace/ModelImpl.ts +32 -41
- package/front_end/models/trace/Processor.ts +28 -30
- package/front_end/models/trace/extras/FilmStrip.ts +6 -6
- package/front_end/models/trace/extras/StackTraceForEvent.ts +22 -25
- package/front_end/models/trace/extras/ThirdParties.ts +16 -17
- package/front_end/models/trace/extras/TraceFilter.ts +1 -1
- package/front_end/models/trace/handlers/Threads.ts +10 -10
- package/front_end/models/trace/handlers/helpers.ts +9 -9
- package/front_end/models/trace/handlers/types.ts +3 -3
- package/front_end/models/trace/insights/CLSCulprits.ts +12 -14
- package/front_end/models/trace/insights/Cache.ts +8 -4
- package/front_end/models/trace/insights/DOMSize.ts +8 -5
- package/front_end/models/trace/insights/DocumentLatency.ts +2 -2
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +3 -3
- package/front_end/models/trace/insights/FontDisplay.ts +3 -4
- package/front_end/models/trace/insights/ForcedReflow.ts +3 -3
- package/front_end/models/trace/insights/INPBreakdown.ts +2 -2
- package/front_end/models/trace/insights/ImageDelivery.ts +11 -11
- package/front_end/models/trace/insights/LCPBreakdown.ts +4 -4
- package/front_end/models/trace/insights/LCPDiscovery.ts +4 -4
- package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -2
- package/front_end/models/trace/insights/ModernHTTP.ts +4 -5
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +12 -12
- package/front_end/models/trace/insights/RenderBlocking.ts +9 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +2 -2
- package/front_end/models/trace/insights/ThirdParties.ts +4 -5
- package/front_end/models/trace/insights/Viewport.ts +8 -5
- package/front_end/models/trace/insights/types.ts +1 -0
- package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +10 -10
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +52 -52
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +8 -8
- package/front_end/panels/animation/AnimationTimeline.ts +5 -5
- package/front_end/panels/animation/AnimationUI.ts +22 -23
- package/front_end/panels/application/ApplicationPanelSidebar.ts +12 -12
- package/front_end/panels/application/DOMStorageModel.ts +23 -23
- package/front_end/panels/application/ExtensionStorageModel.ts +31 -31
- package/front_end/panels/application/IndexedDBModel.ts +1 -0
- package/front_end/panels/application/PreloadingTreeElement.ts +8 -8
- package/front_end/panels/application/ServiceWorkersView.ts +0 -53
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/common/BadgeNotification.ts +24 -4
- package/front_end/panels/common/GdpSignUpDialog.ts +5 -0
- package/front_end/panels/common/badgeNotification.css +26 -9
- package/front_end/panels/console/ConsoleContextSelector.ts +9 -9
- package/front_end/panels/console/ConsolePrompt.ts +8 -5
- package/front_end/panels/console/ConsoleView.ts +13 -13
- package/front_end/panels/console/ConsoleViewport.ts +29 -29
- package/front_end/panels/coverage/CoverageModel.ts +22 -22
- package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
- package/front_end/panels/elements/ComputedStyleModel.ts +17 -18
- package/front_end/panels/elements/DOMPath.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +13 -13
- package/front_end/panels/elements/ElementsTreeElement.ts +18 -18
- package/front_end/panels/elements/ElementsTreeOutline.ts +41 -48
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -50
- package/front_end/panels/elements/StylesSidebarPane.ts +19 -19
- package/front_end/panels/emulation/DeviceModeToolbar.ts +7 -7
- package/front_end/panels/emulation/DeviceModeView.ts +6 -6
- package/front_end/panels/emulation/MediaQueryInspector.ts +18 -18
- package/front_end/panels/event_listeners/EventListenersView.ts +13 -14
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +3 -3
- package/front_end/panels/layer_viewer/LayerViewHost.ts +13 -13
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +9 -10
- package/front_end/panels/layer_viewer/TransformController.ts +34 -36
- package/front_end/panels/layers/LayerTreeModel.ts +41 -40
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +13 -13
- package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -7
- package/front_end/panels/media/PlayerMessagesView.ts +5 -5
- package/front_end/panels/media/TickingFlameChart.ts +24 -24
- package/front_end/panels/media/TickingFlameChartHelpers.ts +32 -32
- package/front_end/panels/network/NetworkItemView.ts +4 -4
- package/front_end/panels/network/NetworkLogViewColumns.ts +29 -29
- package/front_end/panels/network/NetworkPanel.ts +8 -5
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +10 -10
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +3 -4
- package/front_end/panels/profiler/ProfileHeader.ts +25 -25
- package/front_end/panels/profiler/ProfileLauncherView.ts +5 -6
- package/front_end/panels/recorder/components/ReplaySection.ts +3 -1
- package/front_end/panels/security/OriginTreeElement.ts +8 -8
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/settings/SettingsScreen.ts +18 -12
- package/front_end/panels/settings/components/SyncSection.ts +20 -6
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +3 -0
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -9
- package/front_end/panels/sources/NavigatorView.ts +43 -46
- package/front_end/panels/sources/SourcesPanel.ts +35 -35
- package/front_end/panels/sources/SourcesView.ts +13 -13
- package/front_end/panels/sources/TabbedEditorContainer.ts +19 -22
- package/front_end/panels/sources/UISourceCodeFrame.ts +4 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +34 -36
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +3 -3
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +8 -8
- package/front_end/panels/timeline/CountersGraph.ts +16 -16
- package/front_end/panels/timeline/EntriesFilter.ts +4 -3
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/GPUTrackAppender.ts +3 -3
- package/front_end/panels/timeline/Initiators.ts +10 -10
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +5 -5
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +7 -7
- package/front_end/panels/timeline/ModificationsManager.ts +8 -15
- package/front_end/panels/timeline/TargetForEvent.ts +2 -2
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -1
- package/front_end/panels/timeline/ThreadAppender.ts +13 -13
- package/front_end/panels/timeline/TimelineDetailsView.ts +6 -14
- package/front_end/panels/timeline/TimelineEventOverview.ts +27 -26
- package/front_end/panels/timeline/TimelineFilters.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +54 -53
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +34 -34
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -31
- package/front_end/panels/timeline/TimelineHistoryManager.ts +17 -18
- package/front_end/panels/timeline/TimelineMiniMap.ts +6 -6
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +6 -6
- package/front_end/panels/timeline/TimelinePanel.ts +52 -59
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +7 -5
- package/front_end/panels/timeline/TimelineTreeView.ts +10 -10
- package/front_end/panels/timeline/TimelineUIUtils.ts +43 -43
- package/front_end/panels/timeline/TimingsTrackAppender.ts +12 -12
- package/front_end/panels/timeline/TracingLayerTree.ts +43 -43
- package/front_end/panels/timeline/TrackConfigBanner.ts +6 -6
- package/front_end/panels/timeline/TrackConfiguration.ts +1 -1
- package/front_end/panels/timeline/components/DetailsView.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +12 -21
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -5
- package/front_end/panels/timeline/components/Sidebar.ts +4 -14
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +13 -36
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +21 -19
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/insights/Cache.ts +4 -0
- package/front_end/panels/timeline/components/insights/DOMSize.ts +5 -1
- package/front_end/panels/timeline/components/insights/Helpers.ts +19 -0
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/panels/timeline/components/insights/Viewport.ts +4 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
- package/front_end/panels/timeline/utils/AICallTree.ts +11 -11
- package/front_end/panels/timeline/utils/AIContext.ts +17 -19
- package/front_end/panels/timeline/utils/EntityMapper.ts +6 -5
- package/front_end/panels/timeline/utils/EntryName.ts +2 -2
- package/front_end/panels/timeline/utils/EntryNodes.ts +5 -5
- package/front_end/panels/timeline/utils/EntryStyles.ts +4 -4
- package/front_end/panels/timeline/utils/FreshRecording.ts +3 -3
- package/front_end/panels/timeline/utils/Helpers.ts +0 -18
- package/front_end/panels/timeline/utils/InsightAIContext.ts +6 -6
- package/front_end/panels/timeline/utils/SourceMapsResolver.ts +7 -7
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js.map +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/chunk/cpp.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
- package/front_end/third_party/json5/rebuild.sh +1 -1
- package/front_end/third_party/legacy-javascript/{update.sh → rebuild.sh} +1 -1
- package/front_end/third_party/lit/lib/decorators.d.ts +26 -9
- package/front_end/third_party/lit/lib/decorators.js +5 -5
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.js +8 -13
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +26 -9
- package/front_end/third_party/lit/lib/lit.js +5 -5
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.js +2 -2
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/rebuild.sh +1 -1
- package/front_end/third_party/third-party-web/rebuild.sh +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +6 -7
- package/front_end/ui/legacy/ActionRegistration.ts +9 -9
- package/front_end/ui/legacy/DockController.ts +18 -18
- package/front_end/ui/legacy/FilterBar.ts +7 -7
- package/front_end/ui/legacy/Fragment.ts +4 -4
- package/front_end/ui/legacy/GlassPane.ts +12 -12
- package/front_end/ui/legacy/InspectorView.ts +5 -15
- package/front_end/ui/legacy/ListControl.ts +27 -27
- package/front_end/ui/legacy/ListWidget.ts +4 -4
- package/front_end/ui/legacy/PopoverHelper.ts +4 -4
- package/front_end/ui/legacy/ShortcutRegistry.ts +17 -17
- package/front_end/ui/legacy/TabbedPane.ts +74 -75
- package/front_end/ui/legacy/TextPrompt.ts +31 -31
- package/front_end/ui/legacy/Toolbar.ts +13 -14
- package/front_end/ui/legacy/ViewManager.ts +30 -31
- package/front_end/ui/legacy/Widget.ts +6 -6
- package/front_end/ui/legacy/XLink.ts +9 -9
- package/front_end/ui/legacy/ZoomManager.ts +9 -9
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +27 -27
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +30 -32
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +15 -15
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +64 -64
- package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -11
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +12 -12
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +14 -14
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -8
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +4 -4
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +4 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -2
- package/package.json +1 -1
@@ -17,7 +17,7 @@ let targetManagerInstance: TargetManager|undefined;
|
|
17
17
|
type ModelClass<T = SDKModel> = new (arg1: Target) => T;
|
18
18
|
|
19
19
|
export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
20
|
-
#
|
20
|
+
#targets: Set<Target>;
|
21
21
|
readonly #observers: Set<Observer>;
|
22
22
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
23
23
|
#modelListeners: Platform.MapUtilities.Multimap<string|symbol|number, {
|
@@ -30,19 +30,19 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
30
30
|
#scopedObservers: WeakSet<Observer|SDKModelObserver<any>>;
|
31
31
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
32
32
|
#isSuspended: boolean;
|
33
|
-
#
|
33
|
+
#browserTarget: Target|null;
|
34
34
|
#scopeTarget: Target|null;
|
35
35
|
#defaultScopeSet: boolean;
|
36
36
|
readonly #scopeChangeListeners: Set<() => void>;
|
37
37
|
|
38
38
|
private constructor() {
|
39
39
|
super();
|
40
|
-
this.#
|
40
|
+
this.#targets = new Set();
|
41
41
|
this.#observers = new Set();
|
42
42
|
this.#modelListeners = new Platform.MapUtilities.Multimap();
|
43
43
|
this.#modelObservers = new Platform.MapUtilities.Multimap();
|
44
44
|
this.#isSuspended = false;
|
45
|
-
this.#
|
45
|
+
this.#browserTarget = null;
|
46
46
|
this.#scopeTarget = null;
|
47
47
|
this.#scopedObservers = new WeakSet();
|
48
48
|
this.#defaultScopeSet = false;
|
@@ -82,7 +82,7 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
82
82
|
}
|
83
83
|
this.#isSuspended = true;
|
84
84
|
this.dispatchEventToListeners(Events.SUSPEND_STATE_CHANGED);
|
85
|
-
const suspendPromises = Array.from(this.#
|
85
|
+
const suspendPromises = Array.from(this.#targets.values(), target => target.suspend(reason));
|
86
86
|
await Promise.all(suspendPromises);
|
87
87
|
}
|
88
88
|
|
@@ -92,7 +92,7 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
92
92
|
}
|
93
93
|
this.#isSuspended = false;
|
94
94
|
this.dispatchEventToListeners(Events.SUSPEND_STATE_CHANGED);
|
95
|
-
const resumePromises = Array.from(this.#
|
95
|
+
const resumePromises = Array.from(this.#targets.values(), target => target.resume());
|
96
96
|
await Promise.all(resumePromises);
|
97
97
|
}
|
98
98
|
|
@@ -102,7 +102,7 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
102
102
|
|
103
103
|
models<T extends SDKModel>(modelClass: ModelClass<T>, opts?: {scoped: boolean}): T[] {
|
104
104
|
const result = [];
|
105
|
-
for (const target of this.#
|
105
|
+
for (const target of this.#targets) {
|
106
106
|
if (opts?.scoped && !this.isInScope(target)) {
|
107
107
|
continue;
|
108
108
|
}
|
@@ -194,7 +194,7 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
194
194
|
if (opts?.scoped) {
|
195
195
|
this.#scopedObservers.add(targetObserver);
|
196
196
|
}
|
197
|
-
for (const target of this.#
|
197
|
+
for (const target of this.#targets) {
|
198
198
|
if (!opts?.scoped || this.isInScope(target)) {
|
199
199
|
targetObserver.targetAdded(target);
|
200
200
|
}
|
@@ -217,7 +217,7 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
217
217
|
void target.pageAgent().invoke_waitForDebugger();
|
218
218
|
}
|
219
219
|
target.createModels(new Set(this.#modelObservers.keysArray()));
|
220
|
-
this.#
|
220
|
+
this.#targets.add(target);
|
221
221
|
|
222
222
|
const inScope = this.isInScope(target);
|
223
223
|
// Iterate over a copy. #observers might be modified during iteration.
|
@@ -250,12 +250,12 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
250
250
|
}
|
251
251
|
|
252
252
|
removeTarget(target: Target): void {
|
253
|
-
if (!this.#
|
253
|
+
if (!this.#targets.has(target)) {
|
254
254
|
return;
|
255
255
|
}
|
256
256
|
|
257
257
|
const inScope = this.isInScope(target);
|
258
|
-
this.#
|
258
|
+
this.#targets.delete(target);
|
259
259
|
for (const modelClass of target.models().keys()) {
|
260
260
|
const model = target.models().get(modelClass);
|
261
261
|
assertNotNullOrUndefined(model);
|
@@ -280,7 +280,7 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
280
280
|
}
|
281
281
|
|
282
282
|
targets(): Target[] {
|
283
|
-
return [...this.#
|
283
|
+
return [...this.#targets];
|
284
284
|
}
|
285
285
|
|
286
286
|
targetById(id: string): Target|null {
|
@@ -289,10 +289,10 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
289
289
|
}
|
290
290
|
|
291
291
|
rootTarget(): Target|null {
|
292
|
-
if (this.#
|
292
|
+
if (this.#targets.size === 0) {
|
293
293
|
return null;
|
294
294
|
}
|
295
|
-
return this.#
|
295
|
+
return this.#targets.values().next().value ?? null;
|
296
296
|
}
|
297
297
|
|
298
298
|
primaryPageTarget(): Target|null {
|
@@ -307,25 +307,25 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
307
307
|
}
|
308
308
|
|
309
309
|
browserTarget(): Target|null {
|
310
|
-
return this.#
|
310
|
+
return this.#browserTarget;
|
311
311
|
}
|
312
312
|
|
313
313
|
async maybeAttachInitialTarget(): Promise<boolean> {
|
314
314
|
if (!Boolean(Root.Runtime.Runtime.queryParam('browserConnection'))) {
|
315
315
|
return false;
|
316
316
|
}
|
317
|
-
if (!this.#
|
318
|
-
this.#
|
317
|
+
if (!this.#browserTarget) {
|
318
|
+
this.#browserTarget = new Target(
|
319
319
|
this, /* #id*/ 'main', /* #name*/ 'browser', TargetType.BROWSER, /* #parentTarget*/ null,
|
320
320
|
/* #sessionId */ '', /* suspended*/ false, /* #connection*/ null, /* targetInfo*/ undefined);
|
321
|
-
this.#
|
321
|
+
this.#browserTarget.createModels(new Set(this.#modelObservers.keysArray()));
|
322
322
|
}
|
323
323
|
const targetId =
|
324
324
|
await Host.InspectorFrontendHost.InspectorFrontendHostInstance.initialTargetId() as Protocol.Target.TargetID;
|
325
325
|
// Do not await for Target.autoAttachRelated to return, as it goes throguh the renderer and we don't want to block early
|
326
326
|
// at front-end initialization if a renderer is stuck. The rest of #target discovery and auto-attach process should happen
|
327
327
|
// asynchronously upon Target.attachedToTarget.
|
328
|
-
void this.#
|
328
|
+
void this.#browserTarget.targetAgent().invoke_autoAttachRelated({
|
329
329
|
targetId,
|
330
330
|
waitForDebuggerOnStart: true,
|
331
331
|
});
|
@@ -333,7 +333,7 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
333
333
|
}
|
334
334
|
|
335
335
|
clearAllTargetsForTest(): void {
|
336
|
-
this.#
|
336
|
+
this.#targets.clear();
|
337
337
|
}
|
338
338
|
|
339
339
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
@@ -35,8 +35,8 @@ export type TokenOrComment = Acorn.Token|Acorn.Comment;
|
|
35
35
|
*/
|
36
36
|
export class AcornTokenizer {
|
37
37
|
#textCursor: TextUtils.TextCursor.TextCursor;
|
38
|
-
#
|
39
|
-
#
|
38
|
+
#tokenLineStart: number;
|
39
|
+
#tokenLineEnd: number;
|
40
40
|
#tokens: Array<Acorn.Comment|Acorn.Token>;
|
41
41
|
#idx = 0;
|
42
42
|
|
@@ -44,8 +44,8 @@ export class AcornTokenizer {
|
|
44
44
|
this.#tokens = tokens;
|
45
45
|
const contentLineEndings = Platform.StringUtilities.findLineEndingIndexes(content);
|
46
46
|
this.#textCursor = new TextUtils.TextCursor.TextCursor(contentLineEndings);
|
47
|
-
this.#
|
48
|
-
this.#
|
47
|
+
this.#tokenLineStart = 0;
|
48
|
+
this.#tokenLineEnd = 0;
|
49
49
|
}
|
50
50
|
|
51
51
|
static punctuator(token: Acorn.Token, values?: string): boolean {
|
@@ -83,10 +83,10 @@ export class AcornTokenizer {
|
|
83
83
|
}
|
84
84
|
|
85
85
|
this.#textCursor.advance(token.start);
|
86
|
-
this.#
|
86
|
+
this.#tokenLineStart = this.#textCursor.lineNumber();
|
87
87
|
|
88
88
|
this.#textCursor.advance(token.end);
|
89
|
-
this.#
|
89
|
+
this.#tokenLineEnd = this.#textCursor.lineNumber();
|
90
90
|
return token;
|
91
91
|
}
|
92
92
|
|
@@ -99,11 +99,11 @@ export class AcornTokenizer {
|
|
99
99
|
}
|
100
100
|
|
101
101
|
tokenLineStart(): number {
|
102
|
-
return this.#
|
102
|
+
return this.#tokenLineStart;
|
103
103
|
}
|
104
104
|
|
105
105
|
tokenLineEnd(): number {
|
106
|
-
return this.#
|
106
|
+
return this.#tokenLineEnd;
|
107
107
|
}
|
108
108
|
}
|
109
109
|
|
@@ -229,7 +229,7 @@ function hasTokenInSet(tokenTypes: Set<string>, type: string): boolean {
|
|
229
229
|
|
230
230
|
export class HTMLModel {
|
231
231
|
#state: ParseState = ParseState.INITIAL;
|
232
|
-
readonly #
|
232
|
+
readonly #document: FormatterElement;
|
233
233
|
#stack: FormatterElement[];
|
234
234
|
readonly #tokens: Token[] = [];
|
235
235
|
#tokenIndex = 0;
|
@@ -241,11 +241,11 @@ export class HTMLModel {
|
|
241
241
|
#tagEndOffset?: number|null;
|
242
242
|
|
243
243
|
constructor(text: string) {
|
244
|
-
this.#
|
245
|
-
this.#
|
246
|
-
this.#
|
244
|
+
this.#document = new FormatterElement('document');
|
245
|
+
this.#document.openTag = new Tag('document', 0, 0, new Map(), true, false);
|
246
|
+
this.#document.closeTag = new Tag('document', text.length, text.length, new Map(), false, false);
|
247
247
|
|
248
|
-
this.#stack = [this.#
|
248
|
+
this.#stack = [this.#document];
|
249
249
|
|
250
250
|
this.#build(text);
|
251
251
|
}
|
@@ -432,7 +432,7 @@ export class HTMLModel {
|
|
432
432
|
const topElement = this.#stack[this.#stack.length - 1];
|
433
433
|
if (topElement) {
|
434
434
|
const tagSet = AutoClosingTags.get(topElement.name);
|
435
|
-
if (topElement !== this.#
|
435
|
+
if (topElement !== this.#document && topElement.openTag?.selfClosingTag) {
|
436
436
|
this.#popElement(autocloseTag(topElement, topElement.openTag.endOffset));
|
437
437
|
} else if (tagSet?.has(tag.name)) {
|
438
438
|
this.#popElement(autocloseTag(topElement, tag.startOffset));
|
@@ -485,7 +485,7 @@ export class HTMLModel {
|
|
485
485
|
}
|
486
486
|
|
487
487
|
document(): FormatterElement {
|
488
|
-
return this.#
|
488
|
+
return this.#document;
|
489
489
|
}
|
490
490
|
}
|
491
491
|
|
@@ -237,7 +237,7 @@ export class BottomUpAllocationNode {
|
|
237
237
|
liveCount: number;
|
238
238
|
liveSize: number;
|
239
239
|
traceTopIds: number[];
|
240
|
-
readonly #
|
240
|
+
readonly #callers: BottomUpAllocationNode[];
|
241
241
|
constructor(functionInfo: FunctionAllocationInfo) {
|
242
242
|
this.functionInfo = functionInfo;
|
243
243
|
this.allocationCount = 0;
|
@@ -247,14 +247,14 @@ export class BottomUpAllocationNode {
|
|
247
247
|
|
248
248
|
this.traceTopIds = [];
|
249
249
|
|
250
|
-
this.#
|
250
|
+
this.#callers = [];
|
251
251
|
}
|
252
252
|
|
253
253
|
addCaller(traceNode: TopDownAllocationNode): BottomUpAllocationNode {
|
254
254
|
const functionInfo = traceNode.functionInfo;
|
255
255
|
let result;
|
256
|
-
for (let i = 0; i < this.#
|
257
|
-
const caller = this.#
|
256
|
+
for (let i = 0; i < this.#callers.length; i++) {
|
257
|
+
const caller = this.#callers[i];
|
258
258
|
if (caller.functionInfo === functionInfo) {
|
259
259
|
result = caller;
|
260
260
|
break;
|
@@ -262,17 +262,17 @@ export class BottomUpAllocationNode {
|
|
262
262
|
}
|
263
263
|
if (!result) {
|
264
264
|
result = new BottomUpAllocationNode(functionInfo);
|
265
|
-
this.#
|
265
|
+
this.#callers.push(result);
|
266
266
|
}
|
267
267
|
return result;
|
268
268
|
}
|
269
269
|
|
270
270
|
callers(): BottomUpAllocationNode[] {
|
271
|
-
return this.#
|
271
|
+
return this.#callers;
|
272
272
|
}
|
273
273
|
|
274
274
|
hasCallers(): boolean {
|
275
|
-
return this.#
|
275
|
+
return this.#callers.length > 0;
|
276
276
|
}
|
277
277
|
}
|
278
278
|
|
@@ -197,7 +197,7 @@ export class HeapSnapshotEdgeIterator implements HeapSnapshotItemIterator {
|
|
197
197
|
|
198
198
|
export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
199
199
|
protected snapshot: HeapSnapshot;
|
200
|
-
#
|
200
|
+
#retainerIndex!: number;
|
201
201
|
#globalEdgeIndex!: number;
|
202
202
|
#retainingNodeIndex?: number;
|
203
203
|
#edgeInstance?: JSHeapSnapshotEdge|null;
|
@@ -224,7 +224,7 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
224
224
|
}
|
225
225
|
|
226
226
|
node(): HeapSnapshotNode {
|
227
|
-
return this
|
227
|
+
return this.#node();
|
228
228
|
}
|
229
229
|
|
230
230
|
nodeIndex(): number {
|
@@ -236,11 +236,11 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
236
236
|
}
|
237
237
|
|
238
238
|
retainerIndex(): number {
|
239
|
-
return this.#
|
239
|
+
return this.#retainerIndex;
|
240
240
|
}
|
241
241
|
|
242
242
|
setRetainerIndex(retainerIndex: number): void {
|
243
|
-
if (retainerIndex === this.#
|
243
|
+
if (retainerIndex === this.#retainerIndex) {
|
244
244
|
return;
|
245
245
|
}
|
246
246
|
|
@@ -248,7 +248,7 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
248
248
|
throw new Error('Snapshot does not contain retaining edges or retaining nodes');
|
249
249
|
}
|
250
250
|
|
251
|
-
this.#
|
251
|
+
this.#retainerIndex = retainerIndex;
|
252
252
|
this.#globalEdgeIndex = this.snapshot.retainingEdges[retainerIndex];
|
253
253
|
this.#retainingNodeIndex = this.snapshot.retainingNodes[retainerIndex];
|
254
254
|
this.#edgeInstance = null;
|
@@ -259,7 +259,7 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
259
259
|
this.setRetainerIndex(edgeIndex);
|
260
260
|
}
|
261
261
|
|
262
|
-
|
262
|
+
#node(): HeapSnapshotNode {
|
263
263
|
if (!this.#nodeInstance) {
|
264
264
|
this.#nodeInstance = this.snapshot.createNode(this.#retainingNodeIndex);
|
265
265
|
}
|
@@ -278,7 +278,7 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
278
278
|
}
|
279
279
|
|
280
280
|
itemIndex(): number {
|
281
|
-
return this.#
|
281
|
+
return this.#retainerIndex;
|
282
282
|
}
|
283
283
|
|
284
284
|
serialize(): HeapSnapshotModel.HeapSnapshotModel.Edge {
|
@@ -893,7 +893,7 @@ export abstract class HeapSnapshot {
|
|
893
893
|
readonly #noDistance = -5;
|
894
894
|
rootNodeIndexInternal = 0;
|
895
895
|
#snapshotDiffs: Record<string, Record<string, HeapSnapshotModel.HeapSnapshotModel.Diff>> = {};
|
896
|
-
#
|
896
|
+
#aggregatesForDiff?: {
|
897
897
|
interfaceDefinitions: string,
|
898
898
|
aggregates: Record<string, HeapSnapshotModel.HeapSnapshotModel.AggregateForDiff>,
|
899
899
|
};
|
@@ -1446,7 +1446,7 @@ export abstract class HeapSnapshot {
|
|
1446
1446
|
// for class keys.
|
1447
1447
|
aggregates = Object.create(null);
|
1448
1448
|
for (const [classKey, aggregate] of aggregatesMap.entries()) {
|
1449
|
-
const newKey = this
|
1449
|
+
const newKey = this.#classKeyFromClassKey(classKey);
|
1450
1450
|
aggregates[newKey] = aggregate;
|
1451
1451
|
}
|
1452
1452
|
if (key) {
|
@@ -1483,8 +1483,8 @@ export abstract class HeapSnapshot {
|
|
1483
1483
|
|
1484
1484
|
aggregatesForDiff(interfaceDefinitions: string):
|
1485
1485
|
Record<string, HeapSnapshotModel.HeapSnapshotModel.AggregateForDiff> {
|
1486
|
-
if (this.#
|
1487
|
-
return this.#
|
1486
|
+
if (this.#aggregatesForDiff?.interfaceDefinitions === interfaceDefinitions) {
|
1487
|
+
return this.#aggregatesForDiff.aggregates;
|
1488
1488
|
}
|
1489
1489
|
|
1490
1490
|
// Temporarily apply the interface definitions from the other snapshot.
|
@@ -1509,7 +1509,7 @@ export abstract class HeapSnapshot {
|
|
1509
1509
|
result[classKey] = {name: node.className(), indexes, ids, selfSizes};
|
1510
1510
|
}
|
1511
1511
|
|
1512
|
-
this.#
|
1512
|
+
this.#aggregatesForDiff = {interfaceDefinitions, aggregates: result};
|
1513
1513
|
return result;
|
1514
1514
|
}
|
1515
1515
|
|
@@ -2702,14 +2702,14 @@ export abstract class HeapSnapshot {
|
|
2702
2702
|
// Converts an internal class key, suitable for categorizing within this
|
2703
2703
|
// snapshot, to a public class key, which can be used in comparisons
|
2704
2704
|
// between multiple snapshots.
|
2705
|
-
|
2705
|
+
#classKeyFromClassKey(key: string|number): string {
|
2706
2706
|
return typeof key === 'number' ? (',' + this.strings[key]) : key;
|
2707
2707
|
}
|
2708
2708
|
|
2709
2709
|
nodeClassKey(snapshotObjectId: number): string|null {
|
2710
2710
|
const node = this.nodeForSnapshotObjectId(snapshotObjectId);
|
2711
2711
|
if (node) {
|
2712
|
-
return this
|
2712
|
+
return this.#classKeyFromClassKey(node.classKeyInternal());
|
2713
2713
|
}
|
2714
2714
|
return null;
|
2715
2715
|
}
|
@@ -2921,7 +2921,7 @@ export interface HeapSnapshotHeader {
|
|
2921
2921
|
export abstract class HeapSnapshotItemProvider {
|
2922
2922
|
protected readonly iterator: HeapSnapshotItemIterator;
|
2923
2923
|
readonly #indexProvider: HeapSnapshotItemIndexProvider;
|
2924
|
-
readonly #
|
2924
|
+
readonly #isEmpty: boolean;
|
2925
2925
|
protected iterationOrder: number[]|null;
|
2926
2926
|
protected currentComparator: HeapSnapshotModel.HeapSnapshotModel.ComparatorConfig|null;
|
2927
2927
|
#sortedPrefixLength: number;
|
@@ -2929,7 +2929,7 @@ export abstract class HeapSnapshotItemProvider {
|
|
2929
2929
|
constructor(iterator: HeapSnapshotItemIterator, indexProvider: HeapSnapshotItemIndexProvider) {
|
2930
2930
|
this.iterator = iterator;
|
2931
2931
|
this.#indexProvider = indexProvider;
|
2932
|
-
this.#
|
2932
|
+
this.#isEmpty = !iterator.hasNext();
|
2933
2933
|
this.iterationOrder = null;
|
2934
2934
|
this.currentComparator = null;
|
2935
2935
|
this.#sortedPrefixLength = 0;
|
@@ -2947,7 +2947,7 @@ export abstract class HeapSnapshotItemProvider {
|
|
2947
2947
|
}
|
2948
2948
|
|
2949
2949
|
isEmpty(): boolean {
|
2950
|
-
return this.#
|
2950
|
+
return this.#isEmpty;
|
2951
2951
|
}
|
2952
2952
|
|
2953
2953
|
serializeItemsRange(begin: number, end: number): HeapSnapshotModel.HeapSnapshotModel.ItemsRange {
|
@@ -3849,10 +3849,10 @@ export class JSHeapSnapshotEdge extends HeapSnapshotEdge {
|
|
3849
3849
|
|
3850
3850
|
override hasStringName(): boolean {
|
3851
3851
|
if (!this.isShortcut()) {
|
3852
|
-
return this
|
3852
|
+
return this.#hasStringName();
|
3853
3853
|
}
|
3854
3854
|
// @ts-expect-error parseInt is successful against numbers.
|
3855
|
-
return isNaN(parseInt(this
|
3855
|
+
return isNaN(parseInt(this.#name(), 10));
|
3856
3856
|
}
|
3857
3857
|
|
3858
3858
|
isElement(): boolean {
|
@@ -3880,7 +3880,7 @@ export class JSHeapSnapshotEdge extends HeapSnapshotEdge {
|
|
3880
3880
|
}
|
3881
3881
|
|
3882
3882
|
override name(): string {
|
3883
|
-
const name = this
|
3883
|
+
const name = this.#name();
|
3884
3884
|
if (!this.isShortcut()) {
|
3885
3885
|
return String(name);
|
3886
3886
|
}
|
@@ -3913,14 +3913,14 @@ export class JSHeapSnapshotEdge extends HeapSnapshotEdge {
|
|
3913
3913
|
return '?' + name + '?';
|
3914
3914
|
}
|
3915
3915
|
|
3916
|
-
|
3916
|
+
#hasStringName(): boolean {
|
3917
3917
|
const type = this.rawType();
|
3918
3918
|
const snapshot = this.snapshot;
|
3919
3919
|
return type !== snapshot.edgeElementType && type !== snapshot.edgeHiddenType;
|
3920
3920
|
}
|
3921
3921
|
|
3922
|
-
|
3923
|
-
return this
|
3922
|
+
#name(): string|number {
|
3923
|
+
return this.#hasStringName() ? this.snapshot.strings[this.nameOrIndex()] : this.nameOrIndex();
|
3924
3924
|
}
|
3925
3925
|
|
3926
3926
|
private nameOrIndex(): number {
|
@@ -3932,7 +3932,7 @@ export class JSHeapSnapshotEdge extends HeapSnapshotEdge {
|
|
3932
3932
|
}
|
3933
3933
|
|
3934
3934
|
override nameIndex(): number {
|
3935
|
-
if (!this
|
3935
|
+
if (!this.#hasStringName()) {
|
3936
3936
|
throw new Error('Edge does not have string name');
|
3937
3937
|
}
|
3938
3938
|
return this.nameOrIndex();
|
@@ -158,9 +158,9 @@ export class GlobalAiButton extends UI.Widget.Widget {
|
|
158
158
|
|
159
159
|
const hasExplicitUserPreference =
|
160
160
|
UI.InspectorView.InspectorView.instance().isUserExplicitlyUpdatedDrawerOrientation();
|
161
|
-
const
|
162
|
-
|
163
|
-
if (
|
161
|
+
const isVerticalDrawerFeatureEnabled =
|
162
|
+
Boolean(Root.Runtime.hostConfig.devToolsFlexibleLayout?.verticalDrawerEnabled);
|
163
|
+
if (isVerticalDrawerFeatureEnabled && !hasExplicitUserPreference) {
|
164
164
|
// This mimics what we're doing while showing the drawer via `ESC`.
|
165
165
|
// There is a bug where opening the sidebar directly for the first time,
|
166
166
|
// and triggering a drawer rotation without calling `showDrawer({focus: true})` makes the drawer disappear.
|
@@ -43,6 +43,7 @@ import * as Root from '../../core/root/root.js';
|
|
43
43
|
import * as SDK from '../../core/sdk/sdk.js';
|
44
44
|
import * as AiAssistanceModel from '../../models/ai_assistance/ai_assistance.js';
|
45
45
|
import * as AutofillManager from '../../models/autofill_manager/autofill_manager.js';
|
46
|
+
import * as Badges from '../../models/badges/badges.js';
|
46
47
|
import * as Bindings from '../../models/bindings/bindings.js';
|
47
48
|
import * as Breakpoints from '../../models/breakpoints/breakpoints.js';
|
48
49
|
import * as CrUXManager from '../../models/crux-manager/crux-manager.js';
|
@@ -53,6 +54,7 @@ import * as Logs from '../../models/logs/logs.js';
|
|
53
54
|
import * as Persistence from '../../models/persistence/persistence.js';
|
54
55
|
import * as ProjectSettings from '../../models/project_settings/project_settings.js';
|
55
56
|
import * as Workspace from '../../models/workspace/workspace.js';
|
57
|
+
import type * as PanelCommon from '../../panels/common/common.js';
|
56
58
|
import * as Snippets from '../../panels/snippets/snippets.js';
|
57
59
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
58
60
|
import * as Snackbar from '../../ui/components/snackbars/snackbars.js';
|
@@ -122,6 +124,7 @@ const UIStrings = {
|
|
122
124
|
const str_ = i18n.i18n.registerUIStrings('entrypoints/main/MainImpl.ts', UIStrings);
|
123
125
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
124
126
|
|
127
|
+
let loadedPanelCommonModule: typeof PanelCommon|undefined;
|
125
128
|
export class MainImpl {
|
126
129
|
#readyForTestPromise = Promise.withResolvers<void>();
|
127
130
|
|
@@ -296,7 +299,6 @@ export class MainImpl {
|
|
296
299
|
Root.Runtime.experiments.register('sampling-heap-profiler-timeline', 'Sampling heap profiler timeline', true);
|
297
300
|
Root.Runtime.experiments.register(
|
298
301
|
'show-option-tp-expose-internals-in-heap-snapshot', 'Show option to expose internals in heap snapshots');
|
299
|
-
Root.Runtime.experiments.register('vertical-drawer', 'Enable vertical drawer configuration');
|
300
302
|
|
301
303
|
// Timeline
|
302
304
|
Root.Runtime.experiments.register(
|
@@ -341,11 +343,6 @@ export class MainImpl {
|
|
341
343
|
// New cookie features.
|
342
344
|
Root.Runtime.experiments.register('experimental-cookie-features', 'Enable experimental cookie features');
|
343
345
|
|
344
|
-
// Highlights a violating node or attribute by rendering a squiggly line under it and adding a tooltip linking to the issues panel.
|
345
|
-
Root.Runtime.experiments.register(
|
346
|
-
Root.Runtime.ExperimentName.HIGHLIGHT_ERRORS_ELEMENTS_PANEL,
|
347
|
-
'Highlights a violating node or attribute in the Elements panel DOM tree');
|
348
|
-
|
349
346
|
// Change grouping of sources panel to use Authored/Deployed trees
|
350
347
|
Root.Runtime.experiments.register(
|
351
348
|
Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING, 'Group sources into authored and deployed trees',
|
@@ -364,7 +361,6 @@ export class MainImpl {
|
|
364
361
|
|
365
362
|
Root.Runtime.experiments.enableExperimentsByDefault([
|
366
363
|
Root.Runtime.ExperimentName.FULL_ACCESSIBILITY_TREE,
|
367
|
-
Root.Runtime.ExperimentName.HIGHLIGHT_ERRORS_ELEMENTS_PANEL,
|
368
364
|
...(Root.Runtime.Runtime.queryParam('isChromeForTesting') ? ['protocol-monitor'] : []),
|
369
365
|
]);
|
370
366
|
|
@@ -521,9 +517,15 @@ export class MainImpl {
|
|
521
517
|
UI.ShortcutRegistry.ShortcutRegistry.instance({forceNew: true, actionRegistry: actionRegistryInstance});
|
522
518
|
this.#registerMessageSinkListener();
|
523
519
|
|
524
|
-
// Initialize `GDPClient` for Google Developer Program integration
|
520
|
+
// Initialize `GDPClient` and `UserBadges` for Google Developer Program integration
|
525
521
|
if (Root.Runtime.hostConfig.devToolsGdpProfiles?.enabled) {
|
526
522
|
void Host.GdpClient.GdpClient.instance().initialize();
|
523
|
+
void Badges.UserBadges.instance().initialize();
|
524
|
+
Badges.UserBadges.instance().addEventListener(Badges.Events.BADGE_TRIGGERED, async ev => {
|
525
|
+
loadedPanelCommonModule ??= await import('../../panels/common/common.js') as typeof PanelCommon;
|
526
|
+
const badgeNotification = new loadedPanelCommonModule.BadgeNotification();
|
527
|
+
void badgeNotification.present(ev.data);
|
528
|
+
});
|
527
529
|
}
|
528
530
|
|
529
531
|
MainImpl.timeEnd('Main._createAppUI');
|
@@ -790,13 +792,13 @@ export class SearchActionDelegate implements UI.ActionRegistration.ActionDelegat
|
|
790
792
|
let mainMenuItemInstance: MainMenuItem;
|
791
793
|
|
792
794
|
export class MainMenuItem implements UI.Toolbar.Provider {
|
793
|
-
readonly #
|
795
|
+
readonly #item: UI.Toolbar.ToolbarMenuButton;
|
794
796
|
constructor() {
|
795
|
-
this.#
|
797
|
+
this.#item = new UI.Toolbar.ToolbarMenuButton(
|
796
798
|
this.#handleContextMenu.bind(this), /* isIconDropdown */ true, /* useSoftMenu */ true, 'main-menu',
|
797
799
|
'dots-vertical');
|
798
|
-
this.#
|
799
|
-
this.#
|
800
|
+
this.#item.element.classList.add('main-menu');
|
801
|
+
this.#item.setTitle(i18nString(UIStrings.customizeAndControlDevtools));
|
800
802
|
}
|
801
803
|
|
802
804
|
static instance(opts: {
|
@@ -811,7 +813,7 @@ export class MainMenuItem implements UI.Toolbar.Provider {
|
|
811
813
|
}
|
812
814
|
|
813
815
|
item(): UI.Toolbar.ToolbarItem|null {
|
814
|
-
return this.#
|
816
|
+
return this.#item;
|
815
817
|
}
|
816
818
|
|
817
819
|
#handleContextMenu(contextMenu: UI.ContextMenu.ContextMenu): void {
|
@@ -900,7 +902,7 @@ export class MainMenuItem implements UI.Toolbar.Provider {
|
|
900
902
|
contextMenu.headerSection().appendCustomItem(dockItemElement, 'dock-side');
|
901
903
|
}
|
902
904
|
|
903
|
-
const button = this.#
|
905
|
+
const button = this.#item.element;
|
904
906
|
|
905
907
|
function setDockSide(side: UI.DockController.DockState): void {
|
906
908
|
void dockController.once(UI.DockController.Events.AFTER_DOCK_SIDE_CHANGED).then(() => button.focus());
|
@@ -6,7 +6,6 @@ import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
8
8
|
import type * as Platform from '../../core/platform/platform.js';
|
9
|
-
import * as Root from '../../core/root/root.js';
|
10
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
11
10
|
import * as Workspace from '../../models/workspace/workspace.js';
|
12
11
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
@@ -296,7 +295,7 @@ UI.ActionRegistration.registerActionExtension({
|
|
296
295
|
shortcut: 'Shift+Esc',
|
297
296
|
},
|
298
297
|
],
|
299
|
-
|
298
|
+
condition: config => Boolean(config?.devToolsFlexibleLayout?.verticalDrawerEnabled)
|
300
299
|
});
|
301
300
|
|
302
301
|
UI.ActionRegistration.registerActionExtension({
|