chrome-devtools-frontend 1.0.1545096 → 1.0.1547571
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/.stylelintrc.json +5 -1
- package/docs/contributing/infrastructure.md +2 -2
- package/docs/styleguide/ux/styles.md +1 -1
- package/eslint.config.mjs +2 -1
- package/front_end/Images/generate-css-vars.js +1 -1
- package/front_end/Images/src/arrow-down.svg +8 -1
- package/front_end/Images/src/arrow-up.svg +8 -1
- package/front_end/core/common/common.ts +0 -2
- package/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +0 -5
- package/front_end/core/i18n/collect-ui-strings.js +1 -1
- package/front_end/core/i18n/generate-locales-js.js +1 -1
- package/front_end/core/platform/HostRuntime.ts +25 -0
- package/front_end/core/platform/KeyboardUtilities.ts +2 -2
- package/front_end/core/platform/StringUtilities.ts +1 -1
- package/front_end/core/platform/api/HostRuntime.ts +45 -0
- package/front_end/core/platform/api/api.ts +7 -0
- package/front_end/core/{common/Worker.ts → platform/browser/HostRuntime.ts} +27 -12
- package/front_end/core/platform/browser/browser.ts +7 -0
- package/front_end/core/platform/node/HostRuntime.ts +85 -0
- package/front_end/core/platform/node/node.ts +7 -0
- package/front_end/core/platform/platform.ts +2 -2
- package/front_end/core/sdk/AnimationModel.ts +1 -1
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +1 -1
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/Cookie.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +2 -2
- package/front_end/core/sdk/DebuggerModel.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +6 -0
- package/front_end/core/sdk/PreloadingModel.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/Script.ts +4 -4
- package/front_end/core/sdk/SourceMapScopesInfo.ts +141 -23
- package/front_end/core/sdk/Target.ts +5 -14
- package/front_end/core/sdk/TargetManager.ts +26 -4
- package/front_end/core/sdk/sdk-meta.ts +62 -0
- package/front_end/devtools_compatibility.js +0 -1
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +2 -2
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +15 -18
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +8 -5
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +4 -4
- package/front_end/foundation/Universe.ts +2 -2
- package/front_end/generated/Deprecation.ts +26 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -4
- package/front_end/generated/SupportedCSSProperties.js +17 -15
- package/front_end/generated/protocol-mapping.d.ts +2 -0
- package/front_end/generated/protocol-proxy-api.d.ts +4 -0
- package/front_end/generated/protocol.ts +19 -29
- package/front_end/models/ai_assistance/AiConversation.ts +268 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -172
- package/front_end/models/ai_assistance/BuiltInAi.ts +131 -134
- package/front_end/models/ai_assistance/ChangeManager.ts +9 -0
- package/front_end/models/ai_assistance/ConversationHandler.ts +27 -52
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -8
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +6 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -19
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +313 -313
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +8 -6
- package/front_end/models/ai_assistance/performance/AICallTree.snapshot.txt +33 -33
- package/front_end/models/ai_assistance/performance/AICallTree.ts +9 -3
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +5 -3
- package/front_end/models/bindings/SASSSourceMapping.ts +6 -4
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +10 -7
- package/front_end/models/crux-manager/CrUXManager.ts +7 -4
- package/front_end/models/formatter/FormatterWorkerPool.ts +9 -7
- package/front_end/models/har/Importer.ts +1 -1
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
- package/front_end/models/issues_manager/GenericIssue.ts +12 -9
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +1 -1
- package/front_end/models/trace/handlers/SamplesHandler.ts +3 -0
- package/front_end/models/trace/helpers/Trace.ts +13 -0
- package/front_end/models/trace/types/TraceEvents.ts +2 -1
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -0
- package/front_end/models/workspace/IgnoreListManager.ts +1 -2
- package/front_end/models/workspace/UISourceCode.ts +50 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +86 -159
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +8 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +56 -33
- package/front_end/panels/animation/AnimationTimeline.ts +0 -8
- package/front_end/panels/application/ExtensionStorageModel.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +64 -36
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/components/components.ts +0 -2
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +80 -0
- package/front_end/panels/common/common.ts +2 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +166 -100
- package/front_end/panels/console/ConsolePrompt.ts +4 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +77 -29
- package/front_end/panels/console/ConsoleViewport.ts +2 -3
- package/front_end/panels/console/consoleInsightTeaser.css +1 -0
- package/front_end/panels/coverage/CoverageModel.ts +2 -2
- package/front_end/panels/elements/ElementIssueUtils.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +17 -7
- package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +24 -21
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/cssValueTraceView.css +1 -1
- package/front_end/panels/elements/elements-meta.ts +1 -0
- package/front_end/panels/explain/components/ConsoleInsight.ts +44 -57
- package/front_end/panels/explain/components/consoleInsight.css +46 -1
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +19 -0
- package/front_end/panels/network/RequestConditionsDrawer.ts +116 -42
- package/front_end/panels/network/networkLogView.css +11 -0
- package/front_end/panels/network/networkTimingTable.css +8 -6
- package/front_end/panels/network/requestConditionsDrawer.css +10 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +15 -14
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -2
- package/front_end/panels/recorder/components/StepEditor.ts +1 -1
- package/front_end/panels/security/SecurityPanelSidebar.ts +1 -3
- package/front_end/panels/settings/KeybindsSettingsTab.ts +21 -22
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/CoveragePlugin.ts +5 -5
- package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/Plugin.ts +1 -1
- package/front_end/panels/sources/ProfilePlugin.ts +22 -14
- package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +2 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -2
- package/front_end/panels/sources/sources-meta.ts +0 -62
- package/front_end/panels/timeline/README.md +1 -9
- package/front_end/panels/timeline/ThreadAppender.ts +0 -7
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +8 -8
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -1
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +15 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +37 -1
- package/front_end/panels/timeline/components/exportTraceOptions.css +11 -2
- package/front_end/panels/timeline/enable-easter-egg.js +1 -1
- package/front_end/panels/timeline/utils/Treemap.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +57 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +18 -23
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +9 -73
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +9 -10
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +80 -81
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +52 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +18 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +6 -69
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +9 -10
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +79 -0
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +1 -9
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -31
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +18 -0
- package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +6 -72
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +14 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -0
- package/front_end/ui/components/text_editor/javascript.ts +1 -1
- package/front_end/ui/legacy/ARIAUtils.ts +2 -2
- package/front_end/ui/legacy/ActionRegistration.ts +11 -0
- package/front_end/ui/legacy/ListWidget.ts +51 -18
- package/front_end/ui/legacy/ReportView.ts +1 -1
- package/front_end/ui/legacy/SoftDropDown.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +3 -3
- package/front_end/ui/legacy/TextPrompt.ts +3 -2
- package/front_end/ui/legacy/Treeoutline.ts +3 -2
- package/front_end/ui/legacy/UIUtils.ts +11 -10
- package/front_end/ui/legacy/Widget.ts +3 -2
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +5 -4
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +87 -111
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +62 -39
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -9
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +41 -13
- package/front_end/ui/legacy/components/utils/jsUtils.css +28 -0
- package/front_end/ui/legacy/inspectorCommon.css +2 -2
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/front_end/ui/visual_logging/LoggingConfig.ts +2 -1
- package/inspector_overlay/tool_window_controls.ts +4 -1
- package/mcp/mcp.ts +1 -1
- package/package.json +2 -3
- package/front_end/panels/application/components/StackTrace.ts +0 -239
- package/front_end/panels/application/components/stackTraceLinkButton.css +0 -16
- package/front_end/panels/application/components/stackTraceRow.css +0 -50
- package/front_end/panels/explain/components/consoleInsightSourcesList.css +0 -51
- package/front_end/ui/components/docs/README.md +0 -6
- package/front_end/ui/components/docs/building-ui-documentation/ComponentEvents.md +0 -54
- package/front_end/ui/components/docs/building-ui-documentation/ComponentPerformance.md +0 -136
- package/front_end/ui/components/docs/building-ui-documentation/CreatingComponents.md +0 -242
- package/front_end/ui/components/docs/building-ui-documentation/README.md +0 -23
- package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +0 -66
- package/front_end/ui/components/docs/building-ui-documentation/TestingComponents.md +0 -111
- package/front_end/ui/components/docs/component_docs.ts +0 -24
- package/front_end/ui/components/docs/component_docs_styles.css +0 -53
- package/front_end/ui/components/docs/create_breadcrumbs.ts +0 -44
- package/front_end/ui/components/docs/slider/basic.html +0 -20
- package/front_end/ui/components/docs/switch/basic.html +0 -20
- /package/front_end/models/issues_manager/descriptions/{genericFormAriaLabelledByToNonExistingId.md → genericFormAriaLabelledByToNonExistingIdError.md} +0 -0
- /package/front_end/models/issues_manager/descriptions/{genericFormLabelHasNeitherForNorNestedInput.md → genericFormLabelHasNeitherForNorNestedInputError.md} +0 -0
- /package/front_end/{core/platform → ui/legacy}/DOMUtilities.ts +0 -0
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
|
|
37
37
|
import * as Common from '../../../../core/common/common.js';
|
|
38
38
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
39
|
-
import * as Platform from '../../../../core/platform/platform.js';
|
|
40
39
|
import * as SDK from '../../../../core/sdk/sdk.js';
|
|
41
40
|
import type * as Protocol from '../../../../generated/protocol.js';
|
|
42
41
|
import * as StackTrace from '../../../../models/stack_trace/stack_trace.js';
|
|
@@ -218,7 +217,7 @@ export function buildStackTraceRows(
|
|
|
218
217
|
}
|
|
219
218
|
|
|
220
219
|
function renderStackTraceTable(
|
|
221
|
-
container: Element, parent: Element,
|
|
220
|
+
container: Element, parent: Element, expandable: boolean,
|
|
222
221
|
stackTraceRows: Array<StackTraceRegularRow|StackTraceAsyncRow>): HTMLElement[] {
|
|
223
222
|
container.removeChildren();
|
|
224
223
|
const links: HTMLElement[] = [];
|
|
@@ -226,20 +225,33 @@ function renderStackTraceTable(
|
|
|
226
225
|
// The tableSection groups one or more synchronous call frames together.
|
|
227
226
|
// Wherever there is an asynchronous call, a new section is created.
|
|
228
227
|
let tableSection: Element|null = null;
|
|
228
|
+
let firstRow = true;
|
|
229
229
|
for (const item of stackTraceRows) {
|
|
230
230
|
if (!tableSection || 'asyncDescription' in item) {
|
|
231
231
|
tableSection = container.createChild('tbody');
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
const row = tableSection.createChild('tr');
|
|
235
|
-
if (
|
|
235
|
+
if (firstRow && expandable) {
|
|
236
|
+
const button = row.createChild('td').createChild('button', 'arrow-icon-button');
|
|
237
|
+
button.createChild('span', 'arrow-icon');
|
|
238
|
+
parent.classList.add('expandable');
|
|
239
|
+
container.classList.add('expandable');
|
|
240
|
+
button.addEventListener('click', () => {
|
|
241
|
+
button.setAttribute('jslog', `${VisualLogging.expand().track({click: true})}`);
|
|
242
|
+
parent.classList.toggle('expanded');
|
|
243
|
+
container.classList.toggle('expanded');
|
|
244
|
+
});
|
|
245
|
+
firstRow = false;
|
|
246
|
+
} else {
|
|
236
247
|
row.createChild('td').textContent = '\n';
|
|
248
|
+
}
|
|
249
|
+
if ('asyncDescription' in item) {
|
|
237
250
|
row.createChild('td', 'stack-preview-async-description').textContent = item.asyncDescription;
|
|
238
251
|
row.createChild('td');
|
|
239
252
|
row.createChild('td');
|
|
240
253
|
row.classList.add('stack-preview-async-row');
|
|
241
254
|
} else {
|
|
242
|
-
row.createChild('td').textContent = '\n';
|
|
243
255
|
row.createChild('td', 'function-name').textContent = item.functionName;
|
|
244
256
|
row.createChild('td').textContent = ' @ ';
|
|
245
257
|
if (item.link) {
|
|
@@ -285,13 +297,13 @@ function renderStackTraceTable(
|
|
|
285
297
|
export interface Options {
|
|
286
298
|
// TODO(crbug.com/456517732): remove when all usages of runtimeStackTrace are migrated.
|
|
287
299
|
runtimeStackTrace?: Protocol.Runtime.StackTrace;
|
|
288
|
-
stackTrace?: StackTrace.StackTrace.StackTrace;
|
|
289
300
|
tabStops?: boolean;
|
|
290
301
|
// Whether the width of stack trace preview
|
|
291
302
|
// is constrained to its container or whether
|
|
292
303
|
// it can grow the container.
|
|
293
304
|
widthConstrained?: boolean;
|
|
294
305
|
showColumnNumber?: boolean;
|
|
306
|
+
expandable?: boolean;
|
|
295
307
|
}
|
|
296
308
|
|
|
297
309
|
export interface StackTraceRegularRow {
|
|
@@ -304,8 +316,10 @@ export interface StackTraceAsyncRow {
|
|
|
304
316
|
}
|
|
305
317
|
|
|
306
318
|
export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
319
|
+
#stackTrace?: StackTrace.StackTrace.StackTrace;
|
|
307
320
|
#target?: SDK.Target.Target;
|
|
308
321
|
#linkifier?: Linkifier;
|
|
322
|
+
#ownedLinkifier?: Linkifier;
|
|
309
323
|
#options: Options;
|
|
310
324
|
#links: HTMLElement[] = [];
|
|
311
325
|
|
|
@@ -316,6 +330,10 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
|
316
330
|
|
|
317
331
|
this.#target = target;
|
|
318
332
|
this.#linkifier = linkifier;
|
|
333
|
+
if (!this.#linkifier) {
|
|
334
|
+
this.#ownedLinkifier = new Linkifier();
|
|
335
|
+
this.#linkifier = this.#ownedLinkifier;
|
|
336
|
+
}
|
|
319
337
|
this.#options = options || {
|
|
320
338
|
widthConstrained: false,
|
|
321
339
|
};
|
|
@@ -325,12 +343,12 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
|
325
343
|
this.element.classList.toggle('width-constrained', this.#options.widthConstrained ?? false);
|
|
326
344
|
this.element.style.display = 'inline-block';
|
|
327
345
|
|
|
328
|
-
|
|
346
|
+
UI.DOMUtilities.appendStyle(this.element.shadowRoot as ShadowRoot, jsUtilsStyles);
|
|
329
347
|
|
|
330
348
|
this.#table = this.contentElement.createChild('table', 'stack-preview-container');
|
|
331
349
|
this.#table.classList.toggle('width-constrained', this.#options.widthConstrained ?? false);
|
|
332
350
|
|
|
333
|
-
this.#
|
|
351
|
+
this.#stackTrace?.addEventListener(StackTrace.StackTrace.Events.UPDATED, this.performUpdate.bind(this));
|
|
334
352
|
|
|
335
353
|
this.performUpdate();
|
|
336
354
|
}
|
|
@@ -340,21 +358,22 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
|
340
358
|
return;
|
|
341
359
|
}
|
|
342
360
|
|
|
343
|
-
const {runtimeStackTrace,
|
|
361
|
+
const {runtimeStackTrace, tabStops} = this.#options;
|
|
344
362
|
|
|
345
|
-
if (stackTrace) {
|
|
363
|
+
if (this.#stackTrace) {
|
|
346
364
|
const stackTraceRows = buildStackTraceRows(
|
|
347
|
-
stackTrace, this.#target ?? null, this.#linkifier, tabStops, this.#options.showColumnNumber);
|
|
348
|
-
this.#links = renderStackTraceTable(this.#table, this.element, stackTraceRows);
|
|
365
|
+
this.#stackTrace, this.#target ?? null, this.#linkifier, tabStops, this.#options.showColumnNumber);
|
|
366
|
+
this.#links = renderStackTraceTable(this.#table, this.element, this.#options.expandable ?? false, stackTraceRows);
|
|
349
367
|
return;
|
|
350
368
|
}
|
|
351
369
|
|
|
352
370
|
// TODO(crbug.com/456517732): remove when all usages of runtimeStackTrace are migrated.
|
|
353
|
-
const updateCallback =
|
|
371
|
+
const updateCallback =
|
|
372
|
+
renderStackTraceTable.bind(null, this.#table, this.element, this.#options.expandable ?? false);
|
|
354
373
|
const stackTraceRows = buildStackTraceRowsForLegacyRuntimeStackTrace(
|
|
355
374
|
runtimeStackTrace ?? {callFrames: []}, this.#target ?? null, this.#linkifier, tabStops, updateCallback,
|
|
356
375
|
this.#options.showColumnNumber);
|
|
357
|
-
this.#links = renderStackTraceTable(this.#table, this.element, stackTraceRows);
|
|
376
|
+
this.#links = renderStackTraceTable(this.#table, this.element, this.#options.expandable ?? false, stackTraceRows);
|
|
358
377
|
}
|
|
359
378
|
|
|
360
379
|
get linkElements(): readonly HTMLElement[] {
|
|
@@ -375,4 +394,13 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
|
375
394
|
this.#options = options;
|
|
376
395
|
this.requestUpdate();
|
|
377
396
|
}
|
|
397
|
+
|
|
398
|
+
set stackTrace(stackTrace: StackTrace.StackTrace.StackTrace) {
|
|
399
|
+
this.#stackTrace = stackTrace;
|
|
400
|
+
this.requestUpdate();
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
override onDetach(): void {
|
|
404
|
+
this.#ownedLinkifier?.dispose();
|
|
405
|
+
}
|
|
378
406
|
}
|
|
@@ -99,6 +99,34 @@
|
|
|
99
99
|
&:not(.show-hidden-rows) > tfoot > tr.show-less-link {
|
|
100
100
|
--display-toggle-link: none;
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
.arrow-icon-button {
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
padding: 1px 0;
|
|
106
|
+
border: none;
|
|
107
|
+
background: none;
|
|
108
|
+
margin-left: -4px;
|
|
109
|
+
margin-right: -2px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.arrow-icon {
|
|
113
|
+
display: inline-block;
|
|
114
|
+
mask-image: var(--image-file-triangle-right);
|
|
115
|
+
background-color: var(--icon-default);
|
|
116
|
+
margin-top: 2px;
|
|
117
|
+
height: 14px;
|
|
118
|
+
width: 14px;
|
|
119
|
+
transition: transform 200ms;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.expanded .arrow-icon{
|
|
123
|
+
transform: rotate(90deg);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&.expandable:not(.expanded) tbody:not(:first-of-type),
|
|
127
|
+
&.expandable:not(.expanded) tbody tr:not(:first-of-type) {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
102
130
|
}
|
|
103
131
|
|
|
104
132
|
/* The show more/less links aren't really a part of the content
|
|
@@ -141,7 +141,7 @@ iframe.widget {
|
|
|
141
141
|
display: none !important; /* stylelint-disable-line declaration-no-important */
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
.highlighted-search-result
|
|
144
|
+
.highlighted-search-result,:host::highlight(highlighted-search-result) {
|
|
145
145
|
border-radius: 1px;
|
|
146
146
|
background-color: var(--sys-color-yellow-container);
|
|
147
147
|
outline: 1px solid var(--sys-color-yellow-container);
|
|
@@ -326,7 +326,7 @@ input[type='range']:disabled::-webkit-slider-thumb {
|
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
.highlighted-search-result.current-search-result
|
|
329
|
+
.highlighted-search-result.current-search-result,:host::highlight(current-search-result) {
|
|
330
330
|
/* Note: this value is used in light & dark mode */
|
|
331
331
|
--override-current-search-result-background-color: rgb(255 127 0 / 80%);
|
|
332
332
|
|
|
@@ -10,6 +10,7 @@ import * as ContextFlavorListener from './ContextFlavorListener.js';
|
|
|
10
10
|
import * as ContextMenu from './ContextMenu.js';
|
|
11
11
|
import * as Dialog from './Dialog.js';
|
|
12
12
|
import * as DockController from './DockController.js';
|
|
13
|
+
import * as DOMUtilities from './DOMUtilities.js';
|
|
13
14
|
import * as DropTarget from './DropTarget.js';
|
|
14
15
|
import * as EmptyWidget from './EmptyWidget.js';
|
|
15
16
|
import * as FilterBar from './FilterBar.js';
|
|
@@ -61,6 +62,7 @@ export {
|
|
|
61
62
|
ContextMenu,
|
|
62
63
|
Dialog,
|
|
63
64
|
DockController,
|
|
65
|
+
DOMUtilities,
|
|
64
66
|
DropTarget,
|
|
65
67
|
EmptyWidget,
|
|
66
68
|
FilterBar,
|
|
@@ -1753,6 +1753,7 @@ export const knownContextValues = new Set([
|
|
|
1753
1753
|
'grid-column-start',
|
|
1754
1754
|
'grid-gap',
|
|
1755
1755
|
'grid-how',
|
|
1756
|
+
'grid-lanes',
|
|
1756
1757
|
'grid-overlays',
|
|
1757
1758
|
'grid-row',
|
|
1758
1759
|
'grid-row-end',
|
|
@@ -3218,6 +3219,7 @@ export const knownContextValues = new Set([
|
|
|
3218
3219
|
'save-image',
|
|
3219
3220
|
'save-name',
|
|
3220
3221
|
'save-player-info',
|
|
3222
|
+
'save-trace-explanation',
|
|
3221
3223
|
'scale',
|
|
3222
3224
|
'scheme',
|
|
3223
3225
|
'sci',
|
|
@@ -131,7 +131,8 @@ function checkContextValue(context: string|number|undefined): void {
|
|
|
131
131
|
if (Root.Runtime.Runtime.queryParam('debugFrontend') || Host.InspectorFrontendHost.isUnderTest() ||
|
|
132
132
|
localStorage.getItem('veDebugLoggingEnabled') === DebugLoggingFormat.TEST) {
|
|
133
133
|
const stack = (new Error().stack || '').split('\n').slice(3).join('\n');
|
|
134
|
-
console.error(`Unknown VE context: ${context}${
|
|
134
|
+
console.error(`Unknown VE context: '${context}'\n${
|
|
135
|
+
stack}\nPlease add it to front_end/ui/visual_logging/KnownContextValues.ts if you think that's a valid context value.`);
|
|
135
136
|
}
|
|
136
137
|
reportedUnknownVeContext.add(context);
|
|
137
138
|
}
|
|
@@ -38,7 +38,10 @@ export class WindowControlsOverlay extends Overlay {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
override uninstall() {
|
|
41
|
-
this.
|
|
41
|
+
this.windowsToolBar.remove();
|
|
42
|
+
this.linuxToolBar.remove();
|
|
43
|
+
this.macToolbarRight.remove();
|
|
44
|
+
this.macToolbarLeft.remove();
|
|
42
45
|
super.uninstall();
|
|
43
46
|
}
|
|
44
47
|
|
package/mcp/mcp.ts
CHANGED
|
@@ -31,6 +31,6 @@ export {
|
|
|
31
31
|
type EventTypes as IssuesManagerEventTypes,
|
|
32
32
|
IssuesManager
|
|
33
33
|
} from '../front_end/models/issues_manager/IssuesManager.js';
|
|
34
|
-
export
|
|
34
|
+
export * as MarkdownIssueDescription from '../front_end/models/issues_manager/MarkdownIssueDescription.js';
|
|
35
35
|
export * as TraceEngine from '../front_end/models/trace/trace.js';
|
|
36
36
|
export * as Marked from '../front_end/third_party/marked/marked.js';
|
package/package.json
CHANGED
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
"build": "vpython3 third_party/node/node.py --output scripts/run_build.mjs",
|
|
22
22
|
"check-external-links": "vpython3 third_party/node/node.py --output scripts/check_external_links.js",
|
|
23
23
|
"collect-strings": "vpython3 third_party/node/node.py --output third_party/i18n/collect-strings.js front_end",
|
|
24
|
-
"components-server": "vpython3 third_party/node/node.py --output scripts/component_server/server.js",
|
|
25
24
|
"debug-webtest": "vpython3 third_party/node/node.py --output scripts/npm_test.js --debug-devtools",
|
|
26
25
|
"generate-protocol-resources": "vpython3 scripts/deps/generate_protocol_resources.py && git cl format --js",
|
|
27
26
|
"install-deps": "vpython3 scripts/deps/manage_node_deps.py",
|
|
28
|
-
"lint": "vpython3 third_party/node/node.py --output
|
|
27
|
+
"lint": "vpython3 third_party/node/node.py --output scripts/test/run_lint_check.mjs",
|
|
29
28
|
"prebuild": "gn gen out/Default",
|
|
30
29
|
"rdb": "rdb stream -new -realm chromium:public --",
|
|
31
30
|
"start": "vpython3 third_party/node/node.py --output scripts/run_start.mjs",
|
|
@@ -103,5 +102,5 @@
|
|
|
103
102
|
"flat-cache": "6.1.12"
|
|
104
103
|
}
|
|
105
104
|
},
|
|
106
|
-
"version": "1.0.
|
|
105
|
+
"version": "1.0.1547571"
|
|
107
106
|
}
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
// Copyright 2021 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
|
-
|
|
6
|
-
import '../../../ui/components/expandable_list/expandable_list.js';
|
|
7
|
-
|
|
8
|
-
import * as i18n from '../../../core/i18n/i18n.js';
|
|
9
|
-
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
10
|
-
import type * as Protocol from '../../../generated/protocol.js';
|
|
11
|
-
import * as Components from '../../../ui/legacy/components/utils/utils.js';
|
|
12
|
-
import * as Lit from '../../../ui/lit/lit.js';
|
|
13
|
-
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
14
|
-
|
|
15
|
-
import stackTraceLinkButtonStyles from './stackTraceLinkButton.css.js';
|
|
16
|
-
import stackTraceRowStyles from './stackTraceRow.css.js';
|
|
17
|
-
|
|
18
|
-
const {html} = Lit;
|
|
19
|
-
|
|
20
|
-
const UIStrings = {
|
|
21
|
-
/**
|
|
22
|
-
* @description Error message stating that something went wrong when trying to render stack trace
|
|
23
|
-
*/
|
|
24
|
-
cannotRenderStackTrace: 'Cannot render stack trace',
|
|
25
|
-
/**
|
|
26
|
-
* @description A link to show more frames in the stack trace if more are available. Never 0.
|
|
27
|
-
*/
|
|
28
|
-
showSMoreFrames: '{n, plural, =1 {Show # more frame} other {Show # more frames}}',
|
|
29
|
-
/**
|
|
30
|
-
* @description A link to rehide frames that are by default hidden.
|
|
31
|
-
*/
|
|
32
|
-
showLess: 'Show less',
|
|
33
|
-
/**
|
|
34
|
-
* @description Label for a stack trace. If a frame is created programmatically (i.e. via JavaScript), there is a
|
|
35
|
-
* stack trace for the line of code which caused the creation of the iframe. This is the stack trace we are showing here.
|
|
36
|
-
*/
|
|
37
|
-
creationStackTrace: 'Frame Creation `Stack Trace`',
|
|
38
|
-
} as const;
|
|
39
|
-
const str_ = i18n.i18n.registerUIStrings('panels/application/components/StackTrace.ts', UIStrings);
|
|
40
|
-
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
41
|
-
|
|
42
|
-
export interface StackTraceData {
|
|
43
|
-
creationStackTraceData: {
|
|
44
|
-
creationStackTrace: Protocol.Runtime.StackTrace|null,
|
|
45
|
-
creationStackTraceTarget: SDK.Target.Target|null,
|
|
46
|
-
};
|
|
47
|
-
buildStackTraceRows: (
|
|
48
|
-
stackTrace: Protocol.Runtime.StackTrace,
|
|
49
|
-
target: SDK.Target.Target|null,
|
|
50
|
-
linkifier: Components.Linkifier.Linkifier,
|
|
51
|
-
tabStops: boolean|undefined,
|
|
52
|
-
updateCallback?: (arg0: Array<Components.JSPresentationUtils.StackTraceRegularRow|
|
|
53
|
-
Components.JSPresentationUtils.StackTraceAsyncRow>) => void,
|
|
54
|
-
) => Array<Components.JSPresentationUtils.StackTraceRegularRow|Components.JSPresentationUtils.StackTraceAsyncRow>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
interface StackTraceRowData {
|
|
58
|
-
stackTraceRowItem: Components.JSPresentationUtils.StackTraceRegularRow;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export class StackTraceRow extends HTMLElement {
|
|
62
|
-
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
63
|
-
|
|
64
|
-
#stackTraceRowItem: Components.JSPresentationUtils.StackTraceRegularRow|null = null;
|
|
65
|
-
|
|
66
|
-
set data(data: StackTraceRowData) {
|
|
67
|
-
this.#stackTraceRowItem = data.stackTraceRowItem;
|
|
68
|
-
this.#render();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
#render(): void {
|
|
72
|
-
if (!this.#stackTraceRowItem) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
Lit.render(
|
|
76
|
-
html`
|
|
77
|
-
<style>${stackTraceRowStyles}</style>
|
|
78
|
-
<div class="stack-trace-row">
|
|
79
|
-
<div class="stack-trace-function-name text-ellipsis" title=${this.#stackTraceRowItem.functionName}>
|
|
80
|
-
${this.#stackTraceRowItem.functionName}
|
|
81
|
-
</div>
|
|
82
|
-
<div class="stack-trace-source-location">
|
|
83
|
-
${
|
|
84
|
-
this.#stackTraceRowItem.link ?
|
|
85
|
-
html`<div class="text-ellipsis">\xA0@\xA0${this.#stackTraceRowItem.link}</div>` :
|
|
86
|
-
Lit.nothing}
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
`,
|
|
90
|
-
this.#shadow, {host: this});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
interface StackTraceLinkButtonData {
|
|
95
|
-
onShowAllClick: () => void;
|
|
96
|
-
hiddenCallFramesCount: number;
|
|
97
|
-
expandedView: boolean;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export class StackTraceLinkButton extends HTMLElement {
|
|
101
|
-
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
102
|
-
|
|
103
|
-
#onShowAllClick: () => void = () => {};
|
|
104
|
-
#hiddenCallFramesCount: number|null = null;
|
|
105
|
-
#expandedView = false;
|
|
106
|
-
|
|
107
|
-
set data(data: StackTraceLinkButtonData) {
|
|
108
|
-
this.#onShowAllClick = data.onShowAllClick;
|
|
109
|
-
this.#hiddenCallFramesCount = data.hiddenCallFramesCount;
|
|
110
|
-
this.#expandedView = data.expandedView;
|
|
111
|
-
this.#render();
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
#render(): void {
|
|
115
|
-
if (!this.#hiddenCallFramesCount) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
const linkText = this.#expandedView ? i18nString(UIStrings.showLess) :
|
|
119
|
-
i18nString(UIStrings.showSMoreFrames, {n: this.#hiddenCallFramesCount});
|
|
120
|
-
Lit.render(
|
|
121
|
-
html`
|
|
122
|
-
<style>${stackTraceLinkButtonStyles}</style>
|
|
123
|
-
<div class="stack-trace-row">
|
|
124
|
-
<button class="link" @click=${() => this.#onShowAllClick()}>
|
|
125
|
-
${linkText}
|
|
126
|
-
</button>
|
|
127
|
-
</div>
|
|
128
|
-
`,
|
|
129
|
-
this.#shadow, {host: this});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export class StackTrace extends HTMLElement {
|
|
134
|
-
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
135
|
-
readonly #linkifier = new Components.Linkifier.Linkifier();
|
|
136
|
-
#stackTraceRows:
|
|
137
|
-
Array<Components.JSPresentationUtils.StackTraceRegularRow|Components.JSPresentationUtils.StackTraceAsyncRow> = [];
|
|
138
|
-
#showHidden = false;
|
|
139
|
-
|
|
140
|
-
set data(data: StackTraceData) {
|
|
141
|
-
const {creationStackTrace, creationStackTraceTarget} = data.creationStackTraceData;
|
|
142
|
-
if (creationStackTrace) {
|
|
143
|
-
this.#stackTraceRows = data.buildStackTraceRows(
|
|
144
|
-
creationStackTrace, creationStackTraceTarget, this.#linkifier, true,
|
|
145
|
-
this.#onStackTraceRowsUpdated.bind(this));
|
|
146
|
-
}
|
|
147
|
-
this.#render();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
#onStackTraceRowsUpdated(
|
|
151
|
-
stackTraceRows:
|
|
152
|
-
Array<Components.JSPresentationUtils.StackTraceRegularRow|Components.JSPresentationUtils.StackTraceAsyncRow>):
|
|
153
|
-
void {
|
|
154
|
-
this.#stackTraceRows = stackTraceRows;
|
|
155
|
-
this.#render();
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
#onToggleShowAllClick(): void {
|
|
159
|
-
this.#showHidden = !this.#showHidden;
|
|
160
|
-
this.#render();
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
createRowTemplates(): Lit.TemplateResult[] {
|
|
164
|
-
const expandableRows = [];
|
|
165
|
-
let hiddenCallFramesCount = 0;
|
|
166
|
-
for (const item of this.#stackTraceRows) {
|
|
167
|
-
let ignoreListHide = false;
|
|
168
|
-
// TODO(crbug.com/1183325): fix race condition with uiLocation still being null here
|
|
169
|
-
// Note: This has always checked whether the call frame location *in the generated
|
|
170
|
-
// code* is ignore-listed or not. This can change after the live location updates,
|
|
171
|
-
// and is handled again in the linkifier live location update callback.
|
|
172
|
-
if ('link' in item && item.link) {
|
|
173
|
-
const uiLocation = Components.Linkifier.Linkifier.uiLocation(item.link);
|
|
174
|
-
ignoreListHide = Boolean(uiLocation?.isIgnoreListed());
|
|
175
|
-
}
|
|
176
|
-
if (this.#showHidden || !ignoreListHide) {
|
|
177
|
-
if ('functionName' in item) {
|
|
178
|
-
expandableRows.push(html`
|
|
179
|
-
<devtools-stack-trace-row data-stack-trace-row .data=${{
|
|
180
|
-
stackTraceRowItem: item,
|
|
181
|
-
}}></devtools-stack-trace-row>`);
|
|
182
|
-
}
|
|
183
|
-
if ('asyncDescription' in item) {
|
|
184
|
-
expandableRows.push(html`
|
|
185
|
-
<div>${item.asyncDescription}</div>
|
|
186
|
-
`);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
if ('functionName' in item && ignoreListHide) {
|
|
190
|
-
hiddenCallFramesCount++;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
if (hiddenCallFramesCount) {
|
|
194
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
195
|
-
// clang-format off
|
|
196
|
-
expandableRows.push(html`
|
|
197
|
-
<devtools-stack-trace-link-button data-stack-trace-row .data=${{onShowAllClick: this.#onToggleShowAllClick.bind(this), hiddenCallFramesCount, expandedView: this.#showHidden}}></devtools-stack-trace-link-button>
|
|
198
|
-
`);
|
|
199
|
-
// clang-format on
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
return expandableRows;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
#render(): void {
|
|
206
|
-
if (!this.#stackTraceRows.length) {
|
|
207
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
208
|
-
// clang-format off
|
|
209
|
-
Lit.render(
|
|
210
|
-
html`
|
|
211
|
-
<span>${i18nString(UIStrings.cannotRenderStackTrace)}</span>
|
|
212
|
-
`,
|
|
213
|
-
this.#shadow, {host: this});
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const expandableRows = this.createRowTemplates();
|
|
218
|
-
Lit.render(
|
|
219
|
-
html`
|
|
220
|
-
<devtools-expandable-list .data=${{rows: expandableRows, title: i18nString(UIStrings.creationStackTrace)}}
|
|
221
|
-
jslog=${VisualLogging.tree()}>
|
|
222
|
-
</devtools-expandable-list>
|
|
223
|
-
`,
|
|
224
|
-
this.#shadow, {host: this});
|
|
225
|
-
// clang-format on
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
customElements.define('devtools-stack-trace-row', StackTraceRow);
|
|
230
|
-
customElements.define('devtools-stack-trace-link-button', StackTraceLinkButton);
|
|
231
|
-
customElements.define('devtools-resources-stack-trace', StackTrace);
|
|
232
|
-
|
|
233
|
-
declare global {
|
|
234
|
-
interface HTMLElementTagNameMap {
|
|
235
|
-
'devtools-stack-trace-row': StackTraceRow;
|
|
236
|
-
'devtools-stack-trace-link-button': StackTraceLinkButton;
|
|
237
|
-
'devtools-resources-stack-trace': StackTrace;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2021 The Chromium Authors
|
|
3
|
-
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
button.link {
|
|
8
|
-
color: var(--sys-color-primary);
|
|
9
|
-
text-decoration: underline;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
outline-offset: 2px;
|
|
12
|
-
border: none;
|
|
13
|
-
background: none;
|
|
14
|
-
font-family: inherit;
|
|
15
|
-
font-size: inherit;
|
|
16
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2021 The Chromium Authors
|
|
3
|
-
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
.stack-trace-row {
|
|
8
|
-
display: flex;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.stack-trace-function-name {
|
|
12
|
-
width: 100px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.stack-trace-source-location {
|
|
16
|
-
display: flex;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.text-ellipsis {
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
text-overflow: ellipsis;
|
|
23
|
-
white-space: nowrap;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.stack-trace-source-location .text-ellipsis {
|
|
27
|
-
padding-right: 2px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.ignore-list-link {
|
|
31
|
-
opacity: 60%;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.link,
|
|
35
|
-
.devtools-link {
|
|
36
|
-
color: var(--sys-color-primary);
|
|
37
|
-
text-decoration: underline;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
outline-offset: 2px;
|
|
40
|
-
border: none;
|
|
41
|
-
background: none;
|
|
42
|
-
font-family: inherit;
|
|
43
|
-
font-size: var(--sys-size-6);
|
|
44
|
-
|
|
45
|
-
&:focus-visible {
|
|
46
|
-
outline: 2px solid var(--sys-color-state-focus-ring);
|
|
47
|
-
outline-offset: 0;
|
|
48
|
-
border-radius: var(--sys-shape-corner-extra-small);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2023 The Chromium Authors
|
|
3
|
-
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
* {
|
|
8
|
-
padding: 0;
|
|
9
|
-
margin: 0;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host {
|
|
14
|
-
display: block;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
ul {
|
|
18
|
-
color: var(--sys-color-primary);
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
font-style: normal;
|
|
21
|
-
font-weight: 400;
|
|
22
|
-
line-height: 18px;
|
|
23
|
-
margin-top: 8px;
|
|
24
|
-
padding-left: var(--sys-size-6);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
li {
|
|
28
|
-
list-style-type: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
ul .link {
|
|
32
|
-
color: var(--sys-color-primary);
|
|
33
|
-
display: inline-flex !important; /* stylelint-disable-line declaration-no-important */
|
|
34
|
-
align-items: center;
|
|
35
|
-
gap: 4px;
|
|
36
|
-
text-decoration-line: underline;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
devtools-icon {
|
|
40
|
-
height: 16px;
|
|
41
|
-
width: 16px;
|
|
42
|
-
margin-right: var(--sys-size-1);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
devtools-icon[name="open-externally"] {
|
|
46
|
-
color: var(--icon-link);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.source-disclaimer {
|
|
50
|
-
color: var(--sys-color-on-surface-subtle);
|
|
51
|
-
}
|