chrome-devtools-frontend 1.0.1512147 → 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/Images/src/ai-explorer-badge.svg +114 -0
- package/front_end/Images/src/code-whisperer-badge.svg +166 -0
- package/front_end/Images/src/devtools-user-badge.svg +129 -0
- package/front_end/Images/src/dom-detective-badge.svg +136 -0
- package/front_end/Images/src/speedster-badge.svg +166 -0
- 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 +76 -2
- 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/i18n/NumberFormatter.ts +7 -0
- 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 +18 -35
- package/front_end/models/ai_assistance/ai_assistance.ts +1 -1
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +7 -6
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +246 -119
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +187 -73
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +106 -100
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +20 -27
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +151 -0
- package/front_end/models/badges/AiExplorerBadge.ts +21 -0
- package/front_end/models/badges/Badge.ts +10 -9
- package/front_end/models/badges/CodeWhispererBadge.ts +21 -0
- package/front_end/models/badges/DOMDetectiveBadge.ts +21 -0
- package/front_end/models/badges/SpeedsterBadge.ts +7 -2
- package/front_end/models/badges/StarterBadge.ts +6 -1
- package/front_end/models/badges/UserBadges.ts +61 -9
- 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 -54
- 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 +140 -10
- package/front_end/panels/common/GdpSignUpDialog.ts +5 -0
- package/front_end/panels/common/badgeNotification.css +30 -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 +30 -18
- package/front_end/panels/elements/ElementsTreeOutline.ts +44 -48
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +7 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +54 -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 -18
- package/front_end/panels/settings/components/SyncSection.ts +26 -8
- 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 +73 -68
- 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 +47 -46
- 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/filter.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +1 -1
- package/front_end/ui/legacy/softDropDownButton.css +1 -1
- 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
- package/front_end/models/ai_assistance/data_formatters/Types.ts +0 -9
@@ -208,7 +208,7 @@ function getColorFromHsva(gamut: SpectrumGamut, hsva: Common.ColorUtils.Color4D)
|
|
208
208
|
}
|
209
209
|
|
210
210
|
export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox) {
|
211
|
-
|
211
|
+
#color?: Common.Color.Color;
|
212
212
|
private gamut: SpectrumGamut = SpectrumGamut.SRGB;
|
213
213
|
private colorElement: HTMLElement;
|
214
214
|
private colorDragElement: HTMLElement;
|
@@ -259,7 +259,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
259
259
|
private dragElement?: HTMLElement;
|
260
260
|
private dragHotSpotX?: number;
|
261
261
|
private dragHotSpotY?: number;
|
262
|
-
|
262
|
+
#colorName?: string;
|
263
263
|
private colorFormat: SpectrumColorFormat = Common.Color.Format.RGB;
|
264
264
|
private eyeDropperAbortController: AbortController|null = null;
|
265
265
|
private isFormatPickerShown = false;
|
@@ -269,7 +269,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
269
269
|
// selected form the palettes. That time, we don't
|
270
270
|
// want to return the value of the variable but the
|
271
271
|
// actual variable string.
|
272
|
-
|
272
|
+
#colorString?: string;
|
273
273
|
constructor(contrastInfo?: ContrastInfo|null) {
|
274
274
|
super({useShadowDom: true});
|
275
275
|
this.registerRequiredCSS(spectrumStyles);
|
@@ -621,7 +621,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
621
621
|
}
|
622
622
|
this.palettePanelShowing = show;
|
623
623
|
this.contentElement.classList.toggle('palette-panel-showing', show);
|
624
|
-
this
|
624
|
+
this.#focus();
|
625
625
|
}
|
626
626
|
|
627
627
|
private onCloseBtnKeydown(event: KeyboardEvent): void {
|
@@ -646,7 +646,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
646
646
|
/**
|
647
647
|
* (Suppress warning about preventScroll)
|
648
648
|
*/
|
649
|
-
|
649
|
+
#focus(): void {
|
650
650
|
if (!this.isShowing()) {
|
651
651
|
return;
|
652
652
|
}
|
@@ -717,7 +717,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
717
717
|
}
|
718
718
|
|
719
719
|
this.togglePalettePanel(false);
|
720
|
-
this
|
720
|
+
this.#focus();
|
721
721
|
}
|
722
722
|
|
723
723
|
private showLightnessShades(colorElement: HTMLElement, colorText: string, _event: Event): void {
|
@@ -1074,8 +1074,8 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1074
1074
|
}
|
1075
1075
|
|
1076
1076
|
get color(): Common.Color.Color {
|
1077
|
-
if (this
|
1078
|
-
return this
|
1077
|
+
if (this.#color) {
|
1078
|
+
return this.#color;
|
1079
1079
|
}
|
1080
1080
|
|
1081
1081
|
return getColorFromHsva(this.gamut, this.hsv);
|
@@ -1091,7 +1091,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1091
1091
|
// * If we give "" as an argument to this funciton, it means
|
1092
1092
|
// we want to clear the `colorStringInternal`.
|
1093
1093
|
if (colorString !== undefined) {
|
1094
|
-
this
|
1094
|
+
this.#colorString = colorString;
|
1095
1095
|
}
|
1096
1096
|
|
1097
1097
|
if (colorFormat !== undefined) {
|
@@ -1114,10 +1114,10 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1114
1114
|
// 0 as well. Meaning that, when the user comes to white, the hue will be reset to
|
1115
1115
|
// `0` which will change the state of the color picker unintentionally.
|
1116
1116
|
if (Array.isArray(colorOrHsv)) {
|
1117
|
-
this
|
1117
|
+
this.#color = undefined;
|
1118
1118
|
this.hsv = colorOrHsv;
|
1119
1119
|
} else if (colorOrHsv !== undefined) {
|
1120
|
-
this
|
1120
|
+
this.#color = colorOrHsv;
|
1121
1121
|
const oldHue = this.hsv ? this.hsv[0] : null;
|
1122
1122
|
this.hsv = getHsvFromColor(this.gamut, colorOrHsv);
|
1123
1123
|
// When the hue is powerless in lch color space
|
@@ -1134,7 +1134,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1134
1134
|
this.hsv[0] = oldHue;
|
1135
1135
|
}
|
1136
1136
|
}
|
1137
|
-
this
|
1137
|
+
this.#colorName = colorName;
|
1138
1138
|
|
1139
1139
|
if (this.contrastInfo) {
|
1140
1140
|
this.contrastInfo.setColor(Common.Color.Legacy.fromHSVA(this.hsv), this.colorFormat);
|
@@ -1152,7 +1152,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1152
1152
|
}
|
1153
1153
|
|
1154
1154
|
colorName(): string|undefined {
|
1155
|
-
return this
|
1155
|
+
return this.#colorName;
|
1156
1156
|
}
|
1157
1157
|
|
1158
1158
|
private colorString(): string {
|
@@ -1161,8 +1161,8 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1161
1161
|
// Empty string check is important here since we use
|
1162
1162
|
// that to point that the colorStringInternal is cleared
|
1163
1163
|
// and should not be used.
|
1164
|
-
if (this
|
1165
|
-
return this
|
1164
|
+
if (this.#colorString) {
|
1165
|
+
return this.#colorString;
|
1166
1166
|
}
|
1167
1167
|
|
1168
1168
|
const color = this.color;
|
@@ -140,14 +140,14 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
140
140
|
refreshCallback: (() => void)|undefined;
|
141
141
|
private dataTableHeaders: Record<string, Element>;
|
142
142
|
scrollContainerInternal: Element;
|
143
|
-
|
143
|
+
#dataContainer: Element;
|
144
144
|
private readonly dataTable: Element;
|
145
145
|
protected inline: boolean;
|
146
146
|
private columnsArray: ColumnDescriptor[];
|
147
147
|
columns: Record<string, ColumnDescriptor>;
|
148
148
|
visibleColumnsArray: ColumnDescriptor[];
|
149
149
|
cellClass: string|null;
|
150
|
-
|
150
|
+
#dataTableHead: HTMLTableSectionElement;
|
151
151
|
private readonly headerRow: Element;
|
152
152
|
private readonly dataTableColumnGroup: Element;
|
153
153
|
dataTableBody: Element;
|
@@ -166,7 +166,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
166
166
|
elementToDataGridNode: WeakMap<Node, DataGridNode<T>>;
|
167
167
|
disclosureColumnId?: string;
|
168
168
|
private sortColumnCell?: Element;
|
169
|
-
|
169
|
+
#rootNode?: DataGridNode<T>;
|
170
170
|
private editingNode?: DataGridNode<T>|null;
|
171
171
|
private columnWeightsSetting?: Common.Settings.Setting<any>;
|
172
172
|
creationNode?: DataGridNode<any>;
|
@@ -197,9 +197,9 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
197
197
|
|
198
198
|
this.dataTableHeaders = {};
|
199
199
|
|
200
|
-
this
|
201
|
-
this.dataTable = this.
|
202
|
-
this.scrollContainerInternal = this
|
200
|
+
this.#dataContainer = this.element.createChild('div', 'data-container');
|
201
|
+
this.dataTable = this.#dataContainer.createChild('table', 'data');
|
202
|
+
this.scrollContainerInternal = this.#dataContainer;
|
203
203
|
|
204
204
|
// FIXME: Add a createCallback which is different from editCallback and has different
|
205
205
|
// behavior when creating a new node.
|
@@ -219,8 +219,8 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
219
219
|
|
220
220
|
this.dataTableColumnGroup = this.dataTable.createChild('colgroup');
|
221
221
|
|
222
|
-
this
|
223
|
-
this.headerRow = this.
|
222
|
+
this.#dataTableHead = this.dataTable.createChild('thead');
|
223
|
+
this.headerRow = this.#dataTableHead.createChild('tr');
|
224
224
|
|
225
225
|
this.dataTableBody = this.dataTable.createChild('tbody');
|
226
226
|
this.topFillerRow = this.dataTableBody.createChild('tr', 'data-grid-filler-row revealed');
|
@@ -260,7 +260,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
260
260
|
}
|
261
261
|
|
262
262
|
private firstSelectableNode(): DataGridNode<T>|null|undefined {
|
263
|
-
let firstSelectableNode: (DataGridNode<T>|undefined) = this
|
263
|
+
let firstSelectableNode: (DataGridNode<T>|undefined) = this.#rootNode;
|
264
264
|
while (firstSelectableNode && !firstSelectableNode.selectable) {
|
265
265
|
firstSelectableNode = firstSelectableNode.traverseNextNode(true) || undefined;
|
266
266
|
}
|
@@ -268,8 +268,8 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
268
268
|
}
|
269
269
|
|
270
270
|
private lastSelectableNode(): DataGridNode<T>|undefined {
|
271
|
-
let lastSelectableNode: DataGridNode<T>|(DataGridNode<T>| undefined) = this
|
272
|
-
let iterator: (DataGridNode<T>|undefined) = this
|
271
|
+
let lastSelectableNode: DataGridNode<T>|(DataGridNode<T>| undefined) = this.#rootNode;
|
272
|
+
let iterator: (DataGridNode<T>|undefined) = this.#rootNode;
|
273
273
|
while (iterator) {
|
274
274
|
if (iterator.selectable) {
|
275
275
|
lastSelectableNode = iterator;
|
@@ -383,7 +383,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
383
383
|
}
|
384
384
|
|
385
385
|
protected getNumberOfRows(): number {
|
386
|
-
return this
|
386
|
+
return this.#rootNode ? this.enumerateChildren(this.#rootNode, [], 1).length : 0;
|
387
387
|
}
|
388
388
|
|
389
389
|
updateGridAccessibleNameOnFocus(): void {
|
@@ -400,7 +400,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
400
400
|
accessibleText = `${rowHeader} ${this.selectedNode.nodeAccessibleText}`;
|
401
401
|
} else {
|
402
402
|
// 2) If there is no selected item - Read the name of the grid and give instructions
|
403
|
-
if (!this
|
403
|
+
if (!this.#rootNode) {
|
404
404
|
return;
|
405
405
|
}
|
406
406
|
const numberOfRows = this.getNumberOfRows();
|
@@ -546,12 +546,12 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
546
546
|
}
|
547
547
|
|
548
548
|
protected setRootNode(rootNode: DataGridNode<T>): void {
|
549
|
-
if (this
|
550
|
-
this.
|
551
|
-
this.
|
552
|
-
this.
|
549
|
+
if (this.#rootNode) {
|
550
|
+
this.#rootNode.removeChildren();
|
551
|
+
this.#rootNode.dataGrid = null;
|
552
|
+
this.#rootNode.isRoot = false;
|
553
553
|
}
|
554
|
-
this
|
554
|
+
this.#rootNode = rootNode;
|
555
555
|
rootNode.isRoot = true;
|
556
556
|
rootNode.setHasChildren(false);
|
557
557
|
rootNode.expandedInternal = true;
|
@@ -561,7 +561,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
561
561
|
}
|
562
562
|
|
563
563
|
rootNode(): DataGridNode<T> {
|
564
|
-
let rootNode: DataGridNode<T>|(DataGridNode<T>| undefined) = this
|
564
|
+
let rootNode: DataGridNode<T>|(DataGridNode<T>| undefined) = this.#rootNode;
|
565
565
|
if (!rootNode) {
|
566
566
|
rootNode = new DataGridNode();
|
567
567
|
this.setRootNode(rootNode);
|
@@ -894,10 +894,10 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
894
894
|
}
|
895
895
|
|
896
896
|
maxDescentLevel = maxDescentLevel || 0;
|
897
|
-
if (!this
|
897
|
+
if (!this.#rootNode) {
|
898
898
|
return;
|
899
899
|
}
|
900
|
-
const children = this.enumerateChildren(this
|
900
|
+
const children = this.enumerateChildren(this.#rootNode, [], maxDescentLevel + 1);
|
901
901
|
for (let i = 0; i < children.length; ++i) {
|
902
902
|
const node = children[i];
|
903
903
|
for (let j = 0; j < this.columnsArray.length; ++j) {
|
@@ -955,7 +955,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
955
955
|
|
956
956
|
// Use container size to avoid changes of table width caused by change of column widths.
|
957
957
|
const tableWidth = this.element.offsetWidth - this.cornerWidth;
|
958
|
-
const cells = this.
|
958
|
+
const cells = this.#dataTableHead.rows[0].cells;
|
959
959
|
const numColumns = cells.length - 1; // Do not process corner column.
|
960
960
|
for (let i = 0; i < numColumns; i++) {
|
961
961
|
const column = this.visibleColumnsArray[i];
|
@@ -1025,7 +1025,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
1025
1025
|
|
1026
1026
|
private getPreferredWidth(columnIndex: number): number {
|
1027
1027
|
return elementToPreferedWidthMap.get(this.dataTableColumnGroup.children[columnIndex]) ||
|
1028
|
-
this.
|
1028
|
+
this.#dataTableHead.rows[0].cells[columnIndex].offsetWidth;
|
1029
1029
|
}
|
1030
1030
|
|
1031
1031
|
private applyColumnWeights(): void {
|
@@ -1104,7 +1104,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
1104
1104
|
// Get the width of the cell in the first (and only) row of the
|
1105
1105
|
// header table in order to determine the width of the column, since
|
1106
1106
|
// it is not possible to query a column for its width.
|
1107
|
-
left[i] = (left[i - 1] || 0) + this.
|
1107
|
+
left[i] = (left[i - 1] || 0) + this.#dataTableHead.rows[0].cells[i].offsetWidth;
|
1108
1108
|
}
|
1109
1109
|
|
1110
1110
|
// Make n - 1 resizers for n columns.
|
@@ -1442,7 +1442,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
1442
1442
|
}
|
1443
1443
|
}
|
1444
1444
|
|
1445
|
-
if (target.isSelfOrDescendant(this
|
1445
|
+
if (target.isSelfOrDescendant(this.#dataTableHead)) {
|
1446
1446
|
if (this.headerContextMenuCallback) {
|
1447
1447
|
this.headerContextMenuCallback(contextMenu);
|
1448
1448
|
}
|
@@ -1652,11 +1652,11 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
1652
1652
|
// container's height matches the visible scrollable data area as seen by the user.
|
1653
1653
|
|
1654
1654
|
protected headerHeightInScroller(): number {
|
1655
|
-
return this.scrollContainer === this
|
1655
|
+
return this.scrollContainer === this.#dataContainer ? this.headerHeight() : 0;
|
1656
1656
|
}
|
1657
1657
|
|
1658
1658
|
headerHeight(): number {
|
1659
|
-
return this.
|
1659
|
+
return this.#dataTableHead.offsetHeight;
|
1660
1660
|
}
|
1661
1661
|
|
1662
1662
|
revealNode(element: HTMLElement): void {
|
@@ -1720,18 +1720,18 @@ export type DataGridData = Record<string, any>;
|
|
1720
1720
|
export class DataGridNode<T> {
|
1721
1721
|
elementInternal: HTMLElement|null = null;
|
1722
1722
|
expandedInternal = false;
|
1723
|
-
|
1723
|
+
#selected = false;
|
1724
1724
|
private dirty = false;
|
1725
1725
|
private inactive = false;
|
1726
1726
|
private highlighted = false;
|
1727
|
-
|
1727
|
+
#depth: number|undefined;
|
1728
1728
|
revealedInternal: boolean|undefined;
|
1729
1729
|
protected attachedInternal = false;
|
1730
1730
|
private savedPosition: {
|
1731
1731
|
parent: DataGridNode<T>,
|
1732
1732
|
index: number,
|
1733
1733
|
}|null = null;
|
1734
|
-
|
1734
|
+
#shouldRefreshChildren = true;
|
1735
1735
|
|
1736
1736
|
children: Array<DataGridNode<T>> = [];
|
1737
1737
|
dataGrid: DataGridImpl<T>|null = null;
|
@@ -1744,12 +1744,12 @@ export class DataGridNode<T> {
|
|
1744
1744
|
nodeAccessibleText = '';
|
1745
1745
|
cellAccessibleTextMap = new Map<string, string>();
|
1746
1746
|
isCreationNode = false;
|
1747
|
-
|
1748
|
-
|
1747
|
+
#data: DataGridData;
|
1748
|
+
#hasChildren: boolean;
|
1749
1749
|
|
1750
1750
|
constructor(data?: DataGridData|null, hasChildren?: boolean) {
|
1751
|
-
this
|
1752
|
-
this
|
1751
|
+
this.#data = data || {};
|
1752
|
+
this.#hasChildren = hasChildren || false;
|
1753
1753
|
}
|
1754
1754
|
|
1755
1755
|
element(): Element {
|
@@ -1769,7 +1769,7 @@ export class DataGridNode<T> {
|
|
1769
1769
|
this.dataGrid.elementToDataGridNode.set(this.elementInternal, this);
|
1770
1770
|
}
|
1771
1771
|
|
1772
|
-
if (this
|
1772
|
+
if (this.#hasChildren) {
|
1773
1773
|
this.elementInternal.classList.add('parent');
|
1774
1774
|
}
|
1775
1775
|
if (this.expanded) {
|
@@ -1812,7 +1812,7 @@ export class DataGridNode<T> {
|
|
1812
1812
|
const columnsArray = this.dataGrid.visibleColumnsArray;
|
1813
1813
|
const accessibleTextArray = [];
|
1814
1814
|
// Add depth if node is part of a tree
|
1815
|
-
if (this
|
1815
|
+
if (this.#hasChildren || !this.parent.isRoot) {
|
1816
1816
|
accessibleTextArray.push(i18nString(UIStrings.levelS, {PH1: this.depth + 1}));
|
1817
1817
|
}
|
1818
1818
|
for (let i = 0; i < columnsArray.length; ++i) {
|
@@ -1834,11 +1834,11 @@ export class DataGridNode<T> {
|
|
1834
1834
|
}
|
1835
1835
|
|
1836
1836
|
get data(): DataGridData {
|
1837
|
-
return this
|
1837
|
+
return this.#data;
|
1838
1838
|
}
|
1839
1839
|
|
1840
1840
|
set data(x: DataGridData) {
|
1841
|
-
this
|
1841
|
+
this.#data = x || {};
|
1842
1842
|
this.refresh();
|
1843
1843
|
}
|
1844
1844
|
|
@@ -1927,34 +1927,34 @@ export class DataGridNode<T> {
|
|
1927
1927
|
}
|
1928
1928
|
|
1929
1929
|
hasChildren(): boolean {
|
1930
|
-
return this
|
1930
|
+
return this.#hasChildren;
|
1931
1931
|
}
|
1932
1932
|
|
1933
1933
|
setHasChildren(x: boolean): void {
|
1934
|
-
if (this
|
1934
|
+
if (this.#hasChildren === x) {
|
1935
1935
|
return;
|
1936
1936
|
}
|
1937
1937
|
|
1938
|
-
this
|
1938
|
+
this.#hasChildren = x;
|
1939
1939
|
|
1940
1940
|
if (!this.elementInternal) {
|
1941
1941
|
return;
|
1942
1942
|
}
|
1943
1943
|
|
1944
|
-
this.elementInternal.classList.toggle('parent', this
|
1945
|
-
this.elementInternal.classList.toggle('expanded', this
|
1944
|
+
this.elementInternal.classList.toggle('parent', this.#hasChildren);
|
1945
|
+
this.elementInternal.classList.toggle('expanded', this.#hasChildren && this.expanded);
|
1946
1946
|
}
|
1947
1947
|
|
1948
1948
|
get depth(): number {
|
1949
|
-
if (this
|
1950
|
-
return this
|
1949
|
+
if (this.#depth !== undefined) {
|
1950
|
+
return this.#depth;
|
1951
1951
|
}
|
1952
1952
|
if (this.parent && !this.parent.isRoot) {
|
1953
|
-
this
|
1953
|
+
this.#depth = this.parent.depth + 1;
|
1954
1954
|
} else {
|
1955
|
-
this
|
1955
|
+
this.#depth = 0;
|
1956
1956
|
}
|
1957
|
-
return this
|
1957
|
+
return this.#depth;
|
1958
1958
|
}
|
1959
1959
|
|
1960
1960
|
get leftPadding(): number {
|
@@ -1962,18 +1962,18 @@ export class DataGridNode<T> {
|
|
1962
1962
|
}
|
1963
1963
|
|
1964
1964
|
get shouldRefreshChildren(): boolean {
|
1965
|
-
return this
|
1965
|
+
return this.#shouldRefreshChildren;
|
1966
1966
|
}
|
1967
1967
|
|
1968
1968
|
set shouldRefreshChildren(x: boolean) {
|
1969
|
-
this
|
1969
|
+
this.#shouldRefreshChildren = x;
|
1970
1970
|
if (x && this.expanded) {
|
1971
1971
|
this.expand();
|
1972
1972
|
}
|
1973
1973
|
}
|
1974
1974
|
|
1975
1975
|
get selected(): boolean {
|
1976
|
-
return this
|
1976
|
+
return this.#selected;
|
1977
1977
|
}
|
1978
1978
|
|
1979
1979
|
set selected(x: boolean) {
|
@@ -2089,7 +2089,7 @@ export class DataGridNode<T> {
|
|
2089
2089
|
|
2090
2090
|
resetNode(onlyCaches?: boolean): void {
|
2091
2091
|
// @TODO(allada) This is a hack to make sure ViewportDataGrid can clean up these caches. Try Not To Use.
|
2092
|
-
|
2092
|
+
this.#depth = undefined;
|
2093
2093
|
delete this.revealedInternal;
|
2094
2094
|
if (onlyCaches) {
|
2095
2095
|
return;
|
@@ -2133,14 +2133,14 @@ export class DataGridNode<T> {
|
|
2133
2133
|
child.dataGrid = this.dataGrid;
|
2134
2134
|
child.recalculateSiblings(index);
|
2135
2135
|
|
2136
|
-
child
|
2136
|
+
child.#shouldRefreshChildren = true;
|
2137
2137
|
|
2138
2138
|
let current: (DataGridNode<T>|null)|DataGridNode<T> = child.children[0];
|
2139
2139
|
while (current) {
|
2140
2140
|
current.resetNode(true);
|
2141
2141
|
current.dataGrid = this.dataGrid;
|
2142
2142
|
current.attachedInternal = false;
|
2143
|
-
current
|
2143
|
+
current.#shouldRefreshChildren = true;
|
2144
2144
|
current = current.traverseNextNode(false, child, true);
|
2145
2145
|
}
|
2146
2146
|
|
@@ -2243,20 +2243,20 @@ export class DataGridNode<T> {
|
|
2243
2243
|
}
|
2244
2244
|
|
2245
2245
|
expand(): void {
|
2246
|
-
if (!this
|
2246
|
+
if (!this.#hasChildren || this.expandedInternal) {
|
2247
2247
|
return;
|
2248
2248
|
}
|
2249
2249
|
if (this.isRoot) {
|
2250
2250
|
return;
|
2251
2251
|
}
|
2252
2252
|
|
2253
|
-
if (this.revealed && !this
|
2253
|
+
if (this.revealed && !this.#shouldRefreshChildren) {
|
2254
2254
|
for (let i = 0; i < this.children.length; ++i) {
|
2255
2255
|
this.children[i].revealed = true;
|
2256
2256
|
}
|
2257
2257
|
}
|
2258
2258
|
|
2259
|
-
if (this
|
2259
|
+
if (this.#shouldRefreshChildren) {
|
2260
2260
|
for (let i = 0; i < this.children.length; ++i) {
|
2261
2261
|
this.children[i].detach();
|
2262
2262
|
}
|
@@ -2273,7 +2273,7 @@ export class DataGridNode<T> {
|
|
2273
2273
|
}
|
2274
2274
|
}
|
2275
2275
|
|
2276
|
-
this
|
2276
|
+
this.#shouldRefreshChildren = false;
|
2277
2277
|
}
|
2278
2278
|
|
2279
2279
|
if (this.elementInternal) {
|
@@ -2318,7 +2318,7 @@ export class DataGridNode<T> {
|
|
2318
2318
|
this.dataGrid.selectedNode.deselect();
|
2319
2319
|
}
|
2320
2320
|
|
2321
|
-
this
|
2321
|
+
this.#selected = true;
|
2322
2322
|
this.dataGrid.selectedNode = this;
|
2323
2323
|
|
2324
2324
|
if (this.elementInternal) {
|
@@ -2346,7 +2346,7 @@ export class DataGridNode<T> {
|
|
2346
2346
|
return;
|
2347
2347
|
}
|
2348
2348
|
|
2349
|
-
this
|
2349
|
+
this.#selected = false;
|
2350
2350
|
this.dataGrid.selectedNode = null;
|
2351
2351
|
|
2352
2352
|
if (this.elementInternal) {
|
@@ -2362,7 +2362,7 @@ export class DataGridNode<T> {
|
|
2362
2362
|
traverseNextNode(skipHidden: boolean, stayWithin?: DataGridNode<T>|null, dontPopulate?: boolean, info?: {
|
2363
2363
|
depthChange: number,
|
2364
2364
|
}): DataGridNode<T>|null {
|
2365
|
-
if (!dontPopulate && this
|
2365
|
+
if (!dontPopulate && this.#hasChildren) {
|
2366
2366
|
this.populate();
|
2367
2367
|
}
|
2368
2368
|
|
@@ -2405,13 +2405,13 @@ export class DataGridNode<T> {
|
|
2405
2405
|
|
2406
2406
|
traversePreviousNode(skipHidden: boolean, dontPopulate?: boolean): DataGridNode<T>|null {
|
2407
2407
|
let node: (DataGridNode<T>|null) = (!skipHidden || this.revealed) ? this.previousSibling : null;
|
2408
|
-
if (!dontPopulate && node
|
2408
|
+
if (!dontPopulate && node && node.#hasChildren) {
|
2409
2409
|
node.populate();
|
2410
2410
|
}
|
2411
2411
|
|
2412
2412
|
while (node &&
|
2413
2413
|
((!skipHidden || (node.revealed && node.expanded)) ? node.children[node.children.length - 1] : null)) {
|
2414
|
-
if (!dontPopulate && node
|
2414
|
+
if (!dontPopulate && node && node.#hasChildren) {
|
2415
2415
|
node.populate();
|
2416
2416
|
}
|
2417
2417
|
node = ((!skipHidden || (node.revealed && node.expanded)) ? node.children[node.children.length - 1] : null);
|
@@ -2429,7 +2429,7 @@ export class DataGridNode<T> {
|
|
2429
2429
|
}
|
2430
2430
|
|
2431
2431
|
isEventWithinDisclosureTriangle(event: MouseEvent): boolean {
|
2432
|
-
if (!this
|
2432
|
+
if (!this.#hasChildren) {
|
2433
2433
|
return false;
|
2434
2434
|
}
|
2435
2435
|
const cell = UI.UIUtils.enclosingNodeOrSelfWithNodeName((event.target as Node), 'td');
|
@@ -82,7 +82,7 @@ export class ShowMoreDataGridNode extends DataGridNode<ShowMoreDataGridNode> {
|
|
82
82
|
this.showNext.addEventListener('click', this.showNextChunk.bind(this), false);
|
83
83
|
|
84
84
|
this.showAll = UI.UIUtils.createTextButton('');
|
85
|
-
this.showAll.addEventListener('click', this.
|
85
|
+
this.showAll.addEventListener('click', this.#showAll.bind(this), false);
|
86
86
|
|
87
87
|
this.showLast = UI.UIUtils.createTextButton(i18nString(UIStrings.showDAfter, {PH1: this.chunkSize}));
|
88
88
|
this.showLast.addEventListener('click', this.showLastChunk.bind(this), false);
|
@@ -95,7 +95,7 @@ export class ShowMoreDataGridNode extends DataGridNode<ShowMoreDataGridNode> {
|
|
95
95
|
void this.callback(this.startPosition, this.startPosition + this.chunkSize);
|
96
96
|
}
|
97
97
|
|
98
|
-
|
98
|
+
#showAll(): void {
|
99
99
|
void this.callback(this.startPosition, this.endPosition);
|
100
100
|
}
|
101
101
|
|
@@ -145,7 +145,7 @@ export const getObjectPropertiesSectionFrom = (element: Element): ObjectProperti
|
|
145
145
|
export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow {
|
146
146
|
private readonly object: SDK.RemoteObject.RemoteObject;
|
147
147
|
editable: boolean;
|
148
|
-
|
148
|
+
readonly #objectTreeElement: RootElement;
|
149
149
|
titleElement: Element;
|
150
150
|
skipProtoInternal?: boolean;
|
151
151
|
constructor(
|
@@ -159,8 +159,8 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
|
|
159
159
|
}
|
160
160
|
this.setFocusable(true);
|
161
161
|
this.setShowSelectionOnKeyboardFocus(true);
|
162
|
-
this
|
163
|
-
this.appendChild(this
|
162
|
+
this.#objectTreeElement = new RootElement(object, linkifier);
|
163
|
+
this.appendChild(this.#objectTreeElement);
|
164
164
|
if (typeof title === 'string' || !title) {
|
165
165
|
this.titleElement = this.element.createChild('span');
|
166
166
|
this.titleElement.textContent = title || '';
|
@@ -540,7 +540,7 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
|
|
540
540
|
}
|
541
541
|
|
542
542
|
expand(): void {
|
543
|
-
this.
|
543
|
+
this.#objectTreeElement.expand();
|
544
544
|
}
|
545
545
|
|
546
546
|
setEditable(value: boolean): void {
|
@@ -548,7 +548,7 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
|
|
548
548
|
}
|
549
549
|
|
550
550
|
objectTreeElement(): UI.TreeOutline.TreeElement {
|
551
|
-
return this
|
551
|
+
return this.#objectTreeElement;
|
552
552
|
}
|
553
553
|
|
554
554
|
enableContextMenu(): void {
|
@@ -561,20 +561,19 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
|
|
561
561
|
if (this.object instanceof SDK.RemoteObject.LocalJSONObject) {
|
562
562
|
contextMenu.viewSection().appendItem(
|
563
563
|
i18nString(UIStrings.expandRecursively),
|
564
|
-
this.
|
564
|
+
this.#objectTreeElement.expandRecursively.bind(this.#objectTreeElement, EXPANDABLE_MAX_DEPTH),
|
565
565
|
{jslogContext: 'expand-recursively'});
|
566
566
|
contextMenu.viewSection().appendItem(
|
567
567
|
i18nString(UIStrings.collapseChildren),
|
568
|
-
this.
|
569
|
-
{jslogContext: 'collapse-children'});
|
568
|
+
this.#objectTreeElement.collapseChildren.bind(this.#objectTreeElement), {jslogContext: 'collapse-children'});
|
570
569
|
}
|
571
570
|
void contextMenu.show();
|
572
571
|
}
|
573
572
|
|
574
573
|
titleLessMode(): void {
|
575
|
-
this.
|
576
|
-
this.
|
577
|
-
this.
|
574
|
+
this.#objectTreeElement.listItemElement.classList.add('hidden');
|
575
|
+
this.#objectTreeElement.childrenListElement.classList.add('title-less-mode');
|
576
|
+
this.#objectTreeElement.expand();
|
578
577
|
}
|
579
578
|
}
|
580
579
|
|