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
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type {Protocol} from 'devtools-protocol';
|
|
8
|
+
|
|
7
9
|
import type {Frame} from '../api/Frame.js';
|
|
8
10
|
import type {JSHandle} from '../api/JSHandle.js';
|
|
9
11
|
|
|
@@ -62,6 +64,7 @@ export class ConsoleMessage {
|
|
|
62
64
|
#args: JSHandle[];
|
|
63
65
|
#stackTraceLocations: ConsoleMessageLocation[];
|
|
64
66
|
#frame?: Frame;
|
|
67
|
+
#rawStackTrace?: Protocol.Runtime.StackTrace;
|
|
65
68
|
|
|
66
69
|
/**
|
|
67
70
|
* @internal
|
|
@@ -72,12 +75,14 @@ export class ConsoleMessage {
|
|
|
72
75
|
args: JSHandle[],
|
|
73
76
|
stackTraceLocations: ConsoleMessageLocation[],
|
|
74
77
|
frame?: Frame,
|
|
78
|
+
rawStackTrace?: Protocol.Runtime.StackTrace,
|
|
75
79
|
) {
|
|
76
80
|
this.#type = type;
|
|
77
81
|
this.#text = text;
|
|
78
82
|
this.#args = args;
|
|
79
83
|
this.#stackTraceLocations = stackTraceLocations;
|
|
80
84
|
this.#frame = frame;
|
|
85
|
+
this.#rawStackTrace = rawStackTrace;
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
/**
|
|
@@ -117,4 +122,13 @@ export class ConsoleMessage {
|
|
|
117
122
|
stackTrace(): ConsoleMessageLocation[] {
|
|
118
123
|
return this.#stackTraceLocations;
|
|
119
124
|
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The underlying protocol stack trace if available.
|
|
128
|
+
*
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
_rawStackTrace(): Protocol.Runtime.StackTrace | undefined {
|
|
132
|
+
return this.#rawStackTrace;
|
|
133
|
+
}
|
|
120
134
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
10
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
|
11
|
-
chrome: '142.0.7444.
|
|
12
|
-
'chrome-headless-shell': '142.0.7444.
|
|
13
|
-
firefox: 'stable_145.0',
|
|
11
|
+
chrome: '142.0.7444.175',
|
|
12
|
+
'chrome-headless-shell': '142.0.7444.175',
|
|
13
|
+
firefox: 'stable_145.0.1',
|
|
14
14
|
});
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"package/lib/esm/puppeteer/api/Browser.js",
|
|
7
7
|
"package/lib/esm/puppeteer/api/BrowserContext.js",
|
|
8
8
|
"package/lib/esm/puppeteer/api/CDPSession.js",
|
|
9
|
+
"package/lib/esm/puppeteer/api/DeviceRequestPrompt.js",
|
|
9
10
|
"package/lib/esm/puppeteer/api/Dialog.js",
|
|
10
11
|
"package/lib/esm/puppeteer/api/ElementHandle.js",
|
|
11
12
|
"package/lib/esm/puppeteer/api/ElementHandleSymbol.js",
|
|
@@ -69,6 +69,11 @@ export const markdownLinks = new Map<string, string>([
|
|
|
69
69
|
],
|
|
70
70
|
['storagePartitioningExplainer', 'https://developers.google.com/privacy-sandbox/cookies/storage-partitioning'],
|
|
71
71
|
['storageAccessAPI', 'https://developer.mozilla.org/en-US/docs/Web/API/StorageAccessHandle/createObjectURL'],
|
|
72
|
+
['https://goo.gle/ps-status', 'https://goo.gle/ps-status'],
|
|
73
|
+
[
|
|
74
|
+
'https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/',
|
|
75
|
+
'https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/'
|
|
76
|
+
],
|
|
72
77
|
]);
|
|
73
78
|
|
|
74
79
|
export const getMarkdownLink = (key: string): string => {
|
|
@@ -523,7 +523,7 @@ async function getArgumentsForExpression(
|
|
|
523
523
|
}
|
|
524
524
|
const expression = doc.sliceString(callee.from, callee.to);
|
|
525
525
|
const result = await evaluateExpression(context, expression, 'argumentsHint');
|
|
526
|
-
if (
|
|
526
|
+
if (result?.type !== 'function') {
|
|
527
527
|
return null;
|
|
528
528
|
}
|
|
529
529
|
const objGetter = async(): Promise<SDK.RemoteObject.RemoteObject|null> => {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Platform from '../../core/platform/platform.js';
|
|
6
6
|
|
|
7
7
|
import {Dialog} from './Dialog.js';
|
|
8
|
+
import {getEnclosingShadowRootForNode} from './DOMUtilities.js';
|
|
8
9
|
|
|
9
10
|
let id = 0;
|
|
10
11
|
|
|
@@ -348,8 +349,7 @@ export function setActiveDescendant(element: Element, activedescendant: Element|
|
|
|
348
349
|
|
|
349
350
|
if (activedescendant.isConnected && element.isConnected) {
|
|
350
351
|
console.assert(
|
|
351
|
-
|
|
352
|
-
Platform.DOMUtilities.getEnclosingShadowRootForNode(element),
|
|
352
|
+
getEnclosingShadowRootForNode(activedescendant) === getEnclosingShadowRootForNode(element),
|
|
353
353
|
'elements are not in the same shadow dom');
|
|
354
354
|
}
|
|
355
355
|
|
|
@@ -215,6 +215,10 @@ export class Action extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
215
215
|
return this.actionRegistration.bindings;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
configurableBindings(): boolean {
|
|
219
|
+
return this.actionRegistration.configurableBindings ?? true;
|
|
220
|
+
}
|
|
221
|
+
|
|
218
222
|
experiment(): string|undefined {
|
|
219
223
|
return this.actionRegistration.experiment;
|
|
220
224
|
}
|
|
@@ -536,6 +540,13 @@ export interface ActionRegistration {
|
|
|
536
540
|
* are flavors of the current appliaction context.
|
|
537
541
|
*/
|
|
538
542
|
bindings?: Binding[];
|
|
543
|
+
/**
|
|
544
|
+
* Whether the action's bindings should be displayed for configuration in the
|
|
545
|
+
* Settings UI. Setting this to `false` will hide the action from the Shortcuts
|
|
546
|
+
* tab. Defaults to `true`.
|
|
547
|
+
*/
|
|
548
|
+
// TODO(crbug.com/436764687): Consider removing this again if parametrized actions get moved to a separate mechanism
|
|
549
|
+
configurableBindings?: boolean;
|
|
539
550
|
/**
|
|
540
551
|
* The name of the experiment an action is associated with. Enabling and disabling the declared
|
|
541
552
|
* experiment will enable and disable the action respectively.
|
|
@@ -56,12 +56,12 @@ export class ListWidget<T> extends VBox {
|
|
|
56
56
|
private readonly list: HTMLElement;
|
|
57
57
|
private lastSeparator: boolean;
|
|
58
58
|
private focusRestorer: ElementFocusRestorer|null;
|
|
59
|
-
|
|
59
|
+
#items: T[];
|
|
60
60
|
private editable: boolean[];
|
|
61
|
-
private elements:
|
|
61
|
+
private elements: HTMLElement[];
|
|
62
62
|
private editor: Editor<T>|null;
|
|
63
63
|
private editItem: T|null;
|
|
64
|
-
private editElement:
|
|
64
|
+
private editElement: HTMLElement|null;
|
|
65
65
|
private emptyPlaceholder: Element|null;
|
|
66
66
|
private isTable: boolean;
|
|
67
67
|
constructor(delegate: Delegate<T>, delegatesFocus = true, isTable = false) {
|
|
@@ -73,7 +73,7 @@ export class ListWidget<T> extends VBox {
|
|
|
73
73
|
|
|
74
74
|
this.lastSeparator = false;
|
|
75
75
|
this.focusRestorer = null;
|
|
76
|
-
this
|
|
76
|
+
this.#items = [];
|
|
77
77
|
this.editable = [];
|
|
78
78
|
this.elements = [];
|
|
79
79
|
this.editor = null;
|
|
@@ -90,8 +90,12 @@ export class ListWidget<T> extends VBox {
|
|
|
90
90
|
this.updatePlaceholder();
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
get items(): T[] {
|
|
94
|
+
return this.#items;
|
|
95
|
+
}
|
|
96
|
+
|
|
93
97
|
clear(): void {
|
|
94
|
-
this
|
|
98
|
+
this.#items = [];
|
|
95
99
|
this.editable = [];
|
|
96
100
|
this.elements = [];
|
|
97
101
|
this.lastSeparator = false;
|
|
@@ -100,8 +104,34 @@ export class ListWidget<T> extends VBox {
|
|
|
100
104
|
this.stopEditing();
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
updateItem(index: number, newItem: T, editable: boolean, focusable = true, controlLabels: {
|
|
108
|
+
edit?: string,
|
|
109
|
+
delete?: string,
|
|
110
|
+
} = {}): void {
|
|
111
|
+
if (index < 0 || index >= this.#items.length) {
|
|
112
|
+
this.appendItem(newItem, editable, focusable, controlLabels);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
this.#items[index] = newItem;
|
|
117
|
+
this.editable[index] = editable;
|
|
118
|
+
const element = this.elements[index];
|
|
119
|
+
const [content, controls] = element.children;
|
|
120
|
+
if (controls) {
|
|
121
|
+
element.removeChild(controls);
|
|
122
|
+
}
|
|
123
|
+
this.delegate.updateItem?.(content, newItem, editable, index);
|
|
124
|
+
element.classList.toggle('editable', editable);
|
|
125
|
+
if (editable) {
|
|
126
|
+
if (focusable) {
|
|
127
|
+
element.tabIndex = 0;
|
|
128
|
+
}
|
|
129
|
+
element.appendChild(this.createControls(newItem, element, controlLabels));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
appendItem(item: T, editable: boolean, focusable = true, controlLabels: {edit?: string, delete?: string} = {}): void {
|
|
134
|
+
if (this.lastSeparator && this.#items.length) {
|
|
105
135
|
const element = document.createElement('div');
|
|
106
136
|
element.classList.add('list-separator');
|
|
107
137
|
if (this.isTable) {
|
|
@@ -111,22 +141,24 @@ export class ListWidget<T> extends VBox {
|
|
|
111
141
|
}
|
|
112
142
|
this.lastSeparator = false;
|
|
113
143
|
|
|
114
|
-
this
|
|
144
|
+
this.#items.push(item);
|
|
115
145
|
this.editable.push(editable);
|
|
116
146
|
|
|
117
147
|
const element = this.list.createChild('div', 'list-item');
|
|
118
148
|
if (this.isTable) {
|
|
119
149
|
element.role = 'rowgroup';
|
|
120
150
|
}
|
|
121
|
-
const content = this.delegate.renderItem(item, editable, this
|
|
151
|
+
const content = this.delegate.renderItem(item, editable, this.#items.length - 1);
|
|
122
152
|
if (!content.hasAttribute('jslog')) {
|
|
123
153
|
element.setAttribute('jslog', `${VisualLogging.item()}`);
|
|
124
154
|
}
|
|
125
155
|
element.appendChild(content);
|
|
126
156
|
if (editable) {
|
|
127
157
|
element.classList.add('editable');
|
|
128
|
-
|
|
129
|
-
|
|
158
|
+
if (focusable) {
|
|
159
|
+
element.tabIndex = 0;
|
|
160
|
+
}
|
|
161
|
+
element.appendChild(this.createControls(item, element, controlLabels));
|
|
130
162
|
}
|
|
131
163
|
this.elements.push(element);
|
|
132
164
|
this.updatePlaceholder();
|
|
@@ -137,7 +169,7 @@ export class ListWidget<T> extends VBox {
|
|
|
137
169
|
}
|
|
138
170
|
|
|
139
171
|
removeItem(index: number): void {
|
|
140
|
-
if (this.editItem === this
|
|
172
|
+
if (this.editItem === this.#items[index]) {
|
|
141
173
|
this.stopEditing();
|
|
142
174
|
}
|
|
143
175
|
|
|
@@ -158,7 +190,7 @@ export class ListWidget<T> extends VBox {
|
|
|
158
190
|
element.remove();
|
|
159
191
|
|
|
160
192
|
this.elements.splice(index, 1);
|
|
161
|
-
this
|
|
193
|
+
this.#items.splice(index, 1);
|
|
162
194
|
this.editable.splice(index, 1);
|
|
163
195
|
this.updatePlaceholder();
|
|
164
196
|
}
|
|
@@ -172,7 +204,7 @@ export class ListWidget<T> extends VBox {
|
|
|
172
204
|
this.updatePlaceholder();
|
|
173
205
|
}
|
|
174
206
|
|
|
175
|
-
private createControls(item: T, element:
|
|
207
|
+
private createControls(item: T, element: HTMLElement, controlLabels: {edit?: string, delete?: string}): Element {
|
|
176
208
|
const controls = document.createElement('div');
|
|
177
209
|
controls.classList.add('controls-container');
|
|
178
210
|
controls.classList.add('fill');
|
|
@@ -185,13 +217,13 @@ export class ListWidget<T> extends VBox {
|
|
|
185
217
|
<devtools-button class=toolbar-button
|
|
186
218
|
.iconName=${'edit'}
|
|
187
219
|
.jslogContext=${'edit-item'}
|
|
188
|
-
.title=${i18nString(UIStrings.editString)}
|
|
220
|
+
.title=${controlLabels?.edit ?? i18nString(UIStrings.editString)}
|
|
189
221
|
.variant=${Buttons.Button.Variant.ICON}
|
|
190
222
|
@click=${onEditClicked}></devtools-button>
|
|
191
223
|
<devtools-button class=toolbar-button
|
|
192
224
|
.iconName=${'bin'}
|
|
193
225
|
.jslogContext=${'remove-item'}
|
|
194
|
-
.title=${i18nString(UIStrings.removeString)}
|
|
226
|
+
.title=${controlLabels?.delete ?? i18nString(UIStrings.removeString)}
|
|
195
227
|
.variant=${Buttons.Button.Variant.ICON}
|
|
196
228
|
@click=${onRemoveClicked}></devtools-button>
|
|
197
229
|
</devtools-toolbar>
|
|
@@ -209,7 +241,7 @@ export class ListWidget<T> extends VBox {
|
|
|
209
241
|
function onRemoveClicked(this: ListWidget<T>): void {
|
|
210
242
|
const index = this.elements.indexOf(element);
|
|
211
243
|
this.element.focus();
|
|
212
|
-
this.delegate.removeItemRequested(this
|
|
244
|
+
this.delegate.removeItemRequested(this.#items[index], index);
|
|
213
245
|
ARIAUtils.LiveAnnouncer.alert(i18nString(UIStrings.removedItem));
|
|
214
246
|
if (this.elements.length >= 1) {
|
|
215
247
|
// focus on the next item in the list, or the last item if we're removing the last item
|
|
@@ -235,7 +267,7 @@ export class ListWidget<T> extends VBox {
|
|
|
235
267
|
}
|
|
236
268
|
}
|
|
237
269
|
|
|
238
|
-
private startEditing(item: T, element:
|
|
270
|
+
private startEditing(item: T, element: HTMLElement|null, insertionPoint: Element|null): void {
|
|
239
271
|
if (element && this.editElement === element) {
|
|
240
272
|
return;
|
|
241
273
|
}
|
|
@@ -297,6 +329,7 @@ export class ListWidget<T> extends VBox {
|
|
|
297
329
|
}
|
|
298
330
|
|
|
299
331
|
export interface Delegate<T> {
|
|
332
|
+
updateItem?(content: Element, newItem: T, editable: boolean, index: number): void;
|
|
300
333
|
renderItem(item: T, editable: boolean, index: number): Element;
|
|
301
334
|
removeItemRequested(item: T, index: number): void;
|
|
302
335
|
beginEdit(item: T): Editor<T>;
|
|
@@ -50,7 +50,7 @@ export class ReportView extends VBox {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
setSubtitle(subtitle: string): void {
|
|
53
|
-
if (this.subtitleElement
|
|
53
|
+
if (this.subtitleElement?.textContent === subtitle) {
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
if (!this.subtitleElement) {
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
import type * as Common from '../../core/common/common.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
|
-
import * as Platform from '../../core/platform/platform.js';
|
|
9
8
|
import * as Geometry from '../../models/geometry/geometry.js';
|
|
10
9
|
import * as IconButton from '../components/icon_button/icon_button.js';
|
|
11
10
|
import * as VisualLogging from '../visual_logging/visual_logging.js';
|
|
12
11
|
|
|
13
12
|
import * as ARIAUtils from './ARIAUtils.js';
|
|
13
|
+
import {appendStyle} from './DOMUtilities.js';
|
|
14
14
|
import {AnchorBehavior, GlassPane, MarginBehavior, PointerEventsBehavior} from './GlassPane.js';
|
|
15
15
|
import {ListControl, type ListDelegate, ListMode} from './ListControl.js';
|
|
16
16
|
import {Events as ListModelEvents, type ItemsReplacedEvent, type ListModel} from './ListModel.js';
|
|
@@ -54,7 +54,7 @@ export class SoftDropDown<T> implements ListDelegate<T> {
|
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
this.element.classList.add('soft-dropdown');
|
|
57
|
-
|
|
57
|
+
appendStyle(this.element, softDropDownButtonStyles);
|
|
58
58
|
this.titleElement = this.element.createChild('span', 'title');
|
|
59
59
|
const dropdownArrowIcon = IconButton.Icon.create('triangle-down');
|
|
60
60
|
this.element.appendChild(dropdownArrowIcon);
|
|
@@ -261,7 +261,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
261
261
|
if (userGesture && !tab.closeable) {
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
|
-
if (this.currentTab
|
|
264
|
+
if (this.currentTab?.id === id) {
|
|
265
265
|
this.hideCurrentTab();
|
|
266
266
|
}
|
|
267
267
|
|
|
@@ -335,7 +335,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
335
335
|
isUserGesture: userGesture,
|
|
336
336
|
};
|
|
337
337
|
this.dispatchEventToListeners(Events.TabInvoked, eventData);
|
|
338
|
-
if (this.currentTab
|
|
338
|
+
if (this.currentTab?.id === id) {
|
|
339
339
|
return true;
|
|
340
340
|
}
|
|
341
341
|
|
|
@@ -474,7 +474,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
this.suspendInvalidations();
|
|
477
|
-
const isSelected = this.currentTab
|
|
477
|
+
const isSelected = this.currentTab?.id === id;
|
|
478
478
|
const shouldFocus = tab.view.hasFocus();
|
|
479
479
|
if (isSelected) {
|
|
480
480
|
this.hideTab(tab);
|
|
@@ -38,6 +38,7 @@ import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
|
38
38
|
import * as VisualLogging from '../visual_logging/visual_logging.js';
|
|
39
39
|
|
|
40
40
|
import * as ARIAUtils from './ARIAUtils.js';
|
|
41
|
+
import {appendStyle, rangeOfWord} from './DOMUtilities.js';
|
|
41
42
|
import {SuggestBox, type SuggestBoxDelegate, type Suggestion} from './SuggestBox.js';
|
|
42
43
|
import textPromptStyles from './textPrompt.css.js';
|
|
43
44
|
import {Tooltip} from './Tooltip.js';
|
|
@@ -344,7 +345,7 @@ export class TextPrompt extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
344
345
|
this.boundClearAutocomplete = this.clearAutocomplete.bind(this);
|
|
345
346
|
this.boundOnBlur = this.onBlur.bind(this);
|
|
346
347
|
this.proxyElement = element.ownerDocument.createElement('span');
|
|
347
|
-
|
|
348
|
+
appendStyle(this.proxyElement, textPromptStyles);
|
|
348
349
|
this.contentElement = this.proxyElement.createChild('div', 'text-prompt-root');
|
|
349
350
|
this.proxyElement.style.display = this.proxyElementDisplay;
|
|
350
351
|
if (element.parentElement) {
|
|
@@ -740,7 +741,7 @@ export class TextPrompt extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
740
741
|
return;
|
|
741
742
|
}
|
|
742
743
|
|
|
743
|
-
const wordQueryRange =
|
|
744
|
+
const wordQueryRange = rangeOfWord(
|
|
744
745
|
selectionRange.startContainer, selectionRange.startOffset, this.completionStopCharacters, this.element(),
|
|
745
746
|
'backward');
|
|
746
747
|
|
|
@@ -45,6 +45,7 @@ import * as Lit from '../lit/lit.js';
|
|
|
45
45
|
import * as VisualLogging from '../visual_logging/visual_logging.js';
|
|
46
46
|
|
|
47
47
|
import * as ARIAUtils from './ARIAUtils.js';
|
|
48
|
+
import {appendStyle} from './DOMUtilities.js';
|
|
48
49
|
import {type Config, InplaceEditor} from './InplaceEditor.js';
|
|
49
50
|
import {Keys} from './KeyboardShortcut.js';
|
|
50
51
|
import type {SearchableView} from './SearchableView.js';
|
|
@@ -428,7 +429,7 @@ export class TreeOutlineInShadow extends TreeOutline {
|
|
|
428
429
|
|
|
429
430
|
registerRequiredCSS(...cssFiles: Array<string&{_tag: 'CSS-in-JS'}>): void {
|
|
430
431
|
for (const cssFile of cssFiles) {
|
|
431
|
-
|
|
432
|
+
appendStyle(this.shadowRoot, cssFile);
|
|
432
433
|
}
|
|
433
434
|
}
|
|
434
435
|
|
|
@@ -1253,7 +1254,7 @@ export class TreeElement {
|
|
|
1253
1254
|
ARIAUtils.clearSelected(this.listItemNode);
|
|
1254
1255
|
this.setFocusable(false);
|
|
1255
1256
|
|
|
1256
|
-
if (this.treeOutline
|
|
1257
|
+
if (this.treeOutline?.selectedTreeElement === this) {
|
|
1257
1258
|
this.treeOutline.selectedTreeElement = null;
|
|
1258
1259
|
this.treeOutline.updateFocusable();
|
|
1259
1260
|
if (hadFocus) {
|
|
@@ -53,6 +53,7 @@ import * as ARIAUtils from './ARIAUtils.js';
|
|
|
53
53
|
import checkboxTextLabelStyles from './checkboxTextLabel.css.js';
|
|
54
54
|
import confirmDialogStyles from './confirmDialog.css.js';
|
|
55
55
|
import {Dialog} from './Dialog.js';
|
|
56
|
+
import {appendStyle, deepActiveElement, rangeOfWord} from './DOMUtilities.js';
|
|
56
57
|
import {GlassPane, PointerEventsBehavior, SizeBehavior} from './GlassPane.js';
|
|
57
58
|
import inspectorCommonStyles from './inspectorCommon.css.js';
|
|
58
59
|
import {InspectorView} from './InspectorView.js';
|
|
@@ -358,7 +359,7 @@ export function isEditing(): boolean {
|
|
|
358
359
|
return true;
|
|
359
360
|
}
|
|
360
361
|
|
|
361
|
-
const focused =
|
|
362
|
+
const focused = deepActiveElement(document);
|
|
362
363
|
if (!focused) {
|
|
363
364
|
return false;
|
|
364
365
|
}
|
|
@@ -580,8 +581,8 @@ export function handleElementValueModifications(
|
|
|
580
581
|
}
|
|
581
582
|
|
|
582
583
|
const originalValue = element.textContent;
|
|
583
|
-
const wordRange =
|
|
584
|
-
selectionRange.startContainer, selectionRange.startOffset, StyleValueDelimiters, element);
|
|
584
|
+
const wordRange =
|
|
585
|
+
rangeOfWord(selectionRange.startContainer, selectionRange.startOffset, StyleValueDelimiters, element);
|
|
585
586
|
const wordString = wordRange.toString();
|
|
586
587
|
|
|
587
588
|
if (suggestionHandler?.(wordString)) {
|
|
@@ -655,8 +656,8 @@ export function addPlatformClass(element: HTMLElement): void {
|
|
|
655
656
|
}
|
|
656
657
|
|
|
657
658
|
export function installComponentRootStyles(element: HTMLElement): void {
|
|
658
|
-
|
|
659
|
-
|
|
659
|
+
appendStyle(element, inspectorCommonStyles);
|
|
660
|
+
appendStyle(element, Buttons.textButtonStyles);
|
|
660
661
|
|
|
661
662
|
// Detect overlay scrollbar enable by checking for nonzero scrollbar width.
|
|
662
663
|
if (!Host.Platform.isMac() && measuredScrollbarWidth(element.ownerDocument) === 0) {
|
|
@@ -681,7 +682,7 @@ export class ElementFocusRestorer {
|
|
|
681
682
|
private previous: HTMLElement|null;
|
|
682
683
|
constructor(element: Element) {
|
|
683
684
|
this.element = (element as HTMLElement | null);
|
|
684
|
-
this.previous = (
|
|
685
|
+
this.previous = (deepActiveElement(element.ownerDocument) as HTMLElement | null);
|
|
685
686
|
(element as HTMLElement).focus();
|
|
686
687
|
}
|
|
687
688
|
|
|
@@ -1930,7 +1931,7 @@ function updateWidgetfocusWidgetForNode(node: Node|null): void {
|
|
|
1930
1931
|
function focusChanged(event: Event): void {
|
|
1931
1932
|
const target = event.target as HTMLElement;
|
|
1932
1933
|
const document = target ? target.ownerDocument : null;
|
|
1933
|
-
const element = document ?
|
|
1934
|
+
const element = document ? deepActiveElement(document) : null;
|
|
1934
1935
|
updateWidgetfocusWidgetForNode(element);
|
|
1935
1936
|
}
|
|
1936
1937
|
|
|
@@ -1953,11 +1954,11 @@ export function createShadowRootWithCoreStyles(element: Element, options: {
|
|
|
1953
1954
|
const {cssFile, delegatesFocus} = options;
|
|
1954
1955
|
|
|
1955
1956
|
const shadowRoot = element.attachShadow({mode: 'open', delegatesFocus});
|
|
1956
|
-
|
|
1957
|
+
appendStyle(shadowRoot, inspectorCommonStyles, Buttons.textButtonStyles);
|
|
1957
1958
|
if (Array.isArray(cssFile)) {
|
|
1958
|
-
|
|
1959
|
+
appendStyle(shadowRoot, ...cssFile);
|
|
1959
1960
|
} else if (cssFile) {
|
|
1960
|
-
|
|
1961
|
+
appendStyle(shadowRoot, cssFile);
|
|
1961
1962
|
}
|
|
1962
1963
|
shadowRoot.addEventListener('focus', focusChanged, true);
|
|
1963
1964
|
return shadowRoot;
|
|
@@ -35,6 +35,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
35
35
|
import * as Geometry from '../../models/geometry/geometry.js';
|
|
36
36
|
import * as Lit from '../../ui/lit/lit.js';
|
|
37
37
|
|
|
38
|
+
import {appendStyle, deepActiveElement} from './DOMUtilities.js';
|
|
38
39
|
import {cloneCustomElement, createShadowRootWithCoreStyles} from './UIUtils.js';
|
|
39
40
|
|
|
40
41
|
// Remember the original DOM mutation methods here, since we
|
|
@@ -766,7 +767,7 @@ export class Widget {
|
|
|
766
767
|
|
|
767
768
|
registerRequiredCSS(...cssFiles: Array<string&{_tag: 'CSS-in-JS'}>): void {
|
|
768
769
|
for (const cssFile of cssFiles) {
|
|
769
|
-
|
|
770
|
+
appendStyle(this.#shadowRoot ?? this.element, cssFile);
|
|
770
771
|
}
|
|
771
772
|
}
|
|
772
773
|
|
|
@@ -1106,7 +1107,7 @@ export class WidgetFocusRestorer {
|
|
|
1106
1107
|
private previous: HTMLElement|null;
|
|
1107
1108
|
constructor(widget: Widget) {
|
|
1108
1109
|
this.widget = widget;
|
|
1109
|
-
this.previous = (
|
|
1110
|
+
this.previous = (deepActiveElement(widget.element.ownerDocument) as HTMLElement | null);
|
|
1110
1111
|
widget.focus();
|
|
1111
1112
|
}
|
|
1112
1113
|
|
|
@@ -37,7 +37,7 @@ export class ContrastInfo extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
37
37
|
this.#contrastRatioAPCAThreshold =
|
|
38
38
|
Common.ColorUtils.getAPCAThreshold(contrastInfo.computedFontSize, contrastInfo.computedFontWeight);
|
|
39
39
|
|
|
40
|
-
if (
|
|
40
|
+
if (contrastInfo.backgroundColors?.length !== 1) {
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
const bgColorText = contrastInfo.backgroundColors[0];
|
|
@@ -368,7 +368,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
368
368
|
|
|
369
369
|
announceSelectedGridNode(): void {
|
|
370
370
|
// Only alert if the datagrid has focus
|
|
371
|
-
if (this.element ===
|
|
371
|
+
if (this.element === UI.DOMUtilities.deepActiveElement(this.element.ownerDocument) &&
|
|
372
372
|
this.selectedNode?.existingElement()) {
|
|
373
373
|
// Update the expand/collapse state for the current selected node
|
|
374
374
|
let expandText;
|
|
@@ -466,7 +466,8 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
466
466
|
cell.createChild('div', 'sort-order-icon-container').appendChild(icon);
|
|
467
467
|
|
|
468
468
|
if (column.title) {
|
|
469
|
-
|
|
469
|
+
const columnLabel = `${column.title} - ${i18nString(UIStrings.sortableColumn)}`;
|
|
470
|
+
UI.ARIAUtils.setLabel(cell, columnLabel);
|
|
470
471
|
}
|
|
471
472
|
}
|
|
472
473
|
}
|
|
@@ -1237,7 +1238,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1237
1238
|
nextSelectedNode.select();
|
|
1238
1239
|
}
|
|
1239
1240
|
|
|
1240
|
-
const activeElement = (
|
|
1241
|
+
const activeElement = (UI.DOMUtilities.deepActiveElement(this.element.ownerDocument) as HTMLElement | null);
|
|
1241
1242
|
if (handled && this.element !== activeElement && !this.element.contains(activeElement)) {
|
|
1242
1243
|
// crbug.com/1005449, crbug.com/1329956
|
|
1243
1244
|
// navigational or delete keys pressed but current DataGrid panel has lost focus;
|
|
@@ -2341,7 +2342,7 @@ export class DataGridNode<T> {
|
|
|
2341
2342
|
}
|
|
2342
2343
|
|
|
2343
2344
|
deselect(supressDeselectedEvent?: boolean): void {
|
|
2344
|
-
if (
|
|
2345
|
+
if (this.dataGrid?.selectedNode !== this || !this.selected) {
|
|
2345
2346
|
return;
|
|
2346
2347
|
}
|
|
2347
2348
|
|