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
@@ -478,11 +478,11 @@ export interface EventTypes {
|
|
478
478
|
|
479
479
|
export class AnimationImpl {
|
480
480
|
readonly #animationModel: AnimationModel;
|
481
|
-
#
|
481
|
+
#payload!: Protocol.Animation
|
482
482
|
.Animation; // Assertion is safe because only way to create `AnimationImpl` is to use `parsePayload` which calls `setPayload` and sets the value.
|
483
|
-
#
|
483
|
+
#source!:
|
484
484
|
AnimationEffect; // Assertion is safe because only way to create `AnimationImpl` is to use `parsePayload` which calls `setPayload` and sets the value.
|
485
|
-
#
|
485
|
+
#playState?: string;
|
486
486
|
|
487
487
|
private constructor(animationModel: AnimationModel) {
|
488
488
|
this.#animationModel = animationModel;
|
@@ -508,11 +508,11 @@ export class AnimationImpl {
|
|
508
508
|
}
|
509
509
|
}
|
510
510
|
|
511
|
-
this.#
|
512
|
-
if (this.#
|
513
|
-
this.#
|
514
|
-
} else if (!this.#
|
515
|
-
this.#
|
511
|
+
this.#payload = payload;
|
512
|
+
if (this.#source && payload.source) {
|
513
|
+
this.#source.setPayload(payload.source);
|
514
|
+
} else if (!this.#source && payload.source) {
|
515
|
+
this.#source = new AnimationEffect(this.#animationModel, payload.source);
|
516
516
|
}
|
517
517
|
}
|
518
518
|
|
@@ -536,27 +536,27 @@ export class AnimationImpl {
|
|
536
536
|
}
|
537
537
|
|
538
538
|
viewOrScrollTimeline(): Protocol.Animation.ViewOrScrollTimeline|undefined {
|
539
|
-
return this.#
|
539
|
+
return this.#payload.viewOrScrollTimeline;
|
540
540
|
}
|
541
541
|
|
542
542
|
id(): string {
|
543
|
-
return this.#
|
543
|
+
return this.#payload.id;
|
544
544
|
}
|
545
545
|
|
546
546
|
name(): string {
|
547
|
-
return this.#
|
547
|
+
return this.#payload.name;
|
548
548
|
}
|
549
549
|
|
550
550
|
paused(): boolean {
|
551
|
-
return this.#
|
551
|
+
return this.#payload.pausedState;
|
552
552
|
}
|
553
553
|
|
554
554
|
playState(): string {
|
555
|
-
return this.#
|
555
|
+
return this.#playState || this.#payload.playState;
|
556
556
|
}
|
557
557
|
|
558
558
|
playbackRate(): number {
|
559
|
-
return this.#
|
559
|
+
return this.#payload.playbackRate;
|
560
560
|
}
|
561
561
|
|
562
562
|
// For scroll driven animations, it returns the pixel offset in the scroll container
|
@@ -565,12 +565,12 @@ export class AnimationImpl {
|
|
565
565
|
const viewOrScrollTimeline = this.viewOrScrollTimeline();
|
566
566
|
if (viewOrScrollTimeline) {
|
567
567
|
return this.percentageToPixels(
|
568
|
-
this.playbackRate() > 0 ? this.#
|
568
|
+
this.playbackRate() > 0 ? this.#payload.startTime : 100 - this.#payload.startTime,
|
569
569
|
viewOrScrollTimeline) +
|
570
570
|
(this.viewOrScrollTimeline()?.startOffset ?? 0);
|
571
571
|
}
|
572
572
|
|
573
|
-
return this.#
|
573
|
+
return this.#payload.startTime;
|
574
574
|
}
|
575
575
|
|
576
576
|
// For scroll driven animations, it returns the duration in pixels (i.e. after how many pixels of scroll the animation is going to end)
|
@@ -615,18 +615,18 @@ export class AnimationImpl {
|
|
615
615
|
currentTime(): number {
|
616
616
|
const viewOrScrollTimeline = this.viewOrScrollTimeline();
|
617
617
|
if (viewOrScrollTimeline) {
|
618
|
-
return this.percentageToPixels(this.#
|
618
|
+
return this.percentageToPixels(this.#payload.currentTime, viewOrScrollTimeline);
|
619
619
|
}
|
620
620
|
|
621
|
-
return this.#
|
621
|
+
return this.#payload.currentTime;
|
622
622
|
}
|
623
623
|
|
624
624
|
source(): AnimationEffect {
|
625
|
-
return this.#
|
625
|
+
return this.#source;
|
626
626
|
}
|
627
627
|
|
628
628
|
type(): Protocol.Animation.AnimationType {
|
629
|
-
return this.#
|
629
|
+
return this.#payload.type;
|
630
630
|
}
|
631
631
|
|
632
632
|
overlaps(animation: AnimationImpl): boolean {
|
@@ -652,14 +652,14 @@ export class AnimationImpl {
|
|
652
652
|
}
|
653
653
|
|
654
654
|
setTiming(duration: number, delay: number): void {
|
655
|
-
void this.#
|
655
|
+
void this.#source.node().then(node => {
|
656
656
|
if (!node) {
|
657
657
|
throw new Error('Unable to find node');
|
658
658
|
}
|
659
659
|
this.updateNodeStyle(duration, delay, node);
|
660
660
|
});
|
661
|
-
this.#
|
662
|
-
this.#
|
661
|
+
this.#source.durationInternal = duration;
|
662
|
+
this.#source.delayInternal = delay;
|
663
663
|
void this.#animationModel.agent.invoke_setTiming({animationId: this.id(), duration, delay});
|
664
664
|
}
|
665
665
|
|
@@ -692,7 +692,7 @@ export class AnimationImpl {
|
|
692
692
|
}
|
693
693
|
|
694
694
|
cssId(): string {
|
695
|
-
return this.#
|
695
|
+
return this.#payload.cssId || '';
|
696
696
|
}
|
697
697
|
}
|
698
698
|
|
@@ -702,8 +702,8 @@ export class AnimationEffect {
|
|
702
702
|
.AnimationEffect; // Assertion is safe because `setPayload` call in `constructor` sets the value.
|
703
703
|
delayInternal!: number; // Assertion is safe because `setPayload` call in `constructor` sets the value.
|
704
704
|
durationInternal!: number; // Assertion is safe because `setPayload` call in `constructor` sets the value.
|
705
|
-
#
|
706
|
-
#
|
705
|
+
#keyframesRule: KeyframesRule|undefined;
|
706
|
+
#deferredNode?: DeferredDOMNode;
|
707
707
|
constructor(animationModel: AnimationModel, payload: Protocol.Animation.AnimationEffect) {
|
708
708
|
this.#animationModel = animationModel;
|
709
709
|
this.setPayload(payload);
|
@@ -711,10 +711,10 @@ export class AnimationEffect {
|
|
711
711
|
|
712
712
|
setPayload(payload: Protocol.Animation.AnimationEffect): void {
|
713
713
|
this.#payload = payload;
|
714
|
-
if (!this.#
|
715
|
-
this.#
|
716
|
-
} else if (this.#
|
717
|
-
this.#
|
714
|
+
if (!this.#keyframesRule && payload.keyframesRule) {
|
715
|
+
this.#keyframesRule = new KeyframesRule(payload.keyframesRule);
|
716
|
+
} else if (this.#keyframesRule && payload.keyframesRule) {
|
717
|
+
this.#keyframesRule.setPayload(payload.keyframesRule);
|
718
718
|
}
|
719
719
|
|
720
720
|
this.delayInternal = payload.delay;
|
@@ -750,10 +750,10 @@ export class AnimationEffect {
|
|
750
750
|
}
|
751
751
|
|
752
752
|
node(): Promise<DOMNode|null> {
|
753
|
-
if (!this.#
|
754
|
-
this.#
|
753
|
+
if (!this.#deferredNode) {
|
754
|
+
this.#deferredNode = new DeferredDOMNode(this.#animationModel.target(), this.backendNodeId());
|
755
755
|
}
|
756
|
-
return this.#
|
756
|
+
return this.#deferredNode.resolvePromise();
|
757
757
|
}
|
758
758
|
|
759
759
|
deferredNode(): DeferredDOMNode {
|
@@ -765,7 +765,7 @@ export class AnimationEffect {
|
|
765
765
|
}
|
766
766
|
|
767
767
|
keyframesRule(): KeyframesRule|null {
|
768
|
-
return this.#
|
768
|
+
return this.#keyframesRule || null;
|
769
769
|
}
|
770
770
|
|
771
771
|
easing(): string {
|
@@ -775,20 +775,19 @@ export class AnimationEffect {
|
|
775
775
|
|
776
776
|
export class KeyframesRule {
|
777
777
|
#payload!: Protocol.Animation
|
778
|
-
.KeyframesRule;
|
779
|
-
#
|
780
|
-
KeyframeStyle[]; // Assertion is safe because `setPayload` call in `constructor` sets the value.;
|
778
|
+
.KeyframesRule; // Assertion is safe because `setPayload` call in `constructor` sets the value.;
|
779
|
+
#keyframes!: KeyframeStyle[]; // Assertion is safe because `setPayload` call in `constructor` sets the value.;
|
781
780
|
constructor(payload: Protocol.Animation.KeyframesRule) {
|
782
781
|
this.setPayload(payload);
|
783
782
|
}
|
784
783
|
|
785
784
|
setPayload(payload: Protocol.Animation.KeyframesRule): void {
|
786
785
|
this.#payload = payload;
|
787
|
-
if (!this.#
|
788
|
-
this.#
|
786
|
+
if (!this.#keyframes) {
|
787
|
+
this.#keyframes = this.#payload.keyframes.map(keyframeStyle => new KeyframeStyle(keyframeStyle));
|
789
788
|
} else {
|
790
789
|
this.#payload.keyframes.forEach((keyframeStyle, index) => {
|
791
|
-
this.#
|
790
|
+
this.#keyframes[index]?.setPayload(keyframeStyle);
|
792
791
|
});
|
793
792
|
}
|
794
793
|
}
|
@@ -798,33 +797,33 @@ export class KeyframesRule {
|
|
798
797
|
}
|
799
798
|
|
800
799
|
keyframes(): KeyframeStyle[] {
|
801
|
-
return this.#
|
800
|
+
return this.#keyframes;
|
802
801
|
}
|
803
802
|
}
|
804
803
|
|
805
804
|
export class KeyframeStyle {
|
806
805
|
#payload!:
|
807
806
|
Protocol.Animation.KeyframeStyle; // Assertion is safe because `setPayload` call in `constructor` sets the value.
|
808
|
-
#
|
807
|
+
#offset!: string; // Assertion is safe because `setPayload` call in `constructor` sets the value.
|
809
808
|
constructor(payload: Protocol.Animation.KeyframeStyle) {
|
810
809
|
this.setPayload(payload);
|
811
810
|
}
|
812
811
|
|
813
812
|
setPayload(payload: Protocol.Animation.KeyframeStyle): void {
|
814
813
|
this.#payload = payload;
|
815
|
-
this.#
|
814
|
+
this.#offset = payload.offset;
|
816
815
|
}
|
817
816
|
|
818
817
|
offset(): string {
|
819
|
-
return this.#
|
818
|
+
return this.#offset;
|
820
819
|
}
|
821
820
|
|
822
821
|
setOffset(offset: number): void {
|
823
|
-
this.#
|
822
|
+
this.#offset = offset * 100 + '%';
|
824
823
|
}
|
825
824
|
|
826
825
|
offsetAsNumber(): number {
|
827
|
-
return parseFloat(this.#
|
826
|
+
return parseFloat(this.#offset) / 100;
|
828
827
|
}
|
829
828
|
|
830
829
|
easing(): string {
|
@@ -834,27 +833,27 @@ export class KeyframeStyle {
|
|
834
833
|
|
835
834
|
export class AnimationGroup {
|
836
835
|
readonly #animationModel: AnimationModel;
|
837
|
-
readonly #
|
838
|
-
#
|
839
|
-
#
|
840
|
-
#
|
836
|
+
readonly #id: string;
|
837
|
+
#scrollNode: AnimationDOMNode|undefined;
|
838
|
+
#animations: AnimationImpl[];
|
839
|
+
#paused: boolean;
|
841
840
|
constructor(animationModel: AnimationModel, id: string, animations: AnimationImpl[]) {
|
842
841
|
this.#animationModel = animationModel;
|
843
|
-
this.#
|
844
|
-
this.#
|
845
|
-
this.#
|
842
|
+
this.#id = id;
|
843
|
+
this.#animations = animations;
|
844
|
+
this.#paused = false;
|
846
845
|
}
|
847
846
|
|
848
847
|
isScrollDriven(): boolean {
|
849
|
-
return Boolean(this.#
|
848
|
+
return Boolean(this.#animations[0]?.viewOrScrollTimeline());
|
850
849
|
}
|
851
850
|
|
852
851
|
id(): string {
|
853
|
-
return this.#
|
852
|
+
return this.#id;
|
854
853
|
}
|
855
854
|
|
856
855
|
animations(): AnimationImpl[] {
|
857
|
-
return this.#
|
856
|
+
return this.#animations;
|
858
857
|
}
|
859
858
|
|
860
859
|
release(): void {
|
@@ -867,18 +866,18 @@ export class AnimationGroup {
|
|
867
866
|
return animation.id();
|
868
867
|
}
|
869
868
|
|
870
|
-
return this.#
|
869
|
+
return this.#animations.map(extractId);
|
871
870
|
}
|
872
871
|
|
873
872
|
startTime(): number {
|
874
|
-
return this.#
|
873
|
+
return this.#animations[0].startTime();
|
875
874
|
}
|
876
875
|
|
877
876
|
// For scroll driven animations, it returns the duration in pixels (i.e. after how many pixels of scroll the animation is going to end)
|
878
877
|
// For time animations, it returns milliseconds.
|
879
878
|
groupDuration(): number {
|
880
879
|
let duration = 0;
|
881
|
-
for (const anim of this.#
|
880
|
+
for (const anim of this.#animations) {
|
882
881
|
duration = Math.max(duration, anim.delayOrStartTime() + anim.iterationDuration());
|
883
882
|
}
|
884
883
|
return duration;
|
@@ -888,14 +887,14 @@ export class AnimationGroup {
|
|
888
887
|
// For time animations, it returns milliseconds.
|
889
888
|
finiteDuration(): number {
|
890
889
|
let maxDuration = 0;
|
891
|
-
for (let i = 0; i < this.#
|
892
|
-
maxDuration = Math.max(maxDuration, this.#
|
890
|
+
for (let i = 0; i < this.#animations.length; ++i) {
|
891
|
+
maxDuration = Math.max(maxDuration, this.#animations[i].finiteDuration());
|
893
892
|
}
|
894
893
|
return maxDuration;
|
895
894
|
}
|
896
895
|
|
897
896
|
scrollOrientation(): Protocol.DOM.ScrollOrientation|null {
|
898
|
-
const timeline = this.#
|
897
|
+
const timeline = this.#animations[0]?.viewOrScrollTimeline();
|
899
898
|
if (!timeline) {
|
900
899
|
return null;
|
901
900
|
}
|
@@ -904,15 +903,15 @@ export class AnimationGroup {
|
|
904
903
|
}
|
905
904
|
|
906
905
|
async scrollNode(): Promise<AnimationDOMNode|null> {
|
907
|
-
if (this.#
|
908
|
-
return this.#
|
906
|
+
if (this.#scrollNode) {
|
907
|
+
return this.#scrollNode;
|
909
908
|
}
|
910
909
|
|
911
910
|
if (!this.isScrollDriven()) {
|
912
911
|
return null;
|
913
912
|
}
|
914
913
|
|
915
|
-
const sourceNodeId = this.#
|
914
|
+
const sourceNodeId = this.#animations[0]?.viewOrScrollTimeline()?.sourceNodeId;
|
916
915
|
if (!sourceNodeId) {
|
917
916
|
return null;
|
918
917
|
}
|
@@ -923,8 +922,8 @@ export class AnimationGroup {
|
|
923
922
|
return null;
|
924
923
|
}
|
925
924
|
|
926
|
-
this.#
|
927
|
-
return this.#
|
925
|
+
this.#scrollNode = new AnimationDOMNode(scrollNode);
|
926
|
+
return this.#scrollNode;
|
928
927
|
}
|
929
928
|
|
930
929
|
seekTo(currentTime: number): void {
|
@@ -932,20 +931,20 @@ export class AnimationGroup {
|
|
932
931
|
}
|
933
932
|
|
934
933
|
paused(): boolean {
|
935
|
-
return this.#
|
934
|
+
return this.#paused;
|
936
935
|
}
|
937
936
|
|
938
937
|
togglePause(paused: boolean): void {
|
939
|
-
if (paused === this.#
|
938
|
+
if (paused === this.#paused) {
|
940
939
|
return;
|
941
940
|
}
|
942
|
-
this.#
|
941
|
+
this.#paused = paused;
|
943
942
|
void this.#animationModel.agent.invoke_setPaused({animations: this.animationIds(), paused});
|
944
943
|
}
|
945
944
|
|
946
945
|
currentTimePromise(): Promise<number> {
|
947
946
|
let longestAnim: AnimationImpl|null = null;
|
948
|
-
for (const anim of this.#
|
947
|
+
for (const anim of this.#animations) {
|
949
948
|
if (!longestAnim || anim.endTime() > longestAnim.endTime()) {
|
950
949
|
longestAnim = anim;
|
951
950
|
}
|
@@ -967,11 +966,11 @@ export class AnimationGroup {
|
|
967
966
|
return regularId + timelineId;
|
968
967
|
}
|
969
968
|
|
970
|
-
if (this.#
|
969
|
+
if (this.#animations.length !== group.#animations.length) {
|
971
970
|
return false;
|
972
971
|
}
|
973
|
-
const left = this.#
|
974
|
-
const right = group.#
|
972
|
+
const left = this.#animations.map(extractId).sort();
|
973
|
+
const right = group.#animations.map(extractId).sort();
|
975
974
|
for (let i = 0; i < left.length; i++) {
|
976
975
|
if (left[i] !== right[i]) {
|
977
976
|
return false;
|
@@ -983,19 +982,19 @@ export class AnimationGroup {
|
|
983
982
|
shouldInclude(group: AnimationGroup): boolean {
|
984
983
|
// We want to include the animations coming from the incoming group
|
985
984
|
// inside this group if they were to be grouped if the events came at the same time.
|
986
|
-
const [firstIncomingAnimation] = group.#
|
987
|
-
const [firstAnimation] = this.#
|
985
|
+
const [firstIncomingAnimation] = group.#animations;
|
986
|
+
const [firstAnimation] = this.#animations;
|
988
987
|
return shouldGroupAnimations(firstAnimation, firstIncomingAnimation);
|
989
988
|
}
|
990
989
|
|
991
990
|
appendAnimations(animations: AnimationImpl[]): void {
|
992
|
-
this.#
|
991
|
+
this.#animations.push(...animations);
|
993
992
|
}
|
994
993
|
|
995
994
|
rebaseTo(group: AnimationGroup): void {
|
996
995
|
this.#animationModel.releaseAnimations(this.animationIds());
|
997
|
-
this.#
|
998
|
-
this.#
|
996
|
+
this.#animations = group.#animations;
|
997
|
+
this.#scrollNode = undefined;
|
999
998
|
}
|
1000
999
|
}
|
1001
1000
|
|
@@ -52,7 +52,7 @@ export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolPr
|
|
52
52
|
#anonymousConsoleProfileIdToTitle: Map<string, string>;
|
53
53
|
readonly #profilerAgent: ProtocolProxyApi.ProfilerApi;
|
54
54
|
#preciseCoverageDeltaUpdateCallback: ((arg0: number, arg2: Protocol.Profiler.ScriptCoverage[]) => Promise<void>)|null;
|
55
|
-
readonly #
|
55
|
+
readonly #debuggerModel: DebuggerModel;
|
56
56
|
readonly registeredConsoleProfileMessages: ProfileFinishedData[] = [];
|
57
57
|
|
58
58
|
constructor(target: Target) {
|
@@ -63,15 +63,15 @@ export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolPr
|
|
63
63
|
this.#preciseCoverageDeltaUpdateCallback = null;
|
64
64
|
target.registerProfilerDispatcher(this);
|
65
65
|
void this.#profilerAgent.invoke_enable();
|
66
|
-
this.#
|
66
|
+
this.#debuggerModel = (target.model(DebuggerModel) as DebuggerModel);
|
67
67
|
}
|
68
68
|
|
69
69
|
runtimeModel(): RuntimeModel {
|
70
|
-
return this.#
|
70
|
+
return this.#debuggerModel.runtimeModel();
|
71
71
|
}
|
72
72
|
|
73
73
|
debuggerModel(): DebuggerModel {
|
74
|
-
return this.#
|
74
|
+
return this.#debuggerModel;
|
75
75
|
}
|
76
76
|
|
77
77
|
consoleProfileStarted({id, location, title}: Protocol.Profiler.ConsoleProfileStartedEvent): void {
|
@@ -97,7 +97,7 @@ export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolPr
|
|
97
97
|
}
|
98
98
|
|
99
99
|
private createEventDataFrom(id: string, scriptLocation: Protocol.Debugger.Location, title?: string): EventData {
|
100
|
-
const debuggerLocation = Location.fromPayload(this.#
|
100
|
+
const debuggerLocation = Location.fromPayload(this.#debuggerModel, scriptLocation);
|
101
101
|
const globalId = this.target().id() + '.' + id;
|
102
102
|
return {
|
103
103
|
id: globalId,
|
@@ -39,14 +39,14 @@ let throttlingManagerInstance: CPUThrottlingManager;
|
|
39
39
|
|
40
40
|
export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements
|
41
41
|
SDKModelObserver<EmulationModel> {
|
42
|
-
#
|
42
|
+
#cpuThrottlingOption: CPUThrottlingOption;
|
43
43
|
#calibratedThrottlingSetting: Common.Settings.Setting<CalibratedCPUThrottling>;
|
44
|
-
#
|
44
|
+
#hardwareConcurrency?: number;
|
45
45
|
#pendingMainTargetPromise?: (r: number) => void;
|
46
46
|
|
47
47
|
private constructor() {
|
48
48
|
super();
|
49
|
-
this.#
|
49
|
+
this.#cpuThrottlingOption = NoThrottlingOption;
|
50
50
|
this.#calibratedThrottlingSetting = Common.Settings.Settings.instance().createSetting<CalibratedCPUThrottling>(
|
51
51
|
'calibrated-cpu-throttling', {}, Common.Settings.SettingStorageType.GLOBAL);
|
52
52
|
this.#calibratedThrottlingSetting.addChangeListener(this.#onCalibratedSettingChanged, this);
|
@@ -63,21 +63,21 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
63
63
|
}
|
64
64
|
|
65
65
|
cpuThrottlingRate(): number {
|
66
|
-
return this.#
|
66
|
+
return this.#cpuThrottlingOption.rate();
|
67
67
|
}
|
68
68
|
|
69
69
|
cpuThrottlingOption(): CPUThrottlingOption {
|
70
|
-
return this.#
|
70
|
+
return this.#cpuThrottlingOption;
|
71
71
|
}
|
72
72
|
|
73
73
|
#onCalibratedSettingChanged(): void {
|
74
74
|
// If a calibrated option is selected, need to propagate new rate.
|
75
|
-
const currentOption = this.#
|
75
|
+
const currentOption = this.#cpuThrottlingOption;
|
76
76
|
if (!currentOption.calibratedDeviceType) {
|
77
77
|
return;
|
78
78
|
}
|
79
79
|
|
80
|
-
const rate = this.#
|
80
|
+
const rate = this.#cpuThrottlingOption.rate();
|
81
81
|
if (rate === 0) {
|
82
82
|
// This calibrated option is no longer valid.
|
83
83
|
this.setCPUThrottlingOption(NoThrottlingOption);
|
@@ -91,23 +91,23 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
91
91
|
}
|
92
92
|
|
93
93
|
setCPUThrottlingOption(option: CPUThrottlingOption): void {
|
94
|
-
if (option === this.#
|
94
|
+
if (option === this.#cpuThrottlingOption) {
|
95
95
|
return;
|
96
96
|
}
|
97
97
|
|
98
|
-
this.#
|
98
|
+
this.#cpuThrottlingOption = option;
|
99
99
|
for (const emulationModel of TargetManager.instance().models(EmulationModel)) {
|
100
|
-
void emulationModel.setCPUThrottlingRate(this.#
|
100
|
+
void emulationModel.setCPUThrottlingRate(this.#cpuThrottlingOption.rate());
|
101
101
|
}
|
102
|
-
this.dispatchEventToListeners(Events.RATE_CHANGED, this.#
|
102
|
+
this.dispatchEventToListeners(Events.RATE_CHANGED, this.#cpuThrottlingOption.rate());
|
103
103
|
}
|
104
104
|
|
105
105
|
setHardwareConcurrency(concurrency: number): void {
|
106
|
-
this.#
|
106
|
+
this.#hardwareConcurrency = concurrency;
|
107
107
|
for (const emulationModel of TargetManager.instance().models(EmulationModel)) {
|
108
108
|
void emulationModel.setHardwareConcurrency(concurrency);
|
109
109
|
}
|
110
|
-
this.dispatchEventToListeners(Events.HARDWARE_CONCURRENCY_CHANGED, this.#
|
110
|
+
this.dispatchEventToListeners(Events.HARDWARE_CONCURRENCY_CHANGED, this.#hardwareConcurrency);
|
111
111
|
}
|
112
112
|
|
113
113
|
hasPrimaryPageTargetSet(): boolean {
|
@@ -154,11 +154,11 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
154
154
|
}
|
155
155
|
|
156
156
|
modelAdded(emulationModel: EmulationModel): void {
|
157
|
-
if (this.#
|
158
|
-
void emulationModel.setCPUThrottlingRate(this.#
|
157
|
+
if (this.#cpuThrottlingOption !== NoThrottlingOption) {
|
158
|
+
void emulationModel.setCPUThrottlingRate(this.#cpuThrottlingOption.rate());
|
159
159
|
}
|
160
|
-
if (this.#
|
161
|
-
void emulationModel.setHardwareConcurrency(this.#
|
160
|
+
if (this.#hardwareConcurrency !== undefined) {
|
161
|
+
void emulationModel.setHardwareConcurrency(this.#hardwareConcurrency);
|
162
162
|
}
|
163
163
|
|
164
164
|
// If there are any callers blocked on a getHardwareConcurrency call, let's wake them now.
|