chrome-devtools-frontend 1.0.1726686 → 1.0.1730971
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/.agents/rules/tests/test-strict-assertions-and-literal-expectations.md +1 -1
- package/.agents/rules/tests/test-view-and-presenter-isolation.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-accessibility-and-semantic-html.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-declarative-child-widget-composition.md +5 -5
- package/.agents/rules/ui-and-widgets/ui-lit-declarative-templates-and-directives.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-localization-and-uistrings-hygiene.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-modern-component-and-encapsulation-standards.md +3 -3
- package/.agents/rules/ui-and-widgets/ui-pure-view-and-presenter-separation.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-reactive-widget-update-lifecycle.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-view-output-and-callback-contracts.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-widget-dom-and-listener-lifecycle.md +2 -2
- package/.agents/skills/code-review/SKILL.md +63 -12
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +38 -10
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +1 -0
- package/.agents/skills/ui-widgets/SKILL.md +8 -2
- package/.agents/skills/write-ai-eval-test/SKILL.md +106 -0
- package/AUTHORS +2 -0
- package/DIR_METADATA +1 -2
- package/README.md +48 -26
- package/config/typescript/tsconfig.base.json +1 -0
- package/config/typescript/tsconfig.eslint.json +1 -0
- package/docs/contributing/changes.md +25 -0
- package/docs/ui_engineering.md +13 -4
- package/eslint.config.mjs +323 -41
- package/front_end/core/common/Color.ts +7 -7
- package/front_end/core/common/ParsedURL.ts +3 -3
- package/front_end/core/common/ResolverBase.ts +3 -3
- package/front_end/core/common/SegmentedRange.ts +3 -3
- package/front_end/core/common/SimpleHistoryManager.ts +14 -14
- package/front_end/core/common/Trie.ts +3 -3
- package/front_end/core/common/VersionController.ts +7 -7
- package/front_end/core/host/InspectorFrontendHost.ts +2 -2
- package/front_end/core/host/InspectorFrontendHostAPI.ts +9 -1
- package/front_end/core/host/InspectorFrontendHostStub.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +4 -0
- package/front_end/core/host/UserMetricsEnums.ts +2 -1
- package/front_end/core/platform/StringUtilities.ts +54 -13
- package/front_end/core/platform/node/HostRuntime.ts +13 -7
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +4 -5
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/AccessibilityModel.ts +5 -5
- package/front_end/core/sdk/AnimationModel.ts +17 -19
- package/front_end/core/sdk/CPUProfilerModel.ts +3 -3
- package/front_end/core/sdk/CPUThrottlingManager.ts +7 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +73 -13
- package/front_end/core/sdk/CSSMetadata.ts +7 -7
- package/front_end/core/sdk/CSSModel.ts +33 -33
- package/front_end/core/sdk/CSSProperty.ts +5 -5
- package/front_end/core/sdk/CSSRule.ts +6 -6
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +4 -4
- package/front_end/core/sdk/Connections.ts +16 -16
- package/front_end/core/sdk/ConsoleModel.ts +44 -47
- package/front_end/core/sdk/CookieParser.ts +11 -11
- package/front_end/core/sdk/EmulationModel.ts +35 -36
- package/front_end/core/sdk/EventBreakpointsModel.ts +11 -11
- package/front_end/core/sdk/FrameManager.ts +16 -16
- package/front_end/core/sdk/IsolateManager.ts +2 -2
- package/front_end/core/sdk/IssuesModel.ts +2 -2
- package/front_end/core/sdk/OverlayModel.ts +19 -19
- package/front_end/core/sdk/PageResourceLoader.ts +14 -16
- package/front_end/core/sdk/RemoteObject.ts +9 -9
- package/front_end/core/sdk/Resource.ts +2 -2
- package/front_end/core/sdk/RuntimeModel.ts +7 -7
- package/front_end/core/sdk/Script.ts +6 -6
- package/front_end/core/sdk/ServiceWorkerManager.ts +36 -10
- package/front_end/core/sdk/SourceMap.ts +18 -20
- package/front_end/core/sdk/SourceMapManager.ts +2 -2
- package/front_end/core/sdk/TargetManager.ts +2 -2
- package/front_end/devtools_compatibility.js +7 -3
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +2 -2
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +203 -115
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/SupportedCSSProperties.ts +1 -3
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +36 -12
- package/front_end/models/ai_assistance/AiConversation.ts +8 -2
- package/front_end/models/ai_assistance/agents/AiAgent.ts +137 -62
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +149 -2
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +269 -42
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +3 -0
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +9 -0
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +13 -2
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +23 -7
- package/front_end/models/ai_assistance/tools/Tool.ts +7 -5
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +22 -24
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +60 -60
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +24 -24
- package/front_end/models/bindings/DefaultScriptMapping.ts +8 -8
- package/front_end/models/bindings/FileUtils.ts +13 -13
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +3 -3
- package/front_end/models/bindings/ResourceScriptMapping.ts +23 -23
- package/front_end/models/comment_manager/CommentManager.ts +3 -3
- package/front_end/models/comment_manager/CommentThread.ts +50 -5
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +14 -14
- package/front_end/models/cpu_profile/ProfileTreeModel.ts +4 -4
- package/front_end/models/elements/StyleChanges.ts +38 -0
- package/front_end/models/emulation/EmulatedDevices.ts +12 -12
- package/front_end/models/har/HARFormat.ts +4 -4
- package/front_end/models/javascript_metadata/NativeFunctions.ts +5 -1
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +57 -3
- package/front_end/models/lighthouse/RunTypes.ts +9 -1
- package/front_end/models/logs/LogManager.ts +2 -2
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +3 -0
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +24 -24
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +6 -0
- package/front_end/models/persistence/NetworkPersistenceManager.ts +8 -3
- package/front_end/models/trace/LanternComputationData.ts +37 -11
- package/front_end/models/trace/Processor.ts +2 -1
- package/front_end/models/trace/extras/TraceTree.ts +36 -10
- package/front_end/models/trace/handlers/InitiatorsHandler.ts +27 -34
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +2 -6
- package/front_end/models/trace/handlers/SamplesHandler.ts +9 -6
- package/front_end/models/workspace/FileManager.ts +6 -0
- package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +8 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +15 -17
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
- package/front_end/panels/ai_assistance/ExternalHandler.ts +10 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +27 -22
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +19 -23
- package/front_end/panels/ai_assistance/components/ExploreWidget.ts +2 -2
- package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +23 -9
- package/front_end/panels/ai_assistance/components/chatInput.css +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +37 -17
- package/front_end/panels/animation/animationTimeline.css +19 -3
- package/front_end/panels/application/AppManifestView.ts +1 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +143 -128
- package/front_end/panels/application/DOMStorageItemsView.ts +14 -14
- package/front_end/panels/application/DeviceBoundSessionsView.ts +10 -13
- package/front_end/panels/application/ExtensionStorageItemsView.ts +3 -4
- package/front_end/panels/application/IndexedDBViews.ts +8 -4
- package/front_end/panels/application/KeyValueStorageItemsView.ts +4 -5
- package/front_end/panels/application/PrivateVerificationTokensView.ts +53 -0
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +12 -8
- package/front_end/panels/application/ServiceWorkersView.ts +1 -2
- package/front_end/panels/application/StorageItemsToolbar.ts +3 -3
- package/front_end/panels/application/StorageView.ts +2 -2
- package/front_end/panels/application/WebMCPView.ts +91 -109
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/components/StorageMetadataView.ts +6 -6
- package/front_end/panels/application/preloading/PreloadingView.ts +70 -37
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +3 -3
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +12 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +10 -11
- package/front_end/panels/application/privateVerificationTokensView.css +20 -0
- package/front_end/panels/application/serviceWorkersView.css +2 -2
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +24 -24
- package/front_end/panels/changes/ChangesSidebar.ts +5 -5
- package/front_end/panels/changes/ChangesView.ts +10 -11
- package/front_end/panels/comments/CommentsPane.ts +292 -102
- package/front_end/panels/comments/commentsPane.css +93 -12
- package/front_end/panels/common/CommentThreadWidget.ts +69 -0
- package/front_end/panels/common/CommentsOverlayWidget.ts +108 -29
- package/front_end/panels/common/CommentsStatusBarPill.ts +17 -6
- package/front_end/panels/common/DOMLinkifier.ts +37 -12
- package/front_end/panels/common/ExtensionPanel.ts +13 -4
- package/front_end/panels/common/ExtensionServer.ts +27 -3
- package/front_end/panels/common/PersistenceUtils.ts +3 -3
- package/front_end/panels/common/commentThreadWidget.css +25 -1
- package/front_end/panels/common/common-meta.ts +10 -0
- package/front_end/panels/console/ConsolePinPane.ts +13 -15
- package/front_end/panels/console/ConsolePrompt.ts +173 -95
- package/front_end/panels/console/ConsoleSidebar.ts +2 -2
- package/front_end/panels/console/ConsoleView.ts +75 -79
- package/front_end/panels/console/ConsoleViewMessage.ts +52 -4
- package/front_end/panels/console/SymbolizedErrorWidget.ts +8 -4
- package/front_end/panels/console/consolePrompt.css +1 -1
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/console_counters/WarningErrorCounter.ts +3 -4
- package/front_end/panels/coverage/CoverageListView.ts +2 -2
- package/front_end/panels/coverage/CoverageView.ts +20 -5
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +4 -3
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +8 -8
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +2 -3
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +4 -5
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +6 -7
- package/front_end/panels/elements/CSSValueTraceView.ts +3 -3
- package/front_end/panels/elements/ClassesPaneWidget.ts +1 -2
- package/front_end/panels/elements/ComputedStyleWidget.ts +15 -14
- package/front_end/panels/elements/DOMTreeElementWidget.ts +5 -4
- package/front_end/panels/elements/DOMTreeWidget.ts +2 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -0
- package/front_end/panels/elements/EventListenersWidget.ts +2 -2
- package/front_end/panels/elements/LayoutPane.ts +2 -2
- package/front_end/panels/elements/PlatformFontsWidget.ts +3 -3
- package/front_end/panels/elements/PropertiesWidget.ts +9 -10
- package/front_end/panels/elements/PropertyRenderer.ts +72 -11
- package/front_end/panels/elements/StandaloneStylesContainer.ts +5 -10
- package/front_end/panels/elements/StyleEditorWidget.ts +30 -16
- package/front_end/panels/elements/StylePropertiesSection.ts +93 -44
- package/front_end/panels/elements/StylePropertyTreeElement.ts +230 -302
- package/front_end/panels/elements/StylesContainer.ts +2 -3
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -13
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +66 -37
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +51 -41
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +75 -65
- package/front_end/panels/elements/components/CSSQuery.ts +112 -74
- package/front_end/panels/elements/components/CSSVariableValueView.ts +109 -68
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +64 -45
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +35 -28
- package/front_end/panels/elements/components/QueryContainer.ts +104 -74
- package/front_end/panels/elements/components/accessibilityTreeNode.css +22 -20
- package/front_end/panels/elements/components/computedStyleProperty.css +2 -0
- package/front_end/panels/elements/components/cssHintDetailsView.css +23 -21
- package/front_end/panels/elements/components/cssPropertyDocsView.css +38 -36
- package/front_end/panels/elements/components/cssVariableValueView.css +42 -40
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -2
- package/front_end/panels/elements/components/queryContainer.css +23 -21
- package/front_end/panels/elements/stylesSidebarPane.css +3 -3
- package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -2
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +2 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +9 -10
- package/front_end/panels/emulation/mediaQueryInspector.css +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +2 -2
- package/front_end/panels/issues/AffectedCookiesView.ts +144 -101
- package/front_end/panels/issues/AffectedDescendantsWithinSelectElementView.ts +83 -31
- package/front_end/panels/issues/AffectedDirectivesView.ts +218 -135
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +84 -34
- package/front_end/panels/issues/AffectedElementsView.ts +86 -23
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +2 -2
- package/front_end/panels/issues/AffectedMetadataAllowedSitesView.ts +2 -2
- package/front_end/panels/issues/AffectedPartitioningBlobURLView.ts +36 -11
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +135 -58
- package/front_end/panels/issues/AffectedSourcesView.ts +49 -28
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +3 -4
- package/front_end/panels/issues/CorsIssueDetailsView.ts +490 -269
- package/front_end/panels/issues/GenericIssueDetailsView.ts +2 -2
- package/front_end/panels/issues/IssueKindView.ts +63 -48
- package/front_end/panels/issues/IssueView.ts +14 -18
- package/front_end/panels/issues/components/ElementsPanelLink.ts +70 -34
- package/front_end/panels/issues/components/HideIssuesMenu.ts +56 -32
- package/front_end/panels/issues/components/elementsPanelLink.css +10 -6
- package/front_end/panels/issues/components/hideIssuesMenu.css +16 -14
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/issues/issuesTree.css +4 -4
- package/front_end/panels/lighthouse/LighthouseController.ts +6 -6
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +12 -13
- package/front_end/panels/lighthouse/lighthouseStartView.css +1 -1
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +159 -161
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorView.ts +228 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +32 -41
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +2 -2
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector.ts +2 -0
- package/front_end/panels/media/EventDisplayTable.ts +2 -2
- package/front_end/panels/media/MainView.ts +132 -66
- package/front_end/panels/media/PlayerDetailView.ts +32 -14
- package/front_end/panels/media/PlayerListView.ts +83 -23
- package/front_end/panels/media/PlayerPropertiesView.ts +2 -2
- package/front_end/panels/media/TickingFlameChart.ts +153 -63
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +615 -464
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +43 -0
- package/front_end/panels/network/EventSourceMessagesView.ts +3 -3
- package/front_end/panels/network/NetworkConfigView.ts +6 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +2 -1
- package/front_end/panels/network/NetworkItemView.ts +27 -26
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +236 -97
- package/front_end/panels/network/NetworkOverview.ts +8 -10
- package/front_end/panels/network/RequestConditionsDrawer.ts +8 -4
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -4
- package/front_end/panels/network/RequestHTMLView.ts +26 -7
- package/front_end/panels/network/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/RequestInitiatorView.ts +21 -22
- package/front_end/panels/network/RequestPayloadView.ts +2 -16
- package/front_end/panels/network/RequestPreviewView.ts +5 -5
- package/front_end/panels/network/RequestTimingView.ts +6 -6
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +5 -6
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +4 -3
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +11 -12
- package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
- package/front_end/panels/network/networkLogView.css +2 -2
- package/front_end/panels/network/networkManageCustomHeadersView.css +27 -6
- package/front_end/panels/network/requestConditionsDrawer.css +1 -1
- package/front_end/panels/network/requestInitiatorView.css +5 -3
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -2
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +1 -2
- package/front_end/panels/profiler/HeapTimelineOverview.ts +77 -15
- package/front_end/panels/profiler/IsolateSelector.ts +258 -187
- package/front_end/panels/profiler/ProfileLauncherView.ts +7 -29
- package/front_end/panels/profiler/profileLauncherView.css +6 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +4 -5
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecordingListView.ts +2 -4
- package/front_end/panels/recorder/RecordingView.ts +1 -2
- package/front_end/panels/recorder/SelectorPicker.ts +2 -4
- package/front_end/panels/recorder/StepView.ts +24 -10
- package/front_end/panels/recorder/TimelineSection.ts +1 -1
- package/front_end/panels/recorder/recordingView.css +1 -1
- package/front_end/panels/screencast/ScreencastApp.ts +1 -1
- package/front_end/panels/search/SearchResultsPane.ts +11 -12
- package/front_end/panels/search/SearchView.ts +8 -10
- package/front_end/panels/security/SecurityPanel.ts +1 -8
- package/front_end/panels/security/SecurityPanelSidebar.ts +2 -2
- package/front_end/panels/security/mainView.css +1 -1
- package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -2
- package/front_end/panels/settings/AISettingsTab.ts +1 -1
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +34 -20
- package/front_end/panels/settings/EditFileSystemView.ts +2 -2
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +375 -197
- package/front_end/panels/settings/KeybindsSettingsTab.ts +570 -414
- package/front_end/panels/settings/SettingsScreen.ts +312 -114
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -2
- package/front_end/panels/settings/aiSettingsTab.css +1 -4
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +924 -578
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +9 -2
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +39 -0
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +37 -8
- package/front_end/panels/settings/settingsScreen.css +0 -24
- package/front_end/panels/sources/BreakpointEditDialog.ts +9 -6
- package/front_end/panels/sources/BreakpointsView.ts +25 -4
- package/front_end/panels/sources/CallStackSidebarPane.ts +7 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -0
- package/front_end/panels/sources/GoToLineQuickOpen.ts +8 -8
- package/front_end/panels/sources/NavigatorView.ts +521 -439
- package/front_end/panels/sources/PersistenceActions.ts +11 -12
- package/front_end/panels/sources/ProfilePlugin.ts +28 -17
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +3 -4
- package/front_end/panels/sources/SourcesNavigator.ts +9 -9
- package/front_end/panels/sources/SourcesPanel.ts +2 -2
- package/front_end/panels/sources/SourcesView.ts +3 -3
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -2
- package/front_end/panels/sources/components/HeadersView.ts +1 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -6
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +73 -34
- package/front_end/panels/timeline/IsolateSelector.ts +25 -37
- package/front_end/panels/timeline/StatusDialog.ts +5 -7
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -13
- package/front_end/panels/timeline/TimelineDetailsView.ts +40 -21
- package/front_end/panels/timeline/TimelineEventOverview.ts +130 -34
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineMiniMap.ts +255 -103
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +19 -11
- package/front_end/panels/timeline/TimelinePanel.ts +1 -0
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +11 -12
- package/front_end/panels/timeline/TimelineTreeView.ts +240 -122
- package/front_end/panels/timeline/TimelineUIUtils.ts +12 -0
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +5 -4
- package/front_end/panels/timeline/components/DetailsView.ts +97 -65
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -2
- package/front_end/panels/timeline/components/MetricCard.ts +2 -2
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +11 -12
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +57 -50
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +2 -2
- package/front_end/panels/timeline/components/Sidebar.ts +161 -109
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +33 -12
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +3 -0
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +11 -11
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +6 -7
- package/front_end/panels/timeline/components/networkTrackWidget.css +24 -22
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -1
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +15 -10
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +1 -1
- package/front_end/panels/timeline/timelinePanel.css +5 -0
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/panels/web_audio/WebAudioView.ts +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/legacy-javascript/README.chromium +2 -2
- package/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +2 -2
- package/front_end/third_party/legacy-javascript/package.json +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1983 -2022
- package/front_end/third_party/lighthouse/locales/ar-XB.json +157 -142
- package/front_end/third_party/lighthouse/locales/ar.json +157 -142
- package/front_end/third_party/lighthouse/locales/bg.json +154 -139
- package/front_end/third_party/lighthouse/locales/ca.json +157 -142
- package/front_end/third_party/lighthouse/locales/cs.json +148 -133
- package/front_end/third_party/lighthouse/locales/da.json +153 -138
- package/front_end/third_party/lighthouse/locales/de.json +152 -137
- package/front_end/third_party/lighthouse/locales/el.json +153 -138
- package/front_end/third_party/lighthouse/locales/en-GB.json +160 -145
- package/front_end/third_party/lighthouse/locales/en-US.json +239 -218
- package/front_end/third_party/lighthouse/locales/en-XL.json +239 -218
- package/front_end/third_party/lighthouse/locales/es-419.json +150 -135
- package/front_end/third_party/lighthouse/locales/es.json +149 -134
- package/front_end/third_party/lighthouse/locales/fi.json +151 -136
- package/front_end/third_party/lighthouse/locales/fil.json +154 -139
- package/front_end/third_party/lighthouse/locales/fr.json +150 -135
- package/front_end/third_party/lighthouse/locales/he.json +160 -145
- package/front_end/third_party/lighthouse/locales/hi.json +156 -141
- package/front_end/third_party/lighthouse/locales/hr.json +154 -139
- package/front_end/third_party/lighthouse/locales/hu.json +111 -96
- package/front_end/third_party/lighthouse/locales/id.json +153 -138
- package/front_end/third_party/lighthouse/locales/it.json +153 -138
- package/front_end/third_party/lighthouse/locales/ja.json +150 -135
- package/front_end/third_party/lighthouse/locales/ko.json +42 -27
- package/front_end/third_party/lighthouse/locales/lt.json +152 -137
- package/front_end/third_party/lighthouse/locales/lv.json +93 -78
- package/front_end/third_party/lighthouse/locales/nl.json +149 -134
- package/front_end/third_party/lighthouse/locales/no.json +152 -137
- package/front_end/third_party/lighthouse/locales/pl.json +153 -138
- package/front_end/third_party/lighthouse/locales/pt-PT.json +152 -137
- package/front_end/third_party/lighthouse/locales/pt.json +157 -142
- package/front_end/third_party/lighthouse/locales/ro.json +149 -134
- package/front_end/third_party/lighthouse/locales/ru.json +76 -61
- package/front_end/third_party/lighthouse/locales/sk.json +153 -138
- package/front_end/third_party/lighthouse/locales/sl.json +149 -134
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +151 -136
- package/front_end/third_party/lighthouse/locales/sr.json +151 -136
- package/front_end/third_party/lighthouse/locales/sv.json +152 -137
- package/front_end/third_party/lighthouse/locales/ta.json +156 -141
- package/front_end/third_party/lighthouse/locales/te.json +157 -142
- package/front_end/third_party/lighthouse/locales/th.json +111 -96
- package/front_end/third_party/lighthouse/locales/tr.json +153 -138
- package/front_end/third_party/lighthouse/locales/uk.json +149 -134
- package/front_end/third_party/lighthouse/locales/vi.json +162 -147
- package/front_end/third_party/lighthouse/locales/zh-HK.json +150 -135
- package/front_end/third_party/lighthouse/locales/zh-TW.json +154 -139
- package/front_end/third_party/lighthouse/locales/zh.json +152 -137
- package/front_end/third_party/lighthouse/report/bundle.d.ts +9 -8
- package/front_end/third_party/lighthouse/report/bundle.js +10 -10
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -7
- package/front_end/tsconfig.compatibility.json +1 -0
- package/front_end/tsconfig.json +3 -2
- package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +0 -2
- package/front_end/ui/components/dialogs/typeToAllowDialog.css +0 -4
- package/front_end/ui/components/icon_button/fileSourceIcon.css +1 -1
- package/front_end/ui/components/input/textInput.css +1 -1
- package/front_end/ui/components/lists/List.ts +26 -14
- package/front_end/ui/components/menus/menus.ts +0 -2
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +351 -138
- package/front_end/ui/components/survey_link/surveyLink.css +3 -3
- package/front_end/ui/components/switch/switch.css +6 -6
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaser.ts +2 -3
- package/front_end/ui/components/text_editor/TextEditor.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +53 -4
- package/front_end/ui/components/tree_outline/treeOutline.css +7 -7
- package/front_end/ui/helpers/OpenInNewTab.ts +8 -3
- package/front_end/ui/legacy/EmptyWidget.ts +4 -4
- package/front_end/ui/legacy/ForwardedInputEventHandler.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/KeyboardShortcut.ts +7 -7
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +198 -66
- package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +71 -68
- package/front_end/ui/legacy/View.ts +7 -4
- package/front_end/ui/legacy/ViewManager.ts +49 -37
- package/front_end/ui/legacy/Widget.ts +32 -12
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -3
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +8 -8
- package/front_end/ui/legacy/components/inline_editor/BezierUI.ts +8 -9
- package/front_end/ui/legacy/components/inline_editor/LinkSwatch.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +45 -11
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +10 -12
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +102 -29
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +148 -122
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +20 -14
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +1 -1
- package/front_end/ui/legacy/components/source_frame/FontView.ts +29 -5
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +79 -12
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +20 -2
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +6 -10
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +11 -11
- package/front_end/ui/legacy/components/source_frame/fontView.css +7 -0
- package/front_end/ui/legacy/components/source_frame/imageView.css +7 -0
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +14 -3
- package/front_end/ui/legacy/components/utils/Linkifier.ts +126 -2
- package/front_end/ui/legacy/emptyWidget.css +2 -1
- package/front_end/ui/legacy/inspectorCommon.css +3 -3
- package/front_end/ui/legacy/smallBubble.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +6 -0
- package/front_end/ui/lit/Directives.ts +35 -18
- package/front_end/ui/lit/lit.ts +0 -2
- package/front_end/ui/lit/render.ts +0 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
- package/package.json +1 -1
- package/vpython.toml +8 -0
- package/vpython.toml.uv.lock +3 -0
- package/.agents/skills/review-models-core/SKILL.md +0 -73
- package/.agents/skills/review-tests/SKILL.md +0 -67
- package/.agents/skills/review-ui-widgets/SKILL.md +0 -115
- package/front_end/generated/ARIAProperties.ts +0 -2686
- package/front_end/ui/components/menus/README.md +0 -119
- package/front_end/ui/components/menus/SelectMenu.ts +0 -473
- package/front_end/ui/components/menus/selectMenu.css +0 -54
- package/front_end/ui/components/menus/selectMenuButton.css +0 -108
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Copyright 2023 The Chromium Authors
|
|
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
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
import * as Common from '../../core/common/common.js';
|
|
7
6
|
import * as Trace from '../../models/trace/trace.js';
|
|
8
7
|
import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';
|
|
9
8
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
10
9
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
11
11
|
|
|
12
12
|
import * as TimelineComponents from './components/components.js';
|
|
13
13
|
import {ModificationsManager} from './ModificationsManager.js';
|
|
@@ -22,6 +22,8 @@ import {
|
|
|
22
22
|
import miniMapStyles from './timelineMiniMap.css.js';
|
|
23
23
|
import {TimelineUIUtils} from './TimelineUIUtils.js';
|
|
24
24
|
|
|
25
|
+
const {widget, widgetRef} = UI.Widget;
|
|
26
|
+
|
|
25
27
|
export interface OverviewData {
|
|
26
28
|
parsedTrace: Trace.TraceModel.ParsedTrace;
|
|
27
29
|
isCpuProfile?: boolean;
|
|
@@ -31,6 +33,160 @@ export interface OverviewData {
|
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
export interface ViewInput {
|
|
37
|
+
data: OverviewData|null;
|
|
38
|
+
initialBreadcrumb: Trace.Types.File.Breadcrumb|null;
|
|
39
|
+
activeBreadcrumb: Trace.Types.File.Breadcrumb|null;
|
|
40
|
+
onBreadcrumbActivated: (breadcrumb: Trace.Types.File.Breadcrumb, childBreadcrumbsRemoved: boolean) => void;
|
|
41
|
+
windowTimes?: {min: Trace.Types.Timing.Milli, max: Trace.Types.Timing.Milli};
|
|
42
|
+
bounds?: {min: Trace.Types.Timing.Milli, max: Trace.Types.Timing.Milli};
|
|
43
|
+
highlightedBounds: {bounds: Trace.Types.Timing.TraceWindowMicro, withBracket: boolean}|null;
|
|
44
|
+
onOverviewWindowChanged: (event: PerfUI.TimelineOverviewPane.OverviewPaneWindowChangedEvent) => void;
|
|
45
|
+
onOverviewBreadcrumbAdded: (event: PerfUI.TimelineOverviewPane.OverviewPaneBreadcrumbAddedEvent) => void;
|
|
46
|
+
onOverviewMouseMove: (event: PerfUI.TimelineOverviewPane.OverviewPaneMouseMoveEvent) => void;
|
|
47
|
+
onOverviewMouseLeave: () => void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ViewOutput {
|
|
51
|
+
getControls?: (data: OverviewData|null) => TimelineEventOverview[];
|
|
52
|
+
resetOverview?: () => void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
56
|
+
|
|
57
|
+
class MiniMapOverviewPane extends PerfUI.TimelineOverviewPane.TimelineOverviewPane {
|
|
58
|
+
#data: OverviewData|null = null;
|
|
59
|
+
#controls: TimelineEventOverview[] = [];
|
|
60
|
+
#hadHighlightedBounds = false;
|
|
61
|
+
|
|
62
|
+
constructor(element?: HTMLElement) {
|
|
63
|
+
super(element);
|
|
64
|
+
this.enableCreateBreadcrumbsButton();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
get data(): OverviewData|null {
|
|
68
|
+
return this.#data;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
get controls(): TimelineEventOverview[] {
|
|
72
|
+
return this.#controls;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
set bounds(bounds: {min: Trace.Types.Timing.Milli, max: Trace.Types.Timing.Milli}|undefined) {
|
|
76
|
+
if (bounds) {
|
|
77
|
+
this.setBounds(bounds.min, bounds.max);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
set windowTimes(windowTimes: {min: Trace.Types.Timing.Milli, max: Trace.Types.Timing.Milli}|undefined) {
|
|
82
|
+
if (windowTimes) {
|
|
83
|
+
this.setWindowTimes(windowTimes.min, windowTimes.max);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
set data(data: OverviewData|null) {
|
|
88
|
+
if (this.#data === data) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
this.#data = data;
|
|
92
|
+
if (data === null) {
|
|
93
|
+
this.#controls = [];
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const {parsedTrace, settings} = data;
|
|
97
|
+
const markers = new Map<number, HTMLDivElement>();
|
|
98
|
+
const {Meta} = parsedTrace.data;
|
|
99
|
+
const navStartEvents = Meta.mainFrameNavigations;
|
|
100
|
+
const minTimeInMilliseconds = Trace.Helpers.Timing.microToMilli(Meta.traceBounds.min);
|
|
101
|
+
for (const event of navStartEvents) {
|
|
102
|
+
const {startTime} = Trace.Helpers.Timing.eventTimingsMilliSeconds(event);
|
|
103
|
+
markers.set(startTime, TimelineUIUtils.createEventDivider(event, minTimeInMilliseconds));
|
|
104
|
+
}
|
|
105
|
+
this.setMarkers(markers);
|
|
106
|
+
this.setNavStartTimes(navStartEvents);
|
|
107
|
+
|
|
108
|
+
const controls: TimelineEventOverview[] = [
|
|
109
|
+
new TimelineEventOverviewResponsiveness(parsedTrace),
|
|
110
|
+
new TimelineEventOverviewCPUActivity(parsedTrace),
|
|
111
|
+
new TimelineEventOverviewNetwork(parsedTrace),
|
|
112
|
+
];
|
|
113
|
+
if (settings.showScreenshots) {
|
|
114
|
+
const filmStrip = Trace.Extras.FilmStrip.fromHandlerData(parsedTrace.data);
|
|
115
|
+
if (filmStrip.frames.length) {
|
|
116
|
+
controls.push(new TimelineFilmStripOverview(filmStrip));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (settings.showMemory) {
|
|
120
|
+
controls.push(new TimelineEventOverviewMemory(parsedTrace));
|
|
121
|
+
}
|
|
122
|
+
this.#controls = controls;
|
|
123
|
+
this.setOverviewControls(controls);
|
|
124
|
+
this.showingScreenshots = settings.showScreenshots;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
set highlightedBounds(
|
|
128
|
+
highlightedBounds: {bounds: Trace.Types.Timing.TraceWindowMicro, withBracket: boolean}|null,
|
|
129
|
+
) {
|
|
130
|
+
if (highlightedBounds) {
|
|
131
|
+
this.highlightBounds(highlightedBounds.bounds, highlightedBounds.withBracket);
|
|
132
|
+
this.#hadHighlightedBounds = true;
|
|
133
|
+
} else if (this.#hadHighlightedBounds) {
|
|
134
|
+
this.clearBoundsHighlight();
|
|
135
|
+
this.#hadHighlightedBounds = false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
override reset(): void {
|
|
140
|
+
this.#data = null;
|
|
141
|
+
this.#controls = [];
|
|
142
|
+
super.reset();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
147
|
+
// clang-format off
|
|
148
|
+
render(html`
|
|
149
|
+
<style>${miniMapStyles}</style>
|
|
150
|
+
${widget(TimelineComponents.BreadcrumbsUI.BreadcrumbsUI, {
|
|
151
|
+
initialBreadcrumb: input.initialBreadcrumb,
|
|
152
|
+
activeBreadcrumb: input.activeBreadcrumb,
|
|
153
|
+
onBreadcrumbActivated: input.onBreadcrumbActivated,
|
|
154
|
+
})}
|
|
155
|
+
<devtools-widget
|
|
156
|
+
${widget(MiniMapOverviewPane, {
|
|
157
|
+
bounds: input.bounds,
|
|
158
|
+
windowTimes: input.windowTimes,
|
|
159
|
+
data: input.data,
|
|
160
|
+
highlightedBounds: input.highlightedBounds,
|
|
161
|
+
})}
|
|
162
|
+
${widgetRef(MiniMapOverviewPane, pane => {
|
|
163
|
+
output.getControls = data => pane.data === data ? pane.controls : [];
|
|
164
|
+
output.resetOverview = () => pane.reset();
|
|
165
|
+
})}
|
|
166
|
+
@OverviewPaneWindowChanged=${(
|
|
167
|
+
event: CustomEvent<PerfUI.TimelineOverviewPane.OverviewPaneWindowChangedEvent>) => {
|
|
168
|
+
input.onOverviewWindowChanged(event.detail);
|
|
169
|
+
}}
|
|
170
|
+
@OverviewPaneBreadcrumbAdded=${(
|
|
171
|
+
event: CustomEvent<PerfUI.TimelineOverviewPane.OverviewPaneBreadcrumbAddedEvent>) => {
|
|
172
|
+
input.onOverviewBreadcrumbAdded(event.detail);
|
|
173
|
+
}}
|
|
174
|
+
@OverviewPaneMouseMove=${(
|
|
175
|
+
event: CustomEvent<PerfUI.TimelineOverviewPane.OverviewPaneMouseMoveEvent>) => {
|
|
176
|
+
input.onOverviewMouseMove(event.detail);
|
|
177
|
+
}}
|
|
178
|
+
@OverviewPaneMouseLeave=${() => {
|
|
179
|
+
input.onOverviewMouseLeave();
|
|
180
|
+
}}>
|
|
181
|
+
</devtools-widget>
|
|
182
|
+
`, target, {
|
|
183
|
+
container: {
|
|
184
|
+
classes: ['timeline-minimap', ...(input.data ? [] : ['no-trace-active'])],
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
// clang-format on
|
|
188
|
+
};
|
|
189
|
+
|
|
34
190
|
/**
|
|
35
191
|
* This component wraps the generic PerfUI Overview component and configures it
|
|
36
192
|
* specifically for the Performance Panel, including injecting the CSS we use
|
|
@@ -47,46 +203,39 @@ const TimelineMiniMapBase:
|
|
|
47
203
|
);
|
|
48
204
|
|
|
49
205
|
export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
50
|
-
#overviewComponent = new PerfUI.TimelineOverviewPane.TimelineOverviewPane('timeline');
|
|
51
|
-
#controls: TimelineEventOverview[] = [];
|
|
52
206
|
breadcrumbs: TimelineComponents.Breadcrumbs.Breadcrumbs|null = null;
|
|
53
|
-
#
|
|
207
|
+
#initialBreadcrumb: Trace.Types.File.Breadcrumb|null = null;
|
|
208
|
+
#activeBreadcrumb: Trace.Types.File.Breadcrumb|null = null;
|
|
54
209
|
#data: OverviewData|null = null;
|
|
210
|
+
#windowTimes?: {min: Trace.Types.Timing.Milli, max: Trace.Types.Timing.Milli};
|
|
211
|
+
#bounds?: {min: Trace.Types.Timing.Milli, max: Trace.Types.Timing.Milli};
|
|
212
|
+
#highlightedBounds: {bounds: Trace.Types.Timing.TraceWindowMicro, withBracket: boolean}|null = null;
|
|
213
|
+
readonly #view: View;
|
|
214
|
+
readonly #viewOutput: ViewOutput = {};
|
|
55
215
|
|
|
56
216
|
#onTraceBoundsChangeBound = this.#onTraceBoundsChange.bind(this);
|
|
217
|
+
readonly #onBreadcrumbActivatedBound = (breadcrumb: Trace.Types.File.Breadcrumb,
|
|
218
|
+
childBreadcrumbsRemoved: boolean): void => {
|
|
219
|
+
this.#activateBreadcrumb(breadcrumb, {removeChildBreadcrumbs: childBreadcrumbsRemoved, updateVisibleWindow: true});
|
|
220
|
+
};
|
|
221
|
+
readonly #onOverviewWindowChangedBound =
|
|
222
|
+
(event: PerfUI.TimelineOverviewPane.OverviewPaneWindowChangedEvent): void => {
|
|
223
|
+
this.#onOverviewPanelWindowChanged(event);
|
|
224
|
+
};
|
|
225
|
+
readonly #onOverviewBreadcrumbAddedBound =
|
|
226
|
+
(event: PerfUI.TimelineOverviewPane.OverviewPaneBreadcrumbAddedEvent): void => {
|
|
227
|
+
this.addBreadcrumb(event);
|
|
228
|
+
};
|
|
229
|
+
readonly #onOverviewMouseMoveBound = (event: PerfUI.TimelineOverviewPane.OverviewPaneMouseMoveEvent): void => {
|
|
230
|
+
this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.OVERVIEW_PANE_MOUSE_MOVE, event);
|
|
231
|
+
};
|
|
232
|
+
readonly #onOverviewMouseLeaveBound = (): void => {
|
|
233
|
+
this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.OVERVIEW_PANE_MOUSE_LEAVE);
|
|
234
|
+
};
|
|
57
235
|
|
|
58
|
-
constructor() {
|
|
236
|
+
constructor(view: View = DEFAULT_VIEW) {
|
|
59
237
|
super();
|
|
60
|
-
this
|
|
61
|
-
this.element.classList.add('timeline-minimap', 'no-trace-active');
|
|
62
|
-
this.#breadcrumbsUI = new TimelineComponents.BreadcrumbsUI.BreadcrumbsUI();
|
|
63
|
-
this.#breadcrumbsUI.show(this.element);
|
|
64
|
-
|
|
65
|
-
this.#overviewComponent.show(this.element);
|
|
66
|
-
|
|
67
|
-
this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.OVERVIEW_PANE_WINDOW_CHANGED, event => {
|
|
68
|
-
this.#onOverviewPanelWindowChanged(event);
|
|
69
|
-
});
|
|
70
|
-
this.#overviewComponent.addEventListener(
|
|
71
|
-
PerfUI.TimelineOverviewPane.Events.OVERVIEW_PANE_BREADCRUMB_ADDED, event => {
|
|
72
|
-
this.addBreadcrumb(event.data);
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
// We want to add/remove an overlay for these two events, and the overlay system is controlled by
|
|
76
|
-
// `TimelineFlameChartView`, so we need to dispatch them up to the `TimelinePanel` level to call
|
|
77
|
-
// `TimelineFlameChartView` -> `addOverlay()/removeOverlay()`.
|
|
78
|
-
this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.OVERVIEW_PANE_MOUSE_MOVE, event => {
|
|
79
|
-
this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.OVERVIEW_PANE_MOUSE_MOVE, event.data);
|
|
80
|
-
});
|
|
81
|
-
this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.OVERVIEW_PANE_MOUSE_LEAVE, () => {
|
|
82
|
-
this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.OVERVIEW_PANE_MOUSE_LEAVE);
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
this.#breadcrumbsUI.onBreadcrumbActivated = (breadcrumb, childBreadcrumbsRemoved) => {
|
|
86
|
-
this.#activateBreadcrumb(breadcrumb,
|
|
87
|
-
{removeChildBreadcrumbs: childBreadcrumbsRemoved, updateVisibleWindow: true});
|
|
88
|
-
};
|
|
89
|
-
this.#overviewComponent.enableCreateBreadcrumbsButton();
|
|
238
|
+
this.#view = view;
|
|
90
239
|
|
|
91
240
|
TraceBounds.TraceBounds.onChange(this.#onTraceBoundsChangeBound);
|
|
92
241
|
// Set the initial bounds for the overview. Otherwise if we mount & there
|
|
@@ -94,13 +243,34 @@ export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
|
94
243
|
const state = TraceBounds.TraceBounds.BoundsManager.instance().state();
|
|
95
244
|
if (state) {
|
|
96
245
|
const {timelineTraceWindow, minimapTraceBounds} = state.milli;
|
|
97
|
-
this.#
|
|
98
|
-
this.#
|
|
246
|
+
this.#windowTimes = {min: timelineTraceWindow.min, max: timelineTraceWindow.max};
|
|
247
|
+
this.#bounds = {min: minimapTraceBounds.min, max: minimapTraceBounds.max};
|
|
99
248
|
}
|
|
249
|
+
|
|
250
|
+
this.requestUpdate();
|
|
100
251
|
}
|
|
101
252
|
|
|
102
|
-
|
|
103
|
-
|
|
253
|
+
override performUpdate(): void {
|
|
254
|
+
this.#view(
|
|
255
|
+
{
|
|
256
|
+
data: this.#data,
|
|
257
|
+
initialBreadcrumb: this.#initialBreadcrumb,
|
|
258
|
+
activeBreadcrumb: this.#activeBreadcrumb,
|
|
259
|
+
onBreadcrumbActivated: this.#onBreadcrumbActivatedBound,
|
|
260
|
+
windowTimes: this.#windowTimes,
|
|
261
|
+
bounds: this.#bounds,
|
|
262
|
+
highlightedBounds: this.#highlightedBounds,
|
|
263
|
+
onOverviewWindowChanged: this.#onOverviewWindowChangedBound,
|
|
264
|
+
onOverviewBreadcrumbAdded: this.#onOverviewBreadcrumbAddedBound,
|
|
265
|
+
onOverviewMouseMove: this.#onOverviewMouseMoveBound,
|
|
266
|
+
onOverviewMouseLeave: this.#onOverviewMouseLeaveBound,
|
|
267
|
+
},
|
|
268
|
+
this.#viewOutput,
|
|
269
|
+
this.contentElement,
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
#onOverviewPanelWindowChanged(event: PerfUI.TimelineOverviewPane.OverviewPaneWindowChangedEvent): void {
|
|
104
274
|
const parsedTrace = this.#data?.parsedTrace;
|
|
105
275
|
if (!parsedTrace) {
|
|
106
276
|
return;
|
|
@@ -111,9 +281,8 @@ export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
|
111
281
|
return;
|
|
112
282
|
}
|
|
113
283
|
|
|
114
|
-
const left = (event.
|
|
115
|
-
const right =
|
|
116
|
-
Number.isFinite(event.data.endTime) ? event.data.endTime : traceBoundsState.milli.minimapTraceBounds.max;
|
|
284
|
+
const left = (event.startTime > 0) ? event.startTime : traceBoundsState.milli.minimapTraceBounds.min;
|
|
285
|
+
const right = Number.isFinite(event.endTime) ? event.endTime : traceBoundsState.milli.minimapTraceBounds.max;
|
|
117
286
|
|
|
118
287
|
TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(
|
|
119
288
|
Trace.Helpers.Timing.traceWindowFromMilliSeconds(
|
|
@@ -128,8 +297,10 @@ export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
|
128
297
|
|
|
129
298
|
#onTraceBoundsChange(event: TraceBounds.TraceBounds.StateChangedEvent): void {
|
|
130
299
|
if (event.updateType === 'RESET' || event.updateType === 'VISIBLE_WINDOW') {
|
|
131
|
-
this.#
|
|
132
|
-
|
|
300
|
+
this.#windowTimes = {
|
|
301
|
+
min: event.state.milli.timelineTraceWindow.min,
|
|
302
|
+
max: event.state.milli.timelineTraceWindow.max,
|
|
303
|
+
};
|
|
133
304
|
|
|
134
305
|
// If the visible window has changed because we are revealing a certain
|
|
135
306
|
// time period to the user, we need to ensure that this new time
|
|
@@ -148,9 +319,12 @@ export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
|
148
319
|
}
|
|
149
320
|
}
|
|
150
321
|
if (event.updateType === 'RESET' || event.updateType === 'MINIMAP_BOUNDS') {
|
|
151
|
-
this.#
|
|
152
|
-
|
|
322
|
+
this.#bounds = {
|
|
323
|
+
min: event.state.milli.minimapTraceBounds.min,
|
|
324
|
+
max: event.state.milli.minimapTraceBounds.max,
|
|
325
|
+
};
|
|
153
326
|
}
|
|
327
|
+
this.requestUpdate();
|
|
154
328
|
}
|
|
155
329
|
|
|
156
330
|
#updateMiniMapBoundsToFitNewWindow(newWindow: Trace.Types.Timing.TraceWindowMicro): void {
|
|
@@ -209,15 +383,21 @@ export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
|
209
383
|
|
|
210
384
|
const addedBreadcrumb = this.breadcrumbs.add(newVisibleTraceWindow);
|
|
211
385
|
|
|
212
|
-
this.#
|
|
213
|
-
this.#
|
|
386
|
+
this.#initialBreadcrumb = this.breadcrumbs.initialBreadcrumb;
|
|
387
|
+
this.#activeBreadcrumb = addedBreadcrumb;
|
|
388
|
+
this.requestUpdate();
|
|
214
389
|
}
|
|
215
390
|
|
|
216
391
|
highlightBounds(bounds: Trace.Types.Timing.TraceWindowMicro, withBracket = false): void {
|
|
217
|
-
this.#
|
|
392
|
+
this.#highlightedBounds = {bounds, withBracket};
|
|
393
|
+
this.requestUpdate();
|
|
218
394
|
}
|
|
219
395
|
clearBoundsHighlight(): void {
|
|
220
|
-
this.#
|
|
396
|
+
if (this.#highlightedBounds === null) {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
this.#highlightedBounds = null;
|
|
400
|
+
this.requestUpdate();
|
|
221
401
|
}
|
|
222
402
|
|
|
223
403
|
/**
|
|
@@ -225,55 +405,43 @@ export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
|
225
405
|
* @param options.removeChildBreadcrumbs if true, any child breadcrumbs will be removed.
|
|
226
406
|
* @param options.updateVisibleWindow if true, the visible window will be updated to match the bounds of the breadcrumb
|
|
227
407
|
*/
|
|
228
|
-
#activateBreadcrumb(
|
|
229
|
-
|
|
230
|
-
options: TimelineComponents.Breadcrumbs.SetActiveBreadcrumbOptions): void {
|
|
408
|
+
#activateBreadcrumb(breadcrumb: Trace.Types.File.Breadcrumb,
|
|
409
|
+
options: TimelineComponents.Breadcrumbs.SetActiveBreadcrumbOptions): void {
|
|
231
410
|
if (!this.breadcrumbs) {
|
|
232
411
|
return;
|
|
233
412
|
}
|
|
234
413
|
|
|
235
414
|
this.breadcrumbs.setActiveBreadcrumb(breadcrumb, options);
|
|
236
|
-
//
|
|
237
|
-
this.#
|
|
238
|
-
this.#
|
|
415
|
+
// Only the initial breadcrumb is passed in because breadcrumbs are stored in a linked list and breadcrumbsUI component iterates through them
|
|
416
|
+
this.#initialBreadcrumb = this.breadcrumbs.initialBreadcrumb;
|
|
417
|
+
this.#activeBreadcrumb = breadcrumb;
|
|
418
|
+
this.requestUpdate();
|
|
239
419
|
}
|
|
240
420
|
|
|
241
421
|
reset(): void {
|
|
242
422
|
this.#data = null;
|
|
243
|
-
this
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
const {Meta} = parsedTrace.data;
|
|
250
|
-
|
|
251
|
-
// Only add markers for navigation start times.
|
|
252
|
-
const navStartEvents = Meta.mainFrameNavigations;
|
|
253
|
-
const minTimeInMilliseconds = Trace.Helpers.Timing.microToMilli(Meta.traceBounds.min);
|
|
254
|
-
|
|
255
|
-
for (const event of navStartEvents) {
|
|
256
|
-
const {startTime} = Trace.Helpers.Timing.eventTimingsMilliSeconds(event);
|
|
257
|
-
markers.set(startTime, TimelineUIUtils.createEventDivider(event, minTimeInMilliseconds));
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
this.#overviewComponent.setMarkers(markers);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
#setNavigationStartEvents(parsedTrace: Trace.TraceModel.ParsedTrace): void {
|
|
264
|
-
this.#overviewComponent.setNavStartTimes(parsedTrace.data.Meta.mainFrameNavigations);
|
|
423
|
+
this.breadcrumbs = null;
|
|
424
|
+
this.#initialBreadcrumb = null;
|
|
425
|
+
this.#activeBreadcrumb = null;
|
|
426
|
+
this.#highlightedBounds = null;
|
|
427
|
+
this.#viewOutput.resetOverview?.();
|
|
428
|
+
this.requestUpdate();
|
|
265
429
|
}
|
|
266
430
|
|
|
267
431
|
getControls(): TimelineEventOverview[] {
|
|
268
|
-
return this.#
|
|
432
|
+
return this.#viewOutput.getControls?.(this.#data) ?? [];
|
|
269
433
|
}
|
|
270
434
|
|
|
271
435
|
setData(data: OverviewData|null): void {
|
|
272
|
-
this.element.classList.toggle('no-trace-active', data === null);
|
|
273
|
-
|
|
274
436
|
if (data === null) {
|
|
437
|
+
if (this.#data === null && this.breadcrumbs === null) {
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
275
440
|
this.#data = null;
|
|
276
|
-
this
|
|
441
|
+
this.breadcrumbs = null;
|
|
442
|
+
this.#initialBreadcrumb = null;
|
|
443
|
+
this.#activeBreadcrumb = null;
|
|
444
|
+
this.requestUpdate();
|
|
277
445
|
return;
|
|
278
446
|
}
|
|
279
447
|
|
|
@@ -281,26 +449,8 @@ export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
|
281
449
|
return;
|
|
282
450
|
}
|
|
283
451
|
this.#data = data;
|
|
284
|
-
this.#controls = [];
|
|
285
|
-
|
|
286
|
-
this.#setMarkers(data.parsedTrace);
|
|
287
|
-
this.#setNavigationStartEvents(data.parsedTrace);
|
|
288
|
-
this.#controls.push(new TimelineEventOverviewResponsiveness(data.parsedTrace));
|
|
289
|
-
this.#controls.push(new TimelineEventOverviewCPUActivity(data.parsedTrace));
|
|
290
|
-
|
|
291
|
-
this.#controls.push(new TimelineEventOverviewNetwork(data.parsedTrace));
|
|
292
|
-
if (data.settings.showScreenshots) {
|
|
293
|
-
const filmStrip = Trace.Extras.FilmStrip.fromHandlerData(data.parsedTrace.data);
|
|
294
|
-
if (filmStrip.frames.length) {
|
|
295
|
-
this.#controls.push(new TimelineFilmStripOverview(filmStrip));
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
if (data.settings.showMemory) {
|
|
299
|
-
this.#controls.push(new TimelineEventOverviewMemory(data.parsedTrace));
|
|
300
|
-
}
|
|
301
|
-
this.#overviewComponent.setOverviewControls(this.#controls);
|
|
302
|
-
this.#overviewComponent.showingScreenshots = data.settings.showScreenshots;
|
|
303
452
|
this.#setInitialBreadcrumb();
|
|
453
|
+
this.requestUpdate();
|
|
304
454
|
}
|
|
305
455
|
|
|
306
456
|
#setInitialBreadcrumb(): void {
|
|
@@ -309,6 +459,8 @@ export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
|
309
459
|
this.breadcrumbs = ModificationsManager.activeManager()?.getTimelineBreadcrumbs() ?? null;
|
|
310
460
|
|
|
311
461
|
if (!this.breadcrumbs) {
|
|
462
|
+
this.#initialBreadcrumb = null;
|
|
463
|
+
this.#activeBreadcrumb = null;
|
|
312
464
|
return;
|
|
313
465
|
}
|
|
314
466
|
|
|
@@ -317,7 +469,7 @@ export class TimelineMiniMap extends TimelineMiniMapBase {
|
|
|
317
469
|
lastBreadcrumb = lastBreadcrumb.child;
|
|
318
470
|
}
|
|
319
471
|
|
|
320
|
-
this.#
|
|
321
|
-
this.#
|
|
472
|
+
this.#initialBreadcrumb = this.breadcrumbs.initialBreadcrumb;
|
|
473
|
+
this.#activeBreadcrumb = lastBreadcrumb;
|
|
322
474
|
}
|
|
323
475
|
}
|
|
@@ -221,14 +221,16 @@ export interface TimelinePaintImageViewInput {
|
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
export
|
|
225
|
-
imageElementNaturalHeight
|
|
226
|
-
|
|
224
|
+
export interface TimelinePaintImageViewOutput {
|
|
225
|
+
imageElementNaturalHeight?: number;
|
|
226
|
+
imageElementNaturalWidth?: number;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export type View = (input: TimelinePaintImageViewInput, output: TimelinePaintImageViewOutput, target: HTMLElement) =>
|
|
230
|
+
void;
|
|
227
231
|
|
|
228
|
-
export const DEFAULT_VIEW: View = (input: TimelinePaintImageViewInput,
|
|
229
|
-
|
|
230
|
-
imageElementNaturalWidth: number,
|
|
231
|
-
} => {
|
|
232
|
+
export const DEFAULT_VIEW: View = (input: TimelinePaintImageViewInput, output: TimelinePaintImageViewOutput,
|
|
233
|
+
target: HTMLElement): void => {
|
|
232
234
|
const imageElementRef = createRef<HTMLImageElement>();
|
|
233
235
|
// clang-format off
|
|
234
236
|
render(html`
|
|
@@ -252,7 +254,8 @@ export const DEFAULT_VIEW: View = (input: TimelinePaintImageViewInput, _output:
|
|
|
252
254
|
throw new Error('ImageElement were not found in the TimelinePaintImageView.');
|
|
253
255
|
}
|
|
254
256
|
|
|
255
|
-
|
|
257
|
+
output.imageElementNaturalHeight = imageElement.naturalHeight;
|
|
258
|
+
output.imageElementNaturalWidth = imageElement.naturalWidth;
|
|
256
259
|
};
|
|
257
260
|
export class TimelinePaintImageView extends UI.Widget.Widget {
|
|
258
261
|
private transformController: LayerViewer.TransformController.TransformController;
|
|
@@ -354,9 +357,14 @@ export class TimelinePaintImageView extends UI.Widget.Widget {
|
|
|
354
357
|
}
|
|
355
358
|
|
|
356
359
|
override performUpdate(): void {
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
+
const output: TimelinePaintImageViewOutput = {};
|
|
361
|
+
this.#view(this.#inputData, output, this.contentElement);
|
|
362
|
+
if (output.imageElementNaturalHeight !== undefined && output.imageElementNaturalWidth !== undefined) {
|
|
363
|
+
this.#imageElementDimensions = {
|
|
364
|
+
naturalHeight: output.imageElementNaturalHeight,
|
|
365
|
+
naturalWidth: output.imageElementNaturalWidth,
|
|
366
|
+
};
|
|
367
|
+
}
|
|
360
368
|
// Image can only be updated to correctly fit the component when the component has loaded.
|
|
361
369
|
this.updateImagePosition();
|
|
362
370
|
}
|
|
@@ -3191,6 +3191,7 @@ export class TimelinePanel extends TimelinePanelBase implements Client, Timeline
|
|
|
3191
3191
|
|
|
3192
3192
|
static async executeRecordAndReload(): Promise<Trace.TraceModel.ParsedTrace> {
|
|
3193
3193
|
await UI.ViewManager.ViewManager.instance().showView('timeline');
|
|
3194
|
+
await SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.pageAgent().invoke_bringToFront();
|
|
3194
3195
|
const panelInstance = TimelinePanel.instance();
|
|
3195
3196
|
|
|
3196
3197
|
const result: EventTypes[Events.RECORDING_COMPLETED] = await new Promise(resolve => {
|
|
@@ -121,7 +121,7 @@ interface ViewInput {
|
|
|
121
121
|
timings: SelectorTiming[];
|
|
122
122
|
onContextMenu: (event: CustomEvent<{menu: UI.ContextMenu.ContextMenu, element: HTMLElement}>) => void;
|
|
123
123
|
}
|
|
124
|
-
type View = (input: ViewInput, output:
|
|
124
|
+
type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
125
125
|
|
|
126
126
|
const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
127
127
|
render(
|
|
@@ -273,11 +273,10 @@ export class TimelineSelectorStatsView extends UI.Widget.VBox {
|
|
|
273
273
|
this.#onContextMenu(event);
|
|
274
274
|
},
|
|
275
275
|
};
|
|
276
|
-
|
|
277
|
-
this.#view(viewInput, viewOutput, this.contentElement);
|
|
276
|
+
this.#view(viewInput, undefined, this.contentElement);
|
|
278
277
|
}
|
|
279
278
|
|
|
280
|
-
|
|
279
|
+
#getDescendentNodeCount(node: SDK.DOMModel.DOMNode|null): number {
|
|
281
280
|
if (!node) {
|
|
282
281
|
return 0;
|
|
283
282
|
}
|
|
@@ -288,14 +287,14 @@ export class TimelineSelectorStatsView extends UI.Widget.VBox {
|
|
|
288
287
|
const childNodes = node.children();
|
|
289
288
|
if (childNodes) {
|
|
290
289
|
for (const childNode of childNodes) {
|
|
291
|
-
numberOfDescendentNode += this
|
|
290
|
+
numberOfDescendentNode += this.#getDescendentNodeCount(childNode);
|
|
292
291
|
}
|
|
293
292
|
}
|
|
294
293
|
|
|
295
294
|
return numberOfDescendentNode;
|
|
296
295
|
}
|
|
297
296
|
|
|
298
|
-
|
|
297
|
+
async #updateInvalidationCount(events: Trace.Types.Events.RecalcStyle[]): Promise<void> {
|
|
299
298
|
if (!this.#parsedTrace) {
|
|
300
299
|
return;
|
|
301
300
|
}
|
|
@@ -358,7 +357,7 @@ export class TimelineSelectorStatsView extends UI.Widget.VBox {
|
|
|
358
357
|
for (const node of nodes.nodeList) {
|
|
359
358
|
if (nodes.subtree) {
|
|
360
359
|
// TODO: this count is live and might have changed since the trace event.
|
|
361
|
-
timing.invalidation_count += this
|
|
360
|
+
timing.invalidation_count += this.#getDescendentNodeCount(node);
|
|
362
361
|
} else {
|
|
363
362
|
timing.invalidation_count += 1;
|
|
364
363
|
}
|
|
@@ -367,7 +366,7 @@ export class TimelineSelectorStatsView extends UI.Widget.VBox {
|
|
|
367
366
|
}
|
|
368
367
|
}
|
|
369
368
|
|
|
370
|
-
|
|
369
|
+
async #aggregateEvents(events: Trace.Types.Events.RecalcStyle[]): Promise<void> {
|
|
371
370
|
if (!this.#parsedTrace) {
|
|
372
371
|
return;
|
|
373
372
|
}
|
|
@@ -402,7 +401,7 @@ export class TimelineSelectorStatsView extends UI.Widget.VBox {
|
|
|
402
401
|
}
|
|
403
402
|
|
|
404
403
|
this.#lastStatsSourceEventOrEvents = events;
|
|
405
|
-
await this
|
|
404
|
+
await this.#updateInvalidationCount(events);
|
|
406
405
|
for (let i = 0; i < events.length; i++) {
|
|
407
406
|
const event = events[i];
|
|
408
407
|
const selectorStats = event ? this.#parsedTrace.data.SelectorStats.dataForRecalcStyleEvent.get(event) : undefined;
|
|
@@ -454,7 +453,7 @@ export class TimelineSelectorStatsView extends UI.Widget.VBox {
|
|
|
454
453
|
[SelectorTimingsKey.InvalidationCount]: sums[SelectorTimingsKey.InvalidationCount],
|
|
455
454
|
});
|
|
456
455
|
|
|
457
|
-
this.#timings = await this
|
|
456
|
+
this.#timings = await this.#processSelectorTimings(timings);
|
|
458
457
|
}
|
|
459
458
|
|
|
460
459
|
setAggregatedEvents(events: Trace.Types.Events.RecalcStyle[]): void {
|
|
@@ -462,12 +461,12 @@ export class TimelineSelectorStatsView extends UI.Widget.VBox {
|
|
|
462
461
|
return;
|
|
463
462
|
}
|
|
464
463
|
|
|
465
|
-
void this
|
|
464
|
+
void this.#aggregateEvents(events).then(() => {
|
|
466
465
|
this.requestUpdate();
|
|
467
466
|
});
|
|
468
467
|
}
|
|
469
468
|
|
|
470
|
-
|
|
469
|
+
async #processSelectorTimings(timings: Trace.Types.Events.SelectorTiming[]): Promise<SelectorTiming[]> {
|
|
471
470
|
async function toSourceFileLocation(
|
|
472
471
|
cssModel: SDK.CSSModel.CSSModel, styleSheetId: Protocol.DOM.StyleSheetId, selectorText: string,
|
|
473
472
|
selectorLocations: Map<string, Protocol.CSS.SourceRange[]>):
|