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
@@ -2,13 +2,17 @@
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
|
+
import * as Common from '../../core/common/common.js';
|
6
|
+
import * as Host from '../../core/host/host.js';
|
5
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
8
|
+
import * as Badges from '../../models/badges/badges.js';
|
6
9
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
7
10
|
import * as UI from '../../ui/legacy/legacy.js';
|
8
11
|
import * as Lit from '../../ui/lit/lit.js';
|
9
12
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
10
13
|
|
11
14
|
import badgeNotificationStyles from './badgeNotification.css.js';
|
15
|
+
import * as GdpSignUpDialog from './GdpSignUpDialog.js';
|
12
16
|
|
13
17
|
const {html, render} = Lit;
|
14
18
|
|
@@ -17,10 +21,50 @@ const UIStrings = {
|
|
17
21
|
* @description Title for close button
|
18
22
|
*/
|
19
23
|
dismiss: 'Dismiss',
|
24
|
+
/**
|
25
|
+
* @description Activity based badge award notification text
|
26
|
+
* @example {Badge Title} PH1
|
27
|
+
*/
|
28
|
+
activityBasedBadgeAwardMessage: 'You earned the {PH1} badge! It has been added to your Developer Profile.',
|
29
|
+
/**
|
30
|
+
* @description Action title for navigating to the badge settings in Google Developer Profile section
|
31
|
+
*/
|
32
|
+
badgeSettings: 'Badge settings',
|
33
|
+
/**
|
34
|
+
* @description Action title for opening the Google Developer Program profile page of the user in a new tab
|
35
|
+
*/
|
36
|
+
viewProfile: 'View profile',
|
37
|
+
/**
|
38
|
+
* @description Starter badge award notification text when the user has a Google Developer Program profile but did not enable receiving badges in DevTools yet
|
39
|
+
* @example {Badge Title} PH1
|
40
|
+
* @example {Google Developer Program link} PH2
|
41
|
+
*/
|
42
|
+
starterBadgeAwardMessageSettingDisabled: 'You earned the {PH1} badge for the {PH2}! Turn on badges to claim it.',
|
43
|
+
/**
|
44
|
+
* @description Starter badge award notification text when the user does not have a Google Developer Program profile.
|
45
|
+
* @example {Badge Title} PH1
|
46
|
+
* @example {Google Developer Program link} PH2
|
47
|
+
*/
|
48
|
+
starterBadgeAwardMessageNoGdpProfile:
|
49
|
+
'You earned the {PH1} badge for the {PH2}! Create a profile to claim your badge.',
|
50
|
+
/**
|
51
|
+
* @description Action title for snoozing the starter badge.
|
52
|
+
*/
|
53
|
+
remindMeLater: 'Remind me later',
|
54
|
+
/**
|
55
|
+
* @description Action title for enabling the "Receive badges" setting
|
56
|
+
*/
|
57
|
+
receiveBadges: 'Receive badges',
|
58
|
+
/**
|
59
|
+
* @description Action title for creating a Google Developer Program profle
|
60
|
+
*/
|
61
|
+
createProfile: 'Create profile',
|
20
62
|
} as const;
|
21
63
|
|
22
64
|
const str_ = i18n.i18n.registerUIStrings('panels/common/BadgeNotification.ts', UIStrings);
|
23
65
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
66
|
+
const i18nFormatString = i18n.i18n.getFormatLocalizedString.bind(undefined, str_);
|
67
|
+
const lockedString = i18n.i18n.lockedString;
|
24
68
|
|
25
69
|
export interface BadgeNotificationAction {
|
26
70
|
label: string;
|
@@ -30,7 +74,7 @@ export interface BadgeNotificationAction {
|
|
30
74
|
}
|
31
75
|
|
32
76
|
export interface BadgeNotificationProperties {
|
33
|
-
message:
|
77
|
+
message: HTMLElement|string;
|
34
78
|
imageUri: string;
|
35
79
|
actions: BadgeNotificationAction[];
|
36
80
|
}
|
@@ -66,12 +110,16 @@ const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement)
|
|
66
110
|
render(html`
|
67
111
|
<style>${badgeNotificationStyles}</style>
|
68
112
|
<div class="container">
|
113
|
+
<div class="badge-container">
|
114
|
+
<img class="badge-image" src=${input.imageUri}>
|
115
|
+
</div>
|
116
|
+
<div class="action-and-text-container">
|
69
117
|
<div class="label-container">
|
70
|
-
<img class="badge-image" src=${input.imageUri}>
|
71
118
|
<div class="message">${input.message}</div>
|
72
119
|
${crossButton}
|
73
120
|
</div>
|
74
121
|
<div class="long-action-container">${actionButtons}</div>
|
122
|
+
</div>
|
75
123
|
</div>
|
76
124
|
`, target);
|
77
125
|
};
|
@@ -80,7 +128,7 @@ const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement)
|
|
80
128
|
type View = typeof DEFAULT_VIEW;
|
81
129
|
|
82
130
|
export class BadgeNotification extends UI.Widget.Widget {
|
83
|
-
message:
|
131
|
+
message: HTMLElement|string = '';
|
84
132
|
imageUri = '';
|
85
133
|
actions: BadgeNotificationAction[] = [];
|
86
134
|
|
@@ -91,13 +139,95 @@ export class BadgeNotification extends UI.Widget.Widget {
|
|
91
139
|
this.#view = view;
|
92
140
|
}
|
93
141
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
142
|
+
async present(badge: Badges.Badge): Promise<void> {
|
143
|
+
if (badge.isStarterBadge) {
|
144
|
+
await this.#presentStarterBadge(badge);
|
145
|
+
} else {
|
146
|
+
this.#presentActivityBasedBadge(badge);
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
#show(properties: BadgeNotificationProperties): void {
|
151
|
+
this.message = properties.message;
|
152
|
+
this.imageUri = properties.imageUri;
|
153
|
+
this.actions = properties.actions;
|
154
|
+
this.requestUpdate();
|
155
|
+
this.show(UI.InspectorView.InspectorView.instance().element);
|
156
|
+
}
|
157
|
+
|
158
|
+
async #presentStarterBadge(badge: Badges.Badge): Promise<void> {
|
159
|
+
const gdpProfile = await Host.GdpClient.GdpClient.instance().getProfile();
|
160
|
+
const receiveBadgesSettingEnabled = Badges.UserBadges.instance().isReceiveBadgesSettingEnabled();
|
161
|
+
const googleDeveloperProgramLink = UI.XLink.XLink.create(
|
162
|
+
'https://developers.google.com/program', lockedString('Google Developer Program'), 'badge-link', undefined,
|
163
|
+
'gdp.program-link');
|
164
|
+
|
165
|
+
// If the user already has a GDP profile and the receive badges setting enabled,
|
166
|
+
// starter badge behaves as if it's an activity based badge.
|
167
|
+
if (gdpProfile && receiveBadgesSettingEnabled) {
|
168
|
+
this.#presentActivityBasedBadge(badge);
|
169
|
+
return;
|
170
|
+
}
|
171
|
+
|
172
|
+
// If the user already has a GDP profile and the receive badges setting disabled,
|
173
|
+
// starter badge behaves as a nudge for opting into receiving badges.
|
174
|
+
if (gdpProfile && !receiveBadgesSettingEnabled) {
|
175
|
+
this.#show({
|
176
|
+
message: i18nFormatString(
|
177
|
+
UIStrings.starterBadgeAwardMessageSettingDisabled, {PH1: badge.title, PH2: googleDeveloperProgramLink}),
|
178
|
+
actions: [
|
179
|
+
{
|
180
|
+
label: i18nString(UIStrings.remindMeLater),
|
181
|
+
onClick: () => {/* To implement */},
|
182
|
+
},
|
183
|
+
{label: i18nString(UIStrings.receiveBadges), onClick: () => { /* To implement */ }}
|
184
|
+
],
|
185
|
+
imageUri: badge.imageUri,
|
186
|
+
});
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
|
190
|
+
// The user does not have a GDP profile, starter badge acts as a nudge for creating a GDP profile.
|
191
|
+
this.#show({
|
192
|
+
message: i18nFormatString(
|
193
|
+
UIStrings.starterBadgeAwardMessageNoGdpProfile, {PH1: badge.title, PH2: googleDeveloperProgramLink}),
|
194
|
+
actions: [
|
195
|
+
{
|
196
|
+
label: i18nString(UIStrings.remindMeLater),
|
197
|
+
onClick: () => {/* TODO(ergunsh): Implement */},
|
198
|
+
},
|
199
|
+
{
|
200
|
+
label: i18nString(UIStrings.createProfile),
|
201
|
+
onClick: () => {
|
202
|
+
this.#close();
|
203
|
+
GdpSignUpDialog.GdpSignUpDialog.show();
|
204
|
+
}
|
205
|
+
}
|
206
|
+
],
|
207
|
+
imageUri: badge.imageUri,
|
208
|
+
});
|
209
|
+
}
|
210
|
+
|
211
|
+
#presentActivityBasedBadge(badge: Badges.Badge): void {
|
212
|
+
this.#show({
|
213
|
+
message: i18nString(UIStrings.activityBasedBadgeAwardMessage, {PH1: badge.title}),
|
214
|
+
actions: [
|
215
|
+
{
|
216
|
+
label: i18nString(UIStrings.badgeSettings),
|
217
|
+
onClick: () => {
|
218
|
+
this.#close();
|
219
|
+
void Common.Revealer.reveal(Common.Settings.moduleSetting('receive-gdp-badges'));
|
220
|
+
},
|
221
|
+
},
|
222
|
+
{
|
223
|
+
label: i18nString(UIStrings.viewProfile),
|
224
|
+
onClick: () => {
|
225
|
+
UI.UIUtils.openInNewTab(Host.GdpClient.GOOGLE_DEVELOPER_PROGRAM_PROFILE_LINK);
|
226
|
+
}
|
227
|
+
}
|
228
|
+
],
|
229
|
+
imageUri: badge.imageUri,
|
230
|
+
});
|
101
231
|
}
|
102
232
|
|
103
233
|
#close = (): void => {
|
@@ -3,9 +3,11 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
import '../../ui/components/switch/switch.js';
|
5
5
|
|
6
|
+
import * as Common from '../../core/common/common.js';
|
6
7
|
import * as Host from '../../core/host/host.js';
|
7
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
8
9
|
import type * as Platform from '../../core/platform/platform.js';
|
10
|
+
import * as Badges from '../../models/badges/badges.js';
|
9
11
|
import * as Geometry from '../../models/geometry/geometry.js';
|
10
12
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
11
13
|
import * as Snackbars from '../../ui/components/snackbars/snackbars.js';
|
@@ -200,6 +202,9 @@ export class GdpSignUpDialog extends UI.Widget.VBox {
|
|
200
202
|
this.#keepMeUpdated ? Host.GdpClient.EmailPreference.ENABLED : Host.GdpClient.EmailPreference.DISABLED;
|
201
203
|
const result = await Host.GdpClient.GdpClient.instance().createProfile({user, emailPreference});
|
202
204
|
if (result) {
|
205
|
+
Common.Settings.Settings.instance().moduleSetting('receive-gdp-badges').set(true);
|
206
|
+
await Badges.UserBadges.instance().initialize();
|
207
|
+
Badges.UserBadges.instance().recordAction(Badges.BadgeAction.GDP_SIGN_UP_COMPLETE);
|
203
208
|
this.#dialog.hide();
|
204
209
|
} else {
|
205
210
|
Snackbars.Snackbar.Snackbar.show({message: i18nString(UIStrings.signUpFailed)}, this.#dialog.contentElement);
|
@@ -16,37 +16,58 @@
|
|
16
16
|
|
17
17
|
.container {
|
18
18
|
display: flex;
|
19
|
-
|
20
|
-
align-items: flex-start;
|
19
|
+
align-items: center;
|
21
20
|
overflow: hidden;
|
22
|
-
width:
|
21
|
+
width: 485px;
|
23
22
|
background: var(--sys-color-inverse-surface);
|
24
23
|
box-shadow: var(--sys-elevation-level3);
|
25
24
|
border-radius: var(--sys-shape-corner-small);
|
26
|
-
font: var(--sys-typescale-body4-
|
25
|
+
font: var(--sys-typescale-body4-regular);
|
27
26
|
animation: slideIn 100ms cubic-bezier(0, 0, 0.3, 1);
|
28
27
|
box-sizing: border-box;
|
29
28
|
max-width: 100%;
|
30
29
|
padding: var(--sys-size-5) var(--sys-size-6) var(--sys-size-6) var(--sys-size-6);
|
31
30
|
}
|
32
31
|
|
32
|
+
.action-and-text-container {
|
33
|
+
display: flex;
|
34
|
+
flex-direction: column;
|
35
|
+
gap: var(--sys-size-3);
|
36
|
+
}
|
37
|
+
|
33
38
|
.long-action-container {
|
34
39
|
margin-left: auto;
|
40
|
+
/*
|
41
|
+
* Buttons have a 24px total height, which includes padding for the hover area.
|
42
|
+
* We apply a -3px vertical margin to compensate for this extra space.
|
43
|
+
* This ensures the component aligns based on the visual text height,
|
44
|
+
* not the full clickable bounding box.
|
45
|
+
*/
|
46
|
+
margin-block: -3px;
|
35
47
|
}
|
36
48
|
|
37
49
|
.label-container {
|
38
50
|
display: flex;
|
39
51
|
width: 100%;
|
40
52
|
align-items: center;
|
41
|
-
|
53
|
+
padding-block: var(--sys-size-3);
|
54
|
+
line-height: 18px;
|
55
|
+
}
|
56
|
+
|
57
|
+
.badge-container {
|
58
|
+
margin-right: 10px;
|
59
|
+
min-width: 64px;
|
60
|
+
height: 64px;
|
42
61
|
}
|
43
62
|
|
44
63
|
.badge-image {
|
45
|
-
|
46
|
-
|
47
|
-
height: 42px;
|
64
|
+
width: 100%;
|
65
|
+
height: 100%;
|
48
66
|
border-radius: var(--sys-shape-corner-full);
|
49
|
-
|
67
|
+
}
|
68
|
+
|
69
|
+
.badge-link {
|
70
|
+
color: var(--sys-color-inverse-primary);
|
50
71
|
}
|
51
72
|
|
52
73
|
.message {
|
@@ -32,19 +32,19 @@ export class ConsoleContextSelector implements SDK.TargetManager.SDKModelObserve
|
|
32
32
|
UI.SoftDropDown.Delegate<SDK.RuntimeModel.ExecutionContext> {
|
33
33
|
readonly items: UI.ListModel.ListModel<SDK.RuntimeModel.ExecutionContext>;
|
34
34
|
private readonly dropDown: UI.SoftDropDown.SoftDropDown<SDK.RuntimeModel.ExecutionContext>;
|
35
|
-
|
35
|
+
readonly #toolbarItem: UI.Toolbar.ToolbarItem;
|
36
36
|
|
37
37
|
constructor() {
|
38
38
|
this.items = new UI.ListModel.ListModel();
|
39
39
|
this.dropDown = new UI.SoftDropDown.SoftDropDown(this.items, this, 'javascript-context');
|
40
40
|
this.dropDown.setRowHeight(36);
|
41
|
-
this
|
42
|
-
this.
|
43
|
-
this.
|
41
|
+
this.#toolbarItem = new UI.Toolbar.ToolbarItem(this.dropDown.element);
|
42
|
+
this.#toolbarItem.setEnabled(false);
|
43
|
+
this.#toolbarItem.setTitle(i18nString(UIStrings.javascriptContextNotSelected));
|
44
44
|
this.items.addEventListener(
|
45
|
-
UI.ListModel.Events.ITEMS_REPLACED, () => this.
|
45
|
+
UI.ListModel.Events.ITEMS_REPLACED, () => this.#toolbarItem.setEnabled(Boolean(this.items.length)));
|
46
46
|
|
47
|
-
this.
|
47
|
+
this.#toolbarItem.element.classList.add('toolbar-has-dropdown');
|
48
48
|
|
49
49
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
50
50
|
SDK.RuntimeModel.RuntimeModel, SDK.RuntimeModel.Events.ExecutionContextCreated, this.onExecutionContextCreated,
|
@@ -70,7 +70,7 @@ export class ConsoleContextSelector implements SDK.TargetManager.SDKModelObserve
|
|
70
70
|
}
|
71
71
|
|
72
72
|
toolbarItem(): UI.Toolbar.ToolbarItem {
|
73
|
-
return this
|
73
|
+
return this.#toolbarItem;
|
74
74
|
}
|
75
75
|
|
76
76
|
highlightedItemChanged(
|
@@ -256,10 +256,10 @@ export class ConsoleContextSelector implements SDK.TargetManager.SDKModelObserve
|
|
256
256
|
}
|
257
257
|
|
258
258
|
itemSelected(item: SDK.RuntimeModel.ExecutionContext|null): void {
|
259
|
-
this.
|
259
|
+
this.#toolbarItem.element.classList.toggle('highlight', !this.isTopContext(item) && this.hasTopContext());
|
260
260
|
const title = item ? i18nString(UIStrings.javascriptContextS, {PH1: this.titleFor(item)}) :
|
261
261
|
i18nString(UIStrings.javascriptContextNotSelected);
|
262
|
-
this.
|
262
|
+
this.#toolbarItem.setTitle(title);
|
263
263
|
UI.Context.Context.instance().setFlavor(SDK.RuntimeModel.ExecutionContext, item);
|
264
264
|
}
|
265
265
|
|
@@ -48,7 +48,7 @@ const AI_CODE_COMPLETION_CHARACTER_LIMIT = 20_000;
|
|
48
48
|
export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.Widget>(
|
49
49
|
UI.Widget.Widget) {
|
50
50
|
private addCompletionsFromHistory: boolean;
|
51
|
-
|
51
|
+
#history: TextEditor.AutocompleteHistory.AutocompleteHistory;
|
52
52
|
private initialText: string;
|
53
53
|
private editor: TextEditor.TextEditor.TextEditor;
|
54
54
|
private readonly eagerPreviewElement: HTMLDivElement;
|
@@ -109,7 +109,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
109
109
|
});
|
110
110
|
this.registerRequiredCSS(consolePromptStyles);
|
111
111
|
this.addCompletionsFromHistory = true;
|
112
|
-
this
|
112
|
+
this.#history = new TextEditor.AutocompleteHistory.AutocompleteHistory(
|
113
113
|
Common.Settings.Settings.instance().createLocalSetting('console-history', []));
|
114
114
|
|
115
115
|
this.initialText = '';
|
@@ -186,7 +186,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
186
186
|
}
|
187
187
|
});
|
188
188
|
editorContainerElement.appendChild(this.editor);
|
189
|
-
this.#editorHistory = new TextEditor.TextEditorHistory.TextEditorHistory(this.editor, this
|
189
|
+
this.#editorHistory = new TextEditor.TextEditorHistory.TextEditorHistory(this.editor, this.#history);
|
190
190
|
|
191
191
|
if (this.hasFocus()) {
|
192
192
|
this.focus();
|
@@ -244,6 +244,9 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
244
244
|
const cursor = selection.main.head;
|
245
245
|
const currentExecutionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
|
246
246
|
let prefix = query.substring(0, cursor);
|
247
|
+
if (prefix.trim().length === 0) {
|
248
|
+
return;
|
249
|
+
}
|
247
250
|
if (currentExecutionContext) {
|
248
251
|
const consoleModel = currentExecutionContext.target().model(SDK.ConsoleModel.ConsoleModel);
|
249
252
|
if (consoleModel) {
|
@@ -307,7 +310,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
307
310
|
}
|
308
311
|
|
309
312
|
history(): TextEditor.AutocompleteHistory.AutocompleteHistory {
|
310
|
-
return this
|
313
|
+
return this.#history;
|
311
314
|
}
|
312
315
|
|
313
316
|
clearAutocomplete(): void {
|
@@ -526,7 +529,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
526
529
|
this.teaser = undefined;
|
527
530
|
}
|
528
531
|
this.aiCodeCompletion = new AiCodeCompletion.AiCodeCompletion.AiCodeCompletion(
|
529
|
-
{aidaClient: this.aidaClient}, this.editor, AiCodeCompletion.AiCodeCompletion.Panel.CONSOLE);
|
532
|
+
{aidaClient: this.aidaClient}, this.editor, AiCodeCompletion.AiCodeCompletion.Panel.CONSOLE, ['\n\n']);
|
530
533
|
this.aiCodeCompletion.addEventListener(AiCodeCompletion.AiCodeCompletion.Events.RESPONSE_RECEIVED, event => {
|
531
534
|
this.aiCodeCompletionCitations = event.data.citations;
|
532
535
|
this.dispatchEventToListeners(Events.AI_CODE_COMPLETION_RESPONSE_RECEIVED, event.data);
|
@@ -275,7 +275,7 @@ const CITATIONS_TOOLTIP_ID = 'console-ai-code-completion-citations-tooltip';
|
|
275
275
|
export class ConsoleView extends UI.Widget.VBox implements
|
276
276
|
UI.SearchableView.Searchable, ConsoleViewportProvider,
|
277
277
|
SDK.TargetManager.SDKModelObserver<SDK.ConsoleModel.ConsoleModel> {
|
278
|
-
|
278
|
+
readonly #searchableView: UI.SearchableView.SearchableView;
|
279
279
|
private readonly sidebar: ConsoleSidebar;
|
280
280
|
private isSidebarOpen: boolean;
|
281
281
|
private filter: ConsoleViewFilter;
|
@@ -343,10 +343,10 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
343
343
|
this.setMinimumSize(0, 35);
|
344
344
|
this.registerRequiredCSS(consoleViewStyles, objectValueStyles, CodeHighlighter.codeHighlighterStyles);
|
345
345
|
|
346
|
-
this
|
347
|
-
this.
|
348
|
-
this.
|
349
|
-
this.
|
346
|
+
this.#searchableView = new UI.SearchableView.SearchableView(this, null);
|
347
|
+
this.#searchableView.element.classList.add('console-searchable-view');
|
348
|
+
this.#searchableView.setPlaceholder(i18nString(UIStrings.findStringInLogs));
|
349
|
+
this.#searchableView.setMinimalSearchQuerySize(0);
|
350
350
|
this.sidebar = new ConsoleSidebar();
|
351
351
|
this.sidebar.addEventListener(Events.FILTER_SELECTED, this.onFilterChanged.bind(this));
|
352
352
|
this.isSidebarOpen = false;
|
@@ -356,7 +356,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
356
356
|
this.consoleToolbarContainer.role = 'toolbar';
|
357
357
|
this.splitWidget = new UI.SplitWidget.SplitWidget(
|
358
358
|
true /* isVertical */, false /* secondIsSidebar */, 'console.sidebar.width', 100);
|
359
|
-
this.splitWidget.setMainWidget(this
|
359
|
+
this.splitWidget.setMainWidget(this.#searchableView);
|
360
360
|
this.splitWidget.setSidebarWidget(this.sidebar);
|
361
361
|
this.splitWidget.show(this.element);
|
362
362
|
this.splitWidget.hideSidebar();
|
@@ -387,7 +387,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
387
387
|
this.filter.setLevelMenuOverridden(this.isSidebarOpen);
|
388
388
|
this.onFilterChanged();
|
389
389
|
});
|
390
|
-
this.contentsElement = this.
|
390
|
+
this.contentsElement = this.#searchableView.element;
|
391
391
|
this.element.classList.add('console-view');
|
392
392
|
|
393
393
|
this.visibleViewMessages = [];
|
@@ -695,7 +695,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
695
695
|
}
|
696
696
|
|
697
697
|
searchableView(): UI.SearchableView.SearchableView {
|
698
|
-
return this
|
698
|
+
return this.#searchableView;
|
699
699
|
}
|
700
700
|
|
701
701
|
clearHistory(): void {
|
@@ -962,7 +962,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
962
962
|
viewMessage,
|
963
963
|
!shouldGroupSimilar /* crbug.com/1082963: prevent collapse of same messages when "Group similar" is false */);
|
964
964
|
this.updateFilterStatus();
|
965
|
-
this.
|
965
|
+
this.#searchableView.updateSearchMatchesCount(this.regexMatchRanges.length);
|
966
966
|
} else {
|
967
967
|
this.needsFullUpdate = true;
|
968
968
|
}
|
@@ -1318,7 +1318,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
1318
1318
|
}
|
1319
1319
|
}
|
1320
1320
|
this.updateFilterStatus();
|
1321
|
-
this.
|
1321
|
+
this.#searchableView.updateSearchMatchesCount(this.regexMatchRanges.length);
|
1322
1322
|
this.jumpToMatch(this.currentMatchRangeIndex); // Re-highlight current match.
|
1323
1323
|
this.viewport.invalidate();
|
1324
1324
|
this.messagesCountElement.setAttribute(
|
@@ -1507,7 +1507,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
1507
1507
|
|
1508
1508
|
performSearch(searchConfig: UI.SearchableView.SearchConfig, shouldJump: boolean, jumpBackwards?: boolean): void {
|
1509
1509
|
this.onSearchCanceled();
|
1510
|
-
this.
|
1510
|
+
this.#searchableView.updateSearchMatchesCount(0);
|
1511
1511
|
|
1512
1512
|
this.searchRegex = searchConfig.toSearchRegex(true).regex;
|
1513
1513
|
|
@@ -1554,7 +1554,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
1554
1554
|
this.searchMessage(index);
|
1555
1555
|
}
|
1556
1556
|
|
1557
|
-
this.
|
1557
|
+
this.#searchableView.updateSearchMatchesCount(this.regexMatchRanges.length);
|
1558
1558
|
if (typeof this.searchShouldJumpBackwards !== 'undefined' && this.regexMatchRanges.length) {
|
1559
1559
|
this.jumpToMatch(this.searchShouldJumpBackwards ? -1 : 0);
|
1560
1560
|
delete this.searchShouldJumpBackwards;
|
@@ -1611,7 +1611,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
1611
1611
|
|
1612
1612
|
index = Platform.NumberUtilities.mod(index, this.regexMatchRanges.length);
|
1613
1613
|
this.currentMatchRangeIndex = index;
|
1614
|
-
this.
|
1614
|
+
this.#searchableView.updateCurrentMatchIndex(index);
|
1615
1615
|
matchRange = this.regexMatchRanges[index];
|
1616
1616
|
const message = this.visibleViewMessages[matchRange.messageIndex];
|
1617
1617
|
const highlightNode = message.searchHighlightNode(matchRange.matchIndex);
|