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
package/.stylelintrc.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "stylelint-config-standard",
|
|
3
|
-
"plugins": [
|
|
3
|
+
"plugins": [
|
|
4
|
+
"./scripts/stylelint_rules/lib/use_theme_colors.mjs",
|
|
5
|
+
"./scripts/stylelint_rules/lib/check_highlight_scope.mjs"
|
|
6
|
+
],
|
|
4
7
|
"rules": {
|
|
5
8
|
"plugin/use_theme_colors": true,
|
|
9
|
+
"plugin/check_highlight_scope": true,
|
|
6
10
|
"alpha-value-notation": "percentage",
|
|
7
11
|
"color-function-notation": "modern",
|
|
8
12
|
"hue-degree-notation": "angle",
|
|
@@ -217,12 +217,12 @@ Below is a detailed description of what happens in such a build:
|
|
|
217
217
|
- It does a `bot_update` of its own
|
|
218
218
|
- Generates the GN files (`gn` step)
|
|
219
219
|
- Compiles (`compile`) the project
|
|
220
|
-
- Reads the
|
|
220
|
+
- Reads the e2e test lists
|
|
221
221
|
- Creates a CAS archive with project and the compilation output
|
|
222
222
|
- Outputs the `compilator_properties`
|
|
223
223
|
- Once the compilator is done we read the `compilator_properties` to find
|
|
224
224
|
- the `cas_digest` to be used when triggering tests on swarming
|
|
225
|
-
- the `
|
|
225
|
+
- the `e2e_test_list` for sharding the e2e tests execution
|
|
226
226
|
- Write the e2e test list at the location where building would have written it
|
|
227
227
|
- The default test run phase starts at `Run tests` step:
|
|
228
228
|
- We trigger all tests on swarming in parallel (`Trigger Tests`) substep.
|
|
@@ -29,7 +29,7 @@ tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/design
|
|
|
29
29
|
name e.g. `--sys-color-error-container`). They reference palette tokens and
|
|
30
30
|
incorporate light / dark mode switches and should be used in the code directly.
|
|
31
31
|
You can view all system tokens in their light and dark variant when running the
|
|
32
|
-
component server
|
|
32
|
+
component server on our [component documentation page](https://chromedevtools.github.io/devtools-frontend/#ThemeColors).
|
|
33
33
|
|
|
34
34
|
[**Application
|
|
35
35
|
tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/application_tokens.css)
|
package/eslint.config.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import jsdocPlugin from 'eslint-plugin-jsdoc';
|
|
|
10
10
|
import litPlugin from 'eslint-plugin-lit';
|
|
11
11
|
import mochaPlugin from 'eslint-plugin-mocha';
|
|
12
12
|
import globals from 'globals';
|
|
13
|
-
import { join } from 'path';
|
|
13
|
+
import { join } from 'node:path';
|
|
14
14
|
import typescriptEslint from 'typescript-eslint';
|
|
15
15
|
|
|
16
16
|
import devToolsPlugin from './scripts/eslint_rules/plugin.mjs';
|
|
@@ -284,6 +284,7 @@ export default defineConfig([
|
|
|
284
284
|
},
|
|
285
285
|
},
|
|
286
286
|
],
|
|
287
|
+
'import/enforce-node-protocol-usage': ['error', 'always'],
|
|
287
288
|
// Try to spot '// console.log()' left over from debugging
|
|
288
289
|
'@devtools/no-commented-out-console': 'error',
|
|
289
290
|
// Prevent imports being commented out rather than deleted.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2020 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
const path = require('path');
|
|
4
|
+
const path = require('node:path');
|
|
5
5
|
|
|
6
6
|
const {writeIfChanged} = require('../../scripts/build/ninja/write-if-changed.js');
|
|
7
7
|
const [, , buildTimestamp, targetGenDir, targetName, ...imageSources] = process.argv;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path
|
|
2
|
+
<g clip-path="url(#clip0_4041_3016)">
|
|
3
|
+
<path d="M9.25 4H10.75V13.125L14.9375 8.9375L16 10L10 16L4 10L5.0625 8.9375L9.25 13.125V4Z" fill="black"/>
|
|
4
|
+
</g>
|
|
5
|
+
<defs>
|
|
6
|
+
<clipPath id="clip0_4041_3016">
|
|
7
|
+
<rect width="20" height="20" fill="white"/>
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
3
10
|
</svg>
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path
|
|
2
|
+
<g clip-path="url(#clip0_4041_3013)">
|
|
3
|
+
<path d="M9.25 16V6.875L5.0625 11.0625L4 10L10 4L16 10L14.9375 11.0625L10.75 6.875V16H9.25Z" fill="black"/>
|
|
4
|
+
</g>
|
|
5
|
+
<defs>
|
|
6
|
+
<clipPath id="clip0_4041_3013">
|
|
7
|
+
<rect width="20" height="20" fill="white"/>
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
3
10
|
</svg>
|
|
@@ -33,7 +33,6 @@ import * as StringOutputStream from './StringOutputStream.js';
|
|
|
33
33
|
import * as TextDictionary from './TextDictionary.js';
|
|
34
34
|
import * as Throttler from './Throttler.js';
|
|
35
35
|
import * as Trie from './Trie.js';
|
|
36
|
-
import * as Worker from './Worker.js';
|
|
37
36
|
|
|
38
37
|
/*
|
|
39
38
|
* This is re-exported here because we moved UIString into platform from
|
|
@@ -73,5 +72,4 @@ export {
|
|
|
73
72
|
TextDictionary,
|
|
74
73
|
Throttler,
|
|
75
74
|
Trie,
|
|
76
|
-
Worker,
|
|
77
75
|
};
|
|
@@ -549,7 +549,6 @@ export const enum EnumeratedHistogram {
|
|
|
549
549
|
LighthouseModeRun = 'DevTools.LighthouseModeRun',
|
|
550
550
|
LighthouseCategoryUsed = 'DevTools.LighthouseCategoryUsed',
|
|
551
551
|
SwatchActivated = 'DevTools.SwatchActivated',
|
|
552
|
-
AnimationPlaybackRateChanged = 'DevTools.AnimationPlaybackRateChanged',
|
|
553
552
|
BuiltInAiAvailability = 'DevTools.BuiltInAiAvailability',
|
|
554
553
|
// LINT.ThenChange(/front_end/devtools_compatibility.js:EnumeratedHistogram)
|
|
555
554
|
}
|
|
@@ -269,11 +269,6 @@ export class UserMetrics {
|
|
|
269
269
|
EnumeratedHistogram.SwatchActivated, swatch, SwatchType.MAX_VALUE);
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
animationPlaybackRateChanged(playbackRate: AnimationsPlaybackRate): void {
|
|
273
|
-
InspectorFrontendHostInstance.recordEnumeratedHistogram(
|
|
274
|
-
EnumeratedHistogram.AnimationPlaybackRateChanged, playbackRate, AnimationsPlaybackRate.MAX_VALUE);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
272
|
workspacesPopulated(wallClockTimeInMilliseconds: number): void {
|
|
278
273
|
InspectorFrontendHostInstance.recordPerformanceHistogram(
|
|
279
274
|
'DevTools.Workspaces.PopulateWallClocktime', wallClockTimeInMilliseconds);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright 2025 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import type * as Api from './api/api.js';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
8
|
+
// @ts-ignore 'process' is not available when type-checking against browser types.
|
|
9
|
+
export const IS_NODE = typeof (process as unknown) !== 'undefined' && process.versions?.node !== null;
|
|
10
|
+
|
|
11
|
+
export const IS_BROWSER =
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
|
+
// @ts-ignore 'window' is not available when type-checking against node.js types.
|
|
14
|
+
typeof window !== 'undefined' || (typeof self !== 'undefined' && typeof self.postMessage === 'function');
|
|
15
|
+
|
|
16
|
+
export const HOST_RUNTIME = await (async(): Promise<Api.HostRuntime.HostRuntime> => {
|
|
17
|
+
if (IS_NODE) {
|
|
18
|
+
return (await import('./node/node.js')).HostRuntime.HOST_RUNTIME;
|
|
19
|
+
}
|
|
20
|
+
if (IS_BROWSER) {
|
|
21
|
+
return (await import('./browser/browser.js')).HostRuntime.HOST_RUNTIME;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
throw new Error('Unknown runtime!');
|
|
25
|
+
})();
|
|
@@ -29,10 +29,10 @@ export function keyIsArrowKey(key: string): key is ArrowKey {
|
|
|
29
29
|
return ARROW_KEYS.has(key as ArrowKey);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export function isEscKey(event:
|
|
32
|
+
export function isEscKey(event: {readonly key: string}): boolean {
|
|
33
33
|
return event.key === 'Escape';
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export function isEnterOrSpaceKey(event:
|
|
36
|
+
export function isEnterOrSpaceKey(event: {readonly key: string}): boolean {
|
|
37
37
|
return event.key === 'Enter' || event.key === ' ';
|
|
38
38
|
}
|
|
@@ -584,5 +584,5 @@ export const concatBase64 = function(lhs: string, rhs: string): string {
|
|
|
584
584
|
}
|
|
585
585
|
const lhsLeaveAsIs = lhs.substring(0, lhs.length - 4);
|
|
586
586
|
const lhsToDecode = lhs.substring(lhs.length - 4);
|
|
587
|
-
return lhsLeaveAsIs +
|
|
587
|
+
return lhsLeaveAsIs + globalThis.btoa(globalThis.atob(lhsToDecode) + globalThis.atob(rhs));
|
|
588
588
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Copyright 2025 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Provides abstractions for host features that require different implementations depending
|
|
7
|
+
* on whether DevTools runs in the browser or Node.js
|
|
8
|
+
*/
|
|
9
|
+
export interface HostRuntime {
|
|
10
|
+
createWorker(url: string): Worker;
|
|
11
|
+
workerScope: WorkerScope;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Abstracts away the differences between browser web workers and Node.js worker threads.
|
|
16
|
+
*/
|
|
17
|
+
export interface Worker {
|
|
18
|
+
postMessage(message: unknown, transfer?: WorkerTransferable[]): void;
|
|
19
|
+
|
|
20
|
+
dispose(): void;
|
|
21
|
+
terminate(immediately?: boolean): void;
|
|
22
|
+
|
|
23
|
+
set onmessage(listener: (event: WorkerMessageEvent) => void);
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
+
set onerror(listener: (event: any) => void);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Currently we ony transfer MessagePorts to workers, but it's possible to add
|
|
30
|
+
* more things (like ReadableStream) as long as it's present in all runtimes.
|
|
31
|
+
*/
|
|
32
|
+
export type WorkerTransferable = typeof MessagePort.prototype;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Used by workers to communicate with their parent.
|
|
36
|
+
*/
|
|
37
|
+
export interface WorkerScope {
|
|
38
|
+
postMessage(message: unknown): void;
|
|
39
|
+
set onmessage(listener: (event: WorkerMessageEvent) => void);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface WorkerMessageEvent {
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
|
+
readonly data: any;
|
|
45
|
+
}
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import type * as Api from '../api/api.js';
|
|
6
|
+
|
|
7
|
+
class WebWorkerScope implements Api.HostRuntime.WorkerScope {
|
|
8
|
+
postMessage(message: unknown): void {
|
|
9
|
+
self.postMessage(message);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
set onmessage(listener: (event: Api.HostRuntime.WorkerMessageEvent) => void) {
|
|
13
|
+
self.onmessage = listener;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class WebWorker implements Api.HostRuntime.Worker {
|
|
6
18
|
readonly #workerPromise: Promise<Worker>;
|
|
7
19
|
#disposed?: boolean;
|
|
8
20
|
#rejectWorkerPromise?: (error: Error) => void;
|
|
9
21
|
|
|
10
|
-
|
|
22
|
+
constructor(workerLocation: string) {
|
|
11
23
|
this.#workerPromise = new Promise((fulfill, reject) => {
|
|
12
24
|
this.#rejectWorkerPromise = reject;
|
|
13
|
-
const worker = new Worker(workerLocation, {type: 'module'});
|
|
25
|
+
const worker = new Worker(new URL(workerLocation), {type: 'module'});
|
|
14
26
|
worker.onerror = event => {
|
|
15
|
-
console.error(`Failed to load worker for ${workerLocation
|
|
27
|
+
console.error(`Failed to load worker for ${workerLocation}:`, event);
|
|
16
28
|
};
|
|
17
29
|
worker.onmessage = (event: MessageEvent<unknown>) => {
|
|
18
30
|
console.assert(event.data === 'workerReady');
|
|
@@ -22,11 +34,7 @@ export class WorkerWrapper {
|
|
|
22
34
|
});
|
|
23
35
|
}
|
|
24
36
|
|
|
25
|
-
|
|
26
|
-
return new WorkerWrapper(url);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
postMessage(message: unknown, transfer?: Transferable[]): void {
|
|
37
|
+
postMessage(message: unknown, transfer?: Api.HostRuntime.WorkerTransferable[]): void {
|
|
30
38
|
void this.#workerPromise.then(worker => {
|
|
31
39
|
if (!this.#disposed) {
|
|
32
40
|
worker.postMessage(message, transfer ?? []);
|
|
@@ -46,15 +54,22 @@ export class WorkerWrapper {
|
|
|
46
54
|
this.dispose();
|
|
47
55
|
}
|
|
48
56
|
|
|
49
|
-
set onmessage(listener: (event:
|
|
57
|
+
set onmessage(listener: (event: Api.HostRuntime.WorkerMessageEvent) => void) {
|
|
50
58
|
void this.#workerPromise.then(worker => {
|
|
51
59
|
worker.onmessage = listener;
|
|
52
60
|
});
|
|
53
61
|
}
|
|
54
62
|
|
|
55
|
-
set onerror(listener: (event:
|
|
63
|
+
set onerror(listener: (event: unknown) => void) {
|
|
56
64
|
void this.#workerPromise.then(worker => {
|
|
57
65
|
worker.onerror = listener;
|
|
58
66
|
});
|
|
59
67
|
}
|
|
60
68
|
}
|
|
69
|
+
|
|
70
|
+
export const HOST_RUNTIME: Api.HostRuntime.HostRuntime = {
|
|
71
|
+
createWorker(url: string): Api.HostRuntime.Worker {
|
|
72
|
+
return new WebWorker(url);
|
|
73
|
+
},
|
|
74
|
+
workerScope: new WebWorkerScope(),
|
|
75
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Copyright 2025 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as WorkerThreads from 'node:worker_threads';
|
|
6
|
+
|
|
7
|
+
import type * as Api from '../api/api.js';
|
|
8
|
+
|
|
9
|
+
class NodeWorkerScope implements Api.HostRuntime.WorkerScope {
|
|
10
|
+
postMessage(message: unknown): void {
|
|
11
|
+
WorkerThreads.parentPort?.postMessage(message);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
set onmessage(listener: (event: Api.HostRuntime.WorkerMessageEvent) => void) {
|
|
15
|
+
WorkerThreads.parentPort?.on('message', data => {
|
|
16
|
+
listener({data});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class NodeWorker implements Api.HostRuntime.Worker {
|
|
22
|
+
readonly #workerPromise: Promise<WorkerThreads.Worker>;
|
|
23
|
+
#disposed = false;
|
|
24
|
+
#rejectWorkerPromise?: (error: Error) => void;
|
|
25
|
+
|
|
26
|
+
constructor(url: string) {
|
|
27
|
+
this.#workerPromise = new Promise((resolve, reject) => {
|
|
28
|
+
this.#rejectWorkerPromise = reject;
|
|
29
|
+
const worker = new WorkerThreads.Worker(new URL(url));
|
|
30
|
+
worker.once('message', (message: unknown) => {
|
|
31
|
+
if (message === 'workerReady') {
|
|
32
|
+
resolve(worker);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
worker.on('error', reject);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
postMessage(message: unknown): void {
|
|
40
|
+
void this.#workerPromise.then(worker => {
|
|
41
|
+
if (!this.#disposed) {
|
|
42
|
+
worker.postMessage(message);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
dispose(): void {
|
|
48
|
+
this.#disposed = true;
|
|
49
|
+
void this.#workerPromise.then(worker => worker.terminate());
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
terminate(immediately?: boolean): void {
|
|
53
|
+
if (immediately) {
|
|
54
|
+
this.#rejectWorkerPromise?.(new Error('Worker terminated'));
|
|
55
|
+
}
|
|
56
|
+
this.dispose();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
set onmessage(listener: (event: unknown) => void) {
|
|
60
|
+
void this.#workerPromise.then(worker => {
|
|
61
|
+
worker.on('message', data => {
|
|
62
|
+
if (!this.#disposed) {
|
|
63
|
+
listener({data});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
set onerror(listener: (event: unknown) => void) {
|
|
70
|
+
void this.#workerPromise.then(worker => {
|
|
71
|
+
worker.on('error', (error: Error) => {
|
|
72
|
+
if (!this.#disposed) {
|
|
73
|
+
listener({type: 'error', ...error});
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const HOST_RUNTIME: Api.HostRuntime.HostRuntime = {
|
|
81
|
+
createWorker(url: string): Api.HostRuntime.Worker {
|
|
82
|
+
return new NodeWorker(url);
|
|
83
|
+
},
|
|
84
|
+
workerScope: new NodeWorkerScope(),
|
|
85
|
+
};
|
|
@@ -7,7 +7,7 @@ import * as Brand from './Brand.js';
|
|
|
7
7
|
import * as Constructor from './Constructor.js';
|
|
8
8
|
import * as DateUtilities from './DateUtilities.js';
|
|
9
9
|
import * as DevToolsPath from './DevToolsPath.js';
|
|
10
|
-
import * as
|
|
10
|
+
import * as HostRuntime from './HostRuntime.js';
|
|
11
11
|
import * as KeyboardUtilities from './KeyboardUtilities.js';
|
|
12
12
|
import * as MapUtilities from './MapUtilities.js';
|
|
13
13
|
import * as MimeType from './MimeType.js';
|
|
@@ -31,7 +31,7 @@ export {
|
|
|
31
31
|
Constructor,
|
|
32
32
|
DateUtilities,
|
|
33
33
|
DevToolsPath,
|
|
34
|
-
|
|
34
|
+
HostRuntime,
|
|
35
35
|
KeyboardUtilities,
|
|
36
36
|
MapUtilities,
|
|
37
37
|
MimeType,
|
|
@@ -375,7 +375,7 @@ export class AnimationModel extends SDKModel<EventTypes> {
|
|
|
375
375
|
const animation = await AnimationImpl.parsePayload(this, payload);
|
|
376
376
|
// Ignore Web Animations custom effects & groups.
|
|
377
377
|
const keyframesRule = animation.source().keyframesRule();
|
|
378
|
-
if (animation.type() === 'WebAnimation' && keyframesRule
|
|
378
|
+
if (animation.type() === 'WebAnimation' && keyframesRule?.keyframes().length === 0) {
|
|
379
379
|
this.#pendingAnimations.delete(animation.id());
|
|
380
380
|
} else {
|
|
381
381
|
this.#animationsById.set(animation.id(), animation);
|
|
@@ -190,7 +190,7 @@ export class CSSModel extends SDKModel<EventTypes> {
|
|
|
190
190
|
|
|
191
191
|
const {styles} =
|
|
192
192
|
await this.agent.invoke_setStyleTexts({edits: [{styleSheetId, range: range.serializeToObject(), text}]});
|
|
193
|
-
if (
|
|
193
|
+
if (styles?.length !== 1) {
|
|
194
194
|
return false;
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -292,7 +292,7 @@ export class CSSProperty extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
292
292
|
}
|
|
293
293
|
if (cssMetadata().isGridAreaDefiningProperty(propertyName)) {
|
|
294
294
|
const rowResult = GridAreaRowRegex.exec(token);
|
|
295
|
-
if (rowResult
|
|
295
|
+
if (rowResult?.index === 0 && !propertyText.trimEnd().endsWith(']')) {
|
|
296
296
|
propertyText = propertyText.trimEnd() + '\n' + doubleIndent;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
@@ -1237,7 +1237,7 @@ export class AnchorFunctionMatcher extends matcherBase(AnchorFunctionMatch) {
|
|
|
1237
1237
|
if (node.name === 'VariableName') {
|
|
1238
1238
|
// Double-dashed anchor reference to be rendered with a link to its matching anchor.
|
|
1239
1239
|
let parent = node.parent;
|
|
1240
|
-
if (
|
|
1240
|
+
if (parent?.name !== 'ArgList') {
|
|
1241
1241
|
return null;
|
|
1242
1242
|
}
|
|
1243
1243
|
parent = parent.parent;
|
|
@@ -432,7 +432,7 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
432
432
|
const callFunctionResult =
|
|
433
433
|
await globalObject.callFunction(saveVariable, [RemoteObject.toCallArgument(remoteObject)]);
|
|
434
434
|
globalObject.release();
|
|
435
|
-
if (callFunctionResult.wasThrown ||
|
|
435
|
+
if (callFunctionResult.wasThrown || callFunctionResult.object?.type !== 'string') {
|
|
436
436
|
failedToSave(callFunctionResult.object || null);
|
|
437
437
|
} else {
|
|
438
438
|
const text = (callFunctionResult.object.value as string);
|
|
@@ -278,7 +278,7 @@ export class Cookie {
|
|
|
278
278
|
// extension cookie tests currently use the funtionality, and if we
|
|
279
279
|
// ever decide to implement that it should be done by preventing
|
|
280
280
|
// such cookies from being set.
|
|
281
|
-
if (
|
|
281
|
+
if (domain?.[0] !== '.') {
|
|
282
282
|
return false;
|
|
283
283
|
}
|
|
284
284
|
|
|
@@ -746,7 +746,7 @@ export class DOMNode {
|
|
|
746
746
|
}
|
|
747
747
|
|
|
748
748
|
const oldAttribute = oldAttributesMap.get(name);
|
|
749
|
-
if (
|
|
749
|
+
if (oldAttribute?.value !== value) {
|
|
750
750
|
attributesChanged = true;
|
|
751
751
|
}
|
|
752
752
|
}
|
|
@@ -1671,7 +1671,7 @@ export class DOMModel extends SDKModel<EventTypes> {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
const {nodeIds} =
|
|
1673
1673
|
await this.agent.invoke_getSearchResults({searchId: this.#searchId, fromIndex: index, toIndex: index + 1});
|
|
1674
|
-
return nodeIds
|
|
1674
|
+
return nodeIds?.length === 1 ? this.nodeForId(nodeIds[0]) : null;
|
|
1675
1675
|
}
|
|
1676
1676
|
|
|
1677
1677
|
private cancelSearch(): void {
|
|
@@ -858,7 +858,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
858
858
|
let functionName: RemoteObject|null = null;
|
|
859
859
|
if (response.properties) {
|
|
860
860
|
for (const prop of response.properties) {
|
|
861
|
-
if (prop.name === 'name' && prop.value
|
|
861
|
+
if (prop.name === 'name' && prop.value?.type === 'string') {
|
|
862
862
|
functionName = prop.value;
|
|
863
863
|
}
|
|
864
864
|
}
|
|
@@ -1502,6 +1502,12 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
|
|
|
1502
1502
|
this.updateNetworkRequest(networkRequest);
|
|
1503
1503
|
}
|
|
1504
1504
|
|
|
1505
|
+
directUDPSocketJoinedMulticastGroup(_event: Protocol.Network.DirectUDPSocketJoinedMulticastGroupEvent): void {
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
directUDPSocketLeftMulticastGroup(_event: Protocol.Network.DirectUDPSocketLeftMulticastGroupEvent): void {
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1505
1511
|
trustTokenOperationDone(event: Protocol.Network.TrustTokenOperationDoneEvent): void {
|
|
1506
1512
|
const request = this.#requestsById.get(event.requestId);
|
|
1507
1513
|
if (!request) {
|
|
@@ -47,7 +47,7 @@ export class PreloadingModel extends SDKModel<EventTypes> {
|
|
|
47
47
|
void this.agent.invoke_enable();
|
|
48
48
|
|
|
49
49
|
const targetInfo = target.targetInfo();
|
|
50
|
-
if (targetInfo
|
|
50
|
+
if (targetInfo?.subtype === 'prerender') {
|
|
51
51
|
this.lastPrimaryPageModel = TargetManager.instance().primaryPageTarget()?.model(PreloadingModel) || null;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -970,7 +970,7 @@ export class RemoteArray {
|
|
|
970
970
|
}
|
|
971
971
|
|
|
972
972
|
static objectAsArray(object: RemoteObject|null): RemoteArray {
|
|
973
|
-
if (
|
|
973
|
+
if (object?.type !== 'object' || (object.subtype !== 'array' && object.subtype !== 'typedarray')) {
|
|
974
974
|
throw new Error('Object is empty or not an array');
|
|
975
975
|
}
|
|
976
976
|
return new RemoteArray(object);
|
|
@@ -891,7 +891,7 @@ export class ResourceTreeFrame {
|
|
|
891
891
|
|
|
892
892
|
addRequest(request: NetworkRequest): void {
|
|
893
893
|
let resource = this.resourcesMap.get(request.url());
|
|
894
|
-
if (resource
|
|
894
|
+
if (resource?.request === request) {
|
|
895
895
|
// Already in the tree, we just got an extra update.
|
|
896
896
|
return;
|
|
897
897
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
import
|
|
30
|
+
import * as Platform from '../../core/platform/platform.js';
|
|
31
31
|
import * as Protocol from '../../generated/protocol.js';
|
|
32
32
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
33
33
|
import * as Common from '../common/common.js';
|
|
@@ -504,10 +504,10 @@ function frameIdForScript(script: Script): Protocol.Page.FrameId|null {
|
|
|
504
504
|
export const sourceURLRegex = /^[\x20\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/;
|
|
505
505
|
|
|
506
506
|
export async function disassembleWasm(content: string): Promise<TextUtils.WasmDisassembly.WasmDisassembly> {
|
|
507
|
-
const worker =
|
|
508
|
-
new URL('../../entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js', import.meta.url));
|
|
507
|
+
const worker = Platform.HostRuntime.HOST_RUNTIME.createWorker(
|
|
508
|
+
new URL('../../entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js', import.meta.url).toString());
|
|
509
509
|
const promise = new Promise<TextUtils.WasmDisassembly.WasmDisassembly>((resolve, reject) => {
|
|
510
|
-
worker.onmessage = ({data}
|
|
510
|
+
worker.onmessage = ({data}) => {
|
|
511
511
|
if ('method' in data) {
|
|
512
512
|
switch (data.method) {
|
|
513
513
|
case 'disassemble':
|