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
|
@@ -150,13 +150,13 @@ export class ContextMenuProvider implements
|
|
|
150
150
|
if (uiSourceCode && networkPersistenceManager.isUISourceCodeOverridable(uiSourceCode)) {
|
|
151
151
|
if (!uiSourceCode.contentType().isFromSourceMap()) {
|
|
152
152
|
disabled = false;
|
|
153
|
-
handler = this
|
|
153
|
+
handler = this.#handleOverrideContent.bind(this, uiSourceCode, contentProvider);
|
|
154
154
|
} else {
|
|
155
155
|
// show redirect dialog for source mapped file
|
|
156
|
-
const deployedUiSourceCode = this
|
|
156
|
+
const deployedUiSourceCode = this.#getDeployedUiSourceCode(uiSourceCode);
|
|
157
157
|
if (deployedUiSourceCode) {
|
|
158
158
|
disabled = false;
|
|
159
|
-
handler = this
|
|
159
|
+
handler = this.#redirectOverrideToDeployedUiSourceCode.bind(this, deployedUiSourceCode, uiSourceCode);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -171,9 +171,8 @@ export class ContextMenuProvider implements
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
contentProvider: TextUtils.ContentProvider.ContentProvider): Promise<void> {
|
|
174
|
+
async #handleOverrideContent(uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
175
|
+
contentProvider: TextUtils.ContentProvider.ContentProvider): Promise<void> {
|
|
177
176
|
const networkPersistenceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();
|
|
178
177
|
const isSuccess = await networkPersistenceManager.setupAndStartLocalOverrides(uiSourceCode);
|
|
179
178
|
if (isSuccess) {
|
|
@@ -202,9 +201,9 @@ export class ContextMenuProvider implements
|
|
|
202
201
|
}
|
|
203
202
|
}
|
|
204
203
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
async #redirectOverrideToDeployedUiSourceCode(deployedUiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
205
|
+
originalUiSourceCode: Workspace.UISourceCode.UISourceCode):
|
|
206
|
+
Promise<void> {
|
|
208
207
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.OverrideContentContextMenuSourceMappedWarning);
|
|
209
208
|
const deployedUrl = deployedUiSourceCode.url();
|
|
210
209
|
const deployedName = Bindings.ResourceUtils.displayNameForURL(deployedUrl);
|
|
@@ -219,12 +218,12 @@ export class ContextMenuProvider implements
|
|
|
219
218
|
|
|
220
219
|
if (shouldJumpToDeployedFile) {
|
|
221
220
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.OverrideContentContextMenuRedirectToDeployed);
|
|
222
|
-
await this
|
|
221
|
+
await this.#handleOverrideContent(deployedUiSourceCode, deployedUiSourceCode);
|
|
223
222
|
}
|
|
224
223
|
}
|
|
225
224
|
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
#getDeployedUiSourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): Workspace.UISourceCode.UISourceCode
|
|
226
|
+
|null {
|
|
228
227
|
const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
|
|
229
228
|
|
|
230
229
|
for (const deployedScript of debuggerWorkspaceBinding.scriptsForUISourceCode(uiSourceCode)) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2021 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 i18n from '../../core/i18n/i18n.js';
|
|
7
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
@@ -9,6 +8,7 @@ import * as Workspace from '../../models/workspace/workspace.js';
|
|
|
9
8
|
import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
|
|
10
9
|
import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
11
10
|
import type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
11
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
12
12
|
|
|
13
13
|
import {Plugin} from './Plugin.js';
|
|
14
14
|
|
|
@@ -24,6 +24,23 @@ const UIStrings = {
|
|
|
24
24
|
const str_ = i18n.i18n.registerUIStrings('panels/sources/ProfilePlugin.ts', UIStrings);
|
|
25
25
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
26
26
|
|
|
27
|
+
interface PerformanceMarkerViewInput {
|
|
28
|
+
value: number;
|
|
29
|
+
intensity: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function renderPerformanceMarker(input: PerformanceMarkerViewInput, _output: undefined,
|
|
33
|
+
target: DocumentFragment): void {
|
|
34
|
+
// clang-format off
|
|
35
|
+
render(html`
|
|
36
|
+
<div class="cm-profileMarker"
|
|
37
|
+
style="background-color: hsla(44, 100%, 50%, ${input.intensity.toFixed(3)})">
|
|
38
|
+
${input.value.toFixed(1)}
|
|
39
|
+
<span class="cm-units">${i18nString(UIStrings.ms)}</span>
|
|
40
|
+
</div>`, target);
|
|
41
|
+
// clang-format on
|
|
42
|
+
}
|
|
43
|
+
|
|
27
44
|
class PerformanceMarker extends CodeMirror.GutterMarker {
|
|
28
45
|
constructor(readonly value: number) {
|
|
29
46
|
super();
|
|
@@ -34,21 +51,15 @@ class PerformanceMarker extends CodeMirror.GutterMarker {
|
|
|
34
51
|
}
|
|
35
52
|
|
|
36
53
|
override toDOM(): HTMLElement {
|
|
37
|
-
const
|
|
38
|
-
element.className = 'cm-profileMarker';
|
|
54
|
+
const fragment = document.createDocumentFragment();
|
|
39
55
|
const intensity = Platform.NumberUtilities.clamp(Math.log10(1 + 10 * this.value) / 5, 0.02, 1);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const span = document.createElement('span');
|
|
43
|
-
span.className = 'cm-units';
|
|
44
|
-
span.textContent = i18nString(UIStrings.ms);
|
|
45
|
-
element.appendChild(span);
|
|
46
|
-
return element;
|
|
56
|
+
renderPerformanceMarker({value: this.value, intensity}, undefined, fragment);
|
|
57
|
+
return fragment.firstElementChild as HTMLElement;
|
|
47
58
|
}
|
|
48
59
|
}
|
|
49
60
|
|
|
50
|
-
function markersFromProfileData(map: Workspace.UISourceCode.LineColumnProfileMap,
|
|
51
|
-
|
|
61
|
+
function markersFromProfileData(map: Workspace.UISourceCode.LineColumnProfileMap,
|
|
62
|
+
state: CodeMirror.EditorState): CodeMirror.RangeSet<CodeMirror.GutterMarker> {
|
|
52
63
|
const markers: Array<CodeMirror.Range<CodeMirror.GutterMarker>> = [];
|
|
53
64
|
const aggregatedByLine = new Map<number, number>();
|
|
54
65
|
for (const [line, value] of map) {
|
|
@@ -99,7 +110,7 @@ export class PerformanceProfilePlugin extends Plugin {
|
|
|
99
110
|
return uiSourceCode.contentType().hasScripts();
|
|
100
111
|
}
|
|
101
112
|
|
|
102
|
-
|
|
113
|
+
#getLineMap(): Workspace.UISourceCode.LineColumnProfileMap|undefined {
|
|
103
114
|
const uiSourceCodeProfileMap =
|
|
104
115
|
this.uiSourceCode.getDecorationData(Workspace.UISourceCode.DecoratorType.PERFORMANCE);
|
|
105
116
|
if (!uiSourceCodeProfileMap) {
|
|
@@ -113,15 +124,15 @@ export class PerformanceProfilePlugin extends Plugin {
|
|
|
113
124
|
}
|
|
114
125
|
|
|
115
126
|
override editorExtension(): CodeMirror.Extension {
|
|
116
|
-
const map = this
|
|
127
|
+
const map = this.#getLineMap();
|
|
117
128
|
return this.compartment.of(
|
|
118
129
|
!map ? [] : [this.field.init(state => markersFromProfileData(map, state)), this.gutter, theme]);
|
|
119
130
|
}
|
|
120
131
|
|
|
121
|
-
override decorationChanged(type: Workspace.UISourceCode.DecoratorType,
|
|
122
|
-
|
|
132
|
+
override decorationChanged(type: Workspace.UISourceCode.DecoratorType,
|
|
133
|
+
editor: TextEditor.TextEditor.TextEditor): void {
|
|
123
134
|
const installed = Boolean(editor.state.field(this.field, false));
|
|
124
|
-
const map = this
|
|
135
|
+
const map = this.#getLineMap();
|
|
125
136
|
if (!map) {
|
|
126
137
|
if (installed) {
|
|
127
138
|
editor.dispatch({effects: this.compartment.reconfigure([])});
|
|
@@ -81,7 +81,7 @@ interface ViewInput {
|
|
|
81
81
|
contextMenu: UI.ContextMenu.ContextMenu,
|
|
82
82
|
) => void;
|
|
83
83
|
}
|
|
84
|
-
type View = (input: ViewInput, output:
|
|
84
|
+
type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
85
85
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
86
86
|
const createScopeSection = ({scope, objectTree}: {
|
|
87
87
|
scope: SDK.DebuggerModel.ScopeChainEntry,
|
|
@@ -141,7 +141,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
141
141
|
input.isPaused ? i18nString(UIStrings.loading) : i18nString(UIStrings.notPaused)}</div>`}
|
|
142
142
|
`,
|
|
143
143
|
// clang-format on
|
|
144
|
-
target);
|
|
144
|
+
target, {container: {attributes: {jslog: `${VisualLogging.section('sources.scope-chain')}`}}});
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
function scopeTitle(scope: SDK.DebuggerModel.ScopeChainEntry): {title: string, subtitle: string|null} {
|
|
@@ -188,7 +188,6 @@ export class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextF
|
|
|
188
188
|
|
|
189
189
|
constructor(target?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
190
190
|
super(target, {
|
|
191
|
-
jslog: `${VisualLogging.section('sources.scope-chain')}`,
|
|
192
191
|
useShadowDom: true,
|
|
193
192
|
});
|
|
194
193
|
|
|
@@ -267,7 +266,7 @@ export class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextF
|
|
|
267
266
|
);
|
|
268
267
|
},
|
|
269
268
|
},
|
|
270
|
-
|
|
269
|
+
undefined, this.contentElement);
|
|
271
270
|
}
|
|
272
271
|
|
|
273
272
|
#buildScopeChain({scopeChain}: SourceMapScopes.ScopeChainModel.ScopeChain): void {
|
|
@@ -172,8 +172,8 @@ export class NetworkNavigatorView extends SourcesNavigatorView {
|
|
|
172
172
|
constructor(element?: HTMLElement, view: NetworkNavigatorViewFunc = NETWORK_NAVIGATOR_DEFAULT_VIEW) {
|
|
173
173
|
super(element);
|
|
174
174
|
this.#view = view;
|
|
175
|
-
SDK.TargetManager.TargetManager.instance().addEventListener(
|
|
176
|
-
|
|
175
|
+
SDK.TargetManager.TargetManager.instance().addEventListener(SDK.TargetManager.Events.INSPECTED_URL_CHANGED,
|
|
176
|
+
this.#inspectedURLChanged, this);
|
|
177
177
|
|
|
178
178
|
// Record the sources tool load time after the file navigator has loaded.
|
|
179
179
|
UI.UIUserMetrics.UIUserMetrics.instance().panelLoaded('sources', 'DevTools.Launch.Sources');
|
|
@@ -220,7 +220,7 @@ export class NetworkNavigatorView extends SourcesNavigatorView {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
|
|
223
|
+
#inspectedURLChanged(event: Common.EventTarget.EventTargetEvent<SDK.Target.Target>): void {
|
|
224
224
|
const mainTarget = SDK.TargetManager.TargetManager.instance().scopeTarget();
|
|
225
225
|
if (event.data !== mainTarget) {
|
|
226
226
|
return;
|
|
@@ -439,12 +439,12 @@ export class OverridesNavigatorView extends SourcesNavigatorView {
|
|
|
439
439
|
this.#view = view;
|
|
440
440
|
|
|
441
441
|
Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener(
|
|
442
|
-
Persistence.NetworkPersistenceManager.Events.PROJECT_CHANGED, this
|
|
442
|
+
Persistence.NetworkPersistenceManager.Events.PROJECT_CHANGED, this.#updateProjectAndUI, this);
|
|
443
443
|
Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener(
|
|
444
|
-
Persistence.NetworkPersistenceManager.Events.LOCAL_OVERRIDES_PROJECT_UPDATED, this
|
|
444
|
+
Persistence.NetworkPersistenceManager.Events.LOCAL_OVERRIDES_PROJECT_UPDATED, this.#updateProjectAndUI, this);
|
|
445
445
|
const workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
|
446
|
-
workspace.addEventListener(Workspace.Workspace.Events.ProjectAdded, this
|
|
447
|
-
workspace.addEventListener(Workspace.Workspace.Events.ProjectRemoved, this
|
|
446
|
+
workspace.addEventListener(Workspace.Workspace.Events.ProjectAdded, this.#onProjectAddOrRemoved, this);
|
|
447
|
+
workspace.addEventListener(Workspace.Workspace.Events.ProjectRemoved, this.#onProjectAddOrRemoved, this);
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
static instance(opts: {
|
|
@@ -480,7 +480,7 @@ export class OverridesNavigatorView extends SourcesNavigatorView {
|
|
|
480
480
|
this.viewOutput, this.contentElement);
|
|
481
481
|
await this.navigatorView?.updateComplete;
|
|
482
482
|
}
|
|
483
|
-
|
|
483
|
+
#onProjectAddOrRemoved(event: Common.EventTarget.EventTargetEvent<Workspace.Workspace.Project>): void {
|
|
484
484
|
const project = event.data;
|
|
485
485
|
if (project && project.type() === Workspace.Workspace.projectTypes.FileSystem &&
|
|
486
486
|
Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemType(project) !== 'overrides') {
|
|
@@ -489,7 +489,7 @@ export class OverridesNavigatorView extends SourcesNavigatorView {
|
|
|
489
489
|
this.requestUpdate();
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
-
|
|
492
|
+
#updateProjectAndUI(): void {
|
|
493
493
|
const navigatorView = this.navigatorView;
|
|
494
494
|
if (navigatorView) {
|
|
495
495
|
navigatorView.reset();
|
|
@@ -1590,7 +1590,7 @@ export const QUICK_SOURCE_DEFAULT_VIEW: QuickSourceViewFunc = (input, _output, t
|
|
|
1590
1590
|
<div class="sources-view-wrapper vbox flex-auto">
|
|
1591
1591
|
${input.sourcesView ? widget(UI.Widget.WrapperWidget, {widget: input.sourcesView}) : nothing}
|
|
1592
1592
|
</div>
|
|
1593
|
-
`, target);
|
|
1593
|
+
`, target, {container: {attributes: {jslog: `${VisualLogging.panel('sources.quick').track({resize: true})}`}}});
|
|
1594
1594
|
// clang-format on
|
|
1595
1595
|
};
|
|
1596
1596
|
|
|
@@ -1600,7 +1600,7 @@ export class QuickSourceView extends UI.Widget.VBox {
|
|
|
1600
1600
|
#showInWrapper = false;
|
|
1601
1601
|
|
|
1602
1602
|
constructor(view: QuickSourceViewFunc = QUICK_SOURCE_DEFAULT_VIEW) {
|
|
1603
|
-
super(
|
|
1603
|
+
super();
|
|
1604
1604
|
this.#view = view;
|
|
1605
1605
|
this.#sourcesView = SourcesPanel.instance().sourcesView();
|
|
1606
1606
|
this.performUpdate();
|
|
@@ -203,7 +203,7 @@ export const DEFAULT_VIEW: View = (input, output, target): void => {
|
|
|
203
203
|
</div>`, target, {
|
|
204
204
|
container: {
|
|
205
205
|
attributes: {
|
|
206
|
-
id: 'sources-panel-sources-view',
|
|
206
|
+
id: 'sources-panel-sources-view', jslog: `${VisualLogging.pane('editor').track({keydown: 'Escape'})}`,
|
|
207
207
|
},
|
|
208
208
|
},
|
|
209
209
|
});
|
|
@@ -243,7 +243,7 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
243
243
|
readonly #onEditorClosed = this.#editorClosed.bind(this);
|
|
244
244
|
|
|
245
245
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
246
|
-
super(element
|
|
246
|
+
super(element);
|
|
247
247
|
this.#view = view;
|
|
248
248
|
this.setMinimumAndPreferredSizes(88, 52, 150, 100);
|
|
249
249
|
|
|
@@ -464,10 +464,10 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
464
464
|
if (wasSelected) {
|
|
465
465
|
this.#currentUISourceCode = null;
|
|
466
466
|
this.#visibleView = null;
|
|
467
|
+
this.#removeToolbarChangedListener();
|
|
467
468
|
}
|
|
468
469
|
|
|
469
470
|
// SourcesNavigator does not need to update on EditorClosed.
|
|
470
|
-
this.#removeToolbarChangedListener();
|
|
471
471
|
this.#updateScriptViewToolbarItems();
|
|
472
472
|
|
|
473
473
|
const data = {
|
|
@@ -71,7 +71,7 @@ export class ThreadsSidebarPane extends UI.Widget.VBox implements
|
|
|
71
71
|
const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);
|
|
72
72
|
this.#selectedModel = currentTarget?.model(SDK.DebuggerModel.DebuggerModel) ?? null;
|
|
73
73
|
|
|
74
|
-
UI.Context.Context.instance().addFlavorChangeListener(SDK.Target.Target, this
|
|
74
|
+
UI.Context.Context.instance().addFlavorChangeListener(SDK.Target.Target, this.#targetFlavorChanged, this);
|
|
75
75
|
SDK.TargetManager.TargetManager.instance().observeModels(SDK.DebuggerModel.DebuggerModel, this);
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -140,7 +140,7 @@ export class ThreadsSidebarPane extends UI.Widget.VBox implements
|
|
|
140
140
|
this.requestUpdate();
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
#targetFlavorChanged({data: target}: Common.EventTarget.EventTargetEvent<SDK.Target.Target>): void {
|
|
144
144
|
this.#selectedModel = target.model(SDK.DebuggerModel.DebuggerModel);
|
|
145
145
|
this.requestUpdate();
|
|
146
146
|
}
|
|
@@ -298,7 +298,7 @@ export class WatchExpressionPromptWidget extends UI.Widget.Widget {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
type View = (input: ViewInput, output:
|
|
301
|
+
type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
302
302
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
303
303
|
const onContextMenu = (watchExpression: WatchExpression|undefined, event: Event): void => {
|
|
304
304
|
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
@@ -560,7 +560,7 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements UI.Ac
|
|
|
560
560
|
e.result.expanded = expanded;
|
|
561
561
|
},
|
|
562
562
|
},
|
|
563
|
-
|
|
563
|
+
undefined, this.contentElement);
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
#getExpansionTracker(expression: string): ObjectUI.ObjectPropertiesSection.ObjectTreeExpansionTracker {
|
|
@@ -78,7 +78,7 @@ export const HEADERS_VIEW_DEFAULT_VIEW: WrapperView = (input, output, target) =>
|
|
|
78
78
|
}
|
|
79
79
|
})}
|
|
80
80
|
></devtools-sources-headers-view>
|
|
81
|
-
`, target);
|
|
81
|
+
`, target, {container: {attributes: {jslog: `${VisualLogging.pane('headers-view')}`}}});
|
|
82
82
|
};
|
|
83
83
|
// clang-format on
|
|
84
84
|
|
|
@@ -92,7 +92,6 @@ export class HeadersView extends UI.View.SimpleView {
|
|
|
92
92
|
super({
|
|
93
93
|
title: i18n.i18n.lockedString('HeadersView'),
|
|
94
94
|
viewId: 'headers-view',
|
|
95
|
-
jslog: `${VisualLogging.pane('headers-view')}`,
|
|
96
95
|
});
|
|
97
96
|
this.#view = view;
|
|
98
97
|
this.#uiSourceCode = uiSourceCode;
|
|
@@ -244,13 +244,12 @@ export class CompatibilityTracksAppender {
|
|
|
244
244
|
this.#addThreadAppenders();
|
|
245
245
|
this.#addExtensionAppenders();
|
|
246
246
|
|
|
247
|
-
|
|
248
|
-
ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, this.onThemeChange);
|
|
247
|
+
ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, this.#onThemeChange);
|
|
249
248
|
}
|
|
250
249
|
|
|
251
250
|
reset(): void {
|
|
252
|
-
ThemeSupport.ThemeSupport.instance().removeEventListener(
|
|
253
|
-
|
|
251
|
+
ThemeSupport.ThemeSupport.instance().removeEventListener(ThemeSupport.ThemeChangeEvent.eventName,
|
|
252
|
+
this.#onThemeChange);
|
|
254
253
|
}
|
|
255
254
|
|
|
256
255
|
setFlameChartDataAndEntryData(
|
|
@@ -266,14 +265,14 @@ export class CompatibilityTracksAppender {
|
|
|
266
265
|
return this.#flameChartData;
|
|
267
266
|
}
|
|
268
267
|
|
|
269
|
-
|
|
268
|
+
#onThemeChange = (): void => {
|
|
270
269
|
for (const group of this.#flameChartData.groups) {
|
|
271
270
|
// We only need to update the color here, because FlameChart will call `scheduleUpdate()` when theme is changed.
|
|
272
271
|
group.style.color = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface');
|
|
273
272
|
group.style.backgroundColor =
|
|
274
273
|
ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');
|
|
275
274
|
}
|
|
276
|
-
}
|
|
275
|
+
};
|
|
277
276
|
|
|
278
277
|
#addExtensionAppenders(): void {
|
|
279
278
|
if (!TimelinePanel.extensionDataVisibilitySetting().get()) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Copyright 2017 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 i18n from '../../core/i18n/i18n.js';
|
|
8
7
|
import * as Trace from '../../models/trace/trace.js';
|
|
9
8
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
10
9
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
|
+
import {html, nothing, render} from '../../ui/lit/lit.js';
|
|
11
11
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
12
12
|
|
|
13
13
|
import {Category, IsLong} from './TimelineFilters.js';
|
|
@@ -16,17 +16,63 @@ import {selectionIsEvent, type TimelineSelection} from './TimelineSelection.js';
|
|
|
16
16
|
import {TimelineTreeView} from './TimelineTreeView.js';
|
|
17
17
|
import {TimelineUIUtils} from './TimelineUIUtils.js';
|
|
18
18
|
|
|
19
|
+
function renderNodeDetails(input: DocumentFragment, _output: undefined, target: HTMLElement): void {
|
|
20
|
+
render(html`${input}`, target);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface FilterToolbarInput {
|
|
24
|
+
durationPresetsMs: readonly number[];
|
|
25
|
+
onDurationChange: (durationMs: number) => void;
|
|
26
|
+
categories: Trace.Styles.CategoryPalette;
|
|
27
|
+
onCategoryChange: (name: Trace.Styles.EventCategory, checked: boolean) => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function renderFilterToolbar(input: FilterToolbarInput, _output: undefined, target: DocumentFragment): void {
|
|
31
|
+
// clang-format off
|
|
32
|
+
render(html`
|
|
33
|
+
<select title=${i18nString(UIStrings.durationFilter)}
|
|
34
|
+
aria-label=${i18nString(UIStrings.durationFilter)}
|
|
35
|
+
jslog=${VisualLogging.dropDown('duration').track({change: true})}
|
|
36
|
+
@change=${(event: Event) => {
|
|
37
|
+
const duration = (event.target as HTMLSelectElement).value;
|
|
38
|
+
input.onDurationChange(parseInt(duration, 10));
|
|
39
|
+
}}>
|
|
40
|
+
${input.durationPresetsMs.map(durationMs => html`
|
|
41
|
+
<option value=${String(durationMs)}
|
|
42
|
+
jslog=${VisualLogging.item(String(durationMs)).track({click: true})}>
|
|
43
|
+
${durationMs ? `≥ ${i18n.TimeUtilities.millisToString(durationMs)}` : i18nString(UIStrings.all)}
|
|
44
|
+
</option>
|
|
45
|
+
`)}
|
|
46
|
+
</select>
|
|
47
|
+
${Object.entries(input.categories).map(([categoryName, category]) => category.visible ? html`
|
|
48
|
+
<devtools-checkbox
|
|
49
|
+
checked
|
|
50
|
+
jslog=${VisualLogging.toggle().track({change: true}).context(categoryName)}
|
|
51
|
+
@change=${(event: Event) => {
|
|
52
|
+
const checkBox = event.target as UI.UIUtils.CheckboxLabel;
|
|
53
|
+
input.onCategoryChange(categoryName as Trace.Styles.EventCategory, checkBox.checked);
|
|
54
|
+
}}>
|
|
55
|
+
${category.title}
|
|
56
|
+
</devtools-checkbox>
|
|
57
|
+
` : nothing)}
|
|
58
|
+
`, target);
|
|
59
|
+
// clang-format on
|
|
60
|
+
}
|
|
61
|
+
|
|
19
62
|
const UIStrings = {
|
|
20
63
|
/**
|
|
21
|
-
* @description Column header for start time in the event log tree view of the
|
|
64
|
+
* @description Column header for start time in the event log tree view of the
|
|
65
|
+
* Performance panel.
|
|
22
66
|
*/
|
|
23
67
|
startTime: 'Start time',
|
|
24
68
|
/**
|
|
25
|
-
* @description Screen reader label for a select box that filters the event
|
|
69
|
+
* @description Screen reader label for a select box that filters the event
|
|
70
|
+
* log by duration in the Performance panel.
|
|
26
71
|
*/
|
|
27
72
|
durationFilter: 'Duration filter',
|
|
28
73
|
/**
|
|
29
|
-
* @description Option in the duration filter dropdown to show all events in
|
|
74
|
+
* @description Option in the duration filter dropdown to show all events in
|
|
75
|
+
* the event log of the Performance panel.
|
|
30
76
|
*/
|
|
31
77
|
all: 'All',
|
|
32
78
|
} as const;
|
|
@@ -37,8 +83,7 @@ export class EventsTimelineTreeView extends TimelineTreeView {
|
|
|
37
83
|
private readonly delegate: TimelineModeViewDelegate;
|
|
38
84
|
private currentTree!: Trace.Extras.TraceTree.Node;
|
|
39
85
|
constructor(delegate: TimelineModeViewDelegate) {
|
|
40
|
-
super();
|
|
41
|
-
this.element.setAttribute('jslog', `${VisualLogging.pane('event-log').track({resize: true})}`);
|
|
86
|
+
super(undefined, {jslog: `${VisualLogging.pane('event-log').track({resize: true})}`});
|
|
42
87
|
this.filtersControl = new Filters();
|
|
43
88
|
this.filtersControl.addEventListener(Events.FILTER_CHANGED, this.onFilterChanged, this);
|
|
44
89
|
this.init();
|
|
@@ -114,8 +159,11 @@ export class EventsTimelineTreeView extends TimelineTreeView {
|
|
|
114
159
|
if (!traceEvent) {
|
|
115
160
|
return false;
|
|
116
161
|
}
|
|
117
|
-
void TimelineUIUtils.buildTraceEventDetails(parsedTrace, traceEvent, this.linkifier, false, null)
|
|
118
|
-
|
|
162
|
+
void TimelineUIUtils.buildTraceEventDetails(parsedTrace, traceEvent, this.linkifier, false, null).then(fragment => {
|
|
163
|
+
if (this.lastSelectedNode() === node) {
|
|
164
|
+
renderNodeDetails(fragment, undefined, this.detailsView.element);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
119
167
|
return true;
|
|
120
168
|
}
|
|
121
169
|
|
|
@@ -140,41 +188,32 @@ export class Filters extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
140
188
|
}
|
|
141
189
|
|
|
142
190
|
populateToolbar(toolbar: UI.Toolbar.Toolbar): void {
|
|
143
|
-
const durationFilterUI = new UI.Toolbar.ToolbarComboBox(
|
|
144
|
-
durationFilterChanged.bind(this), i18nString(UIStrings.durationFilter), undefined, 'duration');
|
|
145
|
-
for (const durationMs of Filters.durationFilterPresetsMs) {
|
|
146
|
-
durationFilterUI.addOption(durationFilterUI.createOption(
|
|
147
|
-
durationMs ? `≥ ${i18n.TimeUtilities.millisToString(durationMs)}` : i18nString(UIStrings.all),
|
|
148
|
-
String(durationMs)));
|
|
149
|
-
}
|
|
150
|
-
toolbar.appendToolbarItem(durationFilterUI);
|
|
151
|
-
|
|
152
|
-
const categoryFiltersUI = new Map<string, UI.Toolbar.ToolbarCheckbox>();
|
|
153
191
|
const categories = Trace.Styles.getCategoryStyles();
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
192
|
+
const fragment = document.createDocumentFragment();
|
|
193
|
+
renderFilterToolbar(
|
|
194
|
+
{
|
|
195
|
+
durationPresetsMs: Filters.durationFilterPresetsMs,
|
|
196
|
+
onDurationChange: durationFilterChanged.bind(this),
|
|
197
|
+
categories,
|
|
198
|
+
onCategoryChange: categoriesFilterChanged.bind(this),
|
|
199
|
+
},
|
|
200
|
+
undefined,
|
|
201
|
+
fragment,
|
|
202
|
+
);
|
|
203
|
+
for (const child of Array.from(fragment.children)) {
|
|
204
|
+
if (child instanceof HTMLElement) {
|
|
205
|
+
toolbar.appendToolbarItem(new UI.Toolbar.ToolbarItem(child));
|
|
158
206
|
}
|
|
159
|
-
const checkbox = new UI.Toolbar.ToolbarCheckbox(
|
|
160
|
-
category.title, undefined, categoriesFilterChanged.bind(this, categoryName as Trace.Styles.EventCategory),
|
|
161
|
-
categoryName);
|
|
162
|
-
checkbox.setChecked(true);
|
|
163
|
-
categoryFiltersUI.set(category.name, checkbox);
|
|
164
|
-
toolbar.appendToolbarItem(checkbox);
|
|
165
207
|
}
|
|
166
208
|
|
|
167
|
-
function durationFilterChanged(this: Filters): void {
|
|
168
|
-
const duration = (durationFilterUI.selectedOption() as HTMLOptionElement).value;
|
|
169
|
-
const minimumRecordDuration = parseInt(duration, 10);
|
|
209
|
+
function durationFilterChanged(this: Filters, minimumRecordDuration: number): void {
|
|
170
210
|
this.durationFilter.setMinimumRecordDuration(Trace.Types.Timing.Milli(minimumRecordDuration));
|
|
171
211
|
this.notifyFiltersChanged();
|
|
172
212
|
}
|
|
173
213
|
|
|
174
|
-
function categoriesFilterChanged(this: Filters, name: Trace.Styles.EventCategory): void {
|
|
214
|
+
function categoriesFilterChanged(this: Filters, name: Trace.Styles.EventCategory, checked: boolean): void {
|
|
175
215
|
const categories = Trace.Styles.getCategoryStyles();
|
|
176
|
-
|
|
177
|
-
categories[name].hidden = !checkBox?.checked();
|
|
216
|
+
categories[name].hidden = !checked;
|
|
178
217
|
this.notifyFiltersChanged();
|
|
179
218
|
}
|
|
180
219
|
}
|