chrome-devtools-frontend 1.0.944427 → 1.0.945677

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 (327) 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 +3 -1
  6. package/front_end/core/i18n/i18nImpl.ts +7 -4
  7. package/front_end/core/i18n/locales/en-US.json +3 -60
  8. package/front_end/core/i18n/locales/en-XL.json +15 -72
  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/CSSStyleSheetHeader.ts +2 -3
  12. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -3
  13. package/front_end/core/sdk/Cookie.ts +17 -0
  14. package/front_end/core/sdk/CookieModel.ts +1 -0
  15. package/front_end/core/sdk/DebuggerModel.ts +5 -4
  16. package/front_end/core/sdk/NetworkManager.ts +4 -1
  17. package/front_end/core/sdk/NetworkRequest.ts +2 -2
  18. package/front_end/core/sdk/Resource.ts +2 -2
  19. package/front_end/core/sdk/Script.ts +2 -3
  20. package/front_end/entrypoints/main/MainImpl.ts +6 -0
  21. package/front_end/generated/protocol.d.ts +0 -4
  22. package/front_end/models/bindings/BreakpointManager.ts +3 -4
  23. package/front_end/models/bindings/ResourceMapping.ts +1 -2
  24. package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
  25. package/front_end/models/emulation/EmulatedDevices.ts +2 -4
  26. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -6
  27. package/front_end/models/persistence/PersistenceActions.ts +4 -1
  28. package/front_end/models/persistence/PlatformFileSystem.ts +3 -4
  29. package/front_end/models/text_utils/ContentProvider.ts +1 -2
  30. package/front_end/models/text_utils/StaticContentProvider.ts +2 -3
  31. package/front_end/models/timeline_model/TimelineJSProfile.ts +16 -3
  32. package/front_end/models/timeline_model/TimelineModel.ts +1 -0
  33. package/front_end/models/workspace/UISourceCode.ts +2 -2
  34. package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -6
  35. package/front_end/panels/animation/AnimationTimeline.ts +1 -1
  36. package/front_end/panels/animation/animationTimeline.css +2 -0
  37. package/front_end/panels/application/BackForwardCacheStrings.ts +15 -75
  38. package/front_end/panels/application/BackForwardCacheView.ts +8 -1
  39. package/front_end/panels/application/ReportingApiView.ts +15 -1
  40. package/front_end/panels/application/components/EndpointsGrid.ts +63 -4
  41. package/front_end/panels/application/components/FrameDetailsView.ts +21 -34
  42. package/front_end/panels/changes/ChangesView.ts +8 -7
  43. package/front_end/panels/elements/StyleEditorWidget.ts +7 -7
  44. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -15
  45. package/front_end/panels/elements/StylesSidebarPane.ts +35 -9
  46. package/front_end/panels/emulation/DeviceModeView.ts +3 -0
  47. package/front_end/panels/help/ReleaseNoteText.ts +3 -1
  48. package/front_end/panels/network/NetworkItemView.ts +7 -1
  49. package/front_end/panels/profiler/heapProfiler.css +2 -5
  50. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
  51. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  52. package/front_end/panels/sources/NavigatorView.ts +1 -1
  53. package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
  54. package/front_end/panels/timeline/TimelineController.ts +3 -0
  55. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -34
  56. package/front_end/panels/timeline/TimelineUIUtils.ts +51 -3
  57. package/front_end/panels/webauthn/WebauthnPane.ts +31 -32
  58. package/front_end/services/window_bounds/WindowBoundsService.ts +27 -0
  59. package/front_end/services/window_bounds/window_bounds.ts +9 -0
  60. package/front_end/third_party/acorn/README.chromium +2 -2
  61. package/front_end/third_party/acorn/acorn.ts +1 -1
  62. package/front_end/third_party/acorn/package/CHANGELOG.md +31 -1
  63. package/front_end/third_party/acorn/package/README.md +1 -1
  64. package/front_end/third_party/acorn/package/dist/acorn.d.ts +3 -0
  65. package/front_end/third_party/acorn/package/dist/acorn.js +772 -708
  66. package/front_end/third_party/acorn/package/dist/acorn.mjs +767 -703
  67. package/front_end/third_party/acorn/package/dist/bin.js +47 -21
  68. package/front_end/third_party/acorn/package/package.json +1 -1
  69. package/front_end/third_party/acorn-loose/README.chromium +2 -2
  70. package/front_end/third_party/acorn-loose/package/CHANGELOG.md +12 -0
  71. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +27 -7
  72. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +28 -8
  73. package/front_end/third_party/acorn-loose/package/package.json +2 -2
  74. package/front_end/third_party/codemirror.next/bundle.ts +1 -1
  75. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  76. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +8 -1
  77. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  78. package/front_end/third_party/codemirror.next/package.json +1 -1
  79. package/front_end/third_party/i18n/i18n-impl.ts +1 -1
  80. package/front_end/third_party/lit-html/README.chromium +2 -2
  81. package/front_end/third_party/lit-html/package/CHANGELOG.md +216 -28
  82. package/front_end/third_party/lit-html/package/LICENSE +9 -9
  83. package/front_end/third_party/lit-html/package/README.md +12 -162
  84. package/front_end/third_party/lit-html/package/async-directive.d.ts +23 -54
  85. package/front_end/third_party/lit-html/package/async-directive.d.ts.map +1 -1
  86. package/front_end/third_party/lit-html/package/async-directive.js +2 -7
  87. package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
  88. package/front_end/third_party/lit-html/package/development/async-directive.d.ts +23 -54
  89. package/front_end/third_party/lit-html/package/development/async-directive.d.ts.map +1 -1
  90. package/front_end/third_party/lit-html/package/development/async-directive.js +44 -194
  91. package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
  92. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts +6 -5
  93. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts.map +1 -1
  94. package/front_end/third_party/lit-html/package/development/directive-helpers.js +25 -9
  95. package/front_end/third_party/lit-html/package/development/directive-helpers.js.map +1 -1
  96. package/front_end/third_party/lit-html/package/development/directive.d.ts +3 -16
  97. package/front_end/third_party/lit-html/package/development/directive.d.ts.map +1 -1
  98. package/front_end/third_party/lit-html/package/development/directive.js +6 -1
  99. package/front_end/third_party/lit-html/package/development/directive.js.map +1 -1
  100. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts +7 -14
  101. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts.map +1 -1
  102. package/front_end/third_party/lit-html/package/development/directives/async-append.js +17 -58
  103. package/front_end/third_party/lit-html/package/development/directives/async-append.js.map +1 -1
  104. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts +9 -14
  105. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts.map +1 -1
  106. package/front_end/third_party/lit-html/package/development/directives/async-replace.js +57 -37
  107. package/front_end/third_party/lit-html/package/development/directives/async-replace.js.map +1 -1
  108. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts +2 -3
  109. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts.map +1 -1
  110. package/front_end/third_party/lit-html/package/development/directives/cache.js +4 -6
  111. package/front_end/third_party/lit-html/package/development/directives/cache.js.map +1 -1
  112. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts +2 -2
  113. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts.map +1 -1
  114. package/front_end/third_party/lit-html/package/development/directives/class-map.js +17 -7
  115. package/front_end/third_party/lit-html/package/development/directives/class-map.js.map +1 -1
  116. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts +3 -2
  117. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts.map +1 -1
  118. package/front_end/third_party/lit-html/package/development/directives/guard.js +3 -2
  119. package/front_end/third_party/lit-html/package/development/directives/guard.js.map +1 -1
  120. package/front_end/third_party/lit-html/package/development/directives/live.d.ts +4 -3
  121. package/front_end/third_party/lit-html/package/development/directives/live.d.ts.map +1 -1
  122. package/front_end/third_party/lit-html/package/development/directives/live.js +5 -7
  123. package/front_end/third_party/lit-html/package/development/directives/live.js.map +1 -1
  124. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts +58 -0
  125. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts.map +1 -0
  126. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js +85 -0
  127. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js.map +1 -0
  128. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts +14 -11
  129. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts.map +1 -1
  130. package/front_end/third_party/lit-html/package/development/directives/ref.js +13 -11
  131. package/front_end/third_party/lit-html/package/development/directives/ref.js.map +1 -1
  132. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts +8 -4
  133. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts.map +1 -1
  134. package/front_end/third_party/lit-html/package/development/directives/repeat.js +23 -9
  135. package/front_end/third_party/lit-html/package/development/directives/repeat.js.map +1 -1
  136. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts +1 -2
  137. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts.map +1 -1
  138. package/front_end/third_party/lit-html/package/development/directives/style-map.js +1 -2
  139. package/front_end/third_party/lit-html/package/development/directives/style-map.js.map +1 -1
  140. package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -2
  141. package/front_end/third_party/lit-html/package/development/directives/template-content.js +1 -2
  142. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts +6 -4
  143. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts.map +1 -1
  144. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js +7 -5
  145. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js.map +1 -1
  146. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts +4 -1
  147. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts.map +1 -1
  148. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js +3 -0
  149. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js.map +1 -1
  150. package/front_end/third_party/lit-html/package/development/directives/until.d.ts +12 -8
  151. package/front_end/third_party/lit-html/package/development/directives/until.d.ts.map +1 -1
  152. package/front_end/third_party/lit-html/package/development/directives/until.js +63 -23
  153. package/front_end/third_party/lit-html/package/development/directives/until.js.map +1 -1
  154. package/front_end/third_party/lit-html/package/development/experimental-hydrate.d.ts.map +1 -1
  155. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js +9 -8
  156. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js.map +1 -1
  157. package/front_end/third_party/lit-html/package/development/lit-html.d.ts +81 -136
  158. package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
  159. package/front_end/third_party/lit-html/package/development/lit-html.js +249 -76
  160. package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
  161. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts +1 -41
  162. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts.map +1 -1
  163. package/front_end/third_party/lit-html/package/development/polyfill-support.js +40 -21
  164. package/front_end/third_party/lit-html/package/development/polyfill-support.js.map +1 -1
  165. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts +12 -10
  166. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts.map +1 -1
  167. package/front_end/third_party/lit-html/package/development/private-ssr-support.js +11 -3
  168. package/front_end/third_party/lit-html/package/development/private-ssr-support.js.map +1 -1
  169. package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
  170. package/front_end/third_party/lit-html/package/development/static.js +6 -5
  171. package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
  172. package/front_end/third_party/lit-html/package/directive-helpers.d.ts +6 -5
  173. package/front_end/third_party/lit-html/package/directive-helpers.d.ts.map +1 -1
  174. package/front_end/third_party/lit-html/package/directive-helpers.js +2 -2
  175. package/front_end/third_party/lit-html/package/directive-helpers.js.map +1 -1
  176. package/front_end/third_party/lit-html/package/directive.d.ts +3 -16
  177. package/front_end/third_party/lit-html/package/directive.d.ts.map +1 -1
  178. package/front_end/third_party/lit-html/package/directive.js +1 -1
  179. package/front_end/third_party/lit-html/package/directive.js.map +1 -1
  180. package/front_end/third_party/lit-html/package/directives/async-append.d.ts +7 -14
  181. package/front_end/third_party/lit-html/package/directives/async-append.d.ts.map +1 -1
  182. package/front_end/third_party/lit-html/package/directives/async-append.js +2 -6
  183. package/front_end/third_party/lit-html/package/directives/async-append.js.map +1 -1
  184. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts +9 -14
  185. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts.map +1 -1
  186. package/front_end/third_party/lit-html/package/directives/async-replace.js +2 -5
  187. package/front_end/third_party/lit-html/package/directives/async-replace.js.map +1 -1
  188. package/front_end/third_party/lit-html/package/directives/cache.d.ts +2 -3
  189. package/front_end/third_party/lit-html/package/directives/cache.d.ts.map +1 -1
  190. package/front_end/third_party/lit-html/package/directives/cache.js +2 -5
  191. package/front_end/third_party/lit-html/package/directives/cache.js.map +1 -1
  192. package/front_end/third_party/lit-html/package/directives/class-map.d.ts +2 -2
  193. package/front_end/third_party/lit-html/package/directives/class-map.d.ts.map +1 -1
  194. package/front_end/third_party/lit-html/package/directives/class-map.js +2 -4
  195. package/front_end/third_party/lit-html/package/directives/class-map.js.map +1 -1
  196. package/front_end/third_party/lit-html/package/directives/guard.d.ts +3 -2
  197. package/front_end/third_party/lit-html/package/directives/guard.d.ts.map +1 -1
  198. package/front_end/third_party/lit-html/package/directives/guard.js +2 -4
  199. package/front_end/third_party/lit-html/package/directives/guard.js.map +1 -1
  200. package/front_end/third_party/lit-html/package/directives/live.d.ts +4 -3
  201. package/front_end/third_party/lit-html/package/directives/live.d.ts.map +1 -1
  202. package/front_end/third_party/lit-html/package/directives/live.js +1 -4
  203. package/front_end/third_party/lit-html/package/directives/live.js.map +1 -1
  204. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts +58 -0
  205. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts.map +1 -0
  206. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js +7 -0
  207. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js.map +1 -0
  208. package/front_end/third_party/lit-html/package/directives/ref.d.ts +14 -11
  209. package/front_end/third_party/lit-html/package/directives/ref.d.ts.map +1 -1
  210. package/front_end/third_party/lit-html/package/directives/ref.js +2 -5
  211. package/front_end/third_party/lit-html/package/directives/ref.js.map +1 -1
  212. package/front_end/third_party/lit-html/package/directives/repeat.d.ts +8 -4
  213. package/front_end/third_party/lit-html/package/directives/repeat.d.ts.map +1 -1
  214. package/front_end/third_party/lit-html/package/directives/repeat.js +2 -5
  215. package/front_end/third_party/lit-html/package/directives/repeat.js.map +1 -1
  216. package/front_end/third_party/lit-html/package/directives/style-map.d.ts +1 -2
  217. package/front_end/third_party/lit-html/package/directives/style-map.d.ts.map +1 -1
  218. package/front_end/third_party/lit-html/package/directives/style-map.js +2 -4
  219. package/front_end/third_party/lit-html/package/directives/style-map.js.map +1 -1
  220. package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -2
  221. package/front_end/third_party/lit-html/package/directives/template-content.js +2 -4
  222. package/front_end/third_party/lit-html/package/directives/template-content.js.map +1 -1
  223. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts +6 -4
  224. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts.map +1 -1
  225. package/front_end/third_party/lit-html/package/directives/unsafe-html.js +2 -4
  226. package/front_end/third_party/lit-html/package/directives/unsafe-html.js.map +1 -1
  227. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts +4 -1
  228. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts.map +1 -1
  229. package/front_end/third_party/lit-html/package/directives/unsafe-svg.js.map +1 -1
  230. package/front_end/third_party/lit-html/package/directives/until.d.ts +12 -8
  231. package/front_end/third_party/lit-html/package/directives/until.d.ts.map +1 -1
  232. package/front_end/third_party/lit-html/package/directives/until.js +2 -6
  233. package/front_end/third_party/lit-html/package/directives/until.js.map +1 -1
  234. package/front_end/third_party/lit-html/package/experimental-hydrate.d.ts.map +1 -1
  235. package/front_end/third_party/lit-html/package/experimental-hydrate.js +2 -5
  236. package/front_end/third_party/lit-html/package/experimental-hydrate.js.map +1 -1
  237. package/front_end/third_party/lit-html/package/lit-html.d.ts +81 -136
  238. package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
  239. package/front_end/third_party/lit-html/package/lit-html.js +1 -1
  240. package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
  241. package/front_end/third_party/lit-html/package/package.json +75 -24
  242. package/front_end/third_party/lit-html/package/polyfill-support.d.ts +1 -41
  243. package/front_end/third_party/lit-html/package/polyfill-support.d.ts.map +1 -1
  244. package/front_end/third_party/lit-html/package/polyfill-support.js +1 -1
  245. package/front_end/third_party/lit-html/package/polyfill-support.js.map +1 -1
  246. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts +12 -10
  247. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts.map +1 -1
  248. package/front_end/third_party/lit-html/package/private-ssr-support.js +2 -2
  249. package/front_end/third_party/lit-html/package/private-ssr-support.js.map +1 -1
  250. package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
  251. package/front_end/third_party/lit-html/package/static.js +1 -1
  252. package/front_end/third_party/lit-html/package/static.js.map +1 -1
  253. package/front_end/third_party/marked/README.chromium +2 -2
  254. package/front_end/third_party/marked/marked.ts +2 -2
  255. package/front_end/third_party/marked/package/README.md +7 -1
  256. package/front_end/third_party/marked/package/bin/marked.js +214 -0
  257. package/front_end/third_party/marked/package/lib/marked.cjs +2907 -0
  258. package/front_end/third_party/marked/package/lib/marked.esm.d.ts +1 -3
  259. package/front_end/third_party/marked/package/lib/marked.esm.js +627 -586
  260. package/front_end/third_party/marked/package/lib/marked.umd.js +2913 -0
  261. package/front_end/third_party/marked/package/man/marked.1 +5 -24
  262. package/front_end/third_party/marked/package/man/marked.1.txt +21 -31
  263. package/front_end/third_party/marked/package/marked.min.js +1 -1
  264. package/front_end/third_party/marked/package/package.json +41 -32
  265. package/front_end/third_party/marked/package/src/Lexer.js +109 -108
  266. package/front_end/third_party/marked/package/src/Parser.js +38 -15
  267. package/front_end/third_party/marked/package/src/Renderer.js +5 -5
  268. package/front_end/third_party/marked/package/src/Slugger.js +2 -2
  269. package/front_end/third_party/marked/package/src/TextRenderer.js +2 -2
  270. package/front_end/third_party/marked/package/src/Tokenizer.js +215 -190
  271. package/front_end/third_party/marked/package/src/defaults.js +6 -9
  272. package/front_end/third_party/marked/package/src/helpers.js +16 -27
  273. package/front_end/third_party/marked/package/src/marked.js +146 -63
  274. package/front_end/third_party/marked/package/src/rules.js +20 -45
  275. package/front_end/third_party/wasmparser/README.chromium +2 -2
  276. package/front_end/third_party/wasmparser/package/.github/workflows/main.yml +47 -0
  277. package/front_end/third_party/wasmparser/package/CHANGELOG.md +12 -0
  278. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +53 -53
  279. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
  280. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +53 -53
  281. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
  282. package/front_end/third_party/wasmparser/package/package.json +1 -1
  283. package/front_end/third_party/wasmparser/package/src/WasmParser.ts +53 -53
  284. package/front_end/ui/components/adorners/Adorner.ts +14 -14
  285. package/front_end/ui/components/buttons/Button.ts +133 -42
  286. package/front_end/ui/components/buttons/button.css +31 -0
  287. package/front_end/ui/components/data_grid/DataGrid.ts +131 -122
  288. package/front_end/ui/components/data_grid/DataGridController.ts +42 -42
  289. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  290. package/front_end/ui/components/docs/button/basic.html +3 -0
  291. package/front_end/ui/components/docs/button/basic.ts +58 -0
  292. package/front_end/ui/components/expandable_list/ExpandableList.ts +11 -11
  293. package/front_end/ui/components/icon_button/Icon.ts +24 -21
  294. package/front_end/ui/components/icon_button/IconButton.ts +31 -31
  295. package/front_end/ui/components/issue_counter/IssueCounter.ts +52 -52
  296. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +42 -42
  297. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +67 -67
  298. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -22
  299. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +36 -36
  300. package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +19 -19
  301. package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +25 -25
  302. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +52 -52
  303. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +21 -21
  304. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
  305. package/front_end/ui/components/markdown_view/MarkdownImage.ts +14 -14
  306. package/front_end/ui/components/markdown_view/MarkdownLink.ts +8 -8
  307. package/front_end/ui/components/markdown_view/MarkdownView.ts +6 -6
  308. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +33 -33
  309. package/front_end/ui/components/report_view/ReportView.ts +18 -18
  310. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +53 -53
  311. package/front_end/ui/components/settings/SettingCheckbox.ts +15 -15
  312. package/front_end/ui/components/survey_link/SurveyLink.ts +28 -28
  313. package/front_end/ui/components/text_editor/TextEditor.ts +68 -36
  314. package/front_end/ui/components/text_editor/config.ts +4 -2
  315. package/front_end/ui/components/text_editor/javascript.ts +6 -6
  316. package/front_end/ui/components/text_prompt/TextPrompt.ts +19 -19
  317. package/front_end/ui/components/tree_outline/TreeOutline.ts +56 -56
  318. package/front_end/ui/legacy/Infobar.ts +9 -0
  319. package/front_end/ui/legacy/InspectorView.ts +1 -1
  320. package/front_end/ui/legacy/ListWidget.ts +2 -2
  321. package/front_end/ui/legacy/ViewManager.ts +6 -0
  322. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +20 -0
  323. package/front_end/ui/legacy/tabbedPane.css +1 -1
  324. package/inspector_overlay/main.ts +3 -0
  325. package/package.json +1 -1
  326. package/scripts/eslint_rules/lib/l10n_filename_matches.js +17 -4
  327. package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +21 -0
@@ -83,84 +83,84 @@ export function getIssueCountsEnumeration(
83
83
 
84
84
  export class IssueCounter extends HTMLElement {
85
85
  static readonly litTagName = LitHtml.literal`issue-counter`;
86
- private readonly shadow = this.attachShadow({mode: 'open'});
87
- private clickHandler: undefined|(() => void) = undefined;
88
- private tooltipCallback: undefined|(() => void) = undefined;
89
- private leadingText: string = '';
90
- private throttler: undefined|Common.Throttler.Throttler;
91
- private counts: [number, number, number] = [0, 0, 0];
92
- private displayMode: DisplayMode = DisplayMode.OmitEmpty;
93
- private issuesManager: IssuesManager.IssuesManager.IssuesManager|undefined = undefined;
94
- private accessibleName: string|undefined = undefined;
95
- private throttlerTimeout: number|undefined;
96
- private compact = false;
86
+ readonly #shadow = this.attachShadow({mode: 'open'});
87
+ #clickHandler: undefined|(() => void) = undefined;
88
+ #tooltipCallback: undefined|(() => void) = undefined;
89
+ #leadingText: string = '';
90
+ #throttler: undefined|Common.Throttler.Throttler;
91
+ #counts: [number, number, number] = [0, 0, 0];
92
+ #displayMode: DisplayMode = DisplayMode.OmitEmpty;
93
+ #issuesManager: IssuesManager.IssuesManager.IssuesManager|undefined = undefined;
94
+ #accessibleName: string|undefined = undefined;
95
+ #throttlerTimeout: number|undefined;
96
+ #compact = false;
97
97
 
98
98
  scheduleUpdate(): void {
99
- if (this.throttler) {
100
- this.throttler.schedule(async () => this.render());
99
+ if (this.#throttler) {
100
+ this.#throttler.schedule(async () => this.render());
101
101
  } else {
102
102
  this.render();
103
103
  }
104
104
  }
105
105
 
106
106
  connectedCallback(): void {
107
- this.shadow.adoptedStyleSheets = [issueCounterStyles];
107
+ this.#shadow.adoptedStyleSheets = [issueCounterStyles];
108
108
  }
109
109
 
110
110
  set data(data: IssueCounterData) {
111
- this.clickHandler = data.clickHandler;
112
- this.leadingText = data.leadingText ?? '';
113
- this.tooltipCallback = data.tooltipCallback;
114
- this.displayMode = data.displayMode ?? DisplayMode.OmitEmpty;
115
- this.accessibleName = data.accessibleName;
116
- this.throttlerTimeout = data.throttlerTimeout;
117
- this.compact = Boolean(data.compact);
118
- if (this.issuesManager !== data.issuesManager) {
119
- this.issuesManager?.removeEventListener(
111
+ this.#clickHandler = data.clickHandler;
112
+ this.#leadingText = data.leadingText ?? '';
113
+ this.#tooltipCallback = data.tooltipCallback;
114
+ this.#displayMode = data.displayMode ?? DisplayMode.OmitEmpty;
115
+ this.#accessibleName = data.accessibleName;
116
+ this.#throttlerTimeout = data.throttlerTimeout;
117
+ this.#compact = Boolean(data.compact);
118
+ if (this.#issuesManager !== data.issuesManager) {
119
+ this.#issuesManager?.removeEventListener(
120
120
  IssuesManager.IssuesManager.Events.IssuesCountUpdated, this.scheduleUpdate, this);
121
- this.issuesManager = data.issuesManager;
122
- this.issuesManager.addEventListener(
121
+ this.#issuesManager = data.issuesManager;
122
+ this.#issuesManager.addEventListener(
123
123
  IssuesManager.IssuesManager.Events.IssuesCountUpdated, this.scheduleUpdate, this);
124
124
  }
125
125
  if (data.throttlerTimeout !== 0) {
126
- this.throttler = new Common.Throttler.Throttler(data.throttlerTimeout ?? 100);
126
+ this.#throttler = new Common.Throttler.Throttler(data.throttlerTimeout ?? 100);
127
127
  } else {
128
- this.throttler = undefined;
128
+ this.#throttler = undefined;
129
129
  }
130
130
  this.scheduleUpdate();
131
131
  }
132
132
 
133
133
  get data(): IssueCounterData {
134
134
  return {
135
- clickHandler: this.clickHandler,
136
- leadingText: this.leadingText,
137
- tooltipCallback: this.tooltipCallback,
138
- displayMode: this.displayMode,
139
- accessibleName: this.accessibleName,
140
- throttlerTimeout: this.throttlerTimeout,
141
- compact: this.compact,
142
- issuesManager: this.issuesManager as IssuesManager.IssuesManager.IssuesManager,
135
+ clickHandler: this.#clickHandler,
136
+ leadingText: this.#leadingText,
137
+ tooltipCallback: this.#tooltipCallback,
138
+ displayMode: this.#displayMode,
139
+ accessibleName: this.#accessibleName,
140
+ throttlerTimeout: this.#throttlerTimeout,
141
+ compact: this.#compact,
142
+ issuesManager: this.#issuesManager as IssuesManager.IssuesManager.IssuesManager,
143
143
  };
144
144
  }
145
145
 
146
146
  private render(): void {
147
- if (!this.issuesManager) {
147
+ if (!this.#issuesManager) {
148
148
  return;
149
149
  }
150
- this.counts = [
151
- this.issuesManager.numberOfIssues(IssuesManager.Issue.IssueKind.PageError),
152
- this.issuesManager.numberOfIssues(IssuesManager.Issue.IssueKind.BreakingChange),
153
- this.issuesManager.numberOfIssues(IssuesManager.Issue.IssueKind.Improvement),
150
+ this.#counts = [
151
+ this.#issuesManager.numberOfIssues(IssuesManager.Issue.IssueKind.PageError),
152
+ this.#issuesManager.numberOfIssues(IssuesManager.Issue.IssueKind.BreakingChange),
153
+ this.#issuesManager.numberOfIssues(IssuesManager.Issue.IssueKind.Improvement),
154
154
  ];
155
155
  const importance = [
156
156
  IssuesManager.Issue.IssueKind.PageError,
157
157
  IssuesManager.Issue.IssueKind.BreakingChange,
158
158
  IssuesManager.Issue.IssueKind.Improvement,
159
159
  ];
160
- const mostImportant = importance[this.counts.findIndex(x => x > 0) ?? 2];
160
+ const mostImportant = importance[this.#counts.findIndex(x => x > 0) ?? 2];
161
161
 
162
162
  const countToString = (kind: IssuesManager.Issue.IssueKind, count: number): string|undefined => {
163
- switch (this.displayMode) {
163
+ switch (this.#displayMode) {
164
164
  case DisplayMode.OmitEmpty:
165
165
  return count > 0 ? `${count}` : undefined;
166
166
  case DisplayMode.ShowAlways:
@@ -174,29 +174,29 @@ export class IssueCounter extends HTMLElement {
174
174
  groups: [
175
175
  {
176
176
  ...toIconGroup(getIssueKindIconData(IssuesManager.Issue.IssueKind.PageError), iconSize),
177
- text: countToString(IssuesManager.Issue.IssueKind.PageError, this.counts[0]),
177
+ text: countToString(IssuesManager.Issue.IssueKind.PageError, this.#counts[0]),
178
178
  },
179
179
  {
180
180
  ...toIconGroup(getIssueKindIconData(IssuesManager.Issue.IssueKind.BreakingChange), iconSize),
181
- text: countToString(IssuesManager.Issue.IssueKind.BreakingChange, this.counts[1]),
181
+ text: countToString(IssuesManager.Issue.IssueKind.BreakingChange, this.#counts[1]),
182
182
  },
183
183
  {
184
184
  ...toIconGroup(getIssueKindIconData(IssuesManager.Issue.IssueKind.Improvement), iconSize),
185
- text: countToString(IssuesManager.Issue.IssueKind.Improvement, this.counts[2]),
185
+ text: countToString(IssuesManager.Issue.IssueKind.Improvement, this.#counts[2]),
186
186
  },
187
187
  ],
188
- clickHandler: this.clickHandler,
189
- leadingText: this.leadingText,
190
- accessibleName: this.accessibleName,
191
- compact: this.compact,
188
+ clickHandler: this.#clickHandler,
189
+ leadingText: this.#leadingText,
190
+ accessibleName: this.#accessibleName,
191
+ compact: this.#compact,
192
192
  };
193
193
  LitHtml.render(
194
194
  LitHtml.html`
195
195
  <icon-button .data=${data as IconButton.IconButton.IconButtonData} .accessibleName="${
196
- this.accessibleName}"></icon-button>
196
+ this.#accessibleName}"></icon-button>
197
197
  `,
198
- this.shadow, {host: this});
199
- this.tooltipCallback?.();
198
+ this.#shadow, {host: this});
199
+ this.#tooltipCallback?.();
200
200
  }
201
201
  }
202
202
 
@@ -51,79 +51,79 @@ const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();
51
51
 
52
52
  export class IssueLinkIcon extends HTMLElement {
53
53
  static readonly litTagName = LitHtml.literal`devtools-issue-link-icon`;
54
- private readonly shadow = this.attachShadow({mode: 'open'});
54
+ readonly #shadow = this.attachShadow({mode: 'open'});
55
55
  // The value `null` indicates that the issue is not available,
56
56
  // `undefined` that it is still being resolved.
57
- private issue?: IssuesManager.Issue.Issue|null;
58
- private issueTitle: string|null = null;
59
- private issueTitlePromise = Promise.resolve<void>(undefined);
60
- private issueId?: Protocol.Audits.IssueId;
61
- private issueResolver?: IssuesManager.IssueResolver.IssueResolver;
62
- private additionalOnClickAction?: () => void;
63
- private reveal = Common.Revealer.reveal;
64
- private issueResolvedPromise = Promise.resolve<void>(undefined);
57
+ #issue?: IssuesManager.Issue.Issue|null;
58
+ #issueTitle: string|null = null;
59
+ #issueTitlePromise = Promise.resolve<void>(undefined);
60
+ #issueId?: Protocol.Audits.IssueId;
61
+ #issueResolver?: IssuesManager.IssueResolver.IssueResolver;
62
+ #additionalOnClickAction?: () => void;
63
+ #reveal = Common.Revealer.reveal;
64
+ #issueResolvedPromise = Promise.resolve<void>(undefined);
65
65
 
66
66
  set data(data: IssueLinkIconData) {
67
- this.issue = data.issue;
68
- this.issueId = data.issueId;
69
- if (!this.issue && !this.issueId) {
67
+ this.#issue = data.issue;
68
+ this.#issueId = data.issueId;
69
+ if (!this.#issue && !this.#issueId) {
70
70
  throw new Error('Either `issue` or `issueId` must be provided');
71
71
  }
72
- this.issueResolver = data.issueResolver;
73
- this.additionalOnClickAction = data.additionalOnClickAction;
72
+ this.#issueResolver = data.issueResolver;
73
+ this.#additionalOnClickAction = data.additionalOnClickAction;
74
74
  if (data.revealOverride) {
75
- this.reveal = data.revealOverride;
75
+ this.#reveal = data.revealOverride;
76
76
  }
77
- if (!this.issue && this.issueId) {
78
- this.issueResolvedPromise = this.resolveIssue(this.issueId);
79
- this.issueTitlePromise = this.issueResolvedPromise.then(() => this.fetchIssueTitle());
77
+ if (!this.#issue && this.#issueId) {
78
+ this.#issueResolvedPromise = this.resolveIssue(this.#issueId);
79
+ this.#issueTitlePromise = this.#issueResolvedPromise.then(() => this.fetchIssueTitle());
80
80
  } else {
81
- this.issueTitlePromise = this.fetchIssueTitle();
81
+ this.#issueTitlePromise = this.fetchIssueTitle();
82
82
  }
83
83
  this.render();
84
84
  }
85
85
 
86
86
  private async fetchIssueTitle(): Promise<void> {
87
- const description = this.issue?.getDescription();
87
+ const description = this.#issue?.getDescription();
88
88
  if (!description) {
89
89
  return;
90
90
  }
91
91
  const title = await IssuesManager.MarkdownIssueDescription.getIssueTitleFromMarkdownDescription(description);
92
92
  if (title) {
93
- this.issueTitle = title;
93
+ this.#issueTitle = title;
94
94
  }
95
95
  }
96
96
 
97
97
  connectedCallback(): void {
98
- this.shadow.adoptedStyleSheets = [IssueLinkIconStyles];
98
+ this.#shadow.adoptedStyleSheets = [IssueLinkIconStyles];
99
99
  }
100
100
 
101
101
  private resolveIssue(issueId: Protocol.Audits.IssueId): Promise<void> {
102
- if (!this.issueResolver) {
102
+ if (!this.#issueResolver) {
103
103
  throw new Error('An `IssueResolver` must be provided if an `issueId` is provided.');
104
104
  }
105
- return this.issueResolver.waitFor(issueId)
105
+ return this.#issueResolver.waitFor(issueId)
106
106
  .then(issue => {
107
- this.issue = issue;
107
+ this.#issue = issue;
108
108
  })
109
109
  .catch(() => {
110
- this.issue = null;
110
+ this.#issue = null;
111
111
  });
112
112
  }
113
113
 
114
114
  get data(): IssueLinkIconData {
115
115
  return {
116
- issue: this.issue,
117
- issueId: this.issueId,
118
- issueResolver: this.issueResolver,
119
- additionalOnClickAction: this.additionalOnClickAction,
120
- revealOverride: this.reveal !== Common.Revealer.reveal ? this.reveal : undefined,
116
+ issue: this.#issue,
117
+ issueId: this.#issueId,
118
+ issueResolver: this.#issueResolver,
119
+ additionalOnClickAction: this.#additionalOnClickAction,
120
+ revealOverride: this.#reveal !== Common.Revealer.reveal ? this.#reveal : undefined,
121
121
  };
122
122
  }
123
123
 
124
124
  iconData(): IconButton.Icon.IconData {
125
- if (this.issue) {
126
- return getIssueKindIconData(this.issue.getKind());
125
+ if (this.#issue) {
126
+ return getIssueKindIconData(this.#issue.getKind());
127
127
  }
128
128
  return {iconName: 'issue-questionmark-icon', color: 'var(--color-text-secondary)', width: '16px', height: '16px'};
129
129
  }
@@ -132,17 +132,17 @@ export class IssueLinkIcon extends HTMLElement {
132
132
  if (event.button !== 0) {
133
133
  return; // Only handle left-click for now.
134
134
  }
135
- if (this.issue) {
136
- this.reveal(this.issue);
135
+ if (this.#issue) {
136
+ this.#reveal(this.#issue);
137
137
  }
138
- this.additionalOnClickAction?.();
138
+ this.#additionalOnClickAction?.();
139
139
  }
140
140
 
141
141
  private getTooltip(): Platform.UIString.LocalizedString {
142
- if (this.issueTitle) {
143
- return i18nString(UIStrings.clickToShowIssueWithTitle, {title: this.issueTitle});
142
+ if (this.#issueTitle) {
143
+ return i18nString(UIStrings.clickToShowIssueWithTitle, {title: this.#issueTitle});
144
144
  }
145
- if (this.issue) {
145
+ if (this.#issue) {
146
146
  return i18nString(UIStrings.clickToShowIssue);
147
147
  }
148
148
  return i18nString(UIStrings.issueUnavailable);
@@ -152,9 +152,9 @@ export class IssueLinkIcon extends HTMLElement {
152
152
  return coordinator.write(() => {
153
153
  // clang-format off
154
154
  LitHtml.render(LitHtml.html`
155
- ${LitHtml.Directives.until(this.issueTitlePromise.then(() => this.renderComponent()), this.issueResolvedPromise.then(() => this.renderComponent()), this.renderComponent())}
155
+ ${LitHtml.Directives.until(this.#issueTitlePromise.then(() => this.renderComponent()), this.#issueResolvedPromise.then(() => this.renderComponent()), this.renderComponent())}
156
156
  `,
157
- this.shadow, {host: this});
157
+ this.#shadow, {host: this});
158
158
  // clang-format on
159
159
  });
160
160
  }
@@ -162,7 +162,7 @@ export class IssueLinkIcon extends HTMLElement {
162
162
  private renderComponent(): LitHtml.TemplateResult {
163
163
  // clang-format off
164
164
  return LitHtml.html`
165
- <span class=${LitHtml.Directives.classMap({'link': Boolean(this.issue)})}
165
+ <span class=${LitHtml.Directives.classMap({'link': Boolean(this.#issue)})}
166
166
  tabindex="0"
167
167
  @click=${this.handleClick}>
168
168
  <${IconButton.Icon.Icon.litTagName} .data=${this.iconData() as IconButton.Icon.IconData}
@@ -82,15 +82,15 @@ export class SettingsChangedEvent extends Event {
82
82
  }
83
83
 
84
84
  class AddressHistoryEntry implements Common.SimpleHistoryManager.HistoryEntry {
85
- private address = 0;
86
- private callback;
85
+ #address = 0;
86
+ #callback;
87
87
 
88
88
  constructor(address: number, callback: (x: number) => void) {
89
89
  if (address < 0) {
90
90
  throw new Error('Address should be a greater or equal to zero');
91
91
  }
92
- this.address = address;
93
- this.callback = callback;
92
+ this.#address = address;
93
+ this.#callback = callback;
94
94
  }
95
95
 
96
96
  valid(): boolean {
@@ -98,32 +98,32 @@ class AddressHistoryEntry implements Common.SimpleHistoryManager.HistoryEntry {
98
98
  }
99
99
 
100
100
  reveal(): void {
101
- this.callback(this.address);
101
+ this.#callback(this.#address);
102
102
  }
103
103
  }
104
104
 
105
105
  export class LinearMemoryInspector extends HTMLElement {
106
106
  static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-inspector`;
107
- private readonly shadow = this.attachShadow({mode: 'open'});
108
- private readonly history = new Common.SimpleHistoryManager.SimpleHistoryManager(10);
107
+ readonly #shadow = this.attachShadow({mode: 'open'});
108
+ readonly #history = new Common.SimpleHistoryManager.SimpleHistoryManager(10);
109
109
 
110
- private memory = new Uint8Array();
111
- private memoryOffset = 0;
112
- private outerMemoryLength = 0;
110
+ #memory = new Uint8Array();
111
+ #memoryOffset = 0;
112
+ #outerMemoryLength = 0;
113
113
 
114
- private address = -1;
114
+ #address = -1;
115
115
 
116
- private currentNavigatorMode = Mode.Submitted;
117
- private currentNavigatorAddressLine = `${this.address}`;
116
+ #currentNavigatorMode = Mode.Submitted;
117
+ #currentNavigatorAddressLine = `${this.#address}`;
118
118
 
119
- private numBytesPerPage = 4;
119
+ #numBytesPerPage = 4;
120
120
 
121
- private valueTypeModes = getDefaultValueTypeMapping();
122
- private valueTypes = new Set(this.valueTypeModes.keys());
123
- private endianness = Endianness.Little;
121
+ #valueTypeModes = getDefaultValueTypeMapping();
122
+ #valueTypes = new Set(this.#valueTypeModes.keys());
123
+ #endianness = Endianness.Little;
124
124
 
125
125
  connectedCallback(): void {
126
- this.shadow.adoptedStyleSheets = [linearMemoryInspectorStyles];
126
+ this.#shadow.adoptedStyleSheets = [linearMemoryInspectorStyles];
127
127
  }
128
128
 
129
129
  set data(data: LinearMemoryInspectorData) {
@@ -135,43 +135,43 @@ export class LinearMemoryInspector extends HTMLElement {
135
135
  throw new Error('Memory offset has to be greater or equal to zero.');
136
136
  }
137
137
 
138
- this.memory = data.memory;
139
- this.memoryOffset = data.memoryOffset;
140
- this.outerMemoryLength = data.outerMemoryLength;
141
- this.valueTypeModes = data.valueTypeModes || this.valueTypeModes;
142
- this.valueTypes = data.valueTypes || this.valueTypes;
143
- this.endianness = data.endianness || this.endianness;
138
+ this.#memory = data.memory;
139
+ this.#memoryOffset = data.memoryOffset;
140
+ this.#outerMemoryLength = data.outerMemoryLength;
141
+ this.#valueTypeModes = data.valueTypeModes || this.#valueTypeModes;
142
+ this.#valueTypes = data.valueTypes || this.#valueTypes;
143
+ this.#endianness = data.endianness || this.#endianness;
144
144
  this.setAddress(data.address);
145
145
  this.render();
146
146
  }
147
147
 
148
148
  private render(): void {
149
- const {start, end} = this.getPageRangeForAddress(this.address, this.numBytesPerPage);
149
+ const {start, end} = this.getPageRangeForAddress(this.#address, this.#numBytesPerPage);
150
150
 
151
- const navigatorAddressToShow =
152
- this.currentNavigatorMode === Mode.Submitted ? formatAddress(this.address) : this.currentNavigatorAddressLine;
151
+ const navigatorAddressToShow = this.#currentNavigatorMode === Mode.Submitted ? formatAddress(this.#address) :
152
+ this.#currentNavigatorAddressLine;
153
153
  const navigatorAddressIsValid = this.isValidAddress(navigatorAddressToShow);
154
154
 
155
155
  const invalidAddressMsg = i18nString(
156
156
  UIStrings.addressHasToBeANumberBetweenSAnd,
157
- {PH1: formatAddress(0), PH2: formatAddress(this.outerMemoryLength)});
157
+ {PH1: formatAddress(0), PH2: formatAddress(this.#outerMemoryLength)});
158
158
 
159
159
  const errorMsg = navigatorAddressIsValid ? undefined : invalidAddressMsg;
160
160
 
161
- const canGoBackInHistory = this.history.canRollback();
162
- const canGoForwardInHistory = this.history.canRollover();
161
+ const canGoBackInHistory = this.#history.canRollback();
162
+ const canGoForwardInHistory = this.#history.canRollover();
163
163
  // Disabled until https://crbug.com/1079231 is fixed.
164
164
  // clang-format off
165
165
  render(html`
166
166
  <div class="view">
167
167
  <${LinearMemoryNavigator.litTagName}
168
- .data=${{address: navigatorAddressToShow, valid: navigatorAddressIsValid, mode: this.currentNavigatorMode, error: errorMsg, canGoBackInHistory, canGoForwardInHistory} as LinearMemoryNavigatorData}
168
+ .data=${{address: navigatorAddressToShow, valid: navigatorAddressIsValid, mode: this.#currentNavigatorMode, error: errorMsg, canGoBackInHistory, canGoForwardInHistory} as LinearMemoryNavigatorData}
169
169
  @refreshrequested=${this.onRefreshRequest}
170
170
  @addressinputchanged=${this.onAddressChange}
171
171
  @pagenavigation=${this.navigatePage}
172
172
  @historynavigation=${this.navigateHistory}></${LinearMemoryNavigator.litTagName}>
173
173
  <${LinearMemoryViewer.litTagName}
174
- .data=${{memory: this.memory.slice(start - this.memoryOffset, end - this.memoryOffset), address: this.address, memoryOffset: start, focus: this.currentNavigatorMode === Mode.Submitted} as LinearMemoryViewerData}
174
+ .data=${{memory: this.#memory.slice(start - this.#memoryOffset, end - this.#memoryOffset), address: this.#address, memoryOffset: start, focus: this.#currentNavigatorMode === Mode.Submitted} as LinearMemoryViewerData}
175
175
  @byteselected=${this.onByteSelected}
176
176
  @resize=${this.resize}>
177
177
  </${LinearMemoryViewer.litTagName}>
@@ -179,11 +179,11 @@ export class LinearMemoryInspector extends HTMLElement {
179
179
  <div class="value-interpreter">
180
180
  <${LinearMemoryValueInterpreter.litTagName}
181
181
  .data=${{
182
- value: this.memory.slice(this.address - this.memoryOffset, this.address + VALUE_INTEPRETER_MAX_NUM_BYTES).buffer,
183
- valueTypes: this.valueTypes,
184
- valueTypeModes: this.valueTypeModes,
185
- endianness: this.endianness,
186
- memoryLength: this.outerMemoryLength } as LinearMemoryValueInterpreterData}
182
+ value: this.#memory.slice(this.#address - this.#memoryOffset, this.#address + VALUE_INTEPRETER_MAX_NUM_BYTES).buffer,
183
+ valueTypes: this.#valueTypes,
184
+ valueTypeModes: this.#valueTypeModes,
185
+ endianness: this.#endianness,
186
+ memoryLength: this.#outerMemoryLength } as LinearMemoryValueInterpreterData}
187
187
  @valuetypetoggled=${this.onValueTypeToggled}
188
188
  @valuetypemodechanged=${this.onValueTypeModeChanged}
189
189
  @endiannesschanged=${this.onEndiannessChanged}
@@ -191,7 +191,7 @@ export class LinearMemoryInspector extends HTMLElement {
191
191
  >
192
192
  </${LinearMemoryValueInterpreter.litTagName}/>
193
193
  </div>
194
- `, this.shadow, {
194
+ `, this.#shadow, {
195
195
  host: this,
196
196
  });
197
197
  // clang-format on
@@ -200,53 +200,53 @@ export class LinearMemoryInspector extends HTMLElement {
200
200
  private onJumpToPointerAddress(e: JumpToPointerAddressEvent): void {
201
201
  // Stop event from bubbling up, since no element further up needs the event.
202
202
  e.stopPropagation();
203
- this.currentNavigatorMode = Mode.Submitted;
204
- const addressInRange = Math.max(0, Math.min(e.data, this.outerMemoryLength - 1));
203
+ this.#currentNavigatorMode = Mode.Submitted;
204
+ const addressInRange = Math.max(0, Math.min(e.data, this.#outerMemoryLength - 1));
205
205
  this.jumpToAddress(addressInRange);
206
206
  }
207
207
 
208
208
  private onRefreshRequest(): void {
209
- const {start, end} = this.getPageRangeForAddress(this.address, this.numBytesPerPage);
210
- this.dispatchEvent(new MemoryRequestEvent(start, end, this.address));
209
+ const {start, end} = this.getPageRangeForAddress(this.#address, this.#numBytesPerPage);
210
+ this.dispatchEvent(new MemoryRequestEvent(start, end, this.#address));
211
211
  }
212
212
 
213
213
  private onByteSelected(e: ByteSelectedEvent): void {
214
- this.currentNavigatorMode = Mode.Submitted;
215
- const addressInRange = Math.max(0, Math.min(e.data, this.outerMemoryLength - 1));
214
+ this.#currentNavigatorMode = Mode.Submitted;
215
+ const addressInRange = Math.max(0, Math.min(e.data, this.#outerMemoryLength - 1));
216
216
  this.jumpToAddress(addressInRange);
217
217
  }
218
218
 
219
219
  private createSettings(): Settings {
220
- return {valueTypes: this.valueTypes, modes: this.valueTypeModes, endianness: this.endianness};
220
+ return {valueTypes: this.#valueTypes, modes: this.#valueTypeModes, endianness: this.#endianness};
221
221
  }
222
222
 
223
223
  private onEndiannessChanged(e: EndiannessChangedEvent): void {
224
- this.endianness = e.data;
224
+ this.#endianness = e.data;
225
225
  this.dispatchEvent(new SettingsChangedEvent(this.createSettings()));
226
226
  this.render();
227
227
  }
228
228
 
229
229
  private isValidAddress(address: string): boolean {
230
230
  const newAddress = parseAddress(address);
231
- return newAddress !== undefined && newAddress >= 0 && newAddress < this.outerMemoryLength;
231
+ return newAddress !== undefined && newAddress >= 0 && newAddress < this.#outerMemoryLength;
232
232
  }
233
233
 
234
234
  private onAddressChange(e: AddressInputChangedEvent): void {
235
235
  const {address, mode} = e.data;
236
236
  const isValid = this.isValidAddress(address);
237
237
  const newAddress = parseAddress(address);
238
- this.currentNavigatorAddressLine = address;
238
+ this.#currentNavigatorAddressLine = address;
239
239
 
240
240
  if (newAddress !== undefined && isValid) {
241
- this.currentNavigatorMode = mode;
241
+ this.#currentNavigatorMode = mode;
242
242
  this.jumpToAddress(newAddress);
243
243
  return;
244
244
  }
245
245
 
246
246
  if (mode === Mode.Submitted && !isValid) {
247
- this.currentNavigatorMode = Mode.InvalidSubmit;
247
+ this.#currentNavigatorMode = Mode.InvalidSubmit;
248
248
  } else {
249
- this.currentNavigatorMode = Mode.Edit;
249
+ this.#currentNavigatorMode = Mode.Edit;
250
250
  }
251
251
 
252
252
  this.render();
@@ -255,9 +255,9 @@ export class LinearMemoryInspector extends HTMLElement {
255
255
  private onValueTypeToggled(e: ValueTypeToggledEvent): void {
256
256
  const {type, checked} = e.data;
257
257
  if (checked) {
258
- this.valueTypes.add(type);
258
+ this.#valueTypes.add(type);
259
259
  } else {
260
- this.valueTypes.delete(type);
260
+ this.#valueTypes.delete(type);
261
261
  }
262
262
  this.dispatchEvent(new SettingsChangedEvent(this.createSettings()));
263
263
  this.render();
@@ -266,24 +266,24 @@ export class LinearMemoryInspector extends HTMLElement {
266
266
  private onValueTypeModeChanged(e: ValueTypeModeChangedEvent): void {
267
267
  e.stopImmediatePropagation();
268
268
  const {type, mode} = e.data;
269
- this.valueTypeModes.set(type, mode);
269
+ this.#valueTypeModes.set(type, mode);
270
270
  this.dispatchEvent(new SettingsChangedEvent(this.createSettings()));
271
271
  this.render();
272
272
  }
273
273
 
274
274
  private navigateHistory(e: HistoryNavigationEvent): boolean {
275
- return e.data === Navigation.Forward ? this.history.rollover() : this.history.rollback();
275
+ return e.data === Navigation.Forward ? this.#history.rollover() : this.#history.rollback();
276
276
  }
277
277
 
278
278
  private navigatePage(e: PageNavigationEvent): void {
279
279
  const newAddress =
280
- e.data === Navigation.Forward ? this.address + this.numBytesPerPage : this.address - this.numBytesPerPage;
281
- const addressInRange = Math.max(0, Math.min(newAddress, this.outerMemoryLength - 1));
280
+ e.data === Navigation.Forward ? this.#address + this.#numBytesPerPage : this.#address - this.#numBytesPerPage;
281
+ const addressInRange = Math.max(0, Math.min(newAddress, this.#outerMemoryLength - 1));
282
282
  this.jumpToAddress(addressInRange);
283
283
  }
284
284
 
285
285
  private jumpToAddress(address: number): void {
286
- if (address < 0 || address >= this.outerMemoryLength) {
286
+ if (address < 0 || address >= this.#outerMemoryLength) {
287
287
  console.warn(`Specified address is out of bounds: ${address}`);
288
288
  return;
289
289
  }
@@ -294,19 +294,19 @@ export class LinearMemoryInspector extends HTMLElement {
294
294
  private getPageRangeForAddress(address: number, numBytesPerPage: number): {start: number, end: number} {
295
295
  const pageNumber = Math.floor(address / numBytesPerPage);
296
296
  const pageStartAddress = pageNumber * numBytesPerPage;
297
- const pageEndAddress = Math.min(pageStartAddress + numBytesPerPage, this.outerMemoryLength);
297
+ const pageEndAddress = Math.min(pageStartAddress + numBytesPerPage, this.#outerMemoryLength);
298
298
  return {start: pageStartAddress, end: pageEndAddress};
299
299
  }
300
300
 
301
301
  private resize(event: ResizeEvent): void {
302
- this.numBytesPerPage = event.data;
302
+ this.#numBytesPerPage = event.data;
303
303
  this.update();
304
304
  }
305
305
 
306
306
  private update(): void {
307
- const {start, end} = this.getPageRangeForAddress(this.address, this.numBytesPerPage);
308
- if (start < this.memoryOffset || end > this.memoryOffset + this.memory.length) {
309
- this.dispatchEvent(new MemoryRequestEvent(start, end, this.address));
307
+ const {start, end} = this.getPageRangeForAddress(this.#address, this.#numBytesPerPage);
308
+ if (start < this.#memoryOffset || end > this.#memoryOffset + this.#memory.length) {
309
+ this.dispatchEvent(new MemoryRequestEvent(start, end, this.#address));
310
310
  } else {
311
311
  this.render();
312
312
  }
@@ -314,13 +314,13 @@ export class LinearMemoryInspector extends HTMLElement {
314
314
 
315
315
  private setAddress(address: number): void {
316
316
  // If we are already showing the address that is requested, no need to act upon it.
317
- if (this.address === address) {
317
+ if (this.#address === address) {
318
318
  return;
319
319
  }
320
320
  const historyEntry = new AddressHistoryEntry(address, () => this.jumpToAddress(address));
321
- this.history.push(historyEntry);
322
- this.address = address;
323
- this.dispatchEvent(new AddressChangedEvent(this.address));
321
+ this.#history.push(historyEntry);
322
+ this.#address = address;
323
+ this.dispatchEvent(new AddressChangedEvent(this.#address));
324
324
  }
325
325
  }
326
326