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
|
@@ -49,6 +49,7 @@ import objectPropertiesSectionStyles from './objectPropertiesSection.css.js';
|
|
|
49
49
|
import objectValueStyles from './objectValue.css.js';
|
|
50
50
|
import {RemoteObjectPreviewFormatter, renderNodeTitle} from './RemoteObjectPreviewFormatter.js';
|
|
51
51
|
|
|
52
|
+
const {widgetConfig} = UI.Widget;
|
|
52
53
|
const {ref, repeat, ifDefined, classMap} = Directives;
|
|
53
54
|
const UIStrings = {
|
|
54
55
|
/**
|
|
@@ -135,7 +136,6 @@ const UIStrings = {
|
|
|
135
136
|
} as const;
|
|
136
137
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/object_ui/ObjectPropertiesSection.ts', UIStrings);
|
|
137
138
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
138
|
-
const EXPANDABLE_MAX_LENGTH = 50;
|
|
139
139
|
const EXPANDABLE_MAX_DEPTH = 100;
|
|
140
140
|
|
|
141
141
|
const objectPropertiesSectionMap = new WeakMap<Element, ObjectPropertiesSection>();
|
|
@@ -639,13 +639,16 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
|
|
|
639
639
|
const text = JSON.stringify(description);
|
|
640
640
|
const tooLong = description.length > maxRenderableStringLength;
|
|
641
641
|
return html`<span class="value object-value-string" title=${ifDefined(tooLong ? undefined : description)}>${
|
|
642
|
-
tooLong ?
|
|
642
|
+
tooLong ? html`<devtools-widget .widgetConfig=${
|
|
643
|
+
widgetConfig(ExpandableTextPropertyValue, {text})}></devtools-widget>` :
|
|
644
|
+
text}</span>`;
|
|
643
645
|
}
|
|
644
646
|
if (type === 'object' && subtype === 'trustedtype') {
|
|
645
647
|
const text = `${className} '${description}'`;
|
|
646
648
|
const tooLong = text.length > maxRenderableStringLength;
|
|
647
649
|
return html`<span class="value object-value-trustedtype" title=${ifDefined(tooLong ? undefined : text)}>${
|
|
648
|
-
tooLong ?
|
|
650
|
+
tooLong ? html`<devtools-widget .widgetConfig=${
|
|
651
|
+
widgetConfig(ExpandableTextPropertyValue, {text})}></devtools-widget>` :
|
|
649
652
|
html`${className} <span class=object-value-string title=${description}>${
|
|
650
653
|
JSON.stringify(description)}</span>`}</span>`;
|
|
651
654
|
}
|
|
@@ -663,8 +666,9 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
|
|
|
663
666
|
>${renderNodeTitle(description)}</span>`;
|
|
664
667
|
}
|
|
665
668
|
if (description.length > maxRenderableStringLength) {
|
|
666
|
-
return html`<span class="value object-value-${subtype || type}" title=${description}
|
|
667
|
-
|
|
669
|
+
return html`<span class="value object-value-${subtype || type}" title=${description}><devtools-widget
|
|
670
|
+
.widgetConfig=${
|
|
671
|
+
widgetConfig(ExpandableTextPropertyValue, {text: description})}></devtools-widget></span>`;
|
|
668
672
|
}
|
|
669
673
|
const hasPreview = value.preview && showPreview;
|
|
670
674
|
return html`<span class="value object-value-${subtype || type}" title=${description}>${
|
|
@@ -992,7 +996,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
992
996
|
private linkifier: Components.Linkifier.Linkifier|undefined;
|
|
993
997
|
private readonly maxNumPropertiesToShow: number;
|
|
994
998
|
readOnly!: boolean;
|
|
995
|
-
private prompt!: ObjectPropertyPrompt|undefined;
|
|
996
999
|
#editing = false;
|
|
997
1000
|
readonly #view: TreeElementView;
|
|
998
1001
|
#completions: string[] = [];
|
|
@@ -1107,39 +1110,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1107
1110
|
treeNode.appendChild(infoElement);
|
|
1108
1111
|
}
|
|
1109
1112
|
|
|
1110
|
-
static createRemoteObjectAccessorPropertySpan(
|
|
1111
|
-
object: SDK.RemoteObject.RemoteObject|null, propertyPath: string[],
|
|
1112
|
-
callback: (arg0: SDK.RemoteObject.CallFunctionResult) => void): HTMLElement {
|
|
1113
|
-
const rootElement = document.createElement('span');
|
|
1114
|
-
const element = rootElement.createChild('span');
|
|
1115
|
-
element.textContent = i18nString(UIStrings.dots);
|
|
1116
|
-
if (!object) {
|
|
1117
|
-
return rootElement;
|
|
1118
|
-
}
|
|
1119
|
-
element.classList.add('object-value-calculate-value-button');
|
|
1120
|
-
UI.Tooltip.Tooltip.install(element, i18nString(UIStrings.invokePropertyGetter));
|
|
1121
|
-
element.addEventListener('click', onInvokeGetterClick, false);
|
|
1122
|
-
|
|
1123
|
-
function onInvokeGetterClick(event: Event): void {
|
|
1124
|
-
event.consume();
|
|
1125
|
-
if (object) {
|
|
1126
|
-
void object.callFunction(invokeGetter, [{value: JSON.stringify(propertyPath)}]).then(callback);
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
function invokeGetter(this: Object, arrayStr: string): Object {
|
|
1131
|
-
let result: Object = this;
|
|
1132
|
-
const properties = JSON.parse(arrayStr);
|
|
1133
|
-
for (let i = 0, n = properties.length; i < n; ++i) {
|
|
1134
|
-
// @ts-expect-error callFunction expects this to be a generic Object, so while this works we can't be more specific on types.
|
|
1135
|
-
result = result[properties[i]];
|
|
1136
|
-
}
|
|
1137
|
-
return result;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
return rootElement;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
1113
|
get nameElement(): Element|undefined {
|
|
1144
1114
|
return this.#nameElement;
|
|
1145
1115
|
}
|
|
@@ -1623,13 +1593,6 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1623
1593
|
static sparseIterationThreshold = 250000;
|
|
1624
1594
|
}
|
|
1625
1595
|
|
|
1626
|
-
export class ObjectPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
1627
|
-
constructor() {
|
|
1628
|
-
super();
|
|
1629
|
-
this.initialize(TextEditor.JavaScript.completeInContext);
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
1596
|
export class ObjectPropertiesSectionsTreeExpandController {
|
|
1634
1597
|
static readonly #propertyPathCache = new WeakMap<UI.TreeOutline.TreeElement, string>();
|
|
1635
1598
|
static readonly #sectionMap = new WeakMap<RootElement, string>();
|
|
@@ -1740,89 +1703,102 @@ export class Renderer implements UI.UIUtils.Renderer {
|
|
|
1740
1703
|
}
|
|
1741
1704
|
}
|
|
1742
1705
|
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
const
|
|
1766
|
-
|
|
1767
|
-
const {target} = e;
|
|
1768
|
-
if (!(target instanceof Element)) {
|
|
1769
|
-
return;
|
|
1770
|
-
}
|
|
1771
|
-
const listItem = target.closest('li');
|
|
1772
|
-
const element = listItem && UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem);
|
|
1773
|
-
if (!(element instanceof ObjectPropertyTreeElement)) {
|
|
1774
|
-
return;
|
|
1775
|
-
}
|
|
1776
|
-
const contextMenu = element.getContextMenu(e);
|
|
1777
|
-
if (this.text.length < this.maxDisplayableTextLength && !this.#expanded) {
|
|
1778
|
-
contextMenu.clipboardSection().appendItem(
|
|
1779
|
-
i18nString(UIStrings.showMoreS, {PH1: totalBytesText}), this.expandText.bind(this),
|
|
1780
|
-
{jslogContext: 'show-more'});
|
|
1781
|
-
}
|
|
1706
|
+
interface ExpandableTextViewInput {
|
|
1707
|
+
copyText: () => void;
|
|
1708
|
+
expandText: () => void;
|
|
1709
|
+
expanded: boolean;
|
|
1710
|
+
maxLength: number;
|
|
1711
|
+
byteCount: number;
|
|
1712
|
+
text: string;
|
|
1713
|
+
}
|
|
1714
|
+
type ExpandableTextView = (input: ExpandableTextViewInput, output: object, target: HTMLElement) => void;
|
|
1715
|
+
export const EXPANDABLE_TEXT_DEFAULT_VIEW: ExpandableTextView = (input, output, target) => {
|
|
1716
|
+
const totalBytesText = i18n.ByteUtilities.bytesToString(input.byteCount);
|
|
1717
|
+
const canExpand = input.text.length < ExpandableTextPropertyValue.MAX_DISPLAYABLE_TEXT_LENGTH;
|
|
1718
|
+
const onContextMenu = (e: Event): void => {
|
|
1719
|
+
const {target} = e;
|
|
1720
|
+
if (!(target instanceof Element)) {
|
|
1721
|
+
return;
|
|
1722
|
+
}
|
|
1723
|
+
const listItem = target.closest('li');
|
|
1724
|
+
const element = listItem && UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem);
|
|
1725
|
+
if (!(element instanceof ObjectPropertyTreeElement)) {
|
|
1726
|
+
return;
|
|
1727
|
+
}
|
|
1728
|
+
const contextMenu = element.getContextMenu(e);
|
|
1729
|
+
if (canExpand && !input.expanded) {
|
|
1782
1730
|
contextMenu.clipboardSection().appendItem(
|
|
1783
|
-
i18nString(UIStrings.
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1731
|
+
i18nString(UIStrings.showMoreS, {PH1: totalBytesText}), input.expandText, {jslogContext: 'show-more'});
|
|
1732
|
+
}
|
|
1733
|
+
contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copy), input.copyText, {jslogContext: 'copy'});
|
|
1734
|
+
void contextMenu.show();
|
|
1735
|
+
e.consume(true);
|
|
1736
|
+
};
|
|
1787
1737
|
|
|
1788
|
-
|
|
1738
|
+
const croppedText = input.text.slice(0, input.maxLength);
|
|
1789
1739
|
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
// clang-format off
|
|
1740
|
+
render(
|
|
1741
|
+
// clang-format off
|
|
1793
1742
|
html`<span title=${croppedText + '…'} @contextmenu=${onContextMenu}>
|
|
1794
|
-
${
|
|
1743
|
+
${input.expanded ? input.text : croppedText}
|
|
1795
1744
|
<button
|
|
1796
|
-
?hidden=${
|
|
1797
|
-
@click=${
|
|
1798
|
-
jslog=${ifDefined(
|
|
1799
|
-
class=${
|
|
1800
|
-
data-text=${
|
|
1745
|
+
?hidden=${input.expanded}
|
|
1746
|
+
@click=${canExpand ? input.expandText : undefined}
|
|
1747
|
+
jslog=${ifDefined(canExpand ? VisualLogging.action('expand').track({click: true}) : undefined)}
|
|
1748
|
+
class=${canExpand ? 'expandable-inline-button' : 'undisplayable-text'}
|
|
1749
|
+
data-text=${canExpand ? i18nString(UIStrings.showMoreS, {PH1: totalBytesText}) :
|
|
1801
1750
|
i18nString(UIStrings.longTextWasTruncatedS, {PH1: totalBytesText})}
|
|
1802
1751
|
></button>
|
|
1803
1752
|
<button
|
|
1804
1753
|
class=expandable-inline-button
|
|
1805
|
-
@click=${
|
|
1754
|
+
@click=${input.copyText}
|
|
1806
1755
|
data-text=${i18nString(UIStrings.copy)}
|
|
1807
1756
|
jslog=${VisualLogging.action('copy').track({click: true})}
|
|
1808
1757
|
></button>
|
|
1809
1758
|
</span>`,
|
|
1810
|
-
|
|
1811
|
-
|
|
1759
|
+
// clang-format on
|
|
1760
|
+
target);
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1763
|
+
export class ExpandableTextPropertyValue extends UI.Widget.Widget {
|
|
1764
|
+
static readonly MAX_DISPLAYABLE_TEXT_LENGTH = 10000000;
|
|
1765
|
+
static readonly EXPANDABLE_MAX_LENGTH = 50;
|
|
1766
|
+
#text = '';
|
|
1767
|
+
#byteCount = 0;
|
|
1768
|
+
#expanded = false;
|
|
1769
|
+
#maxLength = ExpandableTextPropertyValue.EXPANDABLE_MAX_LENGTH;
|
|
1770
|
+
readonly #view: ExpandableTextView;
|
|
1771
|
+
|
|
1772
|
+
constructor(target?: HTMLElement, view = EXPANDABLE_TEXT_DEFAULT_VIEW) {
|
|
1773
|
+
super(target);
|
|
1774
|
+
this.#view = view;
|
|
1812
1775
|
}
|
|
1813
1776
|
|
|
1814
|
-
|
|
1815
|
-
|
|
1777
|
+
set text(text: string) {
|
|
1778
|
+
this.#text = text;
|
|
1779
|
+
this.#byteCount = Platform.StringUtilities.countWtf8Bytes(text);
|
|
1780
|
+
this.requestUpdate();
|
|
1816
1781
|
}
|
|
1817
1782
|
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
this.#render();
|
|
1822
|
-
}
|
|
1783
|
+
set maxLength(maxLength: number) {
|
|
1784
|
+
this.#maxLength = maxLength;
|
|
1785
|
+
this.requestUpdate();
|
|
1823
1786
|
}
|
|
1824
1787
|
|
|
1825
|
-
|
|
1826
|
-
|
|
1788
|
+
override performUpdate(): void {
|
|
1789
|
+
const input: ExpandableTextViewInput = {
|
|
1790
|
+
copyText: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#text),
|
|
1791
|
+
expandText: () => {
|
|
1792
|
+
if (!this.#expanded) {
|
|
1793
|
+
this.#expanded = true;
|
|
1794
|
+
this.requestUpdate();
|
|
1795
|
+
}
|
|
1796
|
+
},
|
|
1797
|
+
expanded: this.#expanded,
|
|
1798
|
+
byteCount: this.#byteCount,
|
|
1799
|
+
maxLength: this.#maxLength,
|
|
1800
|
+
text: this.#text,
|
|
1801
|
+
};
|
|
1802
|
+
this.#view(input, {}, this.contentElement);
|
|
1827
1803
|
}
|
|
1828
1804
|
}
|
|
@@ -8,7 +8,6 @@ import type * as Protocol from '../../../../generated/protocol.js';
|
|
|
8
8
|
import * as Bindings from '../../../../models/bindings/bindings.js';
|
|
9
9
|
import type * as CPUProfile from '../../../../models/cpu_profile/cpu_profile.js';
|
|
10
10
|
import * as Workspace from '../../../../models/workspace/workspace.js';
|
|
11
|
-
import * as SourceFrame from '../source_frame/source_frame.js';
|
|
12
11
|
|
|
13
12
|
let performanceInstance: Performance;
|
|
14
13
|
|
|
@@ -16,7 +15,7 @@ export class Performance {
|
|
|
16
15
|
private readonly helper: Helper;
|
|
17
16
|
|
|
18
17
|
private constructor() {
|
|
19
|
-
this.helper = new Helper(
|
|
18
|
+
this.helper = new Helper(Workspace.UISourceCode.DecoratorType.PERFORMANCE);
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
static instance(opts: {
|
|
@@ -50,7 +49,8 @@ export class Performance {
|
|
|
50
49
|
const lineInfo = node.positionTicks[j];
|
|
51
50
|
const line = lineInfo.line;
|
|
52
51
|
const time = lineInfo.ticks * sampleDuration;
|
|
53
|
-
|
|
52
|
+
// Since no column number is provided by legacy profile, default to 1 (beginning of line).
|
|
53
|
+
this.helper.addLocationData(target, node.url, {line, column: 1}, time);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -62,13 +62,14 @@ export class Performance {
|
|
|
62
62
|
this.helper.scheduleUpdate();
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
if (!profile.samples) {
|
|
65
|
+
if (!profile.samples || !profile.columns) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
for (let i = 1; i < profile.samples.length; ++i) {
|
|
70
70
|
const line = profile.lines[i];
|
|
71
|
-
|
|
71
|
+
const column = profile.columns?.[i];
|
|
72
|
+
if (!line || !column) {
|
|
72
73
|
continue;
|
|
73
74
|
}
|
|
74
75
|
const node = profile.nodeByIndex(i);
|
|
@@ -80,7 +81,7 @@ export class Performance {
|
|
|
80
81
|
continue;
|
|
81
82
|
}
|
|
82
83
|
const time = profile.timestamps[i] - profile.timestamps[i - 1];
|
|
83
|
-
this.helper.
|
|
84
|
+
this.helper.addLocationData(target, scriptIdOrUrl, {line, column}, time);
|
|
84
85
|
}
|
|
85
86
|
this.helper.scheduleUpdate();
|
|
86
87
|
}
|
|
@@ -91,7 +92,7 @@ let memoryInstance: Memory;
|
|
|
91
92
|
export class Memory {
|
|
92
93
|
private readonly helper: Helper;
|
|
93
94
|
private constructor() {
|
|
94
|
-
this.helper = new Helper(
|
|
95
|
+
this.helper = new Helper(Workspace.UISourceCode.DecoratorType.MEMORY);
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
static instance(opts: {
|
|
@@ -124,43 +125,55 @@ export class Memory {
|
|
|
124
125
|
return;
|
|
125
126
|
}
|
|
126
127
|
const line = node.callFrame.lineNumber + 1;
|
|
127
|
-
|
|
128
|
+
// Since no column number is provided by the heap profile, default to 1 (beginning of line).
|
|
129
|
+
helper.addLocationData(target, script, {line, column: 1}, node.selfSize);
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
}
|
|
131
133
|
|
|
132
134
|
export class Helper {
|
|
133
|
-
private readonly type:
|
|
135
|
+
private readonly type: Workspace.UISourceCode.DecoratorType;
|
|
134
136
|
private readonly locationPool = new Bindings.LiveLocation.LiveLocationPool();
|
|
135
137
|
private updateTimer: number|null = null;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
/**
|
|
139
|
+
* Given a location in a script (with line and column numbers being 1-based) stores
|
|
140
|
+
* the time spent at that location in a performance profile.
|
|
141
|
+
*/
|
|
142
|
+
private locationData =
|
|
143
|
+
new Map<SDK.Target.Target|null, Map<Platform.DevToolsPath.UrlString|number, Map<number, Map<number, number>>>>();
|
|
144
|
+
constructor(type: Workspace.UISourceCode.DecoratorType) {
|
|
140
145
|
this.type = type;
|
|
141
146
|
this.reset();
|
|
142
147
|
}
|
|
143
148
|
|
|
144
149
|
reset(): void {
|
|
145
150
|
// The second map uses string keys for script URLs and numbers for scriptId.
|
|
146
|
-
this.
|
|
151
|
+
this.locationData = new Map();
|
|
147
152
|
this.scheduleUpdate();
|
|
148
153
|
}
|
|
149
154
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
155
|
+
/**
|
|
156
|
+
* Stores the time taken running a given script location (line and column)
|
|
157
|
+
*/
|
|
158
|
+
addLocationData(
|
|
159
|
+
target: SDK.Target.Target|null, scriptIdOrUrl: Platform.DevToolsPath.UrlString|number,
|
|
160
|
+
{line, column}: {line: number, column: number}, data: number): void {
|
|
161
|
+
let targetData = this.locationData.get(target);
|
|
154
162
|
if (!targetData) {
|
|
155
163
|
targetData = new Map();
|
|
156
|
-
this.
|
|
164
|
+
this.locationData.set(target, targetData);
|
|
157
165
|
}
|
|
158
166
|
let scriptData = targetData.get(scriptIdOrUrl);
|
|
159
167
|
if (!scriptData) {
|
|
160
168
|
scriptData = new Map();
|
|
161
169
|
targetData.set(scriptIdOrUrl, scriptData);
|
|
162
170
|
}
|
|
163
|
-
|
|
171
|
+
let lineData = scriptData.get(line);
|
|
172
|
+
if (!lineData) {
|
|
173
|
+
lineData = new Map();
|
|
174
|
+
scriptData.set(line, lineData);
|
|
175
|
+
}
|
|
176
|
+
lineData.set(column, (lineData.get(column) || 0) + data);
|
|
164
177
|
}
|
|
165
178
|
|
|
166
179
|
scheduleUpdate(): void {
|
|
@@ -176,10 +189,9 @@ export class Helper {
|
|
|
176
189
|
private async doUpdate(): Promise<void> {
|
|
177
190
|
this.locationPool.disposeAll();
|
|
178
191
|
// Map from sources to line->value profile maps.
|
|
179
|
-
const decorationsBySource = new Map<Workspace.UISourceCode.UISourceCode, Map<number, number
|
|
192
|
+
const decorationsBySource = new Map<Workspace.UISourceCode.UISourceCode, Map<number, Map<number, number>>>();
|
|
180
193
|
const pending: Array<Promise<void>> = [];
|
|
181
|
-
|
|
182
|
-
for (const [target, scriptToLineMap] of this.lineData) {
|
|
194
|
+
for (const [target, scriptToLineMap] of this.locationData) {
|
|
183
195
|
const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;
|
|
184
196
|
for (const [scriptIdOrUrl, lineToDataMap] of scriptToLineMap) {
|
|
185
197
|
// debuggerModel is null when the profile is loaded from file.
|
|
@@ -187,23 +199,34 @@ export class Helper {
|
|
|
187
199
|
const workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
|
188
200
|
if (debuggerModel) {
|
|
189
201
|
const workspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
|
|
190
|
-
for (const
|
|
191
|
-
|
|
192
|
-
const data
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
for (const [lineNumber, lineData] of lineToDataMap) {
|
|
203
|
+
// lineData contains profiling data by column.
|
|
204
|
+
for (const [columnNumber, data] of lineData) {
|
|
205
|
+
const zeroBasedLine = lineNumber - 1;
|
|
206
|
+
const zeroBasedColumn = columnNumber - 1;
|
|
207
|
+
if (target) {
|
|
208
|
+
const rawLocation = typeof scriptIdOrUrl === 'string' ?
|
|
209
|
+
debuggerModel.createRawLocationByURL(scriptIdOrUrl, zeroBasedLine, zeroBasedColumn || 0) :
|
|
210
|
+
debuggerModel.createRawLocationByScriptId(
|
|
211
|
+
String(scriptIdOrUrl) as Protocol.Runtime.ScriptId, zeroBasedLine, zeroBasedColumn || 0);
|
|
212
|
+
if (rawLocation) {
|
|
213
|
+
pending.push(workspaceBinding.rawLocationToUILocation(rawLocation).then(uiLocation => {
|
|
214
|
+
if (uiLocation) {
|
|
215
|
+
let lineMap = decorationsBySource.get(uiLocation.uiSourceCode);
|
|
216
|
+
if (!lineMap) {
|
|
217
|
+
lineMap = new Map<number, Map<number, number>>();
|
|
218
|
+
decorationsBySource.set(uiLocation.uiSourceCode, lineMap);
|
|
219
|
+
}
|
|
220
|
+
let columnMap = lineMap.get(lineNumber);
|
|
221
|
+
if (!columnMap) {
|
|
222
|
+
columnMap = new Map<number, number>();
|
|
223
|
+
lineMap.set(lineNumber, columnMap);
|
|
224
|
+
}
|
|
225
|
+
columnMap.set((zeroBasedColumn || 0) + 1, data);
|
|
226
|
+
}
|
|
227
|
+
}));
|
|
205
228
|
}
|
|
206
|
-
}
|
|
229
|
+
}
|
|
207
230
|
}
|
|
208
231
|
}
|
|
209
232
|
} else if (typeof scriptIdOrUrl === 'string') {
|
|
@@ -176,7 +176,7 @@ export class Window extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
176
176
|
|
|
177
177
|
this.parentElement.addEventListener('wheel', this.onMouseWheel.bind(this), true);
|
|
178
178
|
this.parentElement.addEventListener('dblclick', this.resizeWindowMaximum.bind(this), true);
|
|
179
|
-
|
|
179
|
+
UI.DOMUtilities.appendStyle(this.parentElement, overviewGridStyles);
|
|
180
180
|
|
|
181
181
|
this.leftResizeElement = parentElement.createChild('div', 'overview-grid-window-resizer');
|
|
182
182
|
UI.UIUtils.installDragHandle(
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
-
import * as Platform from '../../../../core/platform/platform.js';
|
|
37
36
|
import type * as NetworkTimeCalculator from '../../../../models/network_time_calculator/network_time_calculator.js';
|
|
37
|
+
import * as UI from '../../legacy.js';
|
|
38
38
|
import * as ThemeSupport from '../../theme_support/theme_support.js';
|
|
39
39
|
|
|
40
40
|
import {DEFAULT_FONT_SIZE, getFontFamilyForCanvas} from './Font.js';
|
|
@@ -51,7 +51,7 @@ export class TimelineGrid {
|
|
|
51
51
|
|
|
52
52
|
constructor() {
|
|
53
53
|
this.element = document.createElement('div');
|
|
54
|
-
|
|
54
|
+
UI.DOMUtilities.appendStyle(this.element, timelineGridStyles);
|
|
55
55
|
|
|
56
56
|
this.#dividersElement = this.element.createChild('div', 'resources-dividers');
|
|
57
57
|
|
|
@@ -121,7 +121,7 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
121
121
|
private readonly lazyContent: () => Promise<TextUtils.ContentData.ContentDataOrError>;
|
|
122
122
|
private prettyInternal: boolean;
|
|
123
123
|
private rawContent: string|CodeMirror.Text|null;
|
|
124
|
-
|
|
124
|
+
protected formattedMap: Formatter.ScriptFormatter.FormatterSourceMapping|null;
|
|
125
125
|
private readonly prettyToggle: UI.Toolbar.ToolbarToggle;
|
|
126
126
|
private shouldAutoPrettyPrint: boolean;
|
|
127
127
|
private readonly progressToolbarItem: UI.Toolbar.ToolbarItem;
|
|
@@ -400,6 +400,7 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
400
400
|
newSelection = textEditor.createSelection(
|
|
401
401
|
{lineNumber: start[0], columnNumber: start[1]}, {lineNumber: end[0], columnNumber: end[1]});
|
|
402
402
|
} else {
|
|
403
|
+
this.formattedMap = null;
|
|
403
404
|
await this.setContent(this.rawContent || '');
|
|
404
405
|
this.baseDoc = textEditor.state.doc;
|
|
405
406
|
const start = this.prettyToRawLocation(startPos.lineNumber, startPos.columnNumber);
|
|
@@ -1051,12 +1052,6 @@ export interface Transformer {
|
|
|
1051
1052
|
};
|
|
1052
1053
|
}
|
|
1053
1054
|
|
|
1054
|
-
export const enum DecoratorType {
|
|
1055
|
-
PERFORMANCE = 'performance',
|
|
1056
|
-
MEMORY = 'memory',
|
|
1057
|
-
COVERAGE = 'coverage',
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
1055
|
const config = {
|
|
1061
1056
|
editable: new CodeMirror.Compartment(),
|
|
1062
1057
|
language: new CodeMirror.Compartment(),
|
|
@@ -1135,8 +1130,7 @@ const searchHighlighter = CodeMirror.ViewPlugin.fromClass(class {
|
|
|
1135
1130
|
}
|
|
1136
1131
|
if (match[0].length) {
|
|
1137
1132
|
const start = pos + match.index, end = start + match[0].length;
|
|
1138
|
-
const current =
|
|
1139
|
-
active.currentRange && active.currentRange.from === start && active.currentRange.to === end;
|
|
1133
|
+
const current = active.currentRange?.from === start && active.currentRange.to === end;
|
|
1140
1134
|
builder.add(start, end, current ? currentSearchMatchDeco : searchMatchDeco);
|
|
1141
1135
|
} else {
|
|
1142
1136
|
active.regexp.regex.lastIndex = match.index + 1;
|