chrome-devtools-frontend 1.0.1669021 → 1.0.1672388

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.
Files changed (208) hide show
  1. package/.agents/skills/fixing-skipped-tests/SKILL.md +6 -6
  2. package/.agents/skills/gerrit-cli/SKILL.md +4 -10
  3. package/.agents/skills/gerrit-cli/references/commands.md +45 -2
  4. package/.agents/skills/gerrit-cli/references/workflows.md +7 -0
  5. package/.agents/skills/gerrit-cli/scripts/import_upstream.py +34 -152
  6. package/config/typescript/tsconfig.eslint.json +1 -1
  7. package/docs/contributing/settings-experiments-features.md +2 -8
  8. package/docs/ecosystem/automatic_workspace_folders.md +0 -19
  9. package/eslint.config.mjs +2 -2
  10. package/front_end/core/common/Lazy.ts +3 -3
  11. package/front_end/core/common/SettingRegistration.ts +0 -7
  12. package/front_end/core/common/Settings.ts +0 -38
  13. package/front_end/core/host/UserMetrics.ts +187 -953
  14. package/front_end/core/host/UserMetricsEnums.d.ts +949 -0
  15. package/front_end/core/root/Runtime.ts +21 -133
  16. package/front_end/core/sdk/CSSMetadata.ts +70 -65
  17. package/front_end/core/sdk/CategorizedBreakpoint.ts +0 -1
  18. package/front_end/core/sdk/ChildTargetManager.ts +0 -2
  19. package/front_end/core/sdk/EmulationModel.ts +0 -2
  20. package/front_end/core/sdk/EventBreakpointsModel.ts +0 -4
  21. package/front_end/core/sdk/NetworkManager.ts +0 -3
  22. package/front_end/core/sdk/PageResourceLoader.ts +9 -9
  23. package/front_end/core/sdk/RehydratingConnection.ts +52 -4
  24. package/front_end/core/sdk/Target.ts +0 -4
  25. package/front_end/devtools_compatibility.js +886 -0
  26. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +7 -6
  27. package/front_end/entrypoints/main/ExecutionContextSelector.ts +0 -1
  28. package/front_end/entrypoints/main/MainImpl.ts +18 -22
  29. package/front_end/foundation/Universe.ts +7 -2
  30. package/front_end/generated/InspectorBackendCommands.ts +3 -10
  31. package/front_end/generated/protocol-mapping.d.ts +0 -42
  32. package/front_end/generated/protocol-proxy-api.d.ts +0 -38
  33. package/front_end/generated/protocol.ts +9 -169
  34. package/front_end/models/ai_assistance/AiAgent2.ts +11 -3
  35. package/front_end/models/ai_assistance/AiConversation.ts +1 -0
  36. package/front_end/models/ai_assistance/AiHistoryStorage.ts +8 -5
  37. package/front_end/models/ai_assistance/AiSetting.ts +108 -0
  38. package/front_end/models/ai_assistance/AiUtils.ts +47 -0
  39. package/front_end/models/ai_assistance/ChangeManager.ts +1 -0
  40. package/front_end/models/ai_assistance/ExtensionScope.ts +3 -12
  41. package/front_end/models/ai_assistance/agents/AiAgent.ts +11 -18
  42. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -0
  43. package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +42 -17
  44. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +3 -2
  45. package/front_end/models/ai_assistance/agents/StorageAgent.ts +253 -155
  46. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
  47. package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
  48. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +12 -6
  49. package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +3 -1
  50. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -0
  51. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -0
  52. package/front_end/models/ai_assistance/injected.ts +1 -0
  53. package/front_end/models/ai_assistance/performance/AICallTree.ts +1 -0
  54. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  55. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
  56. package/front_end/models/ai_assistance/skills/performance.md +10 -0
  57. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +52 -5
  58. package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +4 -4
  59. package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +4 -4
  60. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +5 -4
  61. package/front_end/models/ai_assistance/tools/GetStyles.ts +5 -4
  62. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +5 -4
  63. package/front_end/models/ai_assistance/tools/README.md +1 -1
  64. package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +63 -0
  65. package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +5 -5
  66. package/front_end/models/ai_assistance/tools/Tool.ts +118 -24
  67. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +2 -0
  68. package/front_end/models/badges/UserBadges.ts +2 -0
  69. package/front_end/models/bindings/NetworkProject.ts +5 -0
  70. package/front_end/models/bindings/ResourceScriptMapping.ts +2 -0
  71. package/front_end/models/bindings/ResourceUtils.ts +3 -0
  72. package/front_end/models/crux-manager/CrUXManager.ts +1 -0
  73. package/front_end/models/emulation/DeviceModeModel.ts +140 -7
  74. package/front_end/models/emulation/EmulatedDevices.ts +246 -793
  75. package/front_end/models/issues_manager/IssuesManager.ts +10 -2
  76. package/front_end/models/live-metrics/LiveMetrics.ts +41 -9
  77. package/front_end/models/logs/LogManager.ts +8 -5
  78. package/front_end/models/logs/NetworkLog.ts +1 -0
  79. package/front_end/models/persistence/IsolatedFileSystemManager.ts +21 -3
  80. package/front_end/models/persistence/NetworkPersistenceManager.ts +6 -0
  81. package/front_end/models/project_settings/ProjectSettingsModel.ts +8 -12
  82. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +3 -1
  83. package/front_end/models/workspace/IgnoreListManager.ts +2 -0
  84. package/front_end/models/workspace/UISourceCode.ts +2 -0
  85. package/front_end/models/workspace_diff/WorkspaceDiff.ts +4 -0
  86. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +22 -22
  87. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +0 -7
  88. package/front_end/panels/ai_assistance/components/ChatInput.ts +4 -0
  89. package/front_end/panels/ai_assistance/components/ChatMessage.ts +79 -34
  90. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +1 -2
  91. package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
  92. package/front_end/panels/application/ApplicationPanelSidebar.ts +9 -106
  93. package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
  94. package/front_end/panels/application/application.ts +0 -10
  95. package/front_end/panels/application/components/components.ts +0 -4
  96. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +0 -5
  97. package/front_end/panels/browser_debugger/EventListenerBreakpointsSidebarPane.ts +6 -12
  98. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +5 -3
  99. package/front_end/panels/console/ConsoleFormat.ts +2 -62
  100. package/front_end/panels/console/ConsoleViewMessage.ts +14 -7
  101. package/front_end/panels/emulation/AdvancedApp.ts +1 -2
  102. package/front_end/panels/emulation/DeviceModeToolbar.ts +83 -69
  103. package/front_end/panels/emulation/DeviceModeView.ts +4 -134
  104. package/front_end/panels/emulation/DeviceModeWrapper.ts +52 -69
  105. package/front_end/panels/emulation/MediaQueryInspector.ts +2 -2
  106. package/front_end/panels/emulation/emulation-meta.ts +12 -12
  107. package/front_end/panels/issues/IssuesPane.ts +3 -1
  108. package/front_end/panels/lighthouse/LighthouseController.ts +6 -0
  109. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +17 -21
  110. package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +206 -126
  111. package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +1 -1
  112. package/front_end/panels/mobile_throttling/CalibrationController.ts +1 -1
  113. package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +3 -3
  114. package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +6 -6
  115. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +11 -11
  116. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +13 -13
  117. package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +10 -10
  118. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +28 -28
  119. package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +6 -6
  120. package/front_end/panels/network/RequestHeadersView.ts +1 -1
  121. package/front_end/panels/network/ResourceChunkView.ts +243 -144
  122. package/front_end/panels/network/ResourceDirectSocketChunkView.ts +52 -29
  123. package/front_end/panels/network/ResourceWebSocketFrameView.ts +21 -35
  124. package/front_end/panels/network/resourceChunkView.css +41 -36
  125. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +21 -12
  126. package/front_end/panels/profiler/profiler.ts +4 -0
  127. package/front_end/panels/recorder/RecorderPanel.ts +6 -14
  128. package/front_end/panels/sensors/LocationsSettingsTab.ts +7 -7
  129. package/front_end/panels/settings/AISettingsTab.ts +75 -31
  130. package/front_end/panels/settings/SettingsScreen.ts +8 -13
  131. package/front_end/panels/settings/components/SyncSection.ts +3 -4
  132. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +200 -18
  133. package/front_end/panels/settings/emulation/devicesSettingsTab.css +18 -0
  134. package/front_end/panels/settings/settings-meta.ts +0 -1
  135. package/front_end/panels/sources/CategorizedBreakpointL10n.ts +0 -2
  136. package/front_end/panels/sources/DebuggerPausedMessage.ts +11 -5
  137. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  138. package/front_end/panels/sources/EditingLocationHistoryManager.ts +12 -9
  139. package/front_end/panels/sources/SourcesPanel.ts +19 -17
  140. package/front_end/panels/sources/SourcesView.ts +191 -96
  141. package/front_end/panels/sources/TabbedEditorContainer.ts +3 -4
  142. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -5
  143. package/front_end/panels/timeline/TimelineUIUtils.ts +15 -0
  144. package/front_end/panels/timeline/timeline-meta.ts +3 -5
  145. package/front_end/third_party/chromium/README.chromium +1 -1
  146. package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
  147. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  148. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  149. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
  150. package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
  151. package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
  152. package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
  153. package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
  154. package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
  155. package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
  156. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
  157. package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
  158. package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
  159. package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
  160. package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
  161. package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
  162. package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
  163. package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
  164. package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
  165. package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
  166. package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
  167. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
  168. package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
  169. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
  170. package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
  171. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1332 -193
  172. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  173. package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
  174. package/front_end/tsconfig.compatibility.json +2 -1
  175. package/front_end/tsconfig.json +1 -1
  176. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  177. package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
  178. package/front_end/ui/components/settings/SettingCheckbox.ts +4 -7
  179. package/front_end/ui/components/settings/settings.ts +1 -2
  180. package/front_end/ui/legacy/Treeoutline.ts +52 -30
  181. package/front_end/ui/legacy/components/object_ui/CSSStyleSanitizer.ts +74 -0
  182. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +6 -1
  183. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +47 -54
  184. package/front_end/ui/legacy/components/object_ui/object_ui.ts +2 -0
  185. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -27
  186. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +10 -12
  187. package/front_end/ui/settings/SettingUIRegistration.ts +0 -8
  188. package/front_end/ui/visual_logging/KnownContextValues.ts +21 -0
  189. package/inspector_overlay/tsconfig.json +8 -2
  190. package/package.json +3 -2
  191. package/.agents/skills/gerrit-cli/scripts/gerrit_client_wrapper.py +0 -47
  192. package/front_end/core/sdk/CSSModel.test.api.ts +0 -102
  193. package/front_end/core/sdk/DOMModel.test.api.ts +0 -104
  194. package/front_end/foundation/Universe.test.api.ts +0 -73
  195. package/front_end/panels/application/SharedStorageEventsView.ts +0 -128
  196. package/front_end/panels/application/SharedStorageItemsView.ts +0 -179
  197. package/front_end/panels/application/SharedStorageListTreeElement.ts +0 -65
  198. package/front_end/panels/application/SharedStorageModel.ts +0 -249
  199. package/front_end/panels/application/SharedStorageTreeElement.ts +0 -40
  200. package/front_end/panels/application/components/SharedStorageAccessGrid.ts +0 -191
  201. package/front_end/panels/application/components/SharedStorageMetadataView.ts +0 -133
  202. package/front_end/panels/application/components/sharedStorageAccessGrid.css +0 -29
  203. package/front_end/panels/application/components/sharedStorageMetadataView.css +0 -29
  204. package/front_end/panels/application/sharedStorageEventsView.css +0 -9
  205. package/front_end/panels/network/OriginalResourceChunkView.ts +0 -340
  206. package/front_end/panels/network/originalResourceChunkView.css +0 -49
  207. package/front_end/ui/components/settings/SettingDeprecationWarning.ts +0 -47
  208. package/front_end/ui/components/settings/settingDeprecationWarning.css +0 -14
@@ -1,2 +1,2 @@
1
- export{b5 as Annotation,b6 as AnnotationType,b7 as ChangeDesc,b8 as ChangeSet,b9 as Compartment,C as CompletionContext,bm as Decoration,v as EditorSelection,D as EditorState,S as EditorView,ba as Facet,bp as GutterMarker,aY as HighlightStyle,b as LRParser,o as Language,a as LanguageSupport,bb as Line,bc as MapMode,bu as MatchDecorator,l as NodeProp,m as NodeSet,N as NodeType,P as Parser,x as Prec,bd as Range,be as RangeSet,bf as RangeSetBuilder,bg as SelectionRange,bh as StateEffect,bi as StateEffectType,bj as StateField,a_ as StreamLanguage,a$ as StringStream,bG as StyleModule,T as Tag,bk as Text,bl as Transaction,n as Tree,bE as TreeCursor,bB as ViewPlugin,bC as ViewUpdate,bD as WidgetType,aj as acceptCompletion,Z as angular,ak as autocompletion,aU as bidiIsolates,aS as bracketMatching,_ as clojure,al as closeBrackets,am as closeBracketsKeymap,an as closeCompletion,aT as codeFolding,$ as coffeescript,ao as completeAnyWord,ap as completionStatus,a0 as cpp,a1 as css,af as cssStreamParser,aq as currentCompletions,aw as cursorGroupLeft,ax as cursorGroupRight,av as cursorMatchingBracket,ay as cursorSyntaxLeft,az as cursorSyntaxRight,a2 as dart,bn as drawSelection,aV as ensureSyntaxTree,aW as foldGutter,aX as foldKeymap,b2 as forceParsing,a4 as go,a3 as gss,bo as gutter,bq as gutters,b3 as highlightSelectionMatches,br as highlightSpecialChars,bF as highlightTree,aA as history,aB as historyKeymap,aQ as html,I as ifNotIn,aC as indentLess,aD as indentMore,aZ as indentOnInput,z as indentUnit,bH as indentationMarkers,aE as insertNewlineAndIndent,a5 as java,aR as javascript,y as keymap,a6 as kotlin,a7 as less,bs as lineNumberMarkers,bt as lineNumbers,a8 as markdown,ar as moveCompletionSelection,a9 as php,bv as placeholder,aa as python,aF as redo,aG as redoSelection,bw as repositionTooltips,ab as sass,ac as scala,bx as scrollPastEnd,aI as selectGroupLeft,aJ as selectGroupRight,aH as selectMatchingBracket,b4 as selectNextOccurrence,aK as selectSyntaxLeft,aL as selectSyntaxRight,as as selectedCompletion,at as selectedCompletionIndex,ad as shell,by as showPanel,bz as showTooltip,aM as standardKeymap,au as startCompletion,ae as svelte,b0 as syntaxHighlighting,b1 as syntaxParserRunning,u as syntaxTree,t as tags,aN as toggleComment,bA as tooltips,aO as undo,aP as undoSelection,ag as vue,ah as wast,ai as xml}from"./chunk/codemirror.js";
1
+ export{A as Annotation,a as AnnotationType,C as ChangeDesc,b as ChangeSet,c as Compartment,d as CompletionContext,D as Decoration,E as EditorSelection,f as EditorState,g as EditorView,F as Facet,G as GutterMarker,H as HighlightStyle,i as LRParser,j as Language,l as LanguageSupport,m as Line,M as MapMode,o as MatchDecorator,N as NodeProp,p as NodeSet,q as NodeType,s as Parser,t as Prec,R as Range,u as RangeSet,v as RangeSetBuilder,S as SelectionRange,w as StateEffect,x as StateEffectType,y as StateField,z as StreamLanguage,B as StringStream,J as StyleModule,T as Tag,K as Text,O as Transaction,Q as Tree,U as TreeCursor,V as ViewPlugin,W as ViewUpdate,X as WidgetType,Y as acceptCompletion,Z as angular,_ as autocompletion,$ as bidiIsolates,a0 as bracketMatching,a2 as clojure,a3 as closeBrackets,a4 as closeBracketsKeymap,a5 as closeCompletion,a6 as codeFolding,a7 as coffeescript,a8 as completeAnyWord,aa as completionStatus,ad as cpp,af as css,ah as cssStreamParser,ai as currentCompletions,aj as cursorGroupLeft,ak as cursorGroupRight,al as cursorMatchingBracket,am as cursorSyntaxLeft,an as cursorSyntaxRight,ao as dart,as as drawSelection,at as ensureSyntaxTree,av as foldGutter,ax as foldKeymap,aA as forceParsing,aB as go,aC as gss,aD as gutter,aE as gutters,aF as highlightSelectionMatches,aG as highlightSpecialChars,aH as highlightTree,aI as history,aJ as historyKeymap,aT as html,aM as ifNotIn,aN as indentLess,aO as indentMore,aQ as indentOnInput,aR as indentUnit,aS as indentationMarkers,aV as insertNewlineAndIndent,aW as java,aU as javascript,aZ as keymap,a_ as kotlin,b0 as less,b1 as lineNumberMarkers,b2 as lineNumbers,b3 as markdown,b4 as moveCompletionSelection,b7 as php,b8 as placeholder,b9 as python,ba as redo,bb as redoSelection,bc as repositionTooltips,bd as sass,be as scala,bf as scrollPastEnd,bg as selectGroupLeft,bh as selectGroupRight,bi as selectMatchingBracket,bj as selectNextOccurrence,bk as selectSyntaxLeft,bl as selectSyntaxRight,bm as selectedCompletion,bn as selectedCompletionIndex,bo as shell,bp as showPanel,bq as showTooltip,bs as standardKeymap,bt as startCompletion,bv as svelte,bw as syntaxHighlighting,bx as syntaxParserRunning,by as syntaxTree,bz as tags,bA as toggleComment,bB as tooltips,bD as undo,bE as undoSelection,bF as vue,bG as wast,bH as xml}from"./chunk/codemirror.js";
2
2
  //# sourceMappingURL=codemirror.next.js.map
@@ -1,5 +1,5 @@
1
1
  npm install
2
- ../../../node_modules/.bin/tsc -d -t esnext -m esnext --moduleResolution node bundle.ts
2
+ ../../../node_modules/.bin/tsc -d -t esnext -m esnext --moduleResolution bundler --ignoreConfig bundle.ts
3
3
  ../../../node_modules/rollup/dist/bin/rollup -c
4
4
  rm -rf node_modules bundle.js bundle.d.ts
5
5
  # Because there's a bug in clang causing it to reformat import lists even where formatting is disabled, run it right away
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "extends": "./tsconfig.json",
3
3
  "compilerOptions": {
4
- "noImplicitAny": false
4
+ "noImplicitAny": false,
5
+ "noEmit": false
5
6
  },
6
7
  "files": ["devtools_compatibility.js"],
7
8
  "references": [{ "path": "./tsconfig.json" }]
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "extends": "../config/typescript/tsconfig.base.json",
3
3
  "compilerOptions": {
4
- "outDir": "ignored",
5
4
  "rootDir": ".",
6
5
  "target": "ES2023",
6
+ "noEmit": true,
7
7
  "lib": [
8
8
  "ES2023",
9
9
  "ES2024.Promise",
@@ -29,7 +29,7 @@ export interface IconButtonData {
29
29
  }
30
30
 
31
31
  export class IconButton extends HTMLElement {
32
- readonly #shadow = this.attachShadow({mode: 'open'});
32
+ readonly #shadow = this.attachShadow({mode: 'open', delegatesFocus: true});
33
33
  #clickHandler?: () => void;
34
34
  #groups: IconWithTextData[] = [];
35
35
  #compact = false;
@@ -96,7 +96,7 @@ export function getIssueCountsEnumeration(
96
96
  }
97
97
 
98
98
  export class IssueCounter extends HTMLElement {
99
- readonly #shadow = this.attachShadow({mode: 'open'});
99
+ readonly #shadow = this.attachShadow({mode: 'open', delegatesFocus: true});
100
100
  #clickHandler?: () => void;
101
101
  #tooltipCallback?: () => void;
102
102
  #leadingText = '';
@@ -4,7 +4,6 @@
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view, @devtools/enforce-custom-element-definitions-location */
5
5
 
6
6
  import '../tooltips/tooltips.js';
7
- import './SettingDeprecationWarning.js';
8
7
  import '../../kit/kit.js';
9
8
 
10
9
  import type * as Common from '../../../core/common/common.js';
@@ -32,6 +31,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
32
31
  export interface SettingCheckboxData {
33
32
  setting: Common.Settings.Setting<boolean>;
34
33
  textOverride?: string;
34
+ disabled?: boolean;
35
35
  }
36
36
 
37
37
  /**
@@ -43,6 +43,7 @@ export class SettingCheckbox extends HTMLElement {
43
43
  #setting?: Common.Settings.Setting<boolean>;
44
44
  #changeListenerDescriptor?: Common.EventTarget.EventDescriptor;
45
45
  #textOverride?: string;
46
+ #disabled?: boolean;
46
47
 
47
48
  set data(data: SettingCheckboxData) {
48
49
  if (this.#changeListenerDescriptor && this.#setting) {
@@ -51,6 +52,7 @@ export class SettingCheckbox extends HTMLElement {
51
52
 
52
53
  this.#setting = data.setting;
53
54
  this.#textOverride = data.textOverride;
55
+ this.#disabled = data.disabled;
54
56
 
55
57
  this.#changeListenerDescriptor = this.#setting.addChangeListener(() => {
56
58
  this.#render();
@@ -63,11 +65,6 @@ export class SettingCheckbox extends HTMLElement {
63
65
  return undefined;
64
66
  }
65
67
 
66
- if (this.#setting.deprecation) {
67
- return html`<devtools-setting-deprecation-warning .data=${
68
- this.#setting.deprecation}></devtools-setting-deprecation-warning>`;
69
- }
70
-
71
68
  const uiDescriptor = SettingUIRegistration.SettingUIRegistration.maybeResolve(this.#setting.descriptor());
72
69
  const learnMore = uiDescriptor?.learnMore ?? this.#setting.learnMore();
73
70
  if (learnMore) {
@@ -160,7 +157,7 @@ export class SettingCheckbox extends HTMLElement {
160
157
  <input
161
158
  type="checkbox"
162
159
  .checked=${this.checked}
163
- ?disabled=${this.#setting.disabled()}
160
+ ?disabled=${this.#disabled || this.#setting.disabled()}
164
161
  @change=${this.#checkboxChanged}
165
162
  jslog=${VisualLogging.toggle().track({change: true}).context(this.#setting.name)}
166
163
  aria-label=${titleText}
@@ -3,6 +3,5 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as SettingCheckbox from './SettingCheckbox.js';
6
- import * as SettingDeprecationWarning from './SettingDeprecationWarning.js';
7
6
 
8
- export {SettingCheckbox, SettingDeprecationWarning};
7
+ export {SettingCheckbox};
@@ -35,6 +35,8 @@
35
35
  */
36
36
 
37
37
  import * as Common from '../../core/common/common.js';
38
+ import * as Host from '../../core/host/host.js';
39
+ import * as i18n from '../../core/i18n/i18n.js';
38
40
  import * as Platform from '../../core/platform/platform.js';
39
41
  import * as SDK from '../../core/sdk/sdk.js';
40
42
  import type * as TextUtils from '../../core/text_utils/text_utils.js';
@@ -60,6 +62,23 @@ import {
60
62
  isEditing,
61
63
  } from './UIUtils.js';
62
64
 
65
+ const UIStrings = {
66
+ /**
67
+ * @description Screen reader announcement made when the user expands a tree item, such as a DOM
68
+ * node in the Elements panel. Uses a polite live region so the tree item's name, role, and
69
+ * position are announced before this state update.
70
+ */
71
+ expanded: 'expanded',
72
+ /**
73
+ * @description Screen reader announcement made when the user collapses a tree item, such as a DOM
74
+ * node in the Elements panel. Uses a polite live region so the tree item's name, role, and
75
+ * position are announced before this state update.
76
+ */
77
+ collapsed: 'collapsed',
78
+ } as const;
79
+ const str_ = i18n.i18n.registerUIStrings('ui/legacy/Treeoutline.ts', UIStrings);
80
+ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
81
+
63
82
  const nodeToParentTreeElementMap = new WeakMap<Node, TreeElement>();
64
83
  const {render} = Lit;
65
84
 
@@ -953,17 +972,7 @@ export class TreeElement {
953
972
  return;
954
973
  }
955
974
 
956
- if (this.expanded) {
957
- if (event.altKey) {
958
- this.collapseRecursively();
959
- } else {
960
- this.collapse();
961
- }
962
- } else if (event.altKey) {
963
- void this.expandRecursively();
964
- } else {
965
- this.expand();
966
- }
975
+ void this.#setExpandedFromUser(!this.expanded, event.altKey);
967
976
  void VisualLogging.logClick(this.expandLoggable, event);
968
977
  event.consume();
969
978
  }
@@ -998,7 +1007,30 @@ export class TreeElement {
998
1007
  return;
999
1008
  }
1000
1009
  if (this.expandable && !this.expanded) {
1001
- this.expand();
1010
+ void this.#setExpandedFromUser(true, false);
1011
+ }
1012
+ }
1013
+
1014
+ async #setExpandedFromUser(shouldExpand: boolean, recursively: boolean): Promise<void> {
1015
+ const wasExpanded = this.expanded;
1016
+ if (shouldExpand) {
1017
+ if (recursively) {
1018
+ await this.expandRecursively();
1019
+ } else {
1020
+ this.expand();
1021
+ }
1022
+ } else if (recursively) {
1023
+ this.collapseRecursively();
1024
+ } else {
1025
+ this.collapse();
1026
+ }
1027
+
1028
+ // When a tree item stays focused, VoiceOver on macOS does not announce the updated
1029
+ // `aria-expanded` state, leaving the user without feedback. Other screen readers announce it
1030
+ // natively, so restrict this live-region announcement to macOS to avoid announcing the state
1031
+ // twice elsewhere.
1032
+ if (this.expanded !== wasExpanded && Host.Platform.isMac()) {
1033
+ ARIAUtils.LiveAnnouncer.status(this.expanded ? i18nString(UIStrings.expanded) : i18nString(UIStrings.collapsed));
1002
1034
  }
1003
1035
  }
1004
1036
 
@@ -1094,11 +1126,7 @@ export class TreeElement {
1094
1126
 
1095
1127
  collapseOrAscend(altKey: boolean): boolean {
1096
1128
  if (this.expanded && this.collapsible) {
1097
- if (altKey) {
1098
- this.collapseRecursively();
1099
- } else {
1100
- this.collapse();
1101
- }
1129
+ void this.#setExpandedFromUser(false, altKey);
1102
1130
  return true;
1103
1131
  }
1104
1132
 
@@ -1129,11 +1157,7 @@ export class TreeElement {
1129
1157
  }
1130
1158
 
1131
1159
  if (!this.expanded) {
1132
- if (altKey) {
1133
- void this.expandRecursively();
1134
- } else {
1135
- this.expand();
1136
- }
1160
+ void this.#setExpandedFromUser(true, altKey);
1137
1161
  return true;
1138
1162
  }
1139
1163
 
@@ -1291,15 +1315,13 @@ export class TreeElement {
1291
1315
  }
1292
1316
 
1293
1317
  onenter(): boolean {
1294
- if (this.expandable && !this.expanded) {
1295
- this.expand();
1296
- return true;
1297
- }
1298
- if (this.collapsible && this.expanded) {
1299
- this.collapse();
1300
- return true;
1318
+ // Expanding requires an expandable node; collapsing requires a collapsible one.
1319
+ const canToggle = this.expanded ? this.collapsible : this.expandable;
1320
+ if (!canToggle) {
1321
+ return false;
1301
1322
  }
1302
- return false;
1323
+ void this.#setExpandedFromUser(!this.expanded, false);
1324
+ return true;
1303
1325
  }
1304
1326
 
1305
1327
  ondelete(): boolean {
@@ -0,0 +1,74 @@
1
+ // Copyright 2026 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as Common from '../../../../core/common/common.js';
6
+ import type * as Platform from '../../../../core/platform/platform.js';
7
+
8
+ /**
9
+ * Builds a regex fragment that matches a CSS identifier even when written
10
+ * with hex escapes (e.g. `\75\72\6c` for `url`).
11
+ */
12
+ export function cssEscapeRegex(cssString: string): string {
13
+ return [...cssString]
14
+ .map(char => {
15
+ const charCodes = new Set([char.toLowerCase(), char.toUpperCase()].map(c => c.charCodeAt(0).toString(16)));
16
+ const charCodeRegex =
17
+ [...charCodes].map(charCode => `\\\\0{0,${6 - charCode.length}}${charCode}[ \\n\\t]?`).join('|');
18
+ return `\\\\?(?:${charCodeRegex}|${char})`;
19
+ })
20
+ .join('');
21
+ }
22
+
23
+ const ALLOWED_PROPERTY_PREFIXES = ['background', 'border', 'color', 'font', 'line', 'margin', 'padding', 'text'];
24
+
25
+ // We only allow data URLs with the `url()` CSS function.
26
+ // The capture group is not intended to grab the whole URL exactly, just enough so we can check the scheme.
27
+ // The regex also covers CSS hex-escaped variations of `url()`.
28
+ const URL_REGEX = new RegExp(`(?=${cssEscapeRegex('url')}\\(['"]?([^\\)]*))`, 'gi');
29
+
30
+ // We greedily capture all `image-set()`s to make sure that all of
31
+ // them properly use `url()`s to enforce the data URL check later.
32
+ const IMAGESET_REGEX = new RegExp(`(?=(${cssEscapeRegex('image-set')}\\(.*))`, 'gi');
33
+ const GOOD_IMAGESET_REGEX = /^image-set\((?:(?:(?:url|type)\("[^\\"]*"\)|[\d.]+(?:x|dpi|dpcm|dppx)),?\s*)+\)/i;
34
+
35
+ /**
36
+ * Parses `styleToAdd` as a CSS style string and populates `currentStyle`
37
+ * with only the properties that pass safety checks:
38
+ * - Property name must start with one of the allowed prefixes.
39
+ * - `url()` values must use `data:` scheme only.
40
+ * - `image-set()` values must use properly formed `url()`s.
41
+ *
42
+ * The map is cleared before being populated.
43
+ */
44
+ export function sanitizeStyle(currentStyle: Map<string, {value: string, priority: string}>, styleToAdd: string): void {
45
+ currentStyle.clear();
46
+ // eslint-disable-next-line @devtools/no-imperative-dom-api
47
+ const buffer = document.createElement('span');
48
+ buffer.setAttribute('style', styleToAdd);
49
+ for (const property of buffer.style) {
50
+ if (!ALLOWED_PROPERTY_PREFIXES.some(prefix =>
51
+ property.startsWith(prefix) || property.startsWith(`-webkit-${prefix}`))) {
52
+ continue;
53
+ }
54
+
55
+ const value = buffer.style.getPropertyValue(property);
56
+ // We make sure every `image-set()` only uses `url()`s for its images.
57
+ // If any of them seem malformed, we skip the whole property.
58
+ const imageSets = [...value.matchAll(IMAGESET_REGEX)];
59
+ if (imageSets.some(match => !GOOD_IMAGESET_REGEX.test(match[1]))) {
60
+ continue;
61
+ }
62
+ // There could be multiple `url()` functions, so we check them all.
63
+ // If any of them is not a `data` URL, we skip the whole property.
64
+ const potentialUrls = [...value.matchAll(URL_REGEX)].map(match => match[1]);
65
+ if (potentialUrls.some(potentialUrl =>
66
+ !Common.ParsedURL.schemeIs(potentialUrl as Platform.DevToolsPath.UrlString, 'data:'))) {
67
+ continue;
68
+ }
69
+ currentStyle.set(property, {
70
+ value,
71
+ priority: buffer.style.getPropertyPriority(property),
72
+ });
73
+ }
74
+ }
@@ -10,6 +10,7 @@ import type * as Protocol from '../../../../generated/protocol.js';
10
10
  import {createIcon, type Icon} from '../../../kit/kit.js';
11
11
  import * as UI from '../../legacy.js';
12
12
 
13
+ import {sanitizeStyle} from './CSSStyleSanitizer.js';
13
14
  import customPreviewComponentStyles from './customPreviewComponent.css.js';
14
15
  import {
15
16
  ObjectPropertiesMode,
@@ -108,7 +109,11 @@ export class CustomPreviewSection {
108
109
  continue;
109
110
  }
110
111
 
111
- element.setAttribute(key, value);
112
+ const sanitizedStyle = new Map<string, {value: string, priority: string}>();
113
+ sanitizeStyle(sanitizedStyle, value);
114
+ for (const [property, {value: propertyValue, priority}] of sanitizedStyle) {
115
+ element.style.setProperty(property, propertyValue, priority);
116
+ }
112
117
  }
113
118
  }
114
119
 
@@ -46,6 +46,7 @@ import {
46
46
  type LitTemplate,
47
47
  nothing,
48
48
  render,
49
+ type TemplateResult,
49
50
  } from '../../../lit/lit.js';
50
51
  import * as VisualLogging from '../../../visual_logging/visual_logging.js';
51
52
  import * as UI from '../../legacy.js';
@@ -1051,31 +1052,9 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
1051
1052
  return 0;
1052
1053
  }
1053
1054
 
1054
- static createNameElement(name: string|null, isPrivate?: boolean): Element {
1055
- const element = document.createElement('span');
1056
- element.classList.add('name');
1057
- if (name === null) {
1058
- return element;
1059
- }
1060
- const escapedName = Platform.StringUtilities.escapeUnicodeAsText(name);
1061
- if (/^\s|\s$|^$|\n/.test(escapedName)) {
1062
- element.textContent = `"${escapedName.replace(/\n/g, '\u21B5')}"`;
1063
- return element;
1064
- }
1065
- if (isPrivate) {
1066
- const privatePropertyHash = document.createElement('span');
1067
- privatePropertyHash.classList.add('private-property-hash');
1068
- privatePropertyHash.textContent = escapedName[0];
1069
- element.appendChild(privatePropertyHash);
1070
- element.appendChild(document.createTextNode(escapedName.substring(1)));
1071
- return element;
1072
- }
1073
- element.textContent = escapedName;
1074
- return element;
1075
- }
1076
-
1077
1055
  static valueElementForFunctionDescription(description?: string, includePreview?: boolean, defaultName?: string,
1078
- className?: string): LitTemplate {
1056
+ details?: SDK.DebuggerModel.FunctionDetails|null,
1057
+ linkify?: boolean): LitTemplate {
1079
1058
  const contents =
1080
1059
  (description: string, defaultName: string): {prefix: string, abbreviation: string, body: string} => {
1081
1060
  const text = description.replace(/^function [gs]et /, 'function ')
@@ -1132,10 +1111,23 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
1132
1111
 
1133
1112
  const {prefix, body, abbreviation} = contents(description ?? '', defaultName ?? '');
1134
1113
  const maxFunctionBodyLength = 200;
1114
+
1115
+ const location = details?.location;
1116
+ const clickHandler = linkify && location ? (event: Event) => {
1117
+ void Common.Revealer.reveal(location);
1118
+ event.consume(true);
1119
+ } : undefined;
1120
+
1121
+ const classes = classMap({
1122
+ 'object-value-function': true,
1123
+ linkified: Boolean(linkify && location),
1124
+ });
1125
+ const title = description ? Platform.StringUtilities.trimEndWithMaxLength(description, 500) : undefined;
1126
+
1135
1127
  return html`<span
1136
- class="object-value-function ${className ?? ''}"
1137
- title=${Platform.StringUtilities.trimEndWithMaxLength(description ?? '', 500)}>${
1138
- prefix && html`<span class=object-value-function-prefix>${prefix} </span>`}${
1128
+ class=${classes}
1129
+ @click=${clickHandler || nothing}
1130
+ title=${ifDefined(title)}>${prefix && html`<span class=object-value-function-prefix>${prefix} </span>`}${
1139
1131
  includePreview ? Platform.StringUtilities.trimEndWithMaxLength(body.trim(), maxFunctionBodyLength) :
1140
1132
  abbreviation.replace(/\n/g, ' ')}</span>`;
1141
1133
 
@@ -1221,7 +1213,8 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
1221
1213
  tooLong ? widget(ExpandableTextPropertyValue, {text}) : renderTrustedType(description, className)}</span>`;
1222
1214
  }
1223
1215
  if (type === 'function') {
1224
- return ObjectPropertiesSection.valueElementForFunctionDescription(description, undefined, undefined, 'value');
1216
+ return html`<span class="value">${
1217
+ ObjectPropertiesSection.valueElementForFunctionDescription(description)}</span>`;
1225
1218
  }
1226
1219
  if (type === 'object' && subtype === 'node' && description) {
1227
1220
  return html`<span class="value object-value-node"
@@ -1263,32 +1256,6 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
1263
1256
  return child;
1264
1257
  }
1265
1258
 
1266
- static formatObjectAsFunction(func: SDK.RemoteObject.RemoteObject, element: Element, linkify: boolean,
1267
- includePreview?: boolean): Promise<void> {
1268
- return func.debuggerModel().functionDetailsPromise(func).then(didGetDetails);
1269
-
1270
- function didGetDetails(response: SDK.DebuggerModel.FunctionDetails|null): void {
1271
- if (linkify && response?.location) {
1272
- element.classList.add('linkified');
1273
- element.addEventListener('click', () => {
1274
- void Common.Revealer.reveal(response.location);
1275
- return false;
1276
- });
1277
- }
1278
-
1279
- // The includePreview flag is false for formats such as console.dir().
1280
- let defaultName: string|('' | 'anonymous') = includePreview ? '' : 'anonymous';
1281
- if (response?.functionName) {
1282
- defaultName = response.functionName;
1283
- }
1284
- const valueElement = document.createDocumentFragment();
1285
- // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
1286
- render(ObjectPropertiesSection.valueElementForFunctionDescription(func.description, includePreview, defaultName),
1287
- valueElement);
1288
- element.appendChild(valueElement);
1289
- }
1290
- }
1291
-
1292
1259
  static isDisplayableProperty(property: SDK.RemoteObject.RemoteObjectProperty,
1293
1260
  parentProperty?: SDK.RemoteObject.RemoteObjectProperty): boolean {
1294
1261
  if (!parentProperty?.synthetic) {
@@ -1532,6 +1499,32 @@ class RootElement extends UI.TreeOutline.TreeElement {
1532
1499
  }
1533
1500
  }
1534
1501
 
1502
+ export function renderPropertyName(name: string|null, isPrivate?: boolean, title?: string): TemplateResult {
1503
+ if (name === null) {
1504
+ return html`<span class="name" title=${ifDefined(title)}></span>`;
1505
+ }
1506
+ const escapedName = Platform.StringUtilities.escapeUnicodeAsText(name);
1507
+ if (/^\s|\s$|^$|\n/.test(escapedName)) {
1508
+ return html`<span class="name" title=${ifDefined(title)}>"${escapedName.replace(/\n/g, '\u21B5')}"</span>`;
1509
+ }
1510
+ if (isPrivate) {
1511
+ return html`<span class="name" title=${ifDefined(title)}><span class="private-property-hash">${
1512
+ escapedName[0]}</span>${escapedName.substring(1)}</span>`;
1513
+ }
1514
+ return html`<span class="name" title=${ifDefined(title)}>${escapedName}</span>`;
1515
+ }
1516
+
1517
+ export async function formatObjectAsFunction(func: SDK.RemoteObject.RemoteObject, linkify: boolean,
1518
+ includePreview?: boolean): Promise<LitTemplate> {
1519
+ const details = await func.debuggerModel().functionDetailsPromise(func);
1520
+
1521
+ // The includePreview flag is false for formats such as console.dir().
1522
+ const defaultName = details?.functionName ?? (includePreview ? '' : 'anonymous');
1523
+
1524
+ return ObjectPropertiesSection.valueElementForFunctionDescription(func.description, includePreview, defaultName,
1525
+ details, linkify);
1526
+ }
1527
+
1535
1528
  /**
1536
1529
  * Number of initially visible children in an ObjectPropertyTreeElement.
1537
1530
  * Remaining children are shown as soon as requested via a show more properties button.
@@ -2,6 +2,7 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
+ import * as CSSStyleSanitizer from './CSSStyleSanitizer.js';
5
6
  import * as CustomPreviewComponent from './CustomPreviewComponent.js';
6
7
  import * as JavaScriptREPL from './JavaScriptREPL.js';
7
8
  import * as ObjectPopoverHelper from './ObjectPopoverHelper.js';
@@ -9,6 +10,7 @@ import * as ObjectPropertiesSection from './ObjectPropertiesSection.js';
9
10
  import * as RemoteObjectPreviewFormatter from './RemoteObjectPreviewFormatter.js';
10
11
 
11
12
  export {
13
+ CSSStyleSanitizer,
12
14
  CustomPreviewComponent,
13
15
  JavaScriptREPL,
14
16
  ObjectPopoverHelper,
@@ -38,10 +38,6 @@ const UIStrings = {
38
38
  * @description Text for help title of run command menu
39
39
  */
40
40
  runCommand: 'Run command',
41
- /**
42
- * @description Hint text to indicate that a selected command is deprecated
43
- */
44
- deprecated: '— deprecated',
45
41
  } as const;
46
42
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/quick_open/CommandMenu.ts', UIStrings);
47
43
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -75,7 +71,6 @@ export class CommandMenu {
75
71
  executeHandler,
76
72
  availableHandler,
77
73
  userActionCode,
78
- deprecationWarning,
79
74
  isPanelOrDrawer,
80
75
  featurePromotionId,
81
76
  } = options;
@@ -89,9 +84,8 @@ export class CommandMenu {
89
84
  // not here
90
85
  };
91
86
  }
92
- return new Command(
93
- category, title, keys, shortcut, jslogContext, handler, availableHandler, deprecationWarning, isPanelOrDrawer,
94
- featurePromotionId);
87
+ return new Command(category, title, keys, shortcut, jslogContext, handler, availableHandler, isPanelOrDrawer,
88
+ featurePromotionId);
95
89
  }
96
90
 
97
91
  static createSettingCommand<V>(setting: Common.Settings.Setting<V>, title: Common.UIString.LocalizedString, value: V,
@@ -111,11 +105,6 @@ export class CommandMenu {
111
105
  shortcut: '',
112
106
  jslogContext: Platform.StringUtilities.toKebabCase(`${setting.name}-${value}`),
113
107
  executeHandler: () => {
114
- if (setting.deprecation?.disabled &&
115
- (!setting.deprecation?.experiment || setting.deprecation.experiment.isEnabled())) {
116
- void Common.Revealer.reveal(setting);
117
- return;
118
- }
119
108
  setting.set(value);
120
109
 
121
110
  if (setting.name === 'emulate-page-focus') {
@@ -128,7 +117,6 @@ export class CommandMenu {
128
117
  }
129
118
  },
130
119
  availableHandler,
131
- deprecationWarning: setting.deprecation?.warning,
132
120
  });
133
121
 
134
122
  function availableHandler(): boolean {
@@ -273,7 +261,6 @@ export interface CreateCommandOptions {
273
261
  executeHandler: () => void;
274
262
  availableHandler?: () => boolean;
275
263
  userActionCode?: number;
276
- deprecationWarning?: Platform.UIString.LocalizedString;
277
264
  isPanelOrDrawer?: PanelOrDrawer;
278
265
  featurePromotionId?: string;
279
266
  }
@@ -357,7 +344,6 @@ export class CommandMenuProvider extends Provider {
357
344
  override renderItem(itemIndex: number, query: string): TemplateResult {
358
345
  const command = this.commands[itemIndex];
359
346
  const badge = command.featurePromotionId ? UI.UIUtils.maybeCreateNewBadge(command.featurePromotionId) : undefined;
360
- const deprecationWarning = command.deprecationWarning;
361
347
  // clang-format off
362
348
  return html`
363
349
  <devtools-icon name=${categoryIcons[command.category]}></devtools-icon>
@@ -367,10 +353,6 @@ export class CommandMenuProvider extends Provider {
367
353
  </devtools-highlight>
368
354
  ${badge ?? nothing}
369
355
  <div>${command.shortcut}</div>
370
- ${deprecationWarning ? html`
371
- <span class="deprecated-tag" title=${deprecationWarning}>
372
- ${i18nString(UIStrings.deprecated)}
373
- </span>` : nothing}
374
356
  </div>
375
357
  <span class="tag">${command.category}</span>`;
376
358
  // clang-format on
@@ -422,18 +404,15 @@ export class Command {
422
404
  readonly key: string;
423
405
  readonly shortcut: string;
424
406
  readonly jslogContext: string;
425
- readonly deprecationWarning?: Platform.UIString.LocalizedString;
426
407
  readonly isPanelOrDrawer?: PanelOrDrawer;
427
408
  readonly featurePromotionId?: string;
428
409
 
429
410
  readonly #executeHandler: () => unknown;
430
411
  readonly #availableHandler?: () => boolean;
431
412
 
432
- constructor(
433
- category: Common.UIString.LocalizedString, title: Common.UIString.LocalizedString, key: string, shortcut: string,
434
- jslogContext: string, executeHandler: () => unknown, availableHandler?: () => boolean,
435
- deprecationWarning?: Platform.UIString.LocalizedString, isPanelOrDrawer?: PanelOrDrawer,
436
- featurePromotionId?: string) {
413
+ constructor(category: Common.UIString.LocalizedString, title: Common.UIString.LocalizedString, key: string,
414
+ shortcut: string, jslogContext: string, executeHandler: () => unknown, availableHandler?: () => boolean,
415
+ isPanelOrDrawer?: PanelOrDrawer, featurePromotionId?: string) {
437
416
  this.category = category;
438
417
  this.title = title;
439
418
  this.key = category + '\0' + title + '\0' + key;
@@ -441,7 +420,6 @@ export class Command {
441
420
  this.jslogContext = jslogContext;
442
421
  this.#executeHandler = executeHandler;
443
422
  this.#availableHandler = availableHandler;
444
- this.deprecationWarning = deprecationWarning;
445
423
  this.isPanelOrDrawer = isPanelOrDrawer;
446
424
  this.featurePromotionId = featurePromotionId;
447
425
  }