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
|
@@ -303,14 +303,6 @@ export class ChatView extends HTMLElement {
|
|
|
303
303
|
this.#messagesContainerResizeObserver.disconnect();
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
clearTextInput(): void {
|
|
307
|
-
const textArea = this.#shadow.querySelector('.chat-input') as HTMLTextAreaElement;
|
|
308
|
-
if (!textArea) {
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
textArea.value = '';
|
|
312
|
-
}
|
|
313
|
-
|
|
314
306
|
focusTextInput(): void {
|
|
315
307
|
const textArea = this.#shadow.querySelector('.chat-input') as HTMLTextAreaElement;
|
|
316
308
|
if (!textArea) {
|
|
@@ -698,7 +690,7 @@ function renderStep({step, isLoading, markdownRenderer, isLast}: {
|
|
|
698
690
|
}): Lit.LitTemplate {
|
|
699
691
|
const stepClasses = Lit.Directives.classMap({
|
|
700
692
|
step: true,
|
|
701
|
-
empty: !step.thought && !step.code && !step.contextDetails,
|
|
693
|
+
empty: !step.thought && !step.code && !step.contextDetails && !step.sideEffect,
|
|
702
694
|
paused: Boolean(step.sideEffect),
|
|
703
695
|
canceled: Boolean(step.canceled),
|
|
704
696
|
});
|
|
@@ -884,7 +876,7 @@ function renderChatMessage({
|
|
|
884
876
|
}
|
|
885
877
|
|
|
886
878
|
function renderImageChatMessage(inlineData: Host.AidaClient.MediaBlob): Lit.LitTemplate {
|
|
887
|
-
if (inlineData.data === AiAssistanceModel.
|
|
879
|
+
if (inlineData.data === AiAssistanceModel.AiConversation.NOT_FOUND_IMAGE_DATA) {
|
|
888
880
|
// clang-format off
|
|
889
881
|
return html`<div class="unavailable-image" title=${UIStringsNotTranslate.imageUnavailable}>
|
|
890
882
|
<devtools-icon name='file-image'></devtools-icon>
|
|
@@ -954,6 +946,9 @@ function renderSelection({
|
|
|
954
946
|
onInspectElementClick: () => void,
|
|
955
947
|
conversationType: AiAssistanceModel.AiHistoryStorage.ConversationType,
|
|
956
948
|
}): Lit.LitTemplate {
|
|
949
|
+
if (!selectedContext) {
|
|
950
|
+
return Lit.nothing;
|
|
951
|
+
}
|
|
957
952
|
// TODO: currently the picker behavior is SDKNode specific.
|
|
958
953
|
const hasPickerBehavior = conversationType === AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING;
|
|
959
954
|
|
|
@@ -964,10 +959,6 @@ function renderSelection({
|
|
|
964
959
|
disabled: isTextInputDisabled,
|
|
965
960
|
});
|
|
966
961
|
|
|
967
|
-
if (!selectedContext && !hasPickerBehavior) {
|
|
968
|
-
return Lit.nothing;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
962
|
const handleKeyDown = (ev: KeyboardEvent): void => {
|
|
972
963
|
if (ev.key === 'Enter' || ev.key === ' ') {
|
|
973
964
|
void onContextClick();
|
|
@@ -1307,8 +1298,10 @@ function renderRelevantDataDisclaimer({isLoading, blockedByCrossOrigin, tooltipI
|
|
|
1307
1298
|
tooltipId: string,
|
|
1308
1299
|
disclaimerText: string,
|
|
1309
1300
|
}): Lit.LitTemplate {
|
|
1310
|
-
const classes =
|
|
1311
|
-
|
|
1301
|
+
const classes = Lit.Directives.classMap({
|
|
1302
|
+
'chat-input-disclaimer': true,
|
|
1303
|
+
'hide-divider': !isLoading && blockedByCrossOrigin,
|
|
1304
|
+
});
|
|
1312
1305
|
// clang-format off
|
|
1313
1306
|
return html`
|
|
1314
1307
|
<p class=${classes}>
|
|
@@ -1323,7 +1316,7 @@ function renderRelevantDataDisclaimer({isLoading, blockedByCrossOrigin, tooltipI
|
|
|
1323
1316
|
void UI.ViewManager.ViewManager.instance().showView('chrome-ai');
|
|
1324
1317
|
}}
|
|
1325
1318
|
>${lockedString('Relevant data')}</button> ${lockedString('is sent to Google')}
|
|
1326
|
-
${
|
|
1319
|
+
${renderDisclaimerTooltip(tooltipId, disclaimerText)}
|
|
1327
1320
|
</p>
|
|
1328
1321
|
`;
|
|
1329
1322
|
// clang-format on
|
|
@@ -1376,50 +1369,80 @@ function renderChatInput({
|
|
|
1376
1369
|
onRemoveImageInput?: () => void,
|
|
1377
1370
|
onImageUpload?: (ev: Event) => void,
|
|
1378
1371
|
}): Lit.LitTemplate {
|
|
1379
|
-
const shouldShowMultiLine = selectedContext;
|
|
1380
1372
|
const chatInputContainerCls = Lit.Directives.classMap({
|
|
1381
1373
|
'chat-input-container': true,
|
|
1382
|
-
'single-line-layout': !
|
|
1374
|
+
'single-line-layout': !selectedContext,
|
|
1383
1375
|
disabled: isTextInputDisabled,
|
|
1384
1376
|
});
|
|
1385
1377
|
|
|
1386
1378
|
// clang-format off
|
|
1387
|
-
return html`
|
|
1388
|
-
<form class="input-form" @submit=${onSubmit}>
|
|
1379
|
+
return html` <form class="input-form" @submit=${onSubmit}>
|
|
1389
1380
|
<div class=${chatInputContainerCls}>
|
|
1390
|
-
${renderImageInput(
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1381
|
+
${renderImageInput({
|
|
1382
|
+
multimodalInputEnabled,
|
|
1383
|
+
imageInput,
|
|
1384
|
+
isTextInputDisabled,
|
|
1385
|
+
onRemoveImageInput,
|
|
1386
|
+
})}
|
|
1387
|
+
<textarea
|
|
1388
|
+
class="chat-input"
|
|
1394
1389
|
.disabled=${isTextInputDisabled}
|
|
1395
1390
|
wrap="hard"
|
|
1396
1391
|
maxlength="10000"
|
|
1397
1392
|
@keydown=${onTextAreaKeyDown}
|
|
1398
|
-
@input=${(event: KeyboardEvent) =>
|
|
1393
|
+
@input=${(event: KeyboardEvent) =>
|
|
1394
|
+
onTextInputChange((event.target as HTMLInputElement).value)}
|
|
1399
1395
|
placeholder=${inputPlaceholder}
|
|
1400
|
-
jslog=${VisualLogging.textField('query').track({
|
|
1396
|
+
jslog=${VisualLogging.textField('query').track({
|
|
1397
|
+
change: true,
|
|
1398
|
+
keydown: 'Enter',
|
|
1399
|
+
})}
|
|
1401
1400
|
aria-description=${i18nString(UIStrings.inputTextAriaDescription)}
|
|
1401
|
+
${ref(el => {
|
|
1402
|
+
// If the elements is disabled reset the text to show
|
|
1403
|
+
// the place holder
|
|
1404
|
+
if (el && isTextInputDisabled) {
|
|
1405
|
+
(el as HTMLInputElement).value = '';
|
|
1406
|
+
}
|
|
1407
|
+
})}
|
|
1402
1408
|
></textarea>
|
|
1403
1409
|
<div class="chat-input-actions">
|
|
1404
1410
|
<div class="chat-input-actions-left">
|
|
1405
|
-
${
|
|
1411
|
+
${renderSelection({
|
|
1406
1412
|
selectedContext,
|
|
1407
1413
|
inspectElementToggled,
|
|
1408
1414
|
conversationType,
|
|
1409
1415
|
isTextInputDisabled,
|
|
1410
1416
|
onContextClick,
|
|
1411
1417
|
onInspectElementClick,
|
|
1412
|
-
})
|
|
1418
|
+
})}
|
|
1413
1419
|
</div>
|
|
1414
1420
|
<div class="chat-input-actions-right">
|
|
1415
1421
|
<div class="chat-input-disclaimer-container">
|
|
1416
|
-
${renderRelevantDataDisclaimer({
|
|
1422
|
+
${renderRelevantDataDisclaimer({
|
|
1423
|
+
isLoading,
|
|
1424
|
+
blockedByCrossOrigin,
|
|
1425
|
+
tooltipId: RELEVANT_DATA_LINK_CHAT_ID,
|
|
1426
|
+
disclaimerText,
|
|
1427
|
+
})}
|
|
1417
1428
|
</div>
|
|
1418
1429
|
${renderMultimodalInputButtons({
|
|
1419
|
-
multimodalInputEnabled,
|
|
1430
|
+
multimodalInputEnabled,
|
|
1431
|
+
blockedByCrossOrigin,
|
|
1432
|
+
isTextInputDisabled,
|
|
1433
|
+
imageInput,
|
|
1434
|
+
uploadImageInputEnabled,
|
|
1435
|
+
onTakeScreenshot,
|
|
1436
|
+
onImageUpload,
|
|
1420
1437
|
})}
|
|
1421
1438
|
${renderChatInputButtons({
|
|
1422
|
-
isLoading,
|
|
1439
|
+
isLoading,
|
|
1440
|
+
blockedByCrossOrigin,
|
|
1441
|
+
isTextInputDisabled,
|
|
1442
|
+
isTextInputEmpty,
|
|
1443
|
+
imageInput,
|
|
1444
|
+
onCancel,
|
|
1445
|
+
onNewConversation,
|
|
1423
1446
|
})}
|
|
1424
1447
|
</div>
|
|
1425
1448
|
</div>
|
|
@@ -1479,7 +1502,7 @@ function renderMainContents({
|
|
|
1479
1502
|
return renderEmptyState({isTextInputDisabled, suggestions, onSuggestionClick});
|
|
1480
1503
|
}
|
|
1481
1504
|
|
|
1482
|
-
function
|
|
1505
|
+
function renderDisclaimerTooltip(id: string, disclaimerText: string): Lit.TemplateResult {
|
|
1483
1506
|
// clang-format off
|
|
1484
1507
|
return html`
|
|
1485
1508
|
<devtools-tooltip
|
|
@@ -508,14 +508,6 @@ export class AnimationTimeline extends UI.Widget.VBox implements
|
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
private setPlaybackRate(playbackRate: number): void {
|
|
511
|
-
if (playbackRate !== this.#playbackRate) {
|
|
512
|
-
Host.userMetrics.animationPlaybackRateChanged(
|
|
513
|
-
playbackRate === 0.1 ? Host.UserMetrics.AnimationsPlaybackRate.PERCENT_10 :
|
|
514
|
-
playbackRate === 0.25 ? Host.UserMetrics.AnimationsPlaybackRate.PERCENT_25 :
|
|
515
|
-
playbackRate === 1 ? Host.UserMetrics.AnimationsPlaybackRate.PERCENT_100 :
|
|
516
|
-
Host.UserMetrics.AnimationsPlaybackRate.OTHER);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
511
|
this.#playbackRate = playbackRate;
|
|
520
512
|
for (const animationModel of SDK.TargetManager.TargetManager.instance().models(
|
|
521
513
|
SDK.AnimationModel.AnimationModel, {scoped: true})) {
|
|
@@ -196,7 +196,7 @@ export class ExtensionStorageModel extends SDK.SDKModel.SDKModel<EventTypes> {
|
|
|
196
196
|
|
|
197
197
|
#extensionIdForContext(context: SDK.RuntimeModel.ExecutionContext): string|undefined {
|
|
198
198
|
const url = Common.ParsedURL.ParsedURL.fromString(context.origin);
|
|
199
|
-
return url
|
|
199
|
+
return url?.scheme === 'chrome-extension' ? url.host : undefined;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
#executionContextDestroyed(context: SDK.RuntimeModel.ExecutionContext): void {
|
|
@@ -12,6 +12,7 @@ import * as Root from '../../core/root/root.js';
|
|
|
12
12
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
13
13
|
import * as Protocol from '../../generated/protocol.js';
|
|
14
14
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
15
|
+
import type * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
15
16
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
16
17
|
import * as PanelCommon from '../../panels/common/common.js';
|
|
17
18
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
@@ -21,14 +22,13 @@ import type * as ExpandableList from '../../ui/components/expandable_list/expand
|
|
|
21
22
|
import type * as ReportView from '../../ui/components/report_view/report_view.js';
|
|
22
23
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
23
24
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
24
|
-
import {
|
|
25
|
+
import {html, type LitTemplate, nothing, render} from '../../ui/lit/lit.js';
|
|
25
26
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
26
27
|
|
|
27
28
|
import * as ApplicationComponents from './components/components.js';
|
|
28
29
|
import frameDetailsReportViewStyles from './frameDetailsReportView.css.js';
|
|
29
30
|
import {OriginTrialTreeView} from './OriginTrialTreeView.js';
|
|
30
31
|
|
|
31
|
-
const {until} = Directives;
|
|
32
32
|
const {widgetConfig} = UI.Widget;
|
|
33
33
|
|
|
34
34
|
const UIStrings = {
|
|
@@ -270,12 +270,14 @@ export interface FrameDetailsReportViewData {
|
|
|
270
270
|
interface FrameDetailsViewInput {
|
|
271
271
|
frame: SDK.ResourceTreeModel.ResourceTreeFrame;
|
|
272
272
|
target: SDK.Target.Target|null;
|
|
273
|
+
creationStackTrace: StackTrace.StackTrace.StackTrace|null;
|
|
274
|
+
creationTarget: SDK.Target.Target|null;
|
|
273
275
|
adScriptAncestry: Protocol.Page.AdScriptAncestry|null;
|
|
274
|
-
linkTargetDOMNode
|
|
275
|
-
permissionsPolicies:
|
|
276
|
+
linkTargetDOMNode: SDK.DOMModel.DOMNode|null;
|
|
277
|
+
permissionsPolicies: Protocol.Page.PermissionsPolicyFeatureState[]|null;
|
|
276
278
|
protocolMonitorExperimentEnabled: boolean;
|
|
277
279
|
trials: Protocol.Page.OriginTrial[]|null;
|
|
278
|
-
securityIsolationInfo
|
|
280
|
+
securityIsolationInfo: Protocol.Network.SecurityIsolationStatus|null;
|
|
279
281
|
onRevealInNetwork?: () => void;
|
|
280
282
|
onRevealInSources: () => void;
|
|
281
283
|
}
|
|
@@ -295,11 +297,12 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
295
297
|
${renderIsolationSection(input)}
|
|
296
298
|
${renderApiAvailabilitySection(input.frame)}
|
|
297
299
|
${renderOriginTrial(input.trials)}
|
|
298
|
-
${
|
|
300
|
+
${input.permissionsPolicies ?
|
|
299
301
|
html`
|
|
300
|
-
<devtools-resources-permissions-policy-section
|
|
302
|
+
<devtools-resources-permissions-policy-section
|
|
303
|
+
.data=${{policies: input.permissionsPolicies, showDetails: false} as ApplicationComponents.PermissionsPolicySection.PermissionsPolicySectionData}>
|
|
301
304
|
</devtools-resources-permissions-policy-section>
|
|
302
|
-
`
|
|
305
|
+
` : nothing}
|
|
303
306
|
${input.protocolMonitorExperimentEnabled ? renderAdditionalInfoSection(input.frame) : nothing}
|
|
304
307
|
</devtools-report>
|
|
305
308
|
`, target);
|
|
@@ -337,6 +340,7 @@ function renderDocumentSection(input: FrameDetailsViewInput): LitTemplate {
|
|
|
337
340
|
return nothing;
|
|
338
341
|
}
|
|
339
342
|
|
|
343
|
+
// clang-format off
|
|
340
344
|
return html`
|
|
341
345
|
<devtools-report-section-header>${i18nString(UIStrings.document)}</devtools-report-section-header>
|
|
342
346
|
<devtools-report-key>${i18nString(UIStrings.url)}</devtools-report-key>
|
|
@@ -349,12 +353,12 @@ function renderDocumentSection(input: FrameDetailsViewInput): LitTemplate {
|
|
|
349
353
|
</devtools-report-value>
|
|
350
354
|
${maybeRenderUnreachableURL(input.frame?.unreachableUrl())}
|
|
351
355
|
${maybeRenderOrigin(input.frame?.securityOrigin)}
|
|
352
|
-
${
|
|
353
|
-
${maybeRenderCreationStacktrace(input.
|
|
356
|
+
${renderOwnerElement(input.linkTargetDOMNode)}
|
|
357
|
+
${maybeRenderCreationStacktrace(input.creationStackTrace, input.creationTarget)}
|
|
354
358
|
${maybeRenderAdStatus(input.frame?.adFrameType(), input.frame?.adFrameStatus())}
|
|
355
359
|
${maybeRenderCreatorAdScriptAncestry(input.frame?.adFrameType(), input.target, input.adScriptAncestry)}
|
|
356
|
-
<devtools-report-divider></devtools-report-divider
|
|
357
|
-
|
|
360
|
+
<devtools-report-divider></devtools-report-divider>`;
|
|
361
|
+
// clang-format on
|
|
358
362
|
}
|
|
359
363
|
|
|
360
364
|
function renderSourcesLinkForURL(onRevealInSources: () => void): LitTemplate {
|
|
@@ -444,23 +448,17 @@ function renderOwnerElement(linkTargetDOMNode: SDK.DOMModel.DOMNode|null): LitTe
|
|
|
444
448
|
}
|
|
445
449
|
|
|
446
450
|
function maybeRenderCreationStacktrace(
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
null): LitTemplate {
|
|
450
|
-
if (creationStackTraceData?.creationStackTrace) {
|
|
451
|
+
stackTrace: StackTrace.StackTrace.StackTrace|null, target: SDK.Target.Target|null): LitTemplate {
|
|
452
|
+
if (stackTrace && target) {
|
|
451
453
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
452
454
|
// clang-format off
|
|
453
455
|
return html`
|
|
454
456
|
<devtools-report-key title=${i18nString(UIStrings.creationStackTraceExplanation)}>${
|
|
455
457
|
i18nString(UIStrings.creationStackTrace)}</devtools-report-key>
|
|
456
|
-
<devtools-report-value
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
creationStackTraceData,
|
|
461
|
-
buildStackTraceRows: Components.JSPresentationUtils.buildStackTraceRowsForLegacyRuntimeStackTrace,
|
|
462
|
-
} as ApplicationComponents.StackTrace.StackTraceData}>
|
|
463
|
-
</devtools-resources-stack-trace>
|
|
458
|
+
<devtools-report-value jslog=${VisualLogging.section('frame-creation-stack-trace')}>
|
|
459
|
+
<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(
|
|
460
|
+
Components.JSPresentationUtils.StackTracePreviewContent, {target, stackTrace, options: {expandable: true}})}>
|
|
461
|
+
</devtools-widget>
|
|
464
462
|
</devtools-report-value>
|
|
465
463
|
`;
|
|
466
464
|
// clang-format on
|
|
@@ -569,7 +567,7 @@ function renderIsolationSection(input: FrameDetailsViewInput): LitTemplate {
|
|
|
569
567
|
<devtools-report-value>
|
|
570
568
|
${input.frame.isCrossOriginIsolated() ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}
|
|
571
569
|
</devtools-report-value>
|
|
572
|
-
${
|
|
570
|
+
${maybeRenderCoopCoepCSPStatus(input.securityIsolationInfo)}
|
|
573
571
|
<devtools-report-divider></devtools-report-divider>
|
|
574
572
|
`;
|
|
575
573
|
}
|
|
@@ -597,7 +595,7 @@ function getSecureContextExplanation(frame: SDK.ResourceTreeModel.ResourceTreeFr
|
|
|
597
595
|
return null;
|
|
598
596
|
}
|
|
599
597
|
|
|
600
|
-
|
|
598
|
+
function maybeRenderCoopCoepCSPStatus(info: Protocol.Network.SecurityIsolationStatus|null): LitTemplate {
|
|
601
599
|
if (info) {
|
|
602
600
|
return html`
|
|
603
601
|
${
|
|
@@ -845,8 +843,13 @@ function renderAdditionalInfoSection(frame: SDK.ResourceTreeModel.ResourceTreeFr
|
|
|
845
843
|
export class FrameDetailsReportView extends UI.Widget.Widget {
|
|
846
844
|
#frame?: SDK.ResourceTreeModel.ResourceTreeFrame;
|
|
847
845
|
#target: SDK.Target.Target|null = null;
|
|
846
|
+
#creationStackTrace: StackTrace.StackTrace.StackTrace|null = null;
|
|
847
|
+
#creationTarget: SDK.Target.Target|null = null;
|
|
848
|
+
#securityIsolationInfo: Protocol.Network.SecurityIsolationStatus|null = null;
|
|
849
|
+
#linkTargetDOMNode: SDK.DOMModel.DOMNode|null = null;
|
|
850
|
+
#trials: Protocol.Page.OriginTrial[]|null = null;
|
|
848
851
|
#protocolMonitorExperimentEnabled = false;
|
|
849
|
-
#permissionsPolicies:
|
|
852
|
+
#permissionsPolicies: Protocol.Page.PermissionsPolicyFeatureState[]|null = null;
|
|
850
853
|
#linkifier = new Components.Linkifier.Linkifier();
|
|
851
854
|
#adScriptAncestry: Protocol.Page.AdScriptAncestry|null = null;
|
|
852
855
|
#view: View;
|
|
@@ -859,6 +862,34 @@ export class FrameDetailsReportView extends UI.Widget.Widget {
|
|
|
859
862
|
|
|
860
863
|
set frame(frame: SDK.ResourceTreeModel.ResourceTreeFrame) {
|
|
861
864
|
this.#frame = frame;
|
|
865
|
+
void this.#frame.getPermissionsPolicyState().then(permissionsPolicies => {
|
|
866
|
+
this.#permissionsPolicies = permissionsPolicies;
|
|
867
|
+
this.requestUpdate();
|
|
868
|
+
});
|
|
869
|
+
const {creationStackTrace: rawCreationStackTrace, creationStackTraceTarget: creationTarget} =
|
|
870
|
+
frame.getCreationStackTraceData();
|
|
871
|
+
this.#creationTarget = creationTarget;
|
|
872
|
+
if (rawCreationStackTrace) {
|
|
873
|
+
void Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()
|
|
874
|
+
.createStackTraceFromProtocolRuntime(rawCreationStackTrace, creationTarget)
|
|
875
|
+
.then(creationStackTrace => {
|
|
876
|
+
this.#creationStackTrace = creationStackTrace;
|
|
877
|
+
this.requestUpdate();
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
const networkManager = frame.resourceTreeModel().target().model(SDK.NetworkManager.NetworkManager);
|
|
881
|
+
void networkManager?.getSecurityIsolationStatus(frame.id).then(securityIsolationInfo => {
|
|
882
|
+
this.#securityIsolationInfo = securityIsolationInfo;
|
|
883
|
+
this.requestUpdate();
|
|
884
|
+
});
|
|
885
|
+
void frame.getOwnerDOMNodeOrDocument().then(linkTargetDOMNode => {
|
|
886
|
+
this.#linkTargetDOMNode = linkTargetDOMNode;
|
|
887
|
+
this.requestUpdate();
|
|
888
|
+
});
|
|
889
|
+
void frame.getOriginTrials().then(trials => {
|
|
890
|
+
this.#trials = trials;
|
|
891
|
+
this.requestUpdate();
|
|
892
|
+
});
|
|
862
893
|
this.requestUpdate();
|
|
863
894
|
}
|
|
864
895
|
|
|
@@ -882,27 +913,24 @@ export class FrameDetailsReportView extends UI.Widget.Widget {
|
|
|
882
913
|
this.#target = debuggerModel?.target() ?? null;
|
|
883
914
|
}
|
|
884
915
|
|
|
885
|
-
if (!this.#permissionsPolicies && this.#frame) {
|
|
886
|
-
this.#permissionsPolicies = this.#frame.getPermissionsPolicyState();
|
|
887
|
-
}
|
|
888
916
|
const frame = this.#frame;
|
|
889
917
|
if (!frame) {
|
|
890
918
|
return;
|
|
891
919
|
}
|
|
892
|
-
const networkManager = frame.resourceTreeModel().target().model(SDK.NetworkManager.NetworkManager);
|
|
893
|
-
const securityIsolationInfo = networkManager?.getSecurityIsolationStatus(frame.id);
|
|
894
|
-
const linkTargetDOMNode = frame.getOwnerDOMNodeOrDocument();
|
|
895
920
|
const frameRequest = frame.resourceForURL(frame.url)?.request;
|
|
921
|
+
|
|
896
922
|
const input = {
|
|
897
923
|
frame,
|
|
898
924
|
target: this.#target,
|
|
925
|
+
creationStackTrace: this.#creationStackTrace,
|
|
926
|
+
creationTarget: this.#creationTarget,
|
|
899
927
|
protocolMonitorExperimentEnabled: this.#protocolMonitorExperimentEnabled,
|
|
900
928
|
permissionsPolicies: this.#permissionsPolicies,
|
|
901
929
|
adScriptAncestry: this.#adScriptAncestry,
|
|
902
930
|
linkifier: this.#linkifier,
|
|
903
|
-
linkTargetDOMNode,
|
|
904
|
-
trials:
|
|
905
|
-
securityIsolationInfo,
|
|
931
|
+
linkTargetDOMNode: this.#linkTargetDOMNode,
|
|
932
|
+
trials: this.#trials,
|
|
933
|
+
securityIsolationInfo: this.#securityIsolationInfo,
|
|
906
934
|
onRevealInNetwork: frameRequest ?
|
|
907
935
|
() => {
|
|
908
936
|
const requestLocation = NetworkForward.UIRequestLocation.UIRequestLocation.tab(
|
|
@@ -410,7 +410,7 @@ export class ServiceWorkerCacheView extends UI.View.SimpleView {
|
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
// It is possible that table selection changes before the preview opens.
|
|
413
|
-
if (
|
|
413
|
+
if (request === this.dataGrid?.selectedNode?.data) {
|
|
414
414
|
this.showPreview(preview);
|
|
415
415
|
}
|
|
416
416
|
}
|
|
@@ -12,7 +12,6 @@ import * as ReportsGrid from './ReportsGrid.js';
|
|
|
12
12
|
import * as ServiceWorkerRouterView from './ServiceWorkerRouterView.js';
|
|
13
13
|
import * as SharedStorageAccessGrid from './SharedStorageAccessGrid.js';
|
|
14
14
|
import * as SharedStorageMetadataView from './SharedStorageMetadataView.js';
|
|
15
|
-
import * as StackTrace from './StackTrace.js';
|
|
16
15
|
import * as StorageMetadataView from './StorageMetadataView.js';
|
|
17
16
|
import * as TrustTokensView from './TrustTokensView.js';
|
|
18
17
|
|
|
@@ -27,7 +26,6 @@ export {
|
|
|
27
26
|
ServiceWorkerRouterView,
|
|
28
27
|
SharedStorageAccessGrid,
|
|
29
28
|
SharedStorageMetadataView,
|
|
30
|
-
StackTrace,
|
|
31
29
|
StorageMetadataView,
|
|
32
30
|
TrustTokensView,
|
|
33
31
|
};
|
|
@@ -0,0 +1,80 @@
|
|
|
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 Host from '../../core/host/host.js';
|
|
6
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
8
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
9
|
+
|
|
10
|
+
const UIStringsNotTranslate = {
|
|
11
|
+
/**
|
|
12
|
+
* @description Text for teaser to generate code.
|
|
13
|
+
*/
|
|
14
|
+
ctrlItoGenerateCode: 'ctrl-i to generate code',
|
|
15
|
+
/**
|
|
16
|
+
* @description Text for teaser to generate code in Mac.
|
|
17
|
+
*/
|
|
18
|
+
cmdItoGenerateCode: 'cmd-i to generate code',
|
|
19
|
+
/**
|
|
20
|
+
* Text for teaser when generating suggestion.
|
|
21
|
+
*/
|
|
22
|
+
generating: 'Generating... (esc to cancel)',
|
|
23
|
+
} as const;
|
|
24
|
+
|
|
25
|
+
const lockedString = i18n.i18n.lockedString;
|
|
26
|
+
|
|
27
|
+
export interface ViewInput {
|
|
28
|
+
loading: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
32
|
+
|
|
33
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
34
|
+
const toGenerateCode = Host.Platform.isMac() ? lockedString(UIStringsNotTranslate.cmdItoGenerateCode) :
|
|
35
|
+
lockedString(UIStringsNotTranslate.ctrlItoGenerateCode);
|
|
36
|
+
const teaserLabel = input.loading ? lockedString(UIStringsNotTranslate.generating) : toGenerateCode;
|
|
37
|
+
// clang-format off
|
|
38
|
+
render(
|
|
39
|
+
html`
|
|
40
|
+
<div class="ai-code-generation-teaser">
|
|
41
|
+
${teaserLabel}
|
|
42
|
+
</div>
|
|
43
|
+
`, target
|
|
44
|
+
);
|
|
45
|
+
// clang-format on
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export class AiCodeGenerationTeaser extends UI.Widget.Widget {
|
|
49
|
+
readonly #view: View;
|
|
50
|
+
|
|
51
|
+
#loading = false;
|
|
52
|
+
|
|
53
|
+
constructor(view?: View) {
|
|
54
|
+
super();
|
|
55
|
+
this.markAsExternallyManaged();
|
|
56
|
+
this.#view = view ?? DEFAULT_VIEW;
|
|
57
|
+
this.requestUpdate();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
override performUpdate(): void {
|
|
61
|
+
const output = {};
|
|
62
|
+
this.#view(
|
|
63
|
+
{
|
|
64
|
+
loading: this.#loading,
|
|
65
|
+
},
|
|
66
|
+
output, this.contentElement);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
get loading(): boolean {
|
|
70
|
+
return this.#loading;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
set loading(loading: boolean) {
|
|
74
|
+
if (loading === this.#loading) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
this.#loading = loading;
|
|
78
|
+
this.requestUpdate();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -69,7 +69,7 @@ export class TypeToAllowDialog {
|
|
|
69
69
|
UI.UIUtils.createTextButton(i18nString(UIStrings.cancel), () => resolve(false), {jslogContext: 'cancel'});
|
|
70
70
|
|
|
71
71
|
const allowButton = UI.UIUtils.createTextButton(i18nString(UIStrings.allow), () => {
|
|
72
|
-
resolve(input.value === options.typePhrase);
|
|
72
|
+
resolve(input.value === options.typePhrase || input.value === `'${options.typePhrase}'`);
|
|
73
73
|
}, {jslogContext: 'confirm', variant: Buttons.Button.Variant.PRIMARY});
|
|
74
74
|
allowButton.disabled = true;
|
|
75
75
|
|
|
@@ -95,6 +95,7 @@ export class TypeToAllowDialog {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
export {AiCodeCompletionTeaser} from './AiCodeCompletionTeaser.js';
|
|
98
|
+
export {AiCodeGenerationTeaser} from './AiCodeGenerationTeaser.js';
|
|
98
99
|
export {FreDialog} from './FreDialog.js';
|
|
99
100
|
export {GdpSignUpDialog} from './GdpSignUpDialog.js';
|
|
100
101
|
export {AiCodeCompletionDisclaimer} from './AiCodeCompletionDisclaimer.js';
|