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
|
@@ -895,7 +895,7 @@ export const mergeSegments = (segmentsA: CoverageSegment[], segmentsB: CoverageS
|
|
|
895
895
|
const end = Math.min(a.end, b.end);
|
|
896
896
|
const last = result[result.length - 1];
|
|
897
897
|
const stamp = Math.min(a.stamp, b.stamp);
|
|
898
|
-
if (
|
|
898
|
+
if (last?.count !== count || last.stamp !== stamp) {
|
|
899
899
|
result.push({end, count, stamp});
|
|
900
900
|
} else {
|
|
901
901
|
last.end = end;
|
|
@@ -1078,7 +1078,7 @@ export class CoverageInfo {
|
|
|
1078
1078
|
for (const segment of this.segments) {
|
|
1079
1079
|
if (segment.count) {
|
|
1080
1080
|
const last = ranges.length > 0 ? ranges[ranges.length - 1] : null;
|
|
1081
|
-
if (last
|
|
1081
|
+
if (last?.end === start + offset) {
|
|
1082
1082
|
// We can extend the last segment.
|
|
1083
1083
|
last.end = segment.end + offset;
|
|
1084
1084
|
} else {
|
|
@@ -124,11 +124,11 @@ function getTooltipFromGenericIssue(errorType: Protocol.Audits.GenericIssueError
|
|
|
124
124
|
return i18nString(UIStrings.formAutocompleteAttributeEmptyError);
|
|
125
125
|
case Protocol.Audits.GenericIssueErrorType.FormEmptyIdAndNameAttributesForInputError:
|
|
126
126
|
return i18nString(UIStrings.formEmptyIdAndNameAttributesForInputError);
|
|
127
|
-
case Protocol.Audits.GenericIssueErrorType.
|
|
127
|
+
case Protocol.Audits.GenericIssueErrorType.FormAriaLabelledByToNonExistingIdError:
|
|
128
128
|
return i18nString(UIStrings.formAriaLabelledByToNonExistingId);
|
|
129
129
|
case Protocol.Audits.GenericIssueErrorType.FormInputAssignedAutocompleteValueToIdOrNameAttributeError:
|
|
130
130
|
return i18nString(UIStrings.formInputAssignedAutocompleteValueToIdOrNameAttributeError);
|
|
131
|
-
case Protocol.Audits.GenericIssueErrorType.
|
|
131
|
+
case Protocol.Audits.GenericIssueErrorType.FormLabelHasNeitherForNorNestedInputError:
|
|
132
132
|
return i18nString(UIStrings.formLabelHasNeitherForNorNestedInput);
|
|
133
133
|
case Protocol.Audits.GenericIssueErrorType.FormLabelForMatchesNonExistingIdError:
|
|
134
134
|
return i18nString(UIStrings.formLabelForMatchesNonExistingIdError);
|
|
@@ -641,7 +641,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
-
if (
|
|
644
|
+
if (this.searchConfig?.query !== query) {
|
|
645
645
|
this.onSearchCanceled();
|
|
646
646
|
} else {
|
|
647
647
|
this.hideSearchHighlights();
|
|
@@ -104,6 +104,7 @@ interface ViewInput {
|
|
|
104
104
|
interface ViewOutput {
|
|
105
105
|
elementsTreeOutline?: ElementsTreeOutline;
|
|
106
106
|
highlightedTreeElement: ElementsTreeElement|null;
|
|
107
|
+
isUpdatingHighlights: boolean;
|
|
107
108
|
alreadyExpandedParentTreeElement: ElementsTreeElement|null;
|
|
108
109
|
}
|
|
109
110
|
|
|
@@ -135,6 +136,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
135
136
|
// Node highlighting logic. FIXME: express as a lit template.
|
|
136
137
|
const previousHighlightedNode = output.highlightedTreeElement?.node() ?? null;
|
|
137
138
|
if (previousHighlightedNode !== input.currentHighlightedNode) {
|
|
139
|
+
output.isUpdatingHighlights = true;
|
|
138
140
|
let treeElement: ElementsTreeElement|null = null;
|
|
139
141
|
|
|
140
142
|
if (output.highlightedTreeElement) {
|
|
@@ -172,6 +174,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
172
174
|
output.highlightedTreeElement = treeElement;
|
|
173
175
|
output.elementsTreeOutline.setHoverEffect(treeElement);
|
|
174
176
|
treeElement?.reveal(true);
|
|
177
|
+
output.isUpdatingHighlights = false;
|
|
175
178
|
}
|
|
176
179
|
};
|
|
177
180
|
|
|
@@ -224,6 +227,7 @@ export class DOMTreeWidget extends UI.Widget.Widget {
|
|
|
224
227
|
#viewOutput: ViewOutput = {
|
|
225
228
|
highlightedTreeElement: null,
|
|
226
229
|
alreadyExpandedParentTreeElement: null,
|
|
230
|
+
isUpdatingHighlights: false,
|
|
227
231
|
};
|
|
228
232
|
#highlightThrottler = new Common.Throttler.Throttler(100);
|
|
229
233
|
|
|
@@ -238,8 +242,8 @@ export class DOMTreeWidget extends UI.Widget.Widget {
|
|
|
238
242
|
SDK.OverlayModel.OverlayModel, SDK.OverlayModel.Events.HIGHLIGHT_NODE_REQUESTED, this.#highlightNode, this,
|
|
239
243
|
{scoped: true});
|
|
240
244
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
241
|
-
SDK.OverlayModel.OverlayModel, SDK.OverlayModel.Events.INSPECT_MODE_WILL_BE_TOGGLED,
|
|
242
|
-
{scoped: true});
|
|
245
|
+
SDK.OverlayModel.OverlayModel, SDK.OverlayModel.Events.INSPECT_MODE_WILL_BE_TOGGLED,
|
|
246
|
+
this.#clearHighlightedNode, this, {scoped: true});
|
|
243
247
|
}
|
|
244
248
|
}
|
|
245
249
|
|
|
@@ -250,7 +254,13 @@ export class DOMTreeWidget extends UI.Widget.Widget {
|
|
|
250
254
|
});
|
|
251
255
|
}
|
|
252
256
|
|
|
253
|
-
#
|
|
257
|
+
#clearHighlightedNode(): void {
|
|
258
|
+
// Highlighting an element via tree outline will emit the
|
|
259
|
+
// INSPECT_MODE_WILL_BE_TOGGLED event, therefore, we skip it if the view
|
|
260
|
+
// informed us that it is updating the element.
|
|
261
|
+
if (this.#viewOutput.isUpdatingHighlights) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
254
264
|
this.#currentHighlightedNode = null;
|
|
255
265
|
this.requestUpdate();
|
|
256
266
|
}
|
|
@@ -304,11 +314,11 @@ export class DOMTreeWidget extends UI.Widget.Widget {
|
|
|
304
314
|
currentHighlightedNode: this.#currentHighlightedNode,
|
|
305
315
|
onElementsTreeUpdated: this.onElementsTreeUpdated.bind(this),
|
|
306
316
|
onSelectedNodeChanged: event => {
|
|
307
|
-
this.#
|
|
317
|
+
this.#clearHighlightedNode();
|
|
308
318
|
this.onSelectedNodeChanged(event);
|
|
309
319
|
},
|
|
310
|
-
onElementCollapsed: this.#
|
|
311
|
-
onElementExpanded: this.#
|
|
320
|
+
onElementCollapsed: this.#clearHighlightedNode.bind(this),
|
|
321
|
+
onElementExpanded: this.#clearHighlightedNode.bind(this),
|
|
312
322
|
},
|
|
313
323
|
this.#viewOutput, this.contentElement);
|
|
314
324
|
}
|
|
@@ -684,7 +694,7 @@ export class ElementsTreeOutline extends
|
|
|
684
694
|
}
|
|
685
695
|
|
|
686
696
|
resetClipboardIfNeeded(removedNode: SDK.DOMModel.DOMNode): void {
|
|
687
|
-
if (this.clipboardNodeData
|
|
697
|
+
if (this.clipboardNodeData?.node === removedNode) {
|
|
688
698
|
this.setClipboardData(null);
|
|
689
699
|
}
|
|
690
700
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
8
|
+
import type * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
8
9
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
9
10
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
11
|
import {html, render} from '../../ui/lit/lit.js';
|
|
@@ -23,20 +24,20 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
23
24
|
interface ViewInput {
|
|
24
25
|
target?: SDK.Target.Target;
|
|
25
26
|
linkifier: Components.Linkifier.Linkifier;
|
|
26
|
-
|
|
27
|
+
stackTrace?: StackTrace.StackTrace.StackTrace;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
30
31
|
|
|
31
32
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
32
|
-
const {target: sdkTarget, linkifier,
|
|
33
|
+
const {target: sdkTarget, linkifier, stackTrace} = input;
|
|
33
34
|
// clang-format off
|
|
34
35
|
render(html`
|
|
35
36
|
<style>${nodeStackTraceWidgetStyles}</style>
|
|
36
|
-
${target &&
|
|
37
|
+
${target && stackTrace ?
|
|
37
38
|
html`<devtools-widget
|
|
38
39
|
class="stack-trace"
|
|
39
|
-
.widgetConfig=${UI.Widget.widgetConfig(Components.JSPresentationUtils.StackTracePreviewContent, {target: sdkTarget, linkifier,
|
|
40
|
+
.widgetConfig=${UI.Widget.widgetConfig(Components.JSPresentationUtils.StackTracePreviewContent, {target: sdkTarget, linkifier, stackTrace})}>
|
|
40
41
|
</devtools-widget>` :
|
|
41
42
|
html`<div class="gray-info-message">${i18nString(UIStrings.noStackTraceAvailable)}</div>`}`,
|
|
42
43
|
target);
|
|
@@ -75,7 +76,7 @@ export class NodeStackTraceWidget extends UI.Widget.VBox {
|
|
|
75
76
|
const input: ViewInput = {
|
|
76
77
|
target,
|
|
77
78
|
linkifier: this.#linkifier,
|
|
78
|
-
|
|
79
|
+
stackTrace,
|
|
79
80
|
};
|
|
80
81
|
this.#view(input, {}, this.contentElement);
|
|
81
82
|
}
|
|
@@ -1610,9 +1610,8 @@ export class LengthRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.L
|
|
|
1610
1610
|
valueElement.tabIndex = -1;
|
|
1611
1611
|
valueElement.textContent = match.text;
|
|
1612
1612
|
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
}
|
|
1613
|
+
const tooltip = this.#getTooltip(valueElement, match, context);
|
|
1614
|
+
|
|
1616
1615
|
const evaluation = context.tracing?.applyEvaluation([], () => {
|
|
1617
1616
|
return {
|
|
1618
1617
|
placeholder: [valueElement],
|
|
@@ -1620,7 +1619,11 @@ export class LengthRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.L
|
|
|
1620
1619
|
};
|
|
1621
1620
|
});
|
|
1622
1621
|
|
|
1623
|
-
|
|
1622
|
+
if (evaluation) {
|
|
1623
|
+
return evaluation;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
return tooltip ? [valueElement, tooltip] : [valueElement];
|
|
1624
1627
|
}
|
|
1625
1628
|
|
|
1626
1629
|
async #applyEvaluation(
|
|
@@ -1635,25 +1638,26 @@ export class LengthRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.L
|
|
|
1635
1638
|
return false;
|
|
1636
1639
|
}
|
|
1637
1640
|
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
const pixelValue = await resolveValues(this.#stylesPane, this.#propertyName, match, context, match.text);
|
|
1641
|
-
if (!pixelValue) {
|
|
1642
|
-
return;
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1641
|
+
#getTooltip(valueElement: HTMLElement, match: SDK.CSSPropertyParser.Match, context: RenderingContext):
|
|
1642
|
+
Tooltips.Tooltip.Tooltip|undefined {
|
|
1645
1643
|
const tooltipId = this.#treeElement?.getTooltipId('length');
|
|
1646
|
-
if (tooltipId) {
|
|
1647
|
-
|
|
1648
|
-
const tooltip = new Tooltips.Tooltip.Tooltip(
|
|
1649
|
-
{anchor: valueElement, variant: 'rich', id: tooltipId, jslogContext: 'length-popover'});
|
|
1650
|
-
tooltip.appendChild(document.createTextNode(pixelValue[0]));
|
|
1651
|
-
valueElement.insertAdjacentElement('afterend', tooltip);
|
|
1644
|
+
if (!tooltipId) {
|
|
1645
|
+
return undefined;
|
|
1652
1646
|
}
|
|
1653
|
-
|
|
1647
|
+
valueElement.setAttribute('aria-details', tooltipId);
|
|
1648
|
+
const tooltip = new Tooltips.Tooltip.Tooltip(
|
|
1649
|
+
{anchor: valueElement, variant: 'rich', id: tooltipId, jslogContext: 'length-popover'});
|
|
1650
|
+
tooltip.addEventListener('beforetoggle', () => this.getTooltipValue(tooltip, match, context), {once: true});
|
|
1651
|
+
return tooltip;
|
|
1654
1652
|
}
|
|
1655
1653
|
|
|
1656
|
-
|
|
1654
|
+
async getTooltipValue(
|
|
1655
|
+
tooltip: Tooltips.Tooltip.Tooltip, match: SDK.CSSPropertyParser.Match, context: RenderingContext): Promise<void> {
|
|
1656
|
+
const pixelValue = await resolveValues(this.#stylesPane, this.#propertyName, match, context, match.text);
|
|
1657
|
+
if (!pixelValue) {
|
|
1658
|
+
return;
|
|
1659
|
+
}
|
|
1660
|
+
tooltip.appendChild(document.createTextNode(pixelValue[0]));
|
|
1657
1661
|
}
|
|
1658
1662
|
}
|
|
1659
1663
|
|
|
@@ -2408,8 +2412,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2408
2412
|
}
|
|
2409
2413
|
|
|
2410
2414
|
if (this.valueElement) {
|
|
2411
|
-
const lineBreakValue =
|
|
2412
|
-
this.valueElement.firstElementChild && this.valueElement.firstElementChild.tagName === 'BR';
|
|
2415
|
+
const lineBreakValue = this.valueElement.firstElementChild?.tagName === 'BR';
|
|
2413
2416
|
const separator = lineBreakValue ? ':' : ': ';
|
|
2414
2417
|
this.listItemElement.createChild('span', 'styles-name-value-separator').textContent = separator;
|
|
2415
2418
|
if (this.expandElement) {
|
|
@@ -370,7 +370,7 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
private sectionsContainerKeyDown(event: Event): void {
|
|
373
|
-
const activeElement =
|
|
373
|
+
const activeElement = UI.DOMUtilities.deepActiveElement(this.sectionsContainer.contentElement.ownerDocument);
|
|
374
374
|
if (!activeElement) {
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
@@ -20,7 +20,6 @@ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
|
20
20
|
import * as Console from '../../console/console.js';
|
|
21
21
|
|
|
22
22
|
import styles from './consoleInsight.css.js';
|
|
23
|
-
import listStyles from './consoleInsightSourcesList.css.js';
|
|
24
23
|
|
|
25
24
|
// Note: privacy and legal notices are not localized so far.
|
|
26
25
|
const UIStrings = {
|
|
@@ -189,12 +188,14 @@ const SIGN_IN_URL = 'https://accounts.google.com' as Platform.DevToolsPath.UrlSt
|
|
|
189
188
|
|
|
190
189
|
interface ViewInput {
|
|
191
190
|
state: StateData;
|
|
191
|
+
closing: boolean;
|
|
192
192
|
disableAnimations: boolean;
|
|
193
193
|
renderer: MarkdownView.MarkdownView.MarkdownInsightRenderer;
|
|
194
194
|
selectedRating?: boolean;
|
|
195
195
|
noLogging: boolean;
|
|
196
196
|
callbacks: {
|
|
197
197
|
onClose: () => void,
|
|
198
|
+
onAnimationEnd: () => void,
|
|
198
199
|
onSearch: () => void,
|
|
199
200
|
onRating: (isPositive: boolean) => void,
|
|
200
201
|
onReport: () => void,
|
|
@@ -363,6 +364,26 @@ function renderLoading(): Lit.TemplateResult {
|
|
|
363
364
|
// clang-format on
|
|
364
365
|
}
|
|
365
366
|
|
|
367
|
+
function renderInsightSourcesList(
|
|
368
|
+
sources: Console.PromptBuilder.Source[], isPageReloadRecommended: boolean): Lit.TemplateResult {
|
|
369
|
+
// clang-format off
|
|
370
|
+
return html`
|
|
371
|
+
<div class="insight-sources">
|
|
372
|
+
<ul>
|
|
373
|
+
${Directives.repeat(sources, item => item.value, item => {
|
|
374
|
+
return html`<li><x-link class="link" title="${localizeType(item.type)} ${i18nString(UIStrings.opensInNewTab)}" href="data:text/plain;charset=utf-8,${encodeURIComponent(item.value)}" jslog=${VisualLogging.link('source-' + item.type).track({click: true})}>
|
|
375
|
+
<devtools-icon name="open-externally"></devtools-icon>
|
|
376
|
+
${localizeType(item.type)}
|
|
377
|
+
</x-link></li>`;
|
|
378
|
+
})}
|
|
379
|
+
${isPageReloadRecommended ? html`<li class="source-disclaimer">
|
|
380
|
+
<devtools-icon name="warning"></devtools-icon>
|
|
381
|
+
${i18nString(UIStrings.reloadRecommendation)}</li>` : Lit.nothing}
|
|
382
|
+
</ul>
|
|
383
|
+
</div>`;
|
|
384
|
+
// clang-format on
|
|
385
|
+
}
|
|
386
|
+
|
|
366
387
|
function renderInsight(
|
|
367
388
|
insight: Extract<StateData, {type: State.INSIGHT}>, renderer: ViewInput['renderer'],
|
|
368
389
|
disableAnimations: ViewInput['disableAnimations'], callbacks: ViewInput['callbacks'],
|
|
@@ -384,8 +405,7 @@ function renderInsight(
|
|
|
384
405
|
` : Lit.nothing}
|
|
385
406
|
<details jslog=${VisualLogging.expand('sources').track({click: true})}>
|
|
386
407
|
<summary>${i18nString(UIStrings.inputData)}</summary>
|
|
387
|
-
|
|
388
|
-
</devtools-console-insight-sources-list>
|
|
408
|
+
${renderInsightSourcesList(insight.sources, insight.isPageReloadRecommended)}
|
|
389
409
|
</details>
|
|
390
410
|
<div class="buttons">
|
|
391
411
|
${renderSearchButton(callbacks.onSearch)}
|
|
@@ -652,6 +672,8 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
652
672
|
#headerRef = Directives.createRef<HTMLHeadingElement>();
|
|
653
673
|
#citationLinks: HTMLElement[] = [];
|
|
654
674
|
#areReferenceDetailsOpen = false;
|
|
675
|
+
#stateChanging = false;
|
|
676
|
+
#closing = false;
|
|
655
677
|
|
|
656
678
|
// Rating sub-form state.
|
|
657
679
|
#selectedRating?: boolean;
|
|
@@ -818,12 +840,9 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
818
840
|
}
|
|
819
841
|
|
|
820
842
|
#transitionTo(newState: StateData): void {
|
|
821
|
-
|
|
843
|
+
this.#stateChanging = this.#state.type !== newState.type;
|
|
822
844
|
this.#state = newState;
|
|
823
845
|
this.#render();
|
|
824
|
-
if (newState.type !== previousState.type) {
|
|
825
|
-
this.#focusHeader();
|
|
826
|
-
}
|
|
827
846
|
}
|
|
828
847
|
|
|
829
848
|
async #generateInsightIfNeeded(): Promise<void> {
|
|
@@ -855,10 +874,18 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
855
874
|
if (this.#state.type === State.CONSENT_REMINDER) {
|
|
856
875
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.InsightsReminderTeaserCanceled);
|
|
857
876
|
}
|
|
858
|
-
this
|
|
877
|
+
this.#closing = true;
|
|
878
|
+
this.#render();
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
#onAnimationEnd(): void {
|
|
882
|
+
if (this.#closing) {
|
|
859
883
|
this.dispatchEvent(new CloseEvent());
|
|
860
|
-
|
|
861
|
-
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
if (this.#stateChanging) {
|
|
887
|
+
this.#headerRef.value?.focus();
|
|
888
|
+
}
|
|
862
889
|
}
|
|
863
890
|
|
|
864
891
|
#onRating(isPositive: boolean): void {
|
|
@@ -1074,12 +1101,6 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
1074
1101
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(SIGN_IN_URL);
|
|
1075
1102
|
}
|
|
1076
1103
|
|
|
1077
|
-
#focusHeader(): void {
|
|
1078
|
-
this.addEventListener('animationend', () => {
|
|
1079
|
-
this.#headerRef.value?.focus();
|
|
1080
|
-
}, {once: true});
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
1104
|
#onToggleReferenceDetails(): void {
|
|
1084
1105
|
if (this.#referenceDetailsRef.value) {
|
|
1085
1106
|
this.#areReferenceDetailsOpen = this.#referenceDetailsRef.value.open;
|
|
@@ -1103,6 +1124,7 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
1103
1124
|
#render(): void {
|
|
1104
1125
|
const input: ViewInput = {
|
|
1105
1126
|
state: this.#state,
|
|
1127
|
+
closing: this.#closing,
|
|
1106
1128
|
disableAnimations: this.disableAnimations,
|
|
1107
1129
|
renderer: this.#renderer,
|
|
1108
1130
|
selectedRating: this.#selectedRating,
|
|
@@ -1110,6 +1132,7 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
1110
1132
|
Root.Runtime.GenAiEnterprisePolicyValue.ALLOW_WITHOUT_LOGGING,
|
|
1111
1133
|
callbacks: {
|
|
1112
1134
|
onClose: this.#onClose.bind(this),
|
|
1135
|
+
onAnimationEnd: this.#onAnimationEnd.bind(this),
|
|
1113
1136
|
onSearch: this.#onSearch.bind(this),
|
|
1114
1137
|
onRating: this.#onRating.bind(this),
|
|
1115
1138
|
onReport: this.#onReport.bind(this),
|
|
@@ -1181,7 +1204,11 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
1181
1204
|
render(html`
|
|
1182
1205
|
<style>${styles}</style>
|
|
1183
1206
|
<style>${Input.checkboxStyles}</style>
|
|
1184
|
-
<div
|
|
1207
|
+
<div
|
|
1208
|
+
class=${Directives.classMap({wrapper: true, closing: input.closing})}
|
|
1209
|
+
jslog=${VisualLogging.pane('console-insights').track({resize: true})}
|
|
1210
|
+
@animationend=${callbacks.onAnimationEnd}
|
|
1211
|
+
>
|
|
1185
1212
|
<div class="animation-wrapper">
|
|
1186
1213
|
${header}
|
|
1187
1214
|
<main jslog=${jslog} class=${Directives.classMap(mainClasses)}>
|
|
@@ -1205,50 +1232,10 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
1205
1232
|
}
|
|
1206
1233
|
}
|
|
1207
1234
|
|
|
1208
|
-
class ConsoleInsightSourcesList extends HTMLElement {
|
|
1209
|
-
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
1210
|
-
#sources: Console.PromptBuilder.Source[] = [];
|
|
1211
|
-
#isPageReloadRecommended = false;
|
|
1212
|
-
|
|
1213
|
-
#render(): void {
|
|
1214
|
-
// clang-format off
|
|
1215
|
-
render(html`
|
|
1216
|
-
<style>${listStyles}</style>
|
|
1217
|
-
<style>${Input.checkboxStyles}</style>
|
|
1218
|
-
<ul>
|
|
1219
|
-
${Directives.repeat(this.#sources, item => item.value, item => {
|
|
1220
|
-
return html`<li><x-link class="link" title="${localizeType(item.type)} ${i18nString(UIStrings.opensInNewTab)}" href="data:text/plain;charset=utf-8,${encodeURIComponent(item.value)}" jslog=${VisualLogging.link('source-' + item.type).track({click: true})}>
|
|
1221
|
-
<devtools-icon name="open-externally"></devtools-icon>
|
|
1222
|
-
${localizeType(item.type)}
|
|
1223
|
-
</x-link></li>`;
|
|
1224
|
-
})}
|
|
1225
|
-
${this.#isPageReloadRecommended ? html`<li class="source-disclaimer">
|
|
1226
|
-
<devtools-icon name="warning"></devtools-icon>
|
|
1227
|
-
${i18nString(UIStrings.reloadRecommendation)}</li>` : Lit.nothing}
|
|
1228
|
-
</ul>
|
|
1229
|
-
`, this.#shadow, {
|
|
1230
|
-
host: this,
|
|
1231
|
-
});
|
|
1232
|
-
// clang-format on
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
set sources(values: Console.PromptBuilder.Source[]) {
|
|
1236
|
-
this.#sources = values;
|
|
1237
|
-
this.#render();
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
set isPageReloadRecommended(isPageReloadRecommended: boolean) {
|
|
1241
|
-
this.#isPageReloadRecommended = isPageReloadRecommended;
|
|
1242
|
-
this.#render();
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
1235
|
customElements.define('devtools-console-insight', ConsoleInsight);
|
|
1247
|
-
customElements.define('devtools-console-insight-sources-list', ConsoleInsightSourcesList);
|
|
1248
1236
|
|
|
1249
1237
|
declare global {
|
|
1250
1238
|
interface HTMLElementTagNameMap {
|
|
1251
1239
|
'devtools-console-insight': ConsoleInsight;
|
|
1252
|
-
'devtools-console-insight-sources-list': ConsoleInsightSourcesList;
|
|
1253
1240
|
}
|
|
1254
1241
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
animation: expand var(--sys-motion-duration-medium2) var(--sys-motion-easing-emphasized) forwards;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
.wrapper.closing {
|
|
28
28
|
animation: collapse var(--sys-motion-duration-medium2) var(--sys-motion-easing-emphasized) forwards;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -393,3 +393,48 @@ details h3 {
|
|
|
393
393
|
.error-message {
|
|
394
394
|
font: var(--sys-typescale-body4-bold);
|
|
395
395
|
}
|
|
396
|
+
|
|
397
|
+
@scope (.insight-sources) {
|
|
398
|
+
:root {
|
|
399
|
+
padding: 0;
|
|
400
|
+
margin: 0;
|
|
401
|
+
box-sizing: border-box;
|
|
402
|
+
display: block;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
ul {
|
|
406
|
+
color: var(--sys-color-primary);
|
|
407
|
+
font-size: 12px;
|
|
408
|
+
font-style: normal;
|
|
409
|
+
font-weight: 400;
|
|
410
|
+
line-height: 18px;
|
|
411
|
+
margin-top: 8px;
|
|
412
|
+
padding-left: var(--sys-size-6);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
li {
|
|
416
|
+
list-style-type: none;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
ul .link {
|
|
420
|
+
color: var(--sys-color-primary);
|
|
421
|
+
display: inline-flex !important; /* stylelint-disable-line declaration-no-important */
|
|
422
|
+
align-items: center;
|
|
423
|
+
gap: 4px;
|
|
424
|
+
text-decoration-line: underline;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
devtools-icon {
|
|
428
|
+
height: 16px;
|
|
429
|
+
width: 16px;
|
|
430
|
+
margin-right: var(--sys-size-1);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
devtools-icon[name="open-externally"] {
|
|
434
|
+
color: var(--icon-link);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.source-disclaimer {
|
|
438
|
+
color: var(--sys-color-on-surface-subtle);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Common from '../../core/common/common.js';
|
|
8
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
9
|
-
import * as Platform from '../../core/platform/platform.js';
|
|
10
9
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
11
10
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
11
|
|
|
@@ -80,7 +79,7 @@ export class LayerTreeOutline extends Common.ObjectWrapper.eventMixin<EventTypes
|
|
|
80
79
|
wrapperElement.appendChild(this.treeOutline.element);
|
|
81
80
|
wrapperElement.appendChild(summaryElement);
|
|
82
81
|
this.element = wrapperElement;
|
|
83
|
-
|
|
82
|
+
UI.DOMUtilities.appendStyle(this.element, layerTreeOutlineStyles);
|
|
84
83
|
|
|
85
84
|
this.layerViewHost.showInternalLayersSetting().addChangeListener(this.update, this);
|
|
86
85
|
}
|
|
@@ -64,6 +64,7 @@ interface ViewInput {
|
|
|
64
64
|
customConditionsGroup: NetworkThrottlingConditionsGroup;
|
|
65
65
|
jslogContext: string|undefined;
|
|
66
66
|
title: string|undefined;
|
|
67
|
+
disabled: boolean;
|
|
67
68
|
onSelect: (conditions: SDK.NetworkManager.ThrottlingConditions) => void;
|
|
68
69
|
onAddCustomConditions: () => void;
|
|
69
70
|
}
|
|
@@ -108,6 +109,7 @@ export const DEFAULT_VIEW: ViewFunction = (input, output, target) => {
|
|
|
108
109
|
render(
|
|
109
110
|
// clang-format off
|
|
110
111
|
html`<select
|
|
112
|
+
?disabled=${input.disabled}
|
|
111
113
|
aria-label=${input.title ?? nothing}
|
|
112
114
|
jslog=${VisualLogging.dropDown().track({change: true}).context(input.jslogContext)}
|
|
113
115
|
@change=${onSelect}>
|
|
@@ -166,6 +168,7 @@ export class NetworkThrottlingSelect extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
166
168
|
readonly #title?: string;
|
|
167
169
|
readonly #view: ViewFunction;
|
|
168
170
|
#variant: NetworkThrottlingSelect.Variant = NetworkThrottlingSelect.Variant.GLOBAL_CONDITIONS;
|
|
171
|
+
#disabled = false;
|
|
169
172
|
|
|
170
173
|
static createForGlobalConditions(element: HTMLElement, title: string): NetworkThrottlingSelect {
|
|
171
174
|
ThrottlingManager.instance(); // Instantiate the throttling manager to connect network manager with the setting
|
|
@@ -204,6 +207,14 @@ export class NetworkThrottlingSelect extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
204
207
|
this.#performUpdate();
|
|
205
208
|
}
|
|
206
209
|
|
|
210
|
+
get disabled(): boolean {
|
|
211
|
+
return this.#disabled;
|
|
212
|
+
}
|
|
213
|
+
set disabled(disabled: boolean) {
|
|
214
|
+
this.#disabled = disabled;
|
|
215
|
+
this.#performUpdate();
|
|
216
|
+
}
|
|
217
|
+
|
|
207
218
|
get recommendedConditions(): SDK.NetworkManager.Conditions|null {
|
|
208
219
|
return this.#recommendedConditions;
|
|
209
220
|
}
|
|
@@ -284,6 +295,7 @@ export class NetworkThrottlingSelect extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
284
295
|
selectedConditions: this.#currentConditions,
|
|
285
296
|
jslogContext: this.#jslogContext,
|
|
286
297
|
title: this.#title,
|
|
298
|
+
disabled: this.#disabled,
|
|
287
299
|
onSelect,
|
|
288
300
|
onAddCustomConditions,
|
|
289
301
|
throttlingGroups,
|
|
@@ -308,6 +320,13 @@ export class NetworkThrottlingSelectorWidget extends UI.Widget.VBox {
|
|
|
308
320
|
this.#select.addEventListener(Events.CONDITIONS_CHANGED, ({data}) => this.#conditionsChangedHandler?.(data));
|
|
309
321
|
}
|
|
310
322
|
|
|
323
|
+
get disabled(): boolean {
|
|
324
|
+
return this.#select.disabled;
|
|
325
|
+
}
|
|
326
|
+
set disabled(disabled: boolean) {
|
|
327
|
+
this.#select.disabled = disabled;
|
|
328
|
+
}
|
|
329
|
+
|
|
311
330
|
set variant(variant: NetworkThrottlingSelect.Variant) {
|
|
312
331
|
this.#select.variant = variant;
|
|
313
332
|
}
|