chrome-devtools-frontend 1.0.1512349 → 1.0.1513662
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/cookbook/release_management.md +15 -13
- package/docs/get_the_code.md +114 -35
- package/front_end/core/common/Color.ts +40 -44
- package/front_end/core/common/Console.ts +4 -4
- package/front_end/core/common/ParsedURL.ts +14 -14
- package/front_end/core/common/ResourceType.ts +20 -20
- package/front_end/core/common/SegmentedRange.ts +13 -14
- package/front_end/core/common/Settings.ts +4 -4
- package/front_end/core/common/StringOutputStream.ts +4 -4
- package/front_end/core/host/GdpClient.ts +38 -0
- package/front_end/core/host/InspectorFrontendHost.ts +4 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/host/ResourceLoader.ts +2 -2
- package/front_end/core/host/UserMetrics.ts +0 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +9 -9
- package/front_end/core/root/Runtime.ts +5 -2
- package/front_end/core/sdk/AccessibilityModel.ts +48 -48
- package/front_end/core/sdk/AnimationModel.ts +78 -79
- package/front_end/core/sdk/CPUProfilerModel.ts +5 -5
- package/front_end/core/sdk/CPUThrottlingManager.ts +17 -17
- package/front_end/core/sdk/CSSMatchedStyles.ts +44 -44
- package/front_end/core/sdk/CSSMedia.ts +22 -22
- package/front_end/core/sdk/CSSModel.ts +4 -4
- package/front_end/core/sdk/CSSProperty.ts +9 -9
- package/front_end/core/sdk/CSSPropertyParser.ts +1 -2
- package/front_end/core/sdk/CSSRule.ts +3 -3
- package/front_end/core/sdk/CSSStyleDeclaration.ts +27 -28
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +13 -13
- package/front_end/core/sdk/CategorizedBreakpoint.ts +4 -4
- package/front_end/core/sdk/ChildTargetManager.ts +6 -6
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +4 -4
- package/front_end/core/sdk/ConsoleModel.ts +24 -24
- package/front_end/core/sdk/Cookie.ts +16 -16
- package/front_end/core/sdk/CookieParser.ts +6 -6
- package/front_end/core/sdk/DOMDebuggerModel.ts +88 -89
- package/front_end/core/sdk/DOMModel.ts +113 -113
- package/front_end/core/sdk/DebuggerModel.ts +102 -103
- package/front_end/core/sdk/EmulationModel.ts +6 -6
- package/front_end/core/sdk/EventBreakpointsModel.ts +5 -5
- package/front_end/core/sdk/HeapProfilerModel.ts +5 -5
- package/front_end/core/sdk/IsolateManager.ts +26 -26
- package/front_end/core/sdk/LayerTreeBase.ts +29 -30
- package/front_end/core/sdk/OverlayModel.ts +6 -6
- package/front_end/core/sdk/Resource.ts +43 -43
- package/front_end/core/sdk/ResourceTreeModel.ts +58 -61
- package/front_end/core/sdk/RuntimeModel.ts +12 -13
- package/front_end/core/sdk/SDKModel.ts +3 -3
- package/front_end/core/sdk/Script.ts +17 -17
- package/front_end/core/sdk/SecurityOriginManager.ts +14 -14
- package/front_end/core/sdk/ServerTiming.ts +2 -2
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +15 -15
- package/front_end/core/sdk/ServiceWorkerManager.ts +19 -24
- package/front_end/core/sdk/SourceMap.ts +10 -10
- package/front_end/core/sdk/StorageKeyManager.ts +12 -12
- package/front_end/core/sdk/Target.ts +33 -34
- package/front_end/core/sdk/TargetManager.ts +20 -20
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +8 -8
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -24
- package/front_end/entrypoints/main/GlobalAiButton.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +16 -14
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/generated/InspectorBackendCommands.js +3 -2
- package/front_end/generated/SupportedCSSProperties.js +20 -0
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +20 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -16
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +127 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +149 -26
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +9 -10
- package/front_end/models/badges/AiExplorerBadge.ts +21 -0
- package/front_end/models/badges/Badge.ts +3 -5
- package/front_end/models/badges/CodeWhispererBadge.ts +21 -0
- package/front_end/models/badges/DOMDetectiveBadge.ts +4 -3
- package/front_end/models/badges/SpeedsterBadge.ts +6 -4
- package/front_end/models/badges/StarterBadge.ts +4 -3
- package/front_end/models/badges/UserBadges.ts +29 -3
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +6 -6
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +18 -18
- package/front_end/models/bindings/FileUtils.ts +15 -15
- package/front_end/models/bindings/ResourceScriptMapping.ts +14 -14
- package/front_end/models/elements/ElementUpdateRecord.ts +11 -11
- package/front_end/models/emulation/DeviceModeModel.ts +123 -131
- package/front_end/models/emulation/EmulatedDevices.ts +22 -22
- package/front_end/models/extensions/ExtensionPanel.ts +24 -24
- package/front_end/models/extensions/ExtensionServer.ts +4 -4
- package/front_end/models/javascript_metadata/NativeFunctions.js +14 -2
- package/front_end/models/persistence/IsolatedFileSystem.ts +18 -19
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +13 -13
- package/front_end/models/trace/EventsSerializer.ts +5 -5
- package/front_end/models/trace/LanternComputationData.ts +10 -10
- package/front_end/models/trace/ModelImpl.ts +32 -41
- package/front_end/models/trace/Processor.ts +28 -30
- package/front_end/models/trace/extras/FilmStrip.ts +6 -6
- package/front_end/models/trace/extras/StackTraceForEvent.ts +22 -25
- package/front_end/models/trace/extras/ThirdParties.ts +16 -17
- package/front_end/models/trace/extras/TraceFilter.ts +1 -1
- package/front_end/models/trace/handlers/Threads.ts +10 -10
- package/front_end/models/trace/handlers/helpers.ts +9 -9
- package/front_end/models/trace/handlers/types.ts +3 -3
- package/front_end/models/trace/insights/CLSCulprits.ts +12 -14
- package/front_end/models/trace/insights/Cache.ts +8 -4
- package/front_end/models/trace/insights/DOMSize.ts +8 -5
- package/front_end/models/trace/insights/DocumentLatency.ts +2 -2
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +3 -3
- package/front_end/models/trace/insights/FontDisplay.ts +3 -4
- package/front_end/models/trace/insights/ForcedReflow.ts +3 -3
- package/front_end/models/trace/insights/INPBreakdown.ts +2 -2
- package/front_end/models/trace/insights/ImageDelivery.ts +11 -11
- package/front_end/models/trace/insights/LCPBreakdown.ts +4 -4
- package/front_end/models/trace/insights/LCPDiscovery.ts +4 -4
- package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -2
- package/front_end/models/trace/insights/ModernHTTP.ts +4 -5
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +12 -12
- package/front_end/models/trace/insights/RenderBlocking.ts +9 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +2 -2
- package/front_end/models/trace/insights/ThirdParties.ts +4 -5
- package/front_end/models/trace/insights/Viewport.ts +8 -5
- package/front_end/models/trace/insights/types.ts +1 -0
- package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +10 -10
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +52 -52
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +8 -8
- package/front_end/panels/animation/AnimationTimeline.ts +5 -5
- package/front_end/panels/animation/AnimationUI.ts +22 -23
- package/front_end/panels/application/ApplicationPanelSidebar.ts +12 -12
- package/front_end/panels/application/DOMStorageModel.ts +23 -23
- package/front_end/panels/application/ExtensionStorageModel.ts +31 -31
- package/front_end/panels/application/IndexedDBModel.ts +1 -0
- package/front_end/panels/application/PreloadingTreeElement.ts +8 -8
- package/front_end/panels/application/ServiceWorkersView.ts +0 -53
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/common/BadgeNotification.ts +24 -4
- package/front_end/panels/common/GdpSignUpDialog.ts +5 -0
- package/front_end/panels/common/badgeNotification.css +26 -9
- package/front_end/panels/console/ConsoleContextSelector.ts +9 -9
- package/front_end/panels/console/ConsolePrompt.ts +8 -5
- package/front_end/panels/console/ConsoleView.ts +13 -13
- package/front_end/panels/console/ConsoleViewport.ts +29 -29
- package/front_end/panels/coverage/CoverageModel.ts +22 -22
- package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
- package/front_end/panels/elements/ComputedStyleModel.ts +17 -18
- package/front_end/panels/elements/DOMPath.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +13 -13
- package/front_end/panels/elements/ElementsTreeElement.ts +18 -18
- package/front_end/panels/elements/ElementsTreeOutline.ts +41 -48
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -50
- package/front_end/panels/elements/StylesSidebarPane.ts +19 -19
- package/front_end/panels/emulation/DeviceModeToolbar.ts +7 -7
- package/front_end/panels/emulation/DeviceModeView.ts +6 -6
- package/front_end/panels/emulation/MediaQueryInspector.ts +18 -18
- package/front_end/panels/event_listeners/EventListenersView.ts +13 -14
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +3 -3
- package/front_end/panels/layer_viewer/LayerViewHost.ts +13 -13
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +9 -10
- package/front_end/panels/layer_viewer/TransformController.ts +34 -36
- package/front_end/panels/layers/LayerTreeModel.ts +41 -40
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +13 -13
- package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -7
- package/front_end/panels/media/PlayerMessagesView.ts +5 -5
- package/front_end/panels/media/TickingFlameChart.ts +24 -24
- package/front_end/panels/media/TickingFlameChartHelpers.ts +32 -32
- package/front_end/panels/network/NetworkItemView.ts +4 -4
- package/front_end/panels/network/NetworkLogViewColumns.ts +29 -29
- package/front_end/panels/network/NetworkPanel.ts +8 -5
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +10 -10
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +3 -4
- package/front_end/panels/profiler/ProfileHeader.ts +25 -25
- package/front_end/panels/profiler/ProfileLauncherView.ts +5 -6
- package/front_end/panels/recorder/components/ReplaySection.ts +3 -1
- package/front_end/panels/security/OriginTreeElement.ts +8 -8
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/settings/SettingsScreen.ts +18 -12
- package/front_end/panels/settings/components/SyncSection.ts +20 -6
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +3 -0
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -9
- package/front_end/panels/sources/NavigatorView.ts +43 -46
- package/front_end/panels/sources/SourcesPanel.ts +35 -35
- package/front_end/panels/sources/SourcesView.ts +13 -13
- package/front_end/panels/sources/TabbedEditorContainer.ts +19 -22
- package/front_end/panels/sources/UISourceCodeFrame.ts +4 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +34 -36
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +3 -3
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +8 -8
- package/front_end/panels/timeline/CountersGraph.ts +16 -16
- package/front_end/panels/timeline/EntriesFilter.ts +4 -3
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/GPUTrackAppender.ts +3 -3
- package/front_end/panels/timeline/Initiators.ts +10 -10
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +5 -5
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +7 -7
- package/front_end/panels/timeline/ModificationsManager.ts +8 -15
- package/front_end/panels/timeline/TargetForEvent.ts +2 -2
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -1
- package/front_end/panels/timeline/ThreadAppender.ts +13 -13
- package/front_end/panels/timeline/TimelineDetailsView.ts +6 -14
- package/front_end/panels/timeline/TimelineEventOverview.ts +27 -26
- package/front_end/panels/timeline/TimelineFilters.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +54 -53
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +34 -34
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -31
- package/front_end/panels/timeline/TimelineHistoryManager.ts +17 -18
- package/front_end/panels/timeline/TimelineMiniMap.ts +6 -6
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +6 -6
- package/front_end/panels/timeline/TimelinePanel.ts +52 -59
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +7 -5
- package/front_end/panels/timeline/TimelineTreeView.ts +10 -10
- package/front_end/panels/timeline/TimelineUIUtils.ts +43 -43
- package/front_end/panels/timeline/TimingsTrackAppender.ts +12 -12
- package/front_end/panels/timeline/TracingLayerTree.ts +43 -43
- package/front_end/panels/timeline/TrackConfigBanner.ts +6 -6
- package/front_end/panels/timeline/TrackConfiguration.ts +1 -1
- package/front_end/panels/timeline/components/DetailsView.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +12 -21
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -5
- package/front_end/panels/timeline/components/Sidebar.ts +4 -14
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +13 -36
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +21 -19
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/insights/Cache.ts +4 -0
- package/front_end/panels/timeline/components/insights/DOMSize.ts +5 -1
- package/front_end/panels/timeline/components/insights/Helpers.ts +19 -0
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/panels/timeline/components/insights/Viewport.ts +4 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
- package/front_end/panels/timeline/utils/AICallTree.ts +11 -11
- package/front_end/panels/timeline/utils/AIContext.ts +17 -19
- package/front_end/panels/timeline/utils/EntityMapper.ts +6 -5
- package/front_end/panels/timeline/utils/EntryName.ts +2 -2
- package/front_end/panels/timeline/utils/EntryNodes.ts +5 -5
- package/front_end/panels/timeline/utils/EntryStyles.ts +4 -4
- package/front_end/panels/timeline/utils/FreshRecording.ts +3 -3
- package/front_end/panels/timeline/utils/Helpers.ts +0 -18
- package/front_end/panels/timeline/utils/InsightAIContext.ts +6 -6
- package/front_end/panels/timeline/utils/SourceMapsResolver.ts +7 -7
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
- package/front_end/third_party/json5/rebuild.sh +1 -1
- package/front_end/third_party/legacy-javascript/{update.sh → rebuild.sh} +1 -1
- package/front_end/third_party/lit/lib/decorators.d.ts +26 -9
- package/front_end/third_party/lit/lib/decorators.js +5 -5
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.js +8 -13
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +26 -9
- package/front_end/third_party/lit/lib/lit.js +5 -5
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.js +2 -2
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/rebuild.sh +1 -1
- package/front_end/third_party/third-party-web/rebuild.sh +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +6 -7
- package/front_end/ui/legacy/ActionRegistration.ts +9 -9
- package/front_end/ui/legacy/DockController.ts +18 -18
- package/front_end/ui/legacy/FilterBar.ts +7 -7
- package/front_end/ui/legacy/Fragment.ts +4 -4
- package/front_end/ui/legacy/GlassPane.ts +12 -12
- package/front_end/ui/legacy/InspectorView.ts +5 -15
- package/front_end/ui/legacy/ListControl.ts +27 -27
- package/front_end/ui/legacy/ListWidget.ts +4 -4
- package/front_end/ui/legacy/PopoverHelper.ts +4 -4
- package/front_end/ui/legacy/ShortcutRegistry.ts +17 -17
- package/front_end/ui/legacy/TabbedPane.ts +74 -75
- package/front_end/ui/legacy/TextPrompt.ts +31 -31
- package/front_end/ui/legacy/Toolbar.ts +13 -14
- package/front_end/ui/legacy/ViewManager.ts +30 -31
- package/front_end/ui/legacy/Widget.ts +6 -6
- package/front_end/ui/legacy/XLink.ts +9 -9
- package/front_end/ui/legacy/ZoomManager.ts +9 -9
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +27 -27
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +30 -32
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +15 -15
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +64 -64
- package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -11
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +12 -12
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +14 -14
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -8
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +4 -4
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +4 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -2
- package/package.json +1 -1
@@ -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,54 @@
|
|
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
|
-
background: var(--sys-color-surface);
|
50
67
|
}
|
51
68
|
|
52
69
|
.badge-link {
|
@@ -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);
|
@@ -45,7 +45,7 @@ export class ConsoleViewport {
|
|
45
45
|
element: HTMLElement;
|
46
46
|
private topGapElement: HTMLElement;
|
47
47
|
private topGapElementActive: boolean;
|
48
|
-
|
48
|
+
#contentElement: HTMLElement;
|
49
49
|
private bottomGapElement: HTMLElement;
|
50
50
|
private bottomGapElementActive: boolean;
|
51
51
|
private provider: ConsoleViewportProvider;
|
@@ -63,7 +63,7 @@ export class ConsoleViewport {
|
|
63
63
|
childList: boolean,
|
64
64
|
subtree: boolean,
|
65
65
|
};
|
66
|
-
|
66
|
+
#stickToBottom: boolean;
|
67
67
|
private selectionIsBackward: boolean;
|
68
68
|
private lastSelectedElement?: HTMLElement|null;
|
69
69
|
private cachedProviderElements?: Array<ConsoleViewportElement|null>;
|
@@ -75,7 +75,7 @@ export class ConsoleViewport {
|
|
75
75
|
this.topGapElement.style.height = '0px';
|
76
76
|
this.topGapElement.style.color = 'transparent';
|
77
77
|
this.topGapElementActive = false;
|
78
|
-
this
|
78
|
+
this.#contentElement = this.element.createChild('div');
|
79
79
|
this.bottomGapElement = this.element.createChild('div');
|
80
80
|
this.bottomGapElement.style.height = '0px';
|
81
81
|
this.bottomGapElement.style.color = 'transparent';
|
@@ -93,11 +93,11 @@ export class ConsoleViewport {
|
|
93
93
|
this.element.addEventListener('scroll', this.onScroll.bind(this), false);
|
94
94
|
this.element.addEventListener('copy', (this.onCopy.bind(this) as EventListener), false);
|
95
95
|
this.element.addEventListener('dragstart', (this.onDragStart.bind(this) as (arg0: Event) => unknown), false);
|
96
|
-
this.
|
97
|
-
this.
|
98
|
-
this.
|
96
|
+
this.#contentElement.addEventListener('focusin', (this.onFocusIn.bind(this) as EventListener), false);
|
97
|
+
this.#contentElement.addEventListener('focusout', (this.onFocusOut.bind(this) as EventListener), false);
|
98
|
+
this.#contentElement.addEventListener('keydown', (this.onKeyDown.bind(this) as EventListener), false);
|
99
99
|
this.virtualSelectedIndex = -1;
|
100
|
-
this.
|
100
|
+
this.#contentElement.tabIndex = -1;
|
101
101
|
|
102
102
|
this.firstActiveIndex = -1;
|
103
103
|
this.lastActiveIndex = -1;
|
@@ -113,18 +113,18 @@ export class ConsoleViewport {
|
|
113
113
|
// if they change the scroll height.
|
114
114
|
this.observer = new MutationObserver(this.refresh.bind(this));
|
115
115
|
this.observerConfig = {childList: true, subtree: true};
|
116
|
-
this
|
116
|
+
this.#stickToBottom = false;
|
117
117
|
this.selectionIsBackward = false;
|
118
118
|
}
|
119
119
|
|
120
120
|
stickToBottom(): boolean {
|
121
|
-
return this
|
121
|
+
return this.#stickToBottom;
|
122
122
|
}
|
123
123
|
|
124
124
|
setStickToBottom(value: boolean): void {
|
125
|
-
this
|
126
|
-
if (this
|
127
|
-
this.observer.observe(this
|
125
|
+
this.#stickToBottom = value;
|
126
|
+
if (this.#stickToBottom) {
|
127
|
+
this.observer.observe(this.#contentElement, this.observerConfig);
|
128
128
|
} else {
|
129
129
|
this.observer.disconnect();
|
130
130
|
}
|
@@ -168,7 +168,7 @@ export class ConsoleViewport {
|
|
168
168
|
let focusLastChild = false;
|
169
169
|
// Make default selection when moving from external (e.g. prompt) to the container.
|
170
170
|
if (this.virtualSelectedIndex === -1 && this.isOutsideViewport((event.relatedTarget as Element | null)) &&
|
171
|
-
event.target === this
|
171
|
+
event.target === this.#contentElement && this.itemCount) {
|
172
172
|
focusLastChild = true;
|
173
173
|
this.virtualSelectedIndex = this.itemCount - 1;
|
174
174
|
|
@@ -187,7 +187,7 @@ export class ConsoleViewport {
|
|
187
187
|
}
|
188
188
|
|
189
189
|
private isOutsideViewport(element: Element|null): boolean {
|
190
|
-
return element !== null && !element.isSelfOrDescendant(this
|
190
|
+
return element !== null && !element.isSelfOrDescendant(this.#contentElement);
|
191
191
|
}
|
192
192
|
|
193
193
|
private onDragStart(event: DragEvent): boolean {
|
@@ -242,7 +242,7 @@ export class ConsoleViewport {
|
|
242
242
|
const selectedElement = this.renderedElementAt(this.virtualSelectedIndex);
|
243
243
|
const changed = this.lastSelectedElement !== selectedElement;
|
244
244
|
const containerHasFocus =
|
245
|
-
this
|
245
|
+
this.#contentElement === Platform.DOMUtilities.deepActiveElement(this.element.ownerDocument);
|
246
246
|
if (this.lastSelectedElement && changed) {
|
247
247
|
this.lastSelectedElement.classList.remove('console-selected');
|
248
248
|
}
|
@@ -260,16 +260,16 @@ export class ConsoleViewport {
|
|
260
260
|
selectedElement.focus({preventScroll: true});
|
261
261
|
}
|
262
262
|
}
|
263
|
-
if (this.itemCount && !this.
|
264
|
-
this.
|
263
|
+
if (this.itemCount && !this.#contentElement.hasFocus()) {
|
264
|
+
this.#contentElement.tabIndex = 0;
|
265
265
|
} else {
|
266
|
-
this.
|
266
|
+
this.#contentElement.tabIndex = -1;
|
267
267
|
}
|
268
268
|
this.lastSelectedElement = selectedElement;
|
269
269
|
}
|
270
270
|
|
271
271
|
contentElement(): Element {
|
272
|
-
return this
|
272
|
+
return this.#contentElement;
|
273
273
|
}
|
274
274
|
|
275
275
|
invalidate(): void {
|
@@ -462,8 +462,8 @@ export class ConsoleViewport {
|
|
462
462
|
refresh(): void {
|
463
463
|
this.observer.disconnect();
|
464
464
|
this.innerRefresh();
|
465
|
-
if (this
|
466
|
-
this.observer.observe(this
|
465
|
+
if (this.#stickToBottom) {
|
466
|
+
this.observer.observe(this.#contentElement, this.observerConfig);
|
467
467
|
}
|
468
468
|
}
|
469
469
|
|
@@ -477,7 +477,7 @@ export class ConsoleViewport {
|
|
477
477
|
this.renderedItems[i].willHide();
|
478
478
|
}
|
479
479
|
this.renderedItems = [];
|
480
|
-
this.
|
480
|
+
this.#contentElement.removeChildren();
|
481
481
|
this.topGapElement.style.height = '0px';
|
482
482
|
this.bottomGapElement.style.height = '0px';
|
483
483
|
this.firstActiveIndex = -1;
|
@@ -497,7 +497,7 @@ export class ConsoleViewport {
|
|
497
497
|
// When the viewport is scrolled to the bottom, using the cumulative heights estimate is not
|
498
498
|
// precise enough to determine next visible indices. This stickToBottom check avoids extra
|
499
499
|
// calls to refresh in those cases.
|
500
|
-
if (this
|
500
|
+
if (this.#stickToBottom) {
|
501
501
|
this.firstActiveIndex = Math.max(this.itemCount - Math.ceil(activeHeight / this.provider.minimumRowHeight()), 0);
|
502
502
|
this.lastActiveIndex = this.itemCount - 1;
|
503
503
|
} else {
|
@@ -520,16 +520,16 @@ export class ConsoleViewport {
|
|
520
520
|
this.bottomGapElement.style.height = bottomGapHeight + 'px';
|
521
521
|
this.topGapElementActive = Boolean(topGapHeight);
|
522
522
|
this.bottomGapElementActive = Boolean(bottomGapHeight);
|
523
|
-
this.
|
523
|
+
this.#contentElement.style.setProperty('height', '10000000px');
|
524
524
|
}
|
525
525
|
|
526
526
|
this.partialViewportUpdate(prepare.bind(this));
|
527
|
-
this.
|
527
|
+
this.#contentElement.style.removeProperty('height');
|
528
528
|
// Should be the last call in the method as it might force layout.
|
529
529
|
if (shouldRestoreSelection) {
|
530
530
|
this.restoreSelection(selection);
|
531
531
|
}
|
532
|
-
if (this
|
532
|
+
if (this.#stickToBottom) {
|
533
533
|
this.element.scrollTop = 10000000;
|
534
534
|
}
|
535
535
|
}
|
@@ -555,7 +555,7 @@ export class ConsoleViewport {
|
|
555
555
|
}
|
556
556
|
|
557
557
|
const wasShown = [];
|
558
|
-
let anchor: (ChildNode|null) = this.
|
558
|
+
let anchor: (ChildNode|null) = this.#contentElement.firstChild;
|
559
559
|
for (const viewportElement of itemsToRender) {
|
560
560
|
const element = viewportElement.element();
|
561
561
|
if (element !== anchor) {
|
@@ -563,7 +563,7 @@ export class ConsoleViewport {
|
|
563
563
|
if (shouldCallWasShown) {
|
564
564
|
wasShown.push(viewportElement);
|
565
565
|
}
|
566
|
-
this.
|
566
|
+
this.#contentElement.insertBefore(element, anchor);
|
567
567
|
} else {
|
568
568
|
anchor = anchor.nextSibling;
|
569
569
|
}
|
@@ -574,7 +574,7 @@ export class ConsoleViewport {
|
|
574
574
|
this.renderedItems = Array.from(itemsToRender);
|
575
575
|
|
576
576
|
if (hadFocus) {
|
577
|
-
this.
|
577
|
+
this.#contentElement.focus();
|
578
578
|
}
|
579
579
|
this.updateFocusedItem();
|
580
580
|
}
|
@@ -674,48 +674,48 @@ function locationCompare(a: string, b: string): number {
|
|
674
674
|
}
|
675
675
|
|
676
676
|
export class URLCoverageInfo extends Common.ObjectWrapper.ObjectWrapper<URLCoverageInfo.EventTypes> {
|
677
|
-
|
677
|
+
readonly #url: Platform.DevToolsPath.UrlString;
|
678
678
|
private coverageInfoByLocation: Map<string, CoverageInfo>;
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
679
|
+
#size: number;
|
680
|
+
#usedSize: number;
|
681
|
+
#type!: CoverageType;
|
682
|
+
#isContentScript: boolean;
|
683
683
|
sourcesURLCoverageInfo = new Map<Platform.DevToolsPath.UrlString, SourceURLCoverageInfo>();
|
684
684
|
sourceSegments: SourceSegment[]|undefined;
|
685
685
|
|
686
686
|
constructor(url: Platform.DevToolsPath.UrlString) {
|
687
687
|
super();
|
688
688
|
|
689
|
-
this
|
689
|
+
this.#url = url;
|
690
690
|
this.coverageInfoByLocation = new Map();
|
691
|
-
this
|
692
|
-
this
|
693
|
-
this
|
691
|
+
this.#size = 0;
|
692
|
+
this.#usedSize = 0;
|
693
|
+
this.#isContentScript = false;
|
694
694
|
}
|
695
695
|
|
696
696
|
url(): Platform.DevToolsPath.UrlString {
|
697
|
-
return this
|
697
|
+
return this.#url;
|
698
698
|
}
|
699
699
|
|
700
700
|
type(): CoverageType {
|
701
|
-
return this
|
701
|
+
return this.#type;
|
702
702
|
}
|
703
703
|
|
704
704
|
size(): number {
|
705
|
-
return this
|
705
|
+
return this.#size;
|
706
706
|
}
|
707
707
|
|
708
708
|
usedSize(): number {
|
709
|
-
return this
|
709
|
+
return this.#usedSize;
|
710
710
|
}
|
711
711
|
|
712
712
|
unusedSize(): number {
|
713
|
-
return this
|
713
|
+
return this.#size - this.#usedSize;
|
714
714
|
}
|
715
715
|
|
716
716
|
usedPercentage(): number {
|
717
717
|
// Per convention, empty files are reported as 100 % uncovered
|
718
|
-
if (this
|
718
|
+
if (this.#size === 0) {
|
719
719
|
return 0;
|
720
720
|
}
|
721
721
|
if (!this.unusedSize() || !this.size()) {
|
@@ -726,14 +726,14 @@ export class URLCoverageInfo extends Common.ObjectWrapper.ObjectWrapper<URLCover
|
|
726
726
|
|
727
727
|
unusedPercentage(): number {
|
728
728
|
// Per convention, empty files are reported as 100 % uncovered
|
729
|
-
if (this
|
729
|
+
if (this.#size === 0) {
|
730
730
|
return 1;
|
731
731
|
}
|
732
732
|
return this.unusedSize() / this.size();
|
733
733
|
}
|
734
734
|
|
735
735
|
isContentScript(): boolean {
|
736
|
-
return this
|
736
|
+
return this.#isContentScript;
|
737
737
|
}
|
738
738
|
|
739
739
|
entries(): IterableIterator<CoverageInfo> {
|
@@ -752,8 +752,8 @@ export class URLCoverageInfo extends Common.ObjectWrapper.ObjectWrapper<URLCover
|
|
752
752
|
}
|
753
753
|
|
754
754
|
addToSizes(usedSize: number, size: number): void {
|
755
|
-
this
|
756
|
-
this
|
755
|
+
this.#usedSize += usedSize;
|
756
|
+
this.#size += size;
|
757
757
|
|
758
758
|
if (usedSize !== 0 || size !== 0) {
|
759
759
|
this.dispatchEventToListeners(URLCoverageInfo.Events.SizesChanged);
|
@@ -772,9 +772,9 @@ export class URLCoverageInfo extends Common.ObjectWrapper.ObjectWrapper<URLCover
|
|
772
772
|
|
773
773
|
if ((type & CoverageType.JAVA_SCRIPT) && !this.coverageInfoByLocation.size &&
|
774
774
|
contentProvider instanceof SDK.Script.Script) {
|
775
|
-
this
|
775
|
+
this.#isContentScript = (contentProvider).isContentScript();
|
776
776
|
}
|
777
|
-
this
|
777
|
+
this.#type |= type;
|
778
778
|
|
779
779
|
if (entry) {
|
780
780
|
entry.addCoverageType(type);
|
@@ -783,7 +783,7 @@ export class URLCoverageInfo extends Common.ObjectWrapper.ObjectWrapper<URLCover
|
|
783
783
|
|
784
784
|
if ((type & CoverageType.JAVA_SCRIPT) && !this.coverageInfoByLocation.size &&
|
785
785
|
contentProvider instanceof SDK.Script.Script) {
|
786
|
-
this
|
786
|
+
this.#isContentScript = (contentProvider).isContentScript();
|
787
787
|
}
|
788
788
|
|
789
789
|
entry = new CoverageInfo(contentProvider, contentLength, lineOffset, columnOffset, type, this);
|
@@ -93,7 +93,7 @@ export class ClassesPaneWidget extends UI.Widget.Widget {
|
|
93
93
|
}
|
94
94
|
|
95
95
|
const eventTarget = (event.target as HTMLElement);
|
96
|
-
let text
|
96
|
+
let text = eventTarget.textContent;
|
97
97
|
if (Platform.KeyboardUtilities.isEscKey(event)) {
|
98
98
|
if (!Platform.StringUtilities.isWhitespace(text)) {
|
99
99
|
event.consume(true);
|