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
|
@@ -675,7 +675,7 @@ Network requests data:
|
|
|
675
675
|
|
|
676
676
|
static callFrameDataFormatDescription = `Each call frame is presented in the following format:
|
|
677
677
|
|
|
678
|
-
'id;eventKey;name;duration;selfTime;urlIndex;childRange;[S]'
|
|
678
|
+
'id;eventKey;name;duration;selfTime;urlIndex;childRange;[line];[column];[S]'
|
|
679
679
|
|
|
680
680
|
Key definitions:
|
|
681
681
|
|
|
@@ -686,15 +686,17 @@ Key definitions:
|
|
|
686
686
|
* selfTime: The time spent directly within the call frame, excluding its children's execution.
|
|
687
687
|
* urlIndex: Index referencing the "All URLs" list. Empty if no specific script URL is associated.
|
|
688
688
|
* childRange: Specifies the direct children of this node using their IDs. If empty ('' or 'S' at the end), the node has no children. If a single number (e.g., '4'), the node has one child with that ID. If in the format 'firstId-lastId' (e.g., '4-5'), it indicates a consecutive range of child IDs from 'firstId' to 'lastId', inclusive.
|
|
689
|
+
* line: An optional field for a call frame's line number. This is where the function is defined.
|
|
690
|
+
* column: An optional field for a call frame's column number. This is where the function is defined.
|
|
689
691
|
* S: _Optional_. The letter 'S' terminates the line if that call frame was selected by the user.
|
|
690
692
|
|
|
691
693
|
Example Call Tree:
|
|
692
694
|
|
|
693
|
-
1;r-123;main;500;100;;
|
|
694
|
-
2;r-124;update;200;50;;3
|
|
695
|
-
3;p-49575-15428179-2834-374;animate;150;20;0;4-5;S
|
|
696
|
-
4;p-49575-15428179-3505-1162;calculatePosition;80;80;;
|
|
697
|
-
5;p-49575-15428179-5391-2767;applyStyles;50;50;;
|
|
695
|
+
1;r-123;main;500;100;0;1;;
|
|
696
|
+
2;r-124;update;200;50;;3;0;1;
|
|
697
|
+
3;p-49575-15428179-2834-374;animate;150;20;0;4-5;0;1;S
|
|
698
|
+
4;p-49575-15428179-3505-1162;calculatePosition;80;80;0;1;;
|
|
699
|
+
5;p-49575-15428179-5391-2767;applyStyles;50;50;0;1;;
|
|
698
700
|
`;
|
|
699
701
|
|
|
700
702
|
/**
|
|
@@ -9,14 +9,14 @@ Content:
|
|
|
9
9
|
|
|
10
10
|
# Call tree:
|
|
11
11
|
|
|
12
|
-
1;p-1-1-0-2;(anonymous);2370;;0;2
|
|
13
|
-
2;p-1-1-0-3;executeUserEntryPoint;2370;;1;3
|
|
14
|
-
3;p-1-1-0-4;Module._load;2370;;2;4
|
|
15
|
-
4;p-1-1-0-5;Module.load;2370;;2;5
|
|
16
|
-
5;p-1-1-0-6;Module._extensions..js;2370;;2;6
|
|
17
|
-
6;p-1-1-0-7;Module._compile;2370;;2;7
|
|
18
|
-
7;p-1-1-0-8;callAndPauseOnStart;2370;;;8
|
|
19
|
-
8;p-1-1-0-9;(anonymous);2370;2370;3;
|
|
12
|
+
1;p-1-1-0-2;(anonymous);2370;;0;2;0;0
|
|
13
|
+
2;p-1-1-0-3;executeUserEntryPoint;2370;;1;3;126;30
|
|
14
|
+
3;p-1-1-0-4;Module._load;2370;;2;4;949;23
|
|
15
|
+
4;p-1-1-0-5;Module.load;2370;;2;5;1193;32
|
|
16
|
+
5;p-1-1-0-6;Module._extensions..js;2370;;2;6;1388;36
|
|
17
|
+
6;p-1-1-0-7;Module._compile;2370;;2;7;1329;36
|
|
18
|
+
7;p-1-1-0-8;callAndPauseOnStart;2370;;;8;;;S
|
|
19
|
+
8;p-1-1-0-9;(anonymous);2370;2370;3;;0;0
|
|
20
20
|
=== end content
|
|
21
21
|
|
|
22
22
|
Title: AICallTree serializes a simple tree
|
|
@@ -27,12 +27,12 @@ Content:
|
|
|
27
27
|
|
|
28
28
|
# Call tree:
|
|
29
29
|
|
|
30
|
-
1;r-36071;Task;0.2;;;2
|
|
31
|
-
2;r-36072;Timer fired;0.2;;;3
|
|
32
|
-
3;r-36076;Function call;0.2;;0;4
|
|
33
|
-
4;p-74406-259-16342-528;_ds.q.ns;0.2;;0;5;S
|
|
34
|
-
5;p-74406-259-16342-529;clearTimeout;0.2;0;;6
|
|
35
|
-
6;r-36082;Recalculate style;0.2;0.2;;
|
|
30
|
+
1;r-36071;Task;0.2;;;2;;
|
|
31
|
+
2;r-36072;Timer fired;0.2;;;3;;
|
|
32
|
+
3;r-36076;Function call;0.2;;0;4;190;175
|
|
33
|
+
4;p-74406-259-16342-528;_ds.q.ns;0.2;;0;5;190;175;S
|
|
34
|
+
5;p-74406-259-16342-529;clearTimeout;0.2;0;;6;;
|
|
35
|
+
6;r-36082;Recalculate style;0.2;0.2;0;;136;87
|
|
36
36
|
=== end content
|
|
37
37
|
|
|
38
38
|
Title: AICallTree serializes a simple tree in a concise format
|
|
@@ -43,12 +43,12 @@ Content:
|
|
|
43
43
|
|
|
44
44
|
# Call tree:
|
|
45
45
|
|
|
46
|
-
1;r-36071;Task;0.2;;;2
|
|
47
|
-
2;r-36072;Timer fired;0.2;;;3
|
|
48
|
-
3;r-36076;Function call;0.2;;0;4
|
|
49
|
-
4;p-74406-259-16342-528;_ds.q.ns;0.2;;0;5;S
|
|
50
|
-
5;p-74406-259-16342-529;clearTimeout;0.2;0;;6
|
|
51
|
-
6;r-36082;Recalculate style;0.2;0.2;;
|
|
46
|
+
1;r-36071;Task;0.2;;;2;;
|
|
47
|
+
2;r-36072;Timer fired;0.2;;;3;;
|
|
48
|
+
3;r-36076;Function call;0.2;;0;4;190;175
|
|
49
|
+
4;p-74406-259-16342-528;_ds.q.ns;0.2;;0;5;190;175;S
|
|
50
|
+
5;p-74406-259-16342-529;clearTimeout;0.2;0;;6;;
|
|
51
|
+
6;r-36082;Recalculate style;0.2;0.2;0;;136;87
|
|
52
52
|
=== end content
|
|
53
53
|
|
|
54
54
|
Title: AICallTree serializes a tree in a concise format
|
|
@@ -59,17 +59,17 @@ Content:
|
|
|
59
59
|
|
|
60
60
|
# Call tree:
|
|
61
61
|
|
|
62
|
-
1;r-5764;Task;0.9;0;;2
|
|
63
|
-
2;r-5765;Timer fired;0.9;0;;3
|
|
64
|
-
3;r-5766;Function call;0.9;0.1;0;4
|
|
65
|
-
4;p-73704-775-2873-705;(anonymous);0.8;;0;5
|
|
66
|
-
5;p-73704-775-2873-706;(anonymous);0.8;;0;6-8
|
|
67
|
-
6;p-73704-775-2873-707;Ot.getEntriesByType;0.1;;0;8
|
|
68
|
-
7;p-73704-775-2874-709;le.createOobTrace;0.6;0.2;0;9-11
|
|
69
|
-
8;p-73704-775-2873-708;getEntriesByType;0.1;0.1
|
|
70
|
-
9;p-73704-775-2875-710;le;0.1;0.1;0;
|
|
71
|
-
10;p-73704-775-2877-711;ie;0.2;;0;11-13
|
|
72
|
-
11;p-73704-775-2877-712;Ot.requiredApisAvailable;0.2;0.2;0;
|
|
73
|
-
12;p-73704-775-2879-713;oe;0;;0;13
|
|
74
|
-
13;p-73704-775-2879-714;setTimeout;0;0
|
|
62
|
+
1;r-5764;Task;0.9;0;;2;;;S
|
|
63
|
+
2;r-5765;Timer fired;0.9;0;;3;;
|
|
64
|
+
3;r-5766;Function call;0.9;0.1;0;4;0;32324
|
|
65
|
+
4;p-73704-775-2873-705;(anonymous);0.8;;0;5;0;32324
|
|
66
|
+
5;p-73704-775-2873-706;(anonymous);0.8;;0;6-8;0;32342
|
|
67
|
+
6;p-73704-775-2873-707;Ot.getEntriesByType;0.1;;0;8;0;20337
|
|
68
|
+
7;p-73704-775-2874-709;le.createOobTrace;0.6;0.2;0;9-11;0;30481
|
|
69
|
+
8;p-73704-775-2873-708;getEntriesByType;0.1;0.1;;;;
|
|
70
|
+
9;p-73704-775-2875-710;le;0.1;0.1;0;;0;31269
|
|
71
|
+
10;p-73704-775-2877-711;ie;0.2;;0;11-13;0;25861
|
|
72
|
+
11;p-73704-775-2877-712;Ot.requiredApisAvailable;0.2;0.2;0;;0;20761
|
|
73
|
+
12;p-73704-775-2879-713;oe;0;;0;13;0;26165
|
|
74
|
+
13;p-73704-775-2879-714;setTimeout;0;0;;;;
|
|
75
75
|
=== end content
|
|
@@ -286,10 +286,12 @@ export class AICallTree {
|
|
|
286
286
|
* 5. `urlIndex`: An index referencing a URL in the `allUrls` array. If no URL is present, this is an empty string.
|
|
287
287
|
* 6. `childRange`: A string indicating the range of IDs for the node's children. Children should always have consecutive IDs.
|
|
288
288
|
* If there is only one child, it's a single ID.
|
|
289
|
-
* 7. `[
|
|
289
|
+
* 7. `[line]`: An optional field for a call frame's line number.
|
|
290
|
+
* 8. `[column]`: An optional field for a call frame's column number.
|
|
291
|
+
* 9. `[S]`: An optional marker indicating that this node is the selected node.
|
|
290
292
|
*
|
|
291
293
|
* Example:
|
|
292
|
-
* `1;Parse HTML;2.5;0.3;0;2-5;S`
|
|
294
|
+
* `1;Parse HTML;2.5;0.3;0;2-5;10;11;S`
|
|
293
295
|
* This represents:
|
|
294
296
|
* - Node ID 1
|
|
295
297
|
* - Name "Parse HTML"
|
|
@@ -297,6 +299,7 @@ export class AICallTree {
|
|
|
297
299
|
* - Self time of 0.3ms
|
|
298
300
|
* - URL index 0 (meaning the URL is the first one in the `allUrls` array)
|
|
299
301
|
* - Child range of IDs 2 to 5
|
|
302
|
+
* - Line, column is 10:11
|
|
300
303
|
* - This node is the selected node (S marker)
|
|
301
304
|
*/
|
|
302
305
|
stringifyNode(
|
|
@@ -331,7 +334,8 @@ export class AICallTree {
|
|
|
331
334
|
const selfTimeStr = roundToTenths(node.selfTime);
|
|
332
335
|
|
|
333
336
|
// 6. URL Index
|
|
334
|
-
const
|
|
337
|
+
const location = SourceMapsResolver.SourceMapsResolver.codeLocationForEntry(parsedTrace, event);
|
|
338
|
+
const url = location?.url;
|
|
335
339
|
let urlIndexStr = '';
|
|
336
340
|
if (url) {
|
|
337
341
|
const existingIndex = allUrls.indexOf(url);
|
|
@@ -361,6 +365,8 @@ export class AICallTree {
|
|
|
361
365
|
line += ';' + selfTimeStr;
|
|
362
366
|
line += ';' + urlIndexStr;
|
|
363
367
|
line += ';' + childRangeStr;
|
|
368
|
+
line += ';' + (location?.line ?? '');
|
|
369
|
+
line += ';' + (location?.column ?? '');
|
|
364
370
|
|
|
365
371
|
if (selectedMarker) {
|
|
366
372
|
line += ';' + selectedMarker;
|
|
@@ -63,7 +63,7 @@ export class CSSWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<S
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
modelAdded(cssModel: SDK.CSSModel.CSSModel): void {
|
|
66
|
-
this.#modelToInfo.set(cssModel, new ModelInfo(cssModel, this.#resourceMapping));
|
|
66
|
+
this.#modelToInfo.set(cssModel, new ModelInfo(cssModel, this.#resourceMapping, this));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
modelRemoved(cssModel: SDK.CSSModel.CSSModel): void {
|
|
@@ -157,7 +157,8 @@ export class ModelInfo {
|
|
|
157
157
|
#sassSourceMapping: SASSSourceMapping;
|
|
158
158
|
readonly #locations: Platform.MapUtilities.Multimap<SDK.CSSStyleSheetHeader.CSSStyleSheetHeader, LiveLocation>;
|
|
159
159
|
readonly #unboundLocations: Platform.MapUtilities.Multimap<Platform.DevToolsPath.UrlString, LiveLocation>;
|
|
160
|
-
constructor(
|
|
160
|
+
constructor(
|
|
161
|
+
cssModel: SDK.CSSModel.CSSModel, resourceMapping: ResourceMapping, cssWorkspaceBinding: CSSWorkspaceBinding) {
|
|
161
162
|
this.#eventListeners = [
|
|
162
163
|
cssModel.addEventListener(
|
|
163
164
|
SDK.CSSModel.Events.StyleSheetAdded,
|
|
@@ -176,7 +177,8 @@ export class ModelInfo {
|
|
|
176
177
|
this.#resourceMapping = resourceMapping;
|
|
177
178
|
this.#stylesSourceMapping = new StylesSourceMapping(cssModel, resourceMapping.workspace);
|
|
178
179
|
const sourceMapManager = cssModel.sourceMapManager();
|
|
179
|
-
this.#sassSourceMapping =
|
|
180
|
+
this.#sassSourceMapping =
|
|
181
|
+
new SASSSourceMapping(cssModel.target(), sourceMapManager, resourceMapping.workspace, cssWorkspaceBinding);
|
|
180
182
|
|
|
181
183
|
this.#locations = new Platform.MapUtilities.Multimap();
|
|
182
184
|
this.#unboundLocations = new Platform.MapUtilities.Multimap();
|
|
@@ -10,7 +10,7 @@ import * as TextUtils from '../text_utils/text_utils.js';
|
|
|
10
10
|
import * as Workspace from '../workspace/workspace.js';
|
|
11
11
|
|
|
12
12
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
|
13
|
-
import {CSSWorkspaceBinding,
|
|
13
|
+
import type {CSSWorkspaceBinding, SourceMapping} from './CSSWorkspaceBinding.js';
|
|
14
14
|
import {NetworkProject} from './NetworkProject.js';
|
|
15
15
|
|
|
16
16
|
export class SASSSourceMapping implements SourceMapping {
|
|
@@ -18,12 +18,14 @@ export class SASSSourceMapping implements SourceMapping {
|
|
|
18
18
|
readonly #project: ContentProviderBasedProject;
|
|
19
19
|
readonly #eventListeners: Common.EventTarget.EventDescriptor[];
|
|
20
20
|
readonly #bindings: Map<string, Binding>;
|
|
21
|
+
readonly #cssWorkspaceBinding: CSSWorkspaceBinding;
|
|
21
22
|
|
|
22
23
|
constructor(
|
|
23
24
|
target: SDK.Target.Target,
|
|
24
25
|
sourceMapManager: SDK.SourceMapManager.SourceMapManager<SDK.CSSStyleSheetHeader.CSSStyleSheetHeader>,
|
|
25
|
-
workspace: Workspace.Workspace.WorkspaceImpl) {
|
|
26
|
+
workspace: Workspace.Workspace.WorkspaceImpl, cssWorkspaceBinding: CSSWorkspaceBinding) {
|
|
26
27
|
this.#sourceMapManager = sourceMapManager;
|
|
28
|
+
this.#cssWorkspaceBinding = cssWorkspaceBinding;
|
|
27
29
|
this.#project = new ContentProviderBasedProject(
|
|
28
30
|
workspace, 'cssSourceMaps:' + target.id(), Workspace.Workspace.projectTypes.Network, '',
|
|
29
31
|
false /* isServiceProject */);
|
|
@@ -58,7 +60,7 @@ export class SASSSourceMapping implements SourceMapping {
|
|
|
58
60
|
}
|
|
59
61
|
binding.addSourceMap(sourceMap, header.frameId);
|
|
60
62
|
}
|
|
61
|
-
await
|
|
63
|
+
await this.#cssWorkspaceBinding.updateLocations(header);
|
|
62
64
|
this.sourceMapAttachedForTest(sourceMap);
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -78,7 +80,7 @@ export class SASSSourceMapping implements SourceMapping {
|
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
|
-
await
|
|
83
|
+
await this.#cssWorkspaceBinding.updateLocations(header);
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
rawLocationToUILocation(rawLocation: SDK.CSSModel.CSSLocation): Workspace.UISourceCode.UILocation|null {
|
|
@@ -56,7 +56,15 @@ export class CPUProfileDataModel extends ProfileTreeModel {
|
|
|
56
56
|
* for CPU profiles coming from traces.
|
|
57
57
|
*/
|
|
58
58
|
traceIds?: Record<string, number>;
|
|
59
|
+
/**
|
|
60
|
+
* Each item in the `lines` array contains the script line executing
|
|
61
|
+
* when the sample in that array position was taken.
|
|
62
|
+
*/
|
|
59
63
|
lines?: number[];
|
|
64
|
+
/**
|
|
65
|
+
* Same as `lines` above, but with the script column.
|
|
66
|
+
*/
|
|
67
|
+
columns?: number[];
|
|
60
68
|
totalHitCount: number;
|
|
61
69
|
profileHead: CPUProfileNode;
|
|
62
70
|
/**
|
|
@@ -90,14 +98,8 @@ export class CPUProfileDataModel extends ProfileTreeModel {
|
|
|
90
98
|
this.traceIds = profile.traceIds;
|
|
91
99
|
this.samples = profile.samples;
|
|
92
100
|
|
|
93
|
-
// Lines are available only in profiles coming from tracing.
|
|
94
|
-
// Elements in the lines array have a 1 to 1 correspondence with
|
|
95
|
-
// samples, by array position. They can be 1 or 0 and indicate if
|
|
96
|
-
// there is line data for a given sample, i.e. if a given sample
|
|
97
|
-
// needs to be included to calculate the line level execution time
|
|
98
|
-
// data, which we show in the sources panel after recording a
|
|
99
|
-
// profile.
|
|
100
101
|
this.lines = profile.lines;
|
|
102
|
+
this.columns = profile.columns;
|
|
101
103
|
this.totalHitCount = 0;
|
|
102
104
|
this.profileHead = this.translateProfileTree(profile.nodes);
|
|
103
105
|
this.initialize(this.profileHead);
|
|
@@ -557,6 +559,7 @@ export type ExtendedProfileNode = Protocol.Profiler.ProfileNode&{parent?: number
|
|
|
557
559
|
export type ExtendedProfile = Protocol.Profiler.Profile&{
|
|
558
560
|
nodes: Protocol.Profiler.ProfileNode[] | ExtendedProfileNode[],
|
|
559
561
|
lines?: number[],
|
|
562
|
+
columns?: number[],
|
|
560
563
|
/**
|
|
561
564
|
* A sample can be manually collected with v8::CpuProfiler::collectSample.
|
|
562
565
|
* When this is done an id (trace id) can be passed to the API to
|
|
@@ -87,6 +87,7 @@ export interface CrUXResponse {
|
|
|
87
87
|
|
|
88
88
|
export type PageResult = Record<`${PageScope}-${DeviceScope}`, CrUXResponse|null>&{
|
|
89
89
|
warnings: string[],
|
|
90
|
+
normalizedUrl: string,
|
|
90
91
|
};
|
|
91
92
|
|
|
92
93
|
export interface OriginMapping {
|
|
@@ -194,10 +195,12 @@ export class CrUXManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
194
195
|
'url-PHONE': null,
|
|
195
196
|
'url-TABLET': null,
|
|
196
197
|
warnings: [],
|
|
198
|
+
normalizedUrl: '',
|
|
197
199
|
};
|
|
198
200
|
|
|
199
201
|
try {
|
|
200
202
|
const normalizedUrl = this.#normalizeUrl(pageUrl);
|
|
203
|
+
pageResult.normalizedUrl = normalizedUrl.href;
|
|
201
204
|
const promises: Array<Promise<void>> = [];
|
|
202
205
|
|
|
203
206
|
for (const pageScope of pageScopeList) {
|
|
@@ -250,11 +253,11 @@ export class CrUXManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
250
253
|
*/
|
|
251
254
|
async #getFieldDataForCurrentPage(): Promise<PageResult> {
|
|
252
255
|
const currentUrl = this.#mainDocumentUrl || await this.#getInspectedURL();
|
|
253
|
-
const
|
|
254
|
-
|
|
256
|
+
const normalizedUrl = this.#configSetting.get().overrideEnabled ? this.#configSetting.get().override || '' :
|
|
257
|
+
this.#getMappedUrl(currentUrl);
|
|
255
258
|
|
|
256
|
-
const result = await this.getFieldDataForPage(
|
|
257
|
-
if (currentUrl !==
|
|
259
|
+
const result = await this.getFieldDataForPage(normalizedUrl);
|
|
260
|
+
if (currentUrl !== normalizedUrl) {
|
|
258
261
|
result.warnings.push(i18nString(UIStrings.fieldOverrideWarning));
|
|
259
262
|
}
|
|
260
263
|
return result;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import * as
|
|
5
|
+
import type * as PlatformApi from '../../core/platform/api/api.js';
|
|
6
|
+
import * as Platform from '../../core/platform/platform.js';
|
|
6
7
|
import * as FormatterActions from '../../entrypoints/formatter_worker/FormatterActions.js'; // eslint-disable-line @devtools/es-modules-import
|
|
7
8
|
|
|
8
9
|
export {DefinitionKind, ScopeKind, type ScopeTreeNode} from '../../entrypoints/formatter_worker/FormatterActions.js';
|
|
@@ -11,7 +12,7 @@ let formatterWorkerPoolInstance: FormatterWorkerPool|undefined;
|
|
|
11
12
|
|
|
12
13
|
export class FormatterWorkerPool {
|
|
13
14
|
private taskQueue: Task[];
|
|
14
|
-
private workerTasks: Map<
|
|
15
|
+
private workerTasks: Map<PlatformApi.HostRuntime.Worker, Task|null>;
|
|
15
16
|
|
|
16
17
|
constructor() {
|
|
17
18
|
this.taskQueue = [];
|
|
@@ -42,9 +43,9 @@ export class FormatterWorkerPool {
|
|
|
42
43
|
formatterWorkerPoolInstance = undefined;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
private createWorker():
|
|
46
|
-
const worker =
|
|
47
|
-
new URL('../../entrypoints/formatter_worker/formatter_worker-entrypoint.js', import.meta.url));
|
|
46
|
+
private createWorker(): PlatformApi.HostRuntime.Worker {
|
|
47
|
+
const worker = Platform.HostRuntime.HOST_RUNTIME.createWorker(
|
|
48
|
+
new URL('../../entrypoints/formatter_worker/formatter_worker-entrypoint.js', import.meta.url).toString());
|
|
48
49
|
worker.onmessage = this.onWorkerMessage.bind(this, worker);
|
|
49
50
|
worker.onerror = this.onWorkerError.bind(this, worker);
|
|
50
51
|
return worker;
|
|
@@ -72,7 +73,8 @@ export class FormatterWorkerPool {
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
private onWorkerMessage(worker:
|
|
76
|
+
private onWorkerMessage(worker: PlatformApi.HostRuntime.Worker, event: PlatformApi.HostRuntime.WorkerMessageEvent):
|
|
77
|
+
void {
|
|
76
78
|
const task = this.workerTasks.get(worker);
|
|
77
79
|
if (!task) {
|
|
78
80
|
return;
|
|
@@ -87,7 +89,7 @@ export class FormatterWorkerPool {
|
|
|
87
89
|
task.callback(event.data ? event.data : null);
|
|
88
90
|
}
|
|
89
91
|
|
|
90
|
-
private onWorkerError(worker:
|
|
92
|
+
private onWorkerError(worker: PlatformApi.HostRuntime.Worker, event: Event): void {
|
|
91
93
|
console.error(event);
|
|
92
94
|
const task = this.workerTasks.get(worker);
|
|
93
95
|
worker.terminate();
|
|
@@ -71,7 +71,7 @@ export class ContrastCheckTrigger {
|
|
|
71
71
|
// Otherwise, it should be triggered when the page load event fires.
|
|
72
72
|
const response = await frame.resourceTreeModel().target().runtimeAgent().invoke_evaluate(
|
|
73
73
|
{expression: 'document.readyState', returnByValue: true});
|
|
74
|
-
if (response.result
|
|
74
|
+
if (response.result?.value === 'complete') {
|
|
75
75
|
this.#checkContrast(frame.resourceTreeModel());
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -129,8 +129,8 @@ export const genericFormDuplicateIdForInputError = {
|
|
|
129
129
|
}],
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
-
export const
|
|
133
|
-
file: '
|
|
132
|
+
export const genericFormAriaLabelledByToNonExistingIdError = {
|
|
133
|
+
file: 'genericFormAriaLabelledByToNonExistingIdError.md',
|
|
134
134
|
links: [{
|
|
135
135
|
link: 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label',
|
|
136
136
|
linkTitle: i18nLazyString(UIStrings.labelFormlementsPageTitle),
|
|
@@ -169,8 +169,8 @@ export const genericFormLabelForMatchesNonExistingIdError = {
|
|
|
169
169
|
}],
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
export const
|
|
173
|
-
file: '
|
|
172
|
+
export const genericFormLabelHasNeitherForNorNestedInputError = {
|
|
173
|
+
file: 'genericFormLabelHasNeitherForNorNestedInputError.md',
|
|
174
174
|
links: [{
|
|
175
175
|
link: 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label',
|
|
176
176
|
linkTitle: i18nLazyString(UIStrings.labelFormlementsPageTitle),
|
|
@@ -193,7 +193,10 @@ const issueDescriptions = new Map<Protocol.Audits.GenericIssueErrorType, LazyMar
|
|
|
193
193
|
genericFormAutocompleteAttributeEmptyError,
|
|
194
194
|
],
|
|
195
195
|
[Protocol.Audits.GenericIssueErrorType.FormDuplicateIdForInputError, genericFormDuplicateIdForInputError],
|
|
196
|
-
[
|
|
196
|
+
[
|
|
197
|
+
Protocol.Audits.GenericIssueErrorType.FormAriaLabelledByToNonExistingIdError,
|
|
198
|
+
genericFormAriaLabelledByToNonExistingIdError
|
|
199
|
+
],
|
|
197
200
|
[
|
|
198
201
|
Protocol.Audits.GenericIssueErrorType.FormEmptyIdAndNameAttributesForInputError,
|
|
199
202
|
genericFormEmptyIdAndNameAttributesForInputError,
|
|
@@ -207,8 +210,8 @@ const issueDescriptions = new Map<Protocol.Audits.GenericIssueErrorType, LazyMar
|
|
|
207
210
|
genericFormLabelForMatchesNonExistingIdError,
|
|
208
211
|
],
|
|
209
212
|
[
|
|
210
|
-
Protocol.Audits.GenericIssueErrorType.
|
|
211
|
-
|
|
213
|
+
Protocol.Audits.GenericIssueErrorType.FormLabelHasNeitherForNorNestedInputError,
|
|
214
|
+
genericFormLabelHasNeitherForNorNestedInputError,
|
|
212
215
|
],
|
|
213
216
|
[
|
|
214
217
|
Protocol.Audits.GenericIssueErrorType.FormInputHasWrongButWellIntendedAutocompleteValueError,
|
|
@@ -225,14 +228,14 @@ const issueTypes = new Map<Protocol.Audits.GenericIssueErrorType, IssueKind>([
|
|
|
225
228
|
[Protocol.Audits.GenericIssueErrorType.FormInputWithNoLabelError, IssueKind.IMPROVEMENT],
|
|
226
229
|
[Protocol.Audits.GenericIssueErrorType.FormAutocompleteAttributeEmptyError, IssueKind.PAGE_ERROR],
|
|
227
230
|
[Protocol.Audits.GenericIssueErrorType.FormDuplicateIdForInputError, IssueKind.PAGE_ERROR],
|
|
228
|
-
[Protocol.Audits.GenericIssueErrorType.
|
|
231
|
+
[Protocol.Audits.GenericIssueErrorType.FormAriaLabelledByToNonExistingIdError, IssueKind.IMPROVEMENT],
|
|
229
232
|
[Protocol.Audits.GenericIssueErrorType.FormEmptyIdAndNameAttributesForInputError, IssueKind.IMPROVEMENT],
|
|
230
233
|
[
|
|
231
234
|
Protocol.Audits.GenericIssueErrorType.FormInputAssignedAutocompleteValueToIdOrNameAttributeError,
|
|
232
235
|
IssueKind.IMPROVEMENT,
|
|
233
236
|
],
|
|
234
237
|
[Protocol.Audits.GenericIssueErrorType.FormLabelForMatchesNonExistingIdError, IssueKind.PAGE_ERROR],
|
|
235
|
-
[Protocol.Audits.GenericIssueErrorType.
|
|
238
|
+
[Protocol.Audits.GenericIssueErrorType.FormLabelHasNeitherForNorNestedInputError, IssueKind.IMPROVEMENT],
|
|
236
239
|
[Protocol.Audits.GenericIssueErrorType.FormInputHasWrongButWellIntendedAutocompleteValueError, IssueKind.IMPROVEMENT],
|
|
237
240
|
|
|
238
241
|
]);
|
|
@@ -9079,6 +9079,10 @@ export const NativeFunctions = [
|
|
|
9079
9079
|
name: "setBindGroup",
|
|
9080
9080
|
signatures: [["index","bindGroup","?dynamicOffsets"],["index","bindGroup","dynamicOffsetsData","dynamicOffsetsDataStart","dynamicOffsetsDataLength"]]
|
|
9081
9081
|
},
|
|
9082
|
+
{
|
|
9083
|
+
name: "setImmediates",
|
|
9084
|
+
signatures: [["rangeOffset","data","?dataOffset","?size"]]
|
|
9085
|
+
},
|
|
9082
9086
|
{
|
|
9083
9087
|
name: "writeBuffer",
|
|
9084
9088
|
signatures: [["buffer","bufferOffset","data","?dataElementOffset","?dataElementCount"],["buffer","bufferOffset","data","?dataByteOffset","?byteSize"]]
|
|
@@ -155,7 +155,7 @@ export class AutomaticFileSystemManager extends Common.ObjectWrapper.ObjectWrapp
|
|
|
155
155
|
let automaticFileSystem = this.#automaticFileSystem;
|
|
156
156
|
if (projectSettings.workspace) {
|
|
157
157
|
const {root, uuid} = projectSettings.workspace;
|
|
158
|
-
if (automaticFileSystem
|
|
158
|
+
if (automaticFileSystem?.root !== root || automaticFileSystem.uuid !== uuid) {
|
|
159
159
|
automaticFileSystem = Object.freeze({root, uuid, state: 'disconnected'});
|
|
160
160
|
}
|
|
161
161
|
} else if (automaticFileSystem !== null) {
|
|
@@ -217,9 +217,11 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
|
217
217
|
|
|
218
218
|
const timeDeltas = event.args.data?.timeDeltas || [];
|
|
219
219
|
const lines = event.args.data?.lines || Array(samples.length).fill(0);
|
|
220
|
+
const columns = event.args.data?.columns || Array(samples.length).fill(0);
|
|
220
221
|
cdpProfile.samples?.push(...samples);
|
|
221
222
|
cdpProfile.timeDeltas?.push(...timeDeltas);
|
|
222
223
|
cdpProfile.lines?.push(...lines);
|
|
224
|
+
cdpProfile.columns?.push(...columns);
|
|
223
225
|
|
|
224
226
|
if (traceIds) {
|
|
225
227
|
cdpProfile.traceIds ??= {};
|
|
@@ -270,6 +272,7 @@ function getOrCreatePreProcessedData(
|
|
|
270
272
|
samples: [],
|
|
271
273
|
timeDeltas: [],
|
|
272
274
|
lines: [],
|
|
275
|
+
columns: [],
|
|
273
276
|
},
|
|
274
277
|
profileId,
|
|
275
278
|
}));
|
|
@@ -577,6 +577,19 @@ export function getStackTraceTopCallFrameInEventPayload(event: Types.Events.Even
|
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
+
export function rawCallFrameForEntry(entry: Types.Events.Event): Protocol.Runtime.CallFrame|null {
|
|
581
|
+
if (Types.Events.isProfileCall(entry)) {
|
|
582
|
+
return entry.callFrame;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
const topCallFrame = getStackTraceTopCallFrameInEventPayload(entry);
|
|
586
|
+
if (topCallFrame) {
|
|
587
|
+
return topCallFrame as Protocol.Runtime.CallFrame;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
return null;
|
|
591
|
+
}
|
|
592
|
+
|
|
580
593
|
/**
|
|
581
594
|
* Given a 1-based call frame creates a 0-based one.
|
|
582
595
|
*/
|
|
@@ -92,6 +92,7 @@ export class SourceMapsResolver extends EventTarget {
|
|
|
92
92
|
if (resolvedCallFrameURL) {
|
|
93
93
|
return resolvedCallFrameURL;
|
|
94
94
|
}
|
|
95
|
+
|
|
95
96
|
// If no source mapping was found for an entry's URL, then default
|
|
96
97
|
// to the URL value contained in the event itself, if any.
|
|
97
98
|
const url = Trace.Handlers.Helpers.getNonResolvedURL(entry, parsedTrace.data);
|
|
@@ -101,6 +102,34 @@ export class SourceMapsResolver extends EventTarget {
|
|
|
101
102
|
return null;
|
|
102
103
|
}
|
|
103
104
|
|
|
105
|
+
static codeLocationForEntry(parsedTrace: Trace.TraceModel.ParsedTrace, entry: Trace.Types.Events.Event):
|
|
106
|
+
{url: Platform.DevToolsPath.UrlString, line?: number, column?: number}|null {
|
|
107
|
+
const uiLocation = SourceMapsResolver.resolvedCodeLocationForEntry(entry)?.devtoolsLocation;
|
|
108
|
+
if (uiLocation) {
|
|
109
|
+
return {url: uiLocation.uiSourceCode.url(), line: uiLocation.lineNumber, column: uiLocation.columnNumber};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// If no source mapping was found for an entry's URL, then default
|
|
113
|
+
// to the frame contained in the event itself, if any.
|
|
114
|
+
const rawCallFrame = Trace.Helpers.Trace.rawCallFrameForEntry(entry);
|
|
115
|
+
if (rawCallFrame) {
|
|
116
|
+
const line = rawCallFrame.lineNumber >= 0 ? rawCallFrame.lineNumber : undefined;
|
|
117
|
+
const column = rawCallFrame.columnNumber >= 0 ? rawCallFrame.columnNumber : undefined;
|
|
118
|
+
return {url: rawCallFrame.url as Platform.DevToolsPath.UrlString, line, column};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Lastly, look for just a url.
|
|
122
|
+
let url = Trace.Handlers.Helpers.getNonResolvedURL(entry, parsedTrace.data);
|
|
123
|
+
if (url) {
|
|
124
|
+
url = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(url)?.url() ?? url;
|
|
125
|
+
}
|
|
126
|
+
if (url) {
|
|
127
|
+
return {url};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
|
|
104
133
|
static storeResolvedCodeDataForCallFrame(
|
|
105
134
|
callFrame: Protocol.Runtime.CallFrame, resolvedCodeLocationData: ResolvedCodeLocationData): void {
|
|
106
135
|
const keyForCallFrame = this.keyForCodeLocation(callFrame);
|
|
@@ -257,8 +257,7 @@ export class IgnoreListManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
257
257
|
private async updateScriptRanges(script: SDK.Script.Script, sourceMap: SDK.SourceMap.SourceMap|undefined):
|
|
258
258
|
Promise<void> {
|
|
259
259
|
let hasIgnoreListedMappings = false;
|
|
260
|
-
if (!
|
|
261
|
-
script.sourceURL, {isContentScript: script.isContentScript()})) {
|
|
260
|
+
if (!this.isUserIgnoreListedURL(script.sourceURL, {isContentScript: script.isContentScript()})) {
|
|
262
261
|
hasIgnoreListedMappings =
|
|
263
262
|
sourceMap?.sourceURLs().some(
|
|
264
263
|
url => this.isUserIgnoreListedURL(url, {isKnownThirdParty: sourceMap.hasIgnoreListHint(url)})) ??
|
|
@@ -35,7 +35,9 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
35
35
|
#contentType: Common.ResourceType.ResourceType;
|
|
36
36
|
#requestContentPromise: Promise<TextUtils.ContentData.ContentDataOrError>|null = null;
|
|
37
37
|
#decorations = new Map<string, any>();
|
|
38
|
+
#formattedDecorations = new Map<string, any>();
|
|
38
39
|
#hasCommits = false;
|
|
40
|
+
#prettied = false;
|
|
39
41
|
#messages: Set<Message>|null = null;
|
|
40
42
|
#content: TextUtils.ContentData.ContentDataOrError|null = null;
|
|
41
43
|
#forceLoadOnCheckContent = false;
|
|
@@ -497,6 +499,9 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
497
499
|
}
|
|
498
500
|
|
|
499
501
|
getDecorationData(type: string): any {
|
|
502
|
+
if (this.#prettied && this.#formattedDecorations.get(type)) {
|
|
503
|
+
return this.#formattedDecorations.get(type);
|
|
504
|
+
}
|
|
500
505
|
return this.#decorations.get(type);
|
|
501
506
|
}
|
|
502
507
|
|
|
@@ -508,6 +513,45 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
508
513
|
return this.#disableEdit;
|
|
509
514
|
}
|
|
510
515
|
|
|
516
|
+
formatChanged(format: {originalToFormatted(lineNumber: number, columnNumber?: number): number[]}|null): void {
|
|
517
|
+
if (this.#prettied === Boolean(format)) {
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
this.#prettied = Boolean(format);
|
|
521
|
+
if (!format) {
|
|
522
|
+
this.dispatchEventToListeners(Events.DecorationChanged, DecoratorType.PERFORMANCE);
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
const performanceDecorations = this.#decorations.get(DecoratorType.PERFORMANCE);
|
|
526
|
+
if (!performanceDecorations) {
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
let formattedPerformanceDecorations: Map<number, Map<number, number>> =
|
|
530
|
+
this.#formattedDecorations.get(DecoratorType.PERFORMANCE);
|
|
531
|
+
if (!formattedPerformanceDecorations) {
|
|
532
|
+
formattedPerformanceDecorations = new Map<number, Map<number, number>>();
|
|
533
|
+
this.#formattedDecorations.set(DecoratorType.PERFORMANCE, formattedPerformanceDecorations);
|
|
534
|
+
} else {
|
|
535
|
+
formattedPerformanceDecorations.clear();
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
for (const [lineNumber, columnData] of performanceDecorations) {
|
|
539
|
+
for (const [columnNumber, data] of columnData) {
|
|
540
|
+
const [formattedLineNumber, formattedColumnNumber] =
|
|
541
|
+
format.originalToFormatted(lineNumber - 1, columnNumber - 1);
|
|
542
|
+
const oneBasedFormattedLineNumber = formattedLineNumber + 1;
|
|
543
|
+
const oneBasedFormattedColumnNumber = formattedColumnNumber + 1;
|
|
544
|
+
let lineData = formattedPerformanceDecorations.get(oneBasedFormattedLineNumber);
|
|
545
|
+
if (!lineData) {
|
|
546
|
+
lineData = new Map();
|
|
547
|
+
formattedPerformanceDecorations.set(oneBasedFormattedLineNumber, lineData);
|
|
548
|
+
}
|
|
549
|
+
lineData.set(oneBasedFormattedColumnNumber, (lineData.get(oneBasedFormattedColumnNumber) || 0) + data);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
this.dispatchEventToListeners(Events.DecorationChanged, 'performance');
|
|
553
|
+
}
|
|
554
|
+
|
|
511
555
|
isIgnoreListed(): boolean {
|
|
512
556
|
return IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(this);
|
|
513
557
|
}
|
|
@@ -696,3 +740,9 @@ export class UISourceCodeMetadata {
|
|
|
696
740
|
this.contentSize = contentSize;
|
|
697
741
|
}
|
|
698
742
|
}
|
|
743
|
+
|
|
744
|
+
export const enum DecoratorType {
|
|
745
|
+
PERFORMANCE = 'performance',
|
|
746
|
+
MEMORY = 'memory',
|
|
747
|
+
COVERAGE = 'coverage',
|
|
748
|
+
}
|