chrome-devtools-frontend 1.0.943986 → 1.0.945579

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 (335) hide show
  1. package/config/gni/devtools_grd_files.gni +4 -0
  2. package/config/gni/devtools_image_files.gni +1 -0
  3. package/front_end/Images/src/circled_exclamation_icon.svg +3 -0
  4. package/front_end/core/common/ParsedURL.ts +1 -1
  5. package/front_end/core/host/UserMetrics.ts +2 -1
  6. package/front_end/core/i18n/i18nImpl.ts +7 -4
  7. package/front_end/core/i18n/locales/en-US.json +3 -72
  8. package/front_end/core/i18n/locales/en-XL.json +15 -84
  9. package/front_end/core/protocol_client/NodeURL.ts +1 -0
  10. package/front_end/core/sdk/CSSMetadata.ts +0 -1
  11. package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -0
  12. package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -3
  13. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -3
  14. package/front_end/core/sdk/Cookie.ts +17 -0
  15. package/front_end/core/sdk/CookieModel.ts +1 -0
  16. package/front_end/core/sdk/DebuggerModel.ts +5 -4
  17. package/front_end/core/sdk/NetworkManager.ts +4 -1
  18. package/front_end/core/sdk/NetworkRequest.ts +2 -2
  19. package/front_end/core/sdk/OverlayModel.ts +0 -9
  20. package/front_end/core/sdk/Resource.ts +2 -2
  21. package/front_end/core/sdk/Script.ts +2 -3
  22. package/front_end/core/sdk/sdk-meta.ts +0 -26
  23. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +0 -13
  24. package/front_end/entrypoints/main/MainImpl.ts +4 -0
  25. package/front_end/generated/protocol.d.ts +0 -4
  26. package/front_end/models/bindings/BreakpointManager.ts +3 -4
  27. package/front_end/models/bindings/ResourceMapping.ts +1 -2
  28. package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
  29. package/front_end/models/emulation/EmulatedDevices.ts +2 -4
  30. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -6
  31. package/front_end/models/persistence/PersistenceActions.ts +4 -1
  32. package/front_end/models/persistence/PlatformFileSystem.ts +3 -4
  33. package/front_end/models/text_utils/ContentProvider.ts +1 -2
  34. package/front_end/models/text_utils/StaticContentProvider.ts +2 -3
  35. package/front_end/models/workspace/UISourceCode.ts +2 -2
  36. package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -6
  37. package/front_end/panels/animation/animationTimeline.css +2 -0
  38. package/front_end/panels/application/BackForwardCacheStrings.ts +15 -75
  39. package/front_end/panels/application/BackForwardCacheView.ts +8 -1
  40. package/front_end/panels/application/ReportingApiView.ts +15 -1
  41. package/front_end/panels/application/components/EndpointsGrid.ts +63 -4
  42. package/front_end/panels/application/components/FrameDetailsView.ts +21 -34
  43. package/front_end/panels/changes/ChangesView.ts +8 -7
  44. package/front_end/panels/console/ConsolePinPane.ts +1 -0
  45. package/front_end/panels/console/ConsolePrompt.ts +121 -171
  46. package/front_end/panels/console/ConsoleView.ts +1 -1
  47. package/front_end/panels/console/consoleView.css +1 -1
  48. package/front_end/panels/css_overview/cssOverviewCompletedView.css +2 -2
  49. package/front_end/panels/elements/AccessibilityTreeUtils.ts +2 -1
  50. package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
  51. package/front_end/panels/elements/StyleEditorWidget.ts +13 -2
  52. package/front_end/panels/elements/StylePropertyHighlighter.ts +29 -19
  53. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -12
  54. package/front_end/panels/elements/StylesSidebarPane.ts +36 -10
  55. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +27 -3
  56. package/front_end/panels/emulation/DeviceModeView.ts +3 -0
  57. package/front_end/panels/help/ReleaseNoteText.ts +3 -1
  58. package/front_end/panels/network/NetworkDataGridNode.ts +5 -1
  59. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
  60. package/front_end/panels/sources/BreakpointEditDialog.ts +1 -0
  61. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  62. package/front_end/panels/sources/NavigatorView.ts +1 -1
  63. package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
  64. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -34
  65. package/front_end/panels/timeline/TimelineUIUtils.ts +51 -3
  66. package/front_end/services/window_bounds/WindowBoundsService.ts +27 -0
  67. package/front_end/services/window_bounds/window_bounds.ts +9 -0
  68. package/front_end/third_party/acorn/README.chromium +2 -2
  69. package/front_end/third_party/acorn/acorn.ts +1 -1
  70. package/front_end/third_party/acorn/package/CHANGELOG.md +31 -1
  71. package/front_end/third_party/acorn/package/README.md +1 -1
  72. package/front_end/third_party/acorn/package/dist/acorn.d.ts +3 -0
  73. package/front_end/third_party/acorn/package/dist/acorn.js +772 -708
  74. package/front_end/third_party/acorn/package/dist/acorn.mjs +767 -703
  75. package/front_end/third_party/acorn/package/dist/bin.js +47 -21
  76. package/front_end/third_party/acorn/package/package.json +1 -1
  77. package/front_end/third_party/acorn-loose/README.chromium +2 -2
  78. package/front_end/third_party/acorn-loose/package/CHANGELOG.md +12 -0
  79. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +27 -7
  80. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +28 -8
  81. package/front_end/third_party/acorn-loose/package/package.json +2 -2
  82. package/front_end/third_party/codemirror.next/bundle.ts +4 -3
  83. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  84. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +39 -1
  85. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  86. package/front_end/third_party/codemirror.next/package.json +4 -4
  87. package/front_end/third_party/i18n/i18n-impl.ts +1 -1
  88. package/front_end/third_party/lit-html/README.chromium +2 -2
  89. package/front_end/third_party/lit-html/package/CHANGELOG.md +216 -28
  90. package/front_end/third_party/lit-html/package/LICENSE +9 -9
  91. package/front_end/third_party/lit-html/package/README.md +12 -162
  92. package/front_end/third_party/lit-html/package/async-directive.d.ts +23 -54
  93. package/front_end/third_party/lit-html/package/async-directive.d.ts.map +1 -1
  94. package/front_end/third_party/lit-html/package/async-directive.js +2 -7
  95. package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
  96. package/front_end/third_party/lit-html/package/development/async-directive.d.ts +23 -54
  97. package/front_end/third_party/lit-html/package/development/async-directive.d.ts.map +1 -1
  98. package/front_end/third_party/lit-html/package/development/async-directive.js +44 -194
  99. package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
  100. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts +6 -5
  101. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts.map +1 -1
  102. package/front_end/third_party/lit-html/package/development/directive-helpers.js +25 -9
  103. package/front_end/third_party/lit-html/package/development/directive-helpers.js.map +1 -1
  104. package/front_end/third_party/lit-html/package/development/directive.d.ts +3 -16
  105. package/front_end/third_party/lit-html/package/development/directive.d.ts.map +1 -1
  106. package/front_end/third_party/lit-html/package/development/directive.js +6 -1
  107. package/front_end/third_party/lit-html/package/development/directive.js.map +1 -1
  108. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts +7 -14
  109. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts.map +1 -1
  110. package/front_end/third_party/lit-html/package/development/directives/async-append.js +17 -58
  111. package/front_end/third_party/lit-html/package/development/directives/async-append.js.map +1 -1
  112. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts +9 -14
  113. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts.map +1 -1
  114. package/front_end/third_party/lit-html/package/development/directives/async-replace.js +57 -37
  115. package/front_end/third_party/lit-html/package/development/directives/async-replace.js.map +1 -1
  116. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts +2 -3
  117. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts.map +1 -1
  118. package/front_end/third_party/lit-html/package/development/directives/cache.js +4 -6
  119. package/front_end/third_party/lit-html/package/development/directives/cache.js.map +1 -1
  120. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts +2 -2
  121. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts.map +1 -1
  122. package/front_end/third_party/lit-html/package/development/directives/class-map.js +17 -7
  123. package/front_end/third_party/lit-html/package/development/directives/class-map.js.map +1 -1
  124. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts +3 -2
  125. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts.map +1 -1
  126. package/front_end/third_party/lit-html/package/development/directives/guard.js +3 -2
  127. package/front_end/third_party/lit-html/package/development/directives/guard.js.map +1 -1
  128. package/front_end/third_party/lit-html/package/development/directives/live.d.ts +4 -3
  129. package/front_end/third_party/lit-html/package/development/directives/live.d.ts.map +1 -1
  130. package/front_end/third_party/lit-html/package/development/directives/live.js +5 -7
  131. package/front_end/third_party/lit-html/package/development/directives/live.js.map +1 -1
  132. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts +58 -0
  133. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts.map +1 -0
  134. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js +85 -0
  135. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js.map +1 -0
  136. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts +14 -11
  137. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts.map +1 -1
  138. package/front_end/third_party/lit-html/package/development/directives/ref.js +13 -11
  139. package/front_end/third_party/lit-html/package/development/directives/ref.js.map +1 -1
  140. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts +8 -4
  141. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts.map +1 -1
  142. package/front_end/third_party/lit-html/package/development/directives/repeat.js +23 -9
  143. package/front_end/third_party/lit-html/package/development/directives/repeat.js.map +1 -1
  144. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts +1 -2
  145. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts.map +1 -1
  146. package/front_end/third_party/lit-html/package/development/directives/style-map.js +1 -2
  147. package/front_end/third_party/lit-html/package/development/directives/style-map.js.map +1 -1
  148. package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -2
  149. package/front_end/third_party/lit-html/package/development/directives/template-content.js +1 -2
  150. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts +6 -4
  151. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts.map +1 -1
  152. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js +7 -5
  153. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js.map +1 -1
  154. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts +4 -1
  155. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts.map +1 -1
  156. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js +3 -0
  157. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js.map +1 -1
  158. package/front_end/third_party/lit-html/package/development/directives/until.d.ts +12 -8
  159. package/front_end/third_party/lit-html/package/development/directives/until.d.ts.map +1 -1
  160. package/front_end/third_party/lit-html/package/development/directives/until.js +63 -23
  161. package/front_end/third_party/lit-html/package/development/directives/until.js.map +1 -1
  162. package/front_end/third_party/lit-html/package/development/experimental-hydrate.d.ts.map +1 -1
  163. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js +9 -8
  164. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js.map +1 -1
  165. package/front_end/third_party/lit-html/package/development/lit-html.d.ts +81 -136
  166. package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
  167. package/front_end/third_party/lit-html/package/development/lit-html.js +249 -76
  168. package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
  169. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts +1 -41
  170. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts.map +1 -1
  171. package/front_end/third_party/lit-html/package/development/polyfill-support.js +40 -21
  172. package/front_end/third_party/lit-html/package/development/polyfill-support.js.map +1 -1
  173. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts +12 -10
  174. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts.map +1 -1
  175. package/front_end/third_party/lit-html/package/development/private-ssr-support.js +11 -3
  176. package/front_end/third_party/lit-html/package/development/private-ssr-support.js.map +1 -1
  177. package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
  178. package/front_end/third_party/lit-html/package/development/static.js +6 -5
  179. package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
  180. package/front_end/third_party/lit-html/package/directive-helpers.d.ts +6 -5
  181. package/front_end/third_party/lit-html/package/directive-helpers.d.ts.map +1 -1
  182. package/front_end/third_party/lit-html/package/directive-helpers.js +2 -2
  183. package/front_end/third_party/lit-html/package/directive-helpers.js.map +1 -1
  184. package/front_end/third_party/lit-html/package/directive.d.ts +3 -16
  185. package/front_end/third_party/lit-html/package/directive.d.ts.map +1 -1
  186. package/front_end/third_party/lit-html/package/directive.js +1 -1
  187. package/front_end/third_party/lit-html/package/directive.js.map +1 -1
  188. package/front_end/third_party/lit-html/package/directives/async-append.d.ts +7 -14
  189. package/front_end/third_party/lit-html/package/directives/async-append.d.ts.map +1 -1
  190. package/front_end/third_party/lit-html/package/directives/async-append.js +2 -6
  191. package/front_end/third_party/lit-html/package/directives/async-append.js.map +1 -1
  192. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts +9 -14
  193. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts.map +1 -1
  194. package/front_end/third_party/lit-html/package/directives/async-replace.js +2 -5
  195. package/front_end/third_party/lit-html/package/directives/async-replace.js.map +1 -1
  196. package/front_end/third_party/lit-html/package/directives/cache.d.ts +2 -3
  197. package/front_end/third_party/lit-html/package/directives/cache.d.ts.map +1 -1
  198. package/front_end/third_party/lit-html/package/directives/cache.js +2 -5
  199. package/front_end/third_party/lit-html/package/directives/cache.js.map +1 -1
  200. package/front_end/third_party/lit-html/package/directives/class-map.d.ts +2 -2
  201. package/front_end/third_party/lit-html/package/directives/class-map.d.ts.map +1 -1
  202. package/front_end/third_party/lit-html/package/directives/class-map.js +2 -4
  203. package/front_end/third_party/lit-html/package/directives/class-map.js.map +1 -1
  204. package/front_end/third_party/lit-html/package/directives/guard.d.ts +3 -2
  205. package/front_end/third_party/lit-html/package/directives/guard.d.ts.map +1 -1
  206. package/front_end/third_party/lit-html/package/directives/guard.js +2 -4
  207. package/front_end/third_party/lit-html/package/directives/guard.js.map +1 -1
  208. package/front_end/third_party/lit-html/package/directives/live.d.ts +4 -3
  209. package/front_end/third_party/lit-html/package/directives/live.d.ts.map +1 -1
  210. package/front_end/third_party/lit-html/package/directives/live.js +1 -4
  211. package/front_end/third_party/lit-html/package/directives/live.js.map +1 -1
  212. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts +58 -0
  213. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts.map +1 -0
  214. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js +7 -0
  215. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js.map +1 -0
  216. package/front_end/third_party/lit-html/package/directives/ref.d.ts +14 -11
  217. package/front_end/third_party/lit-html/package/directives/ref.d.ts.map +1 -1
  218. package/front_end/third_party/lit-html/package/directives/ref.js +2 -5
  219. package/front_end/third_party/lit-html/package/directives/ref.js.map +1 -1
  220. package/front_end/third_party/lit-html/package/directives/repeat.d.ts +8 -4
  221. package/front_end/third_party/lit-html/package/directives/repeat.d.ts.map +1 -1
  222. package/front_end/third_party/lit-html/package/directives/repeat.js +2 -5
  223. package/front_end/third_party/lit-html/package/directives/repeat.js.map +1 -1
  224. package/front_end/third_party/lit-html/package/directives/style-map.d.ts +1 -2
  225. package/front_end/third_party/lit-html/package/directives/style-map.d.ts.map +1 -1
  226. package/front_end/third_party/lit-html/package/directives/style-map.js +2 -4
  227. package/front_end/third_party/lit-html/package/directives/style-map.js.map +1 -1
  228. package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -2
  229. package/front_end/third_party/lit-html/package/directives/template-content.js +2 -4
  230. package/front_end/third_party/lit-html/package/directives/template-content.js.map +1 -1
  231. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts +6 -4
  232. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts.map +1 -1
  233. package/front_end/third_party/lit-html/package/directives/unsafe-html.js +2 -4
  234. package/front_end/third_party/lit-html/package/directives/unsafe-html.js.map +1 -1
  235. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts +4 -1
  236. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts.map +1 -1
  237. package/front_end/third_party/lit-html/package/directives/unsafe-svg.js.map +1 -1
  238. package/front_end/third_party/lit-html/package/directives/until.d.ts +12 -8
  239. package/front_end/third_party/lit-html/package/directives/until.d.ts.map +1 -1
  240. package/front_end/third_party/lit-html/package/directives/until.js +2 -6
  241. package/front_end/third_party/lit-html/package/directives/until.js.map +1 -1
  242. package/front_end/third_party/lit-html/package/experimental-hydrate.d.ts.map +1 -1
  243. package/front_end/third_party/lit-html/package/experimental-hydrate.js +2 -5
  244. package/front_end/third_party/lit-html/package/experimental-hydrate.js.map +1 -1
  245. package/front_end/third_party/lit-html/package/lit-html.d.ts +81 -136
  246. package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
  247. package/front_end/third_party/lit-html/package/lit-html.js +1 -1
  248. package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
  249. package/front_end/third_party/lit-html/package/package.json +75 -24
  250. package/front_end/third_party/lit-html/package/polyfill-support.d.ts +1 -41
  251. package/front_end/third_party/lit-html/package/polyfill-support.d.ts.map +1 -1
  252. package/front_end/third_party/lit-html/package/polyfill-support.js +1 -1
  253. package/front_end/third_party/lit-html/package/polyfill-support.js.map +1 -1
  254. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts +12 -10
  255. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts.map +1 -1
  256. package/front_end/third_party/lit-html/package/private-ssr-support.js +2 -2
  257. package/front_end/third_party/lit-html/package/private-ssr-support.js.map +1 -1
  258. package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
  259. package/front_end/third_party/lit-html/package/static.js +1 -1
  260. package/front_end/third_party/lit-html/package/static.js.map +1 -1
  261. package/front_end/third_party/marked/README.chromium +2 -2
  262. package/front_end/third_party/marked/marked.ts +2 -2
  263. package/front_end/third_party/marked/package/README.md +7 -1
  264. package/front_end/third_party/marked/package/bin/marked.js +214 -0
  265. package/front_end/third_party/marked/package/lib/marked.cjs +2907 -0
  266. package/front_end/third_party/marked/package/lib/marked.esm.d.ts +1 -3
  267. package/front_end/third_party/marked/package/lib/marked.esm.js +627 -586
  268. package/front_end/third_party/marked/package/lib/marked.umd.js +2913 -0
  269. package/front_end/third_party/marked/package/man/marked.1 +5 -24
  270. package/front_end/third_party/marked/package/man/marked.1.txt +21 -31
  271. package/front_end/third_party/marked/package/marked.min.js +1 -1
  272. package/front_end/third_party/marked/package/package.json +41 -32
  273. package/front_end/third_party/marked/package/src/Lexer.js +109 -108
  274. package/front_end/third_party/marked/package/src/Parser.js +38 -15
  275. package/front_end/third_party/marked/package/src/Renderer.js +5 -5
  276. package/front_end/third_party/marked/package/src/Slugger.js +2 -2
  277. package/front_end/third_party/marked/package/src/TextRenderer.js +2 -2
  278. package/front_end/third_party/marked/package/src/Tokenizer.js +215 -190
  279. package/front_end/third_party/marked/package/src/defaults.js +6 -9
  280. package/front_end/third_party/marked/package/src/helpers.js +16 -27
  281. package/front_end/third_party/marked/package/src/marked.js +146 -63
  282. package/front_end/third_party/marked/package/src/rules.js +20 -45
  283. package/front_end/third_party/wasmparser/README.chromium +2 -2
  284. package/front_end/third_party/wasmparser/package/.github/workflows/main.yml +47 -0
  285. package/front_end/third_party/wasmparser/package/CHANGELOG.md +12 -0
  286. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +53 -53
  287. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
  288. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +53 -53
  289. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
  290. package/front_end/third_party/wasmparser/package/package.json +1 -1
  291. package/front_end/third_party/wasmparser/package/src/WasmParser.ts +53 -53
  292. package/front_end/ui/components/adorners/Adorner.ts +14 -14
  293. package/front_end/ui/components/buttons/Button.ts +116 -42
  294. package/front_end/ui/components/data_grid/DataGrid.ts +122 -122
  295. package/front_end/ui/components/data_grid/DataGridController.ts +42 -42
  296. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  297. package/front_end/ui/components/docs/button/basic.html +3 -0
  298. package/front_end/ui/components/docs/button/basic.ts +16 -0
  299. package/front_end/ui/components/expandable_list/ExpandableList.ts +11 -11
  300. package/front_end/ui/components/icon_button/Icon.ts +24 -21
  301. package/front_end/ui/components/icon_button/IconButton.ts +31 -31
  302. package/front_end/ui/components/issue_counter/IssueCounter.ts +52 -52
  303. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +42 -42
  304. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +67 -67
  305. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -22
  306. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +36 -36
  307. package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +19 -19
  308. package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +25 -25
  309. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +52 -52
  310. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +21 -21
  311. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
  312. package/front_end/ui/components/markdown_view/MarkdownImage.ts +14 -14
  313. package/front_end/ui/components/markdown_view/MarkdownLink.ts +8 -8
  314. package/front_end/ui/components/markdown_view/MarkdownView.ts +6 -6
  315. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +33 -33
  316. package/front_end/ui/components/report_view/ReportView.ts +18 -18
  317. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +53 -53
  318. package/front_end/ui/components/settings/SettingCheckbox.ts +15 -15
  319. package/front_end/ui/components/survey_link/SurveyLink.ts +28 -28
  320. package/front_end/ui/components/text_editor/TextEditor.ts +65 -36
  321. package/front_end/ui/components/text_editor/config.ts +36 -14
  322. package/front_end/ui/components/text_editor/javascript.ts +20 -15
  323. package/front_end/ui/components/text_editor/theme.ts +29 -4
  324. package/front_end/ui/components/text_prompt/TextPrompt.ts +19 -19
  325. package/front_end/ui/components/tree_outline/TreeOutline.ts +56 -56
  326. package/front_end/ui/legacy/Infobar.ts +9 -0
  327. package/front_end/ui/legacy/InspectorView.ts +1 -1
  328. package/front_end/ui/legacy/ViewManager.ts +6 -0
  329. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +20 -0
  330. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
  331. package/front_end/ui/legacy/components/utils/Linkifier.ts +49 -79
  332. package/front_end/ui/legacy/tabbedPane.css +1 -1
  333. package/front_end/ui/legacy/themeColors.css +2 -0
  334. package/inspector_overlay/main.ts +3 -0
  335. package/package.json +1 -1
@@ -90,7 +90,7 @@ export const enum QueryType {
90
90
  PropertyExpression = 2,
91
91
  }
92
92
 
93
- export function getQueryType(tree: CodeMirror.Tree, pos: number): {
93
+ export function getQueryType(tree: CodeMirror.Tree, pos: number, doc: CodeMirror.Text): {
94
94
  type: QueryType,
95
95
  from?: number,
96
96
  relatedNode?: CodeMirror.SyntaxNode,
@@ -101,13 +101,15 @@ export function getQueryType(tree: CodeMirror.Tree, pos: number): {
101
101
  return null;
102
102
  }
103
103
 
104
- if (node.name === 'VariableName') {
105
- return {type: QueryType.Expression, from: node.from};
106
- }
107
104
  if (node.name === 'PropertyName') {
108
105
  return parent?.name !== 'MemberExpression' ? null :
109
106
  {type: QueryType.PropertyName, from: node.from, relatedNode: parent};
110
107
  }
108
+ if (node.name === 'VariableName' ||
109
+ // Treat alphabetic keywords as variables
110
+ !node.firstChild && node.to - node.from < 20 && !/[^a-z]/.test(doc.sliceString(node.from, node.to))) {
111
+ return {type: QueryType.Expression, from: node.from};
112
+ }
111
113
  if (node.name === 'String') {
112
114
  const parent = node.parent;
113
115
  return parent?.name === 'MemberExpression' && parent.childBefore(node.from)?.name === '[' ?
@@ -134,8 +136,8 @@ export function getQueryType(tree: CodeMirror.Tree, pos: number): {
134
136
 
135
137
  export async function javascriptCompletionSource(cx: CodeMirror.CompletionContext):
136
138
  Promise<CodeMirror.CompletionResult|null> {
137
- const query = getQueryType(CodeMirror.syntaxTree(cx.state), cx.pos);
138
- if (!query || query.from === undefined && !cx.explicit) {
139
+ const query = getQueryType(CodeMirror.syntaxTree(cx.state), cx.pos, cx.state.doc);
140
+ if (!query || query.from === undefined && !cx.explicit && query.type === QueryType.Expression) {
139
141
  return null;
140
142
  }
141
143
 
@@ -162,7 +164,8 @@ export async function javascriptCompletionSource(cx: CodeMirror.CompletionContex
162
164
  if (!objectExpr) {
163
165
  return null;
164
166
  }
165
- result = await completeProperties(cx.state.sliceDoc(objectExpr.from, objectExpr.to), quote);
167
+ result = await completeProperties(
168
+ cx.state.sliceDoc(objectExpr.from, objectExpr.to), quote, cx.state.sliceDoc(cx.pos, cx.pos + 1) === ']');
166
169
  } else {
167
170
  return null;
168
171
  }
@@ -214,10 +217,10 @@ let cacheInstance: PropertyCache|null = null;
214
217
  // Store recent collections of property completions. The empty string
215
218
  // is used to store the set of global bindings.
216
219
  class PropertyCache {
217
- private readonly cache: Map<string, Promise<CompletionSet>> = new Map();
220
+ readonly #cache: Map<string, Promise<CompletionSet>> = new Map();
218
221
 
219
222
  constructor() {
220
- const clear = (): void => this.cache.clear();
223
+ const clear = (): void => this.#cache.clear();
221
224
  SDK.ConsoleModel.ConsoleModel.instance().addEventListener(SDK.ConsoleModel.Events.CommandEvaluated, clear);
222
225
  UI.Context.Context.instance().addFlavorChangeListener(SDK.RuntimeModel.ExecutionContext, clear);
223
226
  SDK.TargetManager.TargetManager.instance().addModelListener(
@@ -227,14 +230,14 @@ class PropertyCache {
227
230
  }
228
231
 
229
232
  get(expression: string): Promise<CompletionSet>|undefined {
230
- return this.cache.get(expression);
233
+ return this.#cache.get(expression);
231
234
  }
232
235
 
233
236
  set(expression: string, value: Promise<CompletionSet>): void {
234
- this.cache.set(expression, value);
237
+ this.#cache.set(expression, value);
235
238
  setTimeout(() => {
236
- if (this.cache.get(expression) === value) {
237
- this.cache.delete(expression);
239
+ if (this.#cache.get(expression) === value) {
240
+ this.#cache.delete(expression);
238
241
  }
239
242
  }, maxCacheAge);
240
243
  }
@@ -250,6 +253,7 @@ class PropertyCache {
250
253
  async function completeProperties(
251
254
  expression: string,
252
255
  quoted?: string,
256
+ hasBracket: boolean = false,
253
257
  ): Promise<CompletionSet> {
254
258
  const cache = PropertyCache.instance();
255
259
  if (!quoted) {
@@ -262,7 +266,7 @@ async function completeProperties(
262
266
  if (!context) {
263
267
  return new CompletionSet();
264
268
  }
265
- const result = completePropertiesInner(expression, context, quoted);
269
+ const result = completePropertiesInner(expression, context, quoted, hasBracket);
266
270
  if (!quoted) {
267
271
  cache.set(expression, result);
268
272
  }
@@ -275,6 +279,7 @@ async function completePropertiesInner(
275
279
  expression: string,
276
280
  context: SDK.RuntimeModel.ExecutionContext,
277
281
  quoted?: string,
282
+ hasBracket: boolean = false,
278
283
  ): Promise<CompletionSet> {
279
284
  const result = new CompletionSet();
280
285
  if (!context) {
@@ -313,7 +318,7 @@ async function completePropertiesInner(
313
318
  label,
314
319
  type: prop.value?.type === 'function' ? functionType : otherType,
315
320
  };
316
- if (quoted) {
321
+ if (quoted && !hasBracket) {
317
322
  completion.apply = label + ']';
318
323
  }
319
324
  if (!prop.isOwn) {
@@ -18,7 +18,7 @@ export const editorTheme = CM.EditorView.theme({
18
18
  fontSize: 'var(--source-code-font-size)',
19
19
  },
20
20
 
21
- '.cm-panels, .cm-tooltip': {
21
+ '.cm-panels': {
22
22
  backgroundColor: 'var(--color-background-elevation-1)',
23
23
  },
24
24
 
@@ -110,25 +110,50 @@ export const editorTheme = CM.EditorView.theme({
110
110
  color: 'var(--color-text-secondary)',
111
111
  },
112
112
 
113
+ '.cm-tooltip': {
114
+ boxShadow: 'var(--drop-shadow)',
115
+ backgroundColor: 'var(--color-background-elevation-1)',
116
+ },
117
+
113
118
  '.cm-argumentHints': {
114
119
  pointerEvents: 'none',
115
120
  padding: '0 4px',
116
121
  whiteSpace: 'nowrap',
117
122
  lineHeight: '20px',
118
123
  marginBottom: '4px',
119
- boxShadow: 'var(--drop-shadow)',
120
- backgroundColor: 'var(--color-background)',
121
124
  width: 'fit-content',
122
125
  },
123
126
 
124
127
  '.cm-tooltip.cm-tooltip-autocomplete > ul': {
128
+ backgroundColor: 'var(--color-background)',
125
129
  minWidth: '16em',
130
+ '& > li.cm-secondaryCompletion': {
131
+ display: 'flex',
132
+ backgroundColor: 'var(--color-background-elevation-1)',
133
+ justifyContent: 'space-between',
134
+ '&::before': {
135
+ content: '">"',
136
+ fontWeight: 'bold',
137
+ color: 'var(--color-primary-variant)',
138
+ marginRight: '5px',
139
+ },
140
+ },
141
+ '& > li:hover': {
142
+ backgroundColor: 'var(--item-hover-color)',
143
+ },
126
144
  '& > li[aria-selected]': {
127
145
  backgroundColor: 'var(--color-selected-option-background)',
128
- color: 'var(--color-selected-option)',
146
+ '&, &.cm-secondaryCompletion::before': {
147
+ color: 'var(--color-selected-option)',
148
+ },
129
149
  },
130
150
  },
131
151
 
152
+ '.cm-completionMatchedText': {
153
+ textDecoration: 'none',
154
+ fontWeight: 'bold',
155
+ },
156
+
132
157
  '.cm-highlightedLine': {
133
158
  animation: 'cm-fading-highlight 2s 0s',
134
159
  },
@@ -26,27 +26,27 @@ export class PromptInputEvent extends Event {
26
26
 
27
27
  export class TextPrompt extends HTMLElement {
28
28
  static readonly litTagName = LitHtml.literal`devtools-text-prompt`;
29
- private readonly shadow = this.attachShadow({mode: 'open'});
30
- private ariaLabelText = '';
31
- private prefixText = '';
32
- private suggestionText = '';
29
+ readonly #shadow = this.attachShadow({mode: 'open'});
30
+ #ariaLabelText = '';
31
+ #prefixText = '';
32
+ #suggestionText = '';
33
33
 
34
34
  connectedCallback(): void {
35
- this.shadow.adoptedStyleSheets = [textPromptStyles];
35
+ this.#shadow.adoptedStyleSheets = [textPromptStyles];
36
36
  }
37
37
 
38
38
  set data(data: TextPromptData) {
39
- this.ariaLabelText = data.ariaLabel;
40
- this.prefixText = data.prefix;
41
- this.suggestionText = data.suggestion;
39
+ this.#ariaLabelText = data.ariaLabel;
40
+ this.#prefixText = data.prefix;
41
+ this.#suggestionText = data.suggestion;
42
42
  this.render();
43
43
  }
44
44
 
45
45
  get data(): TextPromptData {
46
46
  return {
47
- ariaLabel: this.ariaLabelText,
48
- prefix: this.prefixText,
49
- suggestion: this.suggestionText,
47
+ ariaLabel: this.#ariaLabelText,
48
+ prefix: this.#prefixText,
49
+ suggestion: this.#suggestionText,
50
50
  };
51
51
  }
52
52
 
@@ -55,7 +55,7 @@ export class TextPrompt extends HTMLElement {
55
55
  }
56
56
 
57
57
  private input(): HTMLInputElement {
58
- const inputElement = this.shadow.querySelector<HTMLInputElement>('input');
58
+ const inputElement = this.#shadow.querySelector<HTMLInputElement>('input');
59
59
  if (!inputElement) {
60
60
  throw new Error('Expected an input element!');
61
61
  }
@@ -92,12 +92,12 @@ export class TextPrompt extends HTMLElement {
92
92
  }
93
93
 
94
94
  setPrefix(prefix: string): void {
95
- this.prefixText = prefix;
95
+ this.#prefixText = prefix;
96
96
  this.render();
97
97
  }
98
98
 
99
99
  setSuggestion(suggestion: string): void {
100
- this.suggestionText = suggestion;
100
+ this.#suggestionText = suggestion;
101
101
  this.render();
102
102
  }
103
103
 
@@ -112,7 +112,7 @@ export class TextPrompt extends HTMLElement {
112
112
  }
113
113
 
114
114
  private suggestion(): HTMLSpanElement {
115
- const suggestionElement = this.shadow.querySelector<HTMLSpanElement>('.suggestion');
115
+ const suggestionElement = this.#shadow.querySelector<HTMLSpanElement>('.suggestion');
116
116
  if (!suggestionElement) {
117
117
  throw new Error('Expected an suggestion element!');
118
118
  }
@@ -125,11 +125,11 @@ export class TextPrompt extends HTMLElement {
125
125
 
126
126
  private render(): void {
127
127
  const output = LitHtml.html`
128
- <span class="prefix">${this.prefixText} </span>
129
- <span class="text-prompt-input"><input aria-label=${this.ariaLabelText} spellcheck="false" @input=${
128
+ <span class="prefix">${this.#prefixText} </span>
129
+ <span class="text-prompt-input"><input aria-label=${this.#ariaLabelText} spellcheck="false" @input=${
130
130
  this.onInput} @keydown=${this.onKeyDown}/><span class='suggestion' suggestion="${
131
- this.suggestionText}"></span></span>`;
132
- LitHtml.render(output, this.shadow, {host: this});
131
+ this.#suggestionText}"></span></span>`;
132
+ LitHtml.render(output, this.#shadow, {host: this});
133
133
  }
134
134
  }
135
135
 
@@ -82,20 +82,20 @@ export const enum FilterOption {
82
82
 
83
83
  export class TreeOutline<TreeNodeDataType> extends HTMLElement {
84
84
  static readonly litTagName = LitHtml.literal`devtools-tree-outline`;
85
- private readonly shadow = this.attachShadow({mode: 'open'});
86
- private treeData: readonly TreeNode<TreeNodeDataType>[] = [];
87
- private nodeExpandedMap: Map<string, boolean> = new Map();
88
- private domNodeToTreeNodeMap: WeakMap<HTMLLIElement, TreeNode<TreeNodeDataType>> = new WeakMap();
89
- private hasRenderedAtLeastOnce = false;
85
+ readonly #shadow = this.attachShadow({mode: 'open'});
86
+ #treeData: readonly TreeNode<TreeNodeDataType>[] = [];
87
+ #nodeExpandedMap: Map<string, boolean> = new Map();
88
+ #domNodeToTreeNodeMap: WeakMap<HTMLLIElement, TreeNode<TreeNodeDataType>> = new WeakMap();
89
+ #hasRenderedAtLeastOnce = false;
90
90
  /**
91
91
  * If we have expanded to a certain node, we want to focus it once we've
92
92
  * rendered. But we render lazily and wrapped in LitHtml.until, so we can't
93
93
  * know for sure when that node will be rendered. This variable tracks the
94
94
  * node that we want focused but may not yet have been rendered.
95
95
  */
96
- private nodeIdPendingFocus: TreeNodeId|null = null;
97
- private selectedTreeNode: TreeNode<TreeNodeDataType>|null = null;
98
- private defaultRenderer =
96
+ #nodeIdPendingFocus: TreeNodeId|null = null;
97
+ #selectedTreeNode: TreeNode<TreeNodeDataType>|null = null;
98
+ #defaultRenderer =
99
99
  (node: TreeNode<TreeNodeDataType>, _state: {isExpanded: boolean}): LitHtml.TemplateResult => {
100
100
  if (typeof node.treeNodeData !== 'string') {
101
101
  console.warn(`The default TreeOutline renderer simply stringifies its given value. You passed in ${
@@ -105,16 +105,16 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
105
105
  }
106
106
  return LitHtml.html`${String(node.treeNodeData)}`;
107
107
  };
108
- private nodeFilter?: ((node: TreeNodeDataType) => FilterOption);
108
+ #nodeFilter?: ((node: TreeNodeDataType) => FilterOption);
109
109
 
110
110
  /**
111
111
  * scheduledRender = render() has been called and scheduled a render.
112
112
  */
113
- private scheduledRender = false;
113
+ #scheduledRender = false;
114
114
  /**
115
115
  * enqueuedRender = render() was called mid-way through an existing render.
116
116
  */
117
- private enqueuedRender = false;
117
+ #enqueuedRender = false;
118
118
 
119
119
  static get observedAttributes(): string[] {
120
120
  return ['nowrap', 'toplevelbordercolor'];
@@ -136,22 +136,22 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
136
136
  connectedCallback(): void {
137
137
  this.setTopLevelNodeBorderColorCSSVariable(this.getAttribute('toplevelbordercolor'));
138
138
  this.setNodeKeyNoWrapCSSVariable(this.getAttribute('nowrap'));
139
- this.shadow.adoptedStyleSheets = [treeOutlineStyles, CodeHighlighter.Style.default];
139
+ this.#shadow.adoptedStyleSheets = [treeOutlineStyles, CodeHighlighter.Style.default];
140
140
  }
141
141
 
142
142
  get data(): TreeOutlineData<TreeNodeDataType> {
143
143
  return {
144
- tree: this.treeData as TreeNode<TreeNodeDataType>[],
145
- defaultRenderer: this.defaultRenderer,
144
+ tree: this.#treeData as TreeNode<TreeNodeDataType>[],
145
+ defaultRenderer: this.#defaultRenderer,
146
146
  };
147
147
  }
148
148
 
149
149
  set data(data: TreeOutlineData<TreeNodeDataType>) {
150
- this.defaultRenderer = data.defaultRenderer;
151
- this.treeData = data.tree;
152
- this.nodeFilter = data.filter;
153
- if (!this.hasRenderedAtLeastOnce) {
154
- this.selectedTreeNode = this.treeData[0];
150
+ this.#defaultRenderer = data.defaultRenderer;
151
+ this.#treeData = data.tree;
152
+ this.#nodeFilter = data.filter;
153
+ if (!this.#hasRenderedAtLeastOnce) {
154
+ this.#selectedTreeNode = this.#treeData[0];
155
155
  }
156
156
  this.render();
157
157
  }
@@ -162,7 +162,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
162
162
  * 1 and 2.
163
163
  */
164
164
  async expandRecursively(maxDepth = 2): Promise<void> {
165
- await Promise.all(this.treeData.map(rootNode => this.expandAndRecurse(rootNode, 0, maxDepth)));
165
+ await Promise.all(this.#treeData.map(rootNode => this.expandAndRecurse(rootNode, 0, maxDepth)));
166
166
  await this.render();
167
167
  }
168
168
 
@@ -170,7 +170,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
170
170
  * Collapses all nodes in the tree.
171
171
  */
172
172
  async collapseAllNodes(): Promise<void> {
173
- this.nodeExpandedMap.clear();
173
+ this.#nodeExpandedMap.clear();
174
174
  await this.render();
175
175
  }
176
176
 
@@ -185,7 +185,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
185
185
  * Takes a TreeNode ID, expands the outline to reveal it, and focuses it.
186
186
  */
187
187
  async expandToAndSelectTreeNodeId(targetTreeNodeId: TreeNodeId): Promise<void> {
188
- const pathToTreeNode = await getPathToTreeNode(this.treeData, targetTreeNodeId);
188
+ const pathToTreeNode = await getPathToTreeNode(this.#treeData, targetTreeNodeId);
189
189
 
190
190
  if (pathToTreeNode === null) {
191
191
  throw new Error(`Could not find node with id ${targetTreeNodeId} in the tree.`);
@@ -198,7 +198,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
198
198
  });
199
199
 
200
200
  // Mark the node as pending focus so when it is rendered into the DOM we can focus it
201
- this.nodeIdPendingFocus = targetTreeNodeId;
201
+ this.#nodeIdPendingFocus = targetTreeNodeId;
202
202
  await this.render();
203
203
  }
204
204
 
@@ -206,7 +206,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
206
206
  * Takes a list of TreeNode IDs and expands the corresponding nodes.
207
207
  */
208
208
  expandNodeIds(nodeIds: TreeNodeId[]): Promise<void> {
209
- nodeIds.forEach(id => this.nodeExpandedMap.set(id, true));
209
+ nodeIds.forEach(id => this.#nodeExpandedMap.set(id, true));
210
210
  return this.render();
211
211
  }
212
212
 
@@ -214,12 +214,12 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
214
214
  * Takes a TreeNode ID and focuses the corresponding node.
215
215
  */
216
216
  focusNodeId(nodeId: TreeNodeId): Promise<void> {
217
- this.nodeIdPendingFocus = nodeId;
217
+ this.#nodeIdPendingFocus = nodeId;
218
218
  return this.render();
219
219
  }
220
220
 
221
221
  async collapseChildrenOfNode(domNode: HTMLLIElement): Promise<void> {
222
- const treeNode = this.domNodeToTreeNodeMap.get(domNode);
222
+ const treeNode = this.#domNodeToTreeNodeMap.get(domNode);
223
223
  if (!treeNode) {
224
224
  return;
225
225
  }
@@ -248,22 +248,22 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
248
248
  }
249
249
 
250
250
  private getSelectedTreeNode(): TreeNode<TreeNodeDataType> {
251
- if (!this.selectedTreeNode) {
251
+ if (!this.#selectedTreeNode) {
252
252
  throw new Error('getSelectedNode was called but selectedTreeNode is null');
253
253
  }
254
- return this.selectedTreeNode;
254
+ return this.#selectedTreeNode;
255
255
  }
256
256
 
257
257
  private async fetchNodeChildren(node: TreeNodeWithChildren<TreeNodeDataType>): Promise<TreeNode<TreeNodeDataType>[]> {
258
258
  const children = await getNodeChildren(node);
259
- if (!this.nodeFilter) {
259
+ if (!this.#nodeFilter) {
260
260
  return children;
261
261
  }
262
262
  const filteredChildren = [];
263
263
  for (const child of children) {
264
- const filtering = this.nodeFilter(child.treeNodeData);
264
+ const filtering = this.#nodeFilter(child.treeNodeData);
265
265
  // We always include the selected node in the tree, regardless of its filtering status.
266
- if (filtering === FilterOption.SHOW || this.isSelectedNode(child) || child.id === this.nodeIdPendingFocus) {
266
+ if (filtering === FilterOption.SHOW || this.isSelectedNode(child) || child.id === this.#nodeIdPendingFocus) {
267
267
  filteredChildren.push(child);
268
268
  } else if (filtering === FilterOption.FLATTEN && isExpandableNode(child)) {
269
269
  const grandChildren = await this.fetchNodeChildren(child);
@@ -274,11 +274,11 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
274
274
  }
275
275
 
276
276
  private setNodeExpandedState(node: TreeNode<TreeNodeDataType>, newExpandedState: boolean): void {
277
- this.nodeExpandedMap.set(node.id, newExpandedState);
277
+ this.#nodeExpandedMap.set(node.id, newExpandedState);
278
278
  }
279
279
 
280
280
  private nodeIsExpanded(node: TreeNode<TreeNodeDataType>): boolean {
281
- return this.nodeExpandedMap.get(node.id) || false;
281
+ return this.#nodeExpandedMap.get(node.id) || false;
282
282
  }
283
283
 
284
284
  private async expandAndRecurse(node: TreeNode<TreeNodeDataType>, currentDepth: number, maxDepth: number):
@@ -309,7 +309,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
309
309
  event.stopPropagation();
310
310
  const nodeClickExpandsOrContracts = this.getAttribute('clickabletitle') !== null;
311
311
  const domNode = event.currentTarget as HTMLLIElement;
312
- const node = this.domNodeToTreeNodeMap.get(domNode);
312
+ const node = this.#domNodeToTreeNodeMap.get(domNode);
313
313
  if (nodeClickExpandsOrContracts && node && isExpandableNode(node)) {
314
314
  this.setNodeExpandedState(node, !this.nodeIsExpanded(node));
315
315
  }
@@ -317,11 +317,11 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
317
317
  }
318
318
 
319
319
  private async focusTreeNode(domNode: HTMLLIElement): Promise<void> {
320
- const treeNode = this.domNodeToTreeNodeMap.get(domNode);
320
+ const treeNode = this.#domNodeToTreeNodeMap.get(domNode);
321
321
  if (!treeNode) {
322
322
  return;
323
323
  }
324
- this.selectedTreeNode = treeNode;
324
+ this.#selectedTreeNode = treeNode;
325
325
  await this.render();
326
326
  this.dispatchEvent(new ItemSelectedEvent(treeNode));
327
327
  coordinator.write('DOMNode focus', () => {
@@ -331,7 +331,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
331
331
 
332
332
  private processHomeAndEndKeysNavigation(key: 'Home'|'End'): void {
333
333
  if (key === 'Home') {
334
- const firstRootNode = this.shadow.querySelector<HTMLLIElement>('ul[role="tree"] > li[role="treeitem"]');
334
+ const firstRootNode = this.#shadow.querySelector<HTMLLIElement>('ul[role="tree"] > li[role="treeitem"]');
335
335
  if (firstRootNode) {
336
336
  this.focusTreeNode(firstRootNode);
337
337
  }
@@ -345,7 +345,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
345
345
  * li[role="treeitem"] in the DOM because we only render visible nodes.
346
346
  * Therefore we can select all the nodes and pick the last one.
347
347
  */
348
- const allTreeItems = this.shadow.querySelectorAll<HTMLLIElement>('li[role="treeitem"]');
348
+ const allTreeItems = this.#shadow.querySelectorAll<HTMLLIElement>('li[role="treeitem"]');
349
349
  const lastTreeItem = allTreeItems[allTreeItems.length - 1];
350
350
  if (lastTreeItem) {
351
351
  this.focusTreeNode(lastTreeItem);
@@ -355,7 +355,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
355
355
 
356
356
  private async processArrowKeyNavigation(key: Platform.KeyboardUtilities.ArrowKey, currentDOMNode: HTMLLIElement):
357
357
  Promise<void> {
358
- const currentTreeNode = this.domNodeToTreeNodeMap.get(currentDOMNode);
358
+ const currentTreeNode = this.#domNodeToTreeNodeMap.get(currentDOMNode);
359
359
  if (!currentTreeNode) {
360
360
  return;
361
361
  }
@@ -370,7 +370,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
370
370
  }
371
371
 
372
372
  private processEnterOrSpaceNavigation(currentDOMNode: HTMLLIElement): void {
373
- const currentTreeNode = this.domNodeToTreeNodeMap.get(currentDOMNode);
373
+ const currentTreeNode = this.#domNodeToTreeNodeMap.get(currentDOMNode);
374
374
  if (!currentTreeNode) {
375
375
  return;
376
376
  }
@@ -399,13 +399,13 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
399
399
  }
400
400
 
401
401
  private focusPendingNode(domNode: HTMLLIElement): void {
402
- this.nodeIdPendingFocus = null;
402
+ this.#nodeIdPendingFocus = null;
403
403
  this.focusTreeNode(domNode);
404
404
  }
405
405
 
406
406
  private isSelectedNode(node: TreeNode<TreeNodeDataType>): boolean {
407
- if (this.selectedTreeNode) {
408
- return node.id === this.selectedTreeNode.id;
407
+ if (this.#selectedTreeNode) {
408
+ return node.id === this.#selectedTreeNode.id;
409
409
  }
410
410
  return false;
411
411
  }
@@ -446,7 +446,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
446
446
  if (node.renderer) {
447
447
  renderedNodeKey = node.renderer(node, {isExpanded: nodeIsExpanded});
448
448
  } else {
449
- renderedNodeKey = this.defaultRenderer(node, {isExpanded: nodeIsExpanded});
449
+ renderedNodeKey = this.#defaultRenderer(node, {isExpanded: nodeIsExpanded});
450
450
  }
451
451
 
452
452
  // Disabled until https://crbug.com/1079231 is fixed.
@@ -460,7 +460,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
460
460
  aria-posinset=${positionInSet + 1}
461
461
  class=${listItemClasses}
462
462
  @click=${this.onNodeClick}
463
- track-dom-node-to-tree-node=${trackDOMNodeToTreeNode(this.domNodeToTreeNodeMap, node)}
463
+ track-dom-node-to-tree-node=${trackDOMNodeToTreeNode(this.#domNodeToTreeNodeMap, node)}
464
464
  on-render=${ComponentHelpers.Directives.nodeRenderedCallback(domNode => {
465
465
  /**
466
466
  * Because TreeNodes are lazily rendered, you can call
@@ -473,7 +473,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
473
473
  return;
474
474
  }
475
475
 
476
- if (this.nodeIdPendingFocus && node.id === this.nodeIdPendingFocus) {
476
+ if (this.#nodeIdPendingFocus && node.id === this.#nodeIdPendingFocus) {
477
477
  this.focusPendingNode(domNode);
478
478
  }
479
479
  })}
@@ -497,14 +497,14 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
497
497
  }
498
498
 
499
499
  private async render(): Promise<void> {
500
- if (this.scheduledRender) {
500
+ if (this.#scheduledRender) {
501
501
  // If we are already rendering, don't render again immediately, but
502
502
  // enqueue it to be run after we're done on our current render.
503
- this.enqueuedRender = true;
503
+ this.#enqueuedRender = true;
504
504
  return;
505
505
  }
506
506
 
507
- this.scheduledRender = true;
507
+ this.#scheduledRender = true;
508
508
 
509
509
  await coordinator.write('TreeOutline render', () => {
510
510
  // Disabled until https://crbug.com/1079231 is fixed.
@@ -512,27 +512,27 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
512
512
  LitHtml.render(LitHtml.html`
513
513
  <div class="wrapping-container">
514
514
  <ul role="tree" @keydown=${this.onTreeKeyDown}>
515
- ${this.treeData.map((topLevelNode, index) => {
515
+ ${this.#treeData.map((topLevelNode, index) => {
516
516
  return this.renderNode(topLevelNode, {
517
517
  depth: 0,
518
- setSize: this.treeData.length,
518
+ setSize: this.#treeData.length,
519
519
  positionInSet: index,
520
520
  });
521
521
  })}
522
522
  </ul>
523
523
  </div>
524
- `, this.shadow, {
524
+ `, this.#shadow, {
525
525
  host: this,
526
526
  });
527
527
  });
528
528
  // clang-format on
529
- this.hasRenderedAtLeastOnce = true;
530
- this.scheduledRender = false;
529
+ this.#hasRenderedAtLeastOnce = true;
530
+ this.#scheduledRender = false;
531
531
 
532
532
  // If render() was called when we were already mid-render, let's re-render
533
533
  // to ensure we're not rendering any stale UI.
534
- if (this.enqueuedRender) {
535
- this.enqueuedRender = false;
534
+ if (this.#enqueuedRender) {
535
+ this.#enqueuedRender = false;
536
536
  return this.render();
537
537
  }
538
538
  }
@@ -48,6 +48,7 @@ export class Infobar {
48
48
  private readonly toggleElement: HTMLButtonElement;
49
49
  private readonly closeButton: HTMLElement;
50
50
  private closeCallback: (() => void)|null;
51
+ #firstFocusableElement: HTMLElement|null = null;
51
52
  private parentView?: Widget;
52
53
 
53
54
  // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
@@ -88,6 +89,9 @@ export class Infobar {
88
89
  }
89
90
 
90
91
  const button = createTextButton(action.text, actionCallback, buttonClass);
92
+ if (action.highlight && !this.#firstFocusableElement) {
93
+ this.#firstFocusableElement = button;
94
+ }
91
95
  this.actionContainer.appendChild(button);
92
96
  }
93
97
  }
@@ -202,6 +206,11 @@ export class Infobar {
202
206
  this.toggleElement.remove();
203
207
  this.onResize();
204
208
  ARIAUtils.alert(this.detailsMessage);
209
+ if (this.#firstFocusableElement) {
210
+ this.#firstFocusableElement.focus();
211
+ } else {
212
+ this.closeButton.focus();
213
+ }
205
214
  }
206
215
 
207
216
  createDetailsRowMessage(message?: string): Element {
@@ -471,7 +471,7 @@ function createLocaleInfobar(): Infobar {
471
471
  // @ts-ignore TODO(crbug.com/1163928) Wait for Intl support.
472
472
  const locale = new Intl.Locale(closestSupportedLocale);
473
473
  const closestSupportedLanguageInCurrentLocale =
474
- new Intl.DisplayNames([devtoolsLocale.locale], {type: 'language'}).of(locale.language);
474
+ new Intl.DisplayNames([devtoolsLocale.locale], {type: 'language'}).of(locale.language || 'en');
475
475
 
476
476
  const languageSetting = Common.Settings.Settings.instance().moduleSetting<string>('language');
477
477
  return new Infobar(
@@ -828,6 +828,12 @@ export class _TabbedLocation extends Location implements TabbedViewLocation {
828
828
  this.tabOrderSetting.set(tabOrders);
829
829
  }
830
830
 
831
+ // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
832
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
833
+ getCloseableTabSetting(): Common.Settings.Setting<any> {
834
+ return this.closeableTabSetting.get();
835
+ }
836
+
831
837
  static orderStep = 10; // Keep in sync with descriptors.
832
838
  }
833
839