chrome-devtools-frontend 1.0.943709 → 1.0.945329

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 (300) hide show
  1. package/config/gni/devtools_grd_files.gni +3 -0
  2. package/front_end/core/common/ParsedURL.ts +1 -1
  3. package/front_end/core/host/UserMetrics.ts +2 -1
  4. package/front_end/core/i18n/i18nImpl.ts +7 -4
  5. package/front_end/core/i18n/locales/en-US.json +3 -72
  6. package/front_end/core/i18n/locales/en-XL.json +15 -84
  7. package/front_end/core/protocol_client/NodeURL.ts +1 -0
  8. package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -0
  9. package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -3
  10. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -3
  11. package/front_end/core/sdk/Cookie.ts +17 -0
  12. package/front_end/core/sdk/CookieModel.ts +1 -0
  13. package/front_end/core/sdk/DebuggerModel.ts +5 -4
  14. package/front_end/core/sdk/NetworkManager.ts +4 -1
  15. package/front_end/core/sdk/NetworkRequest.ts +2 -2
  16. package/front_end/core/sdk/OverlayModel.ts +0 -9
  17. package/front_end/core/sdk/Resource.ts +2 -2
  18. package/front_end/core/sdk/Script.ts +2 -7
  19. package/front_end/core/sdk/sdk-meta.ts +0 -26
  20. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +0 -13
  21. package/front_end/entrypoints/main/MainImpl.ts +4 -0
  22. package/front_end/models/bindings/BreakpointManager.ts +3 -4
  23. package/front_end/models/bindings/DefaultScriptMapping.ts +1 -9
  24. package/front_end/models/bindings/ResourceMapping.ts +1 -2
  25. package/front_end/models/bindings/ResourceScriptMapping.ts +3 -11
  26. package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
  27. package/front_end/models/formatter/SourceFormatter.ts +0 -15
  28. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -6
  29. package/front_end/models/persistence/PersistenceActions.ts +4 -1
  30. package/front_end/models/persistence/PlatformFileSystem.ts +3 -4
  31. package/front_end/models/text_utils/ContentProvider.ts +1 -2
  32. package/front_end/models/text_utils/StaticContentProvider.ts +2 -3
  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.css +2 -0
  36. package/front_end/panels/application/BackForwardCacheStrings.ts +15 -75
  37. package/front_end/panels/application/ReportingApiView.ts +15 -1
  38. package/front_end/panels/application/components/EndpointsGrid.ts +63 -4
  39. package/front_end/panels/application/components/FrameDetailsView.ts +21 -34
  40. package/front_end/panels/changes/ChangesView.ts +8 -7
  41. package/front_end/panels/console/ConsolePinPane.ts +1 -0
  42. package/front_end/panels/console/ConsolePrompt.ts +121 -171
  43. package/front_end/panels/console/ConsoleView.ts +1 -1
  44. package/front_end/panels/console/consoleView.css +1 -1
  45. package/front_end/panels/css_overview/cssOverviewCompletedView.css +2 -2
  46. package/front_end/panels/elements/AccessibilityTreeUtils.ts +98 -67
  47. package/front_end/panels/elements/AccessibilityTreeView.ts +76 -126
  48. package/front_end/panels/elements/ElementsPanel.ts +6 -7
  49. package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
  50. package/front_end/panels/elements/StylePropertyHighlighter.ts +29 -19
  51. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  52. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +27 -3
  53. package/front_end/panels/emulation/DeviceModeView.ts +3 -0
  54. package/front_end/panels/help/ReleaseNoteText.ts +3 -1
  55. package/front_end/panels/network/NetworkDataGridNode.ts +5 -1
  56. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
  57. package/front_end/panels/sources/BreakpointEditDialog.ts +1 -0
  58. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  59. package/front_end/panels/sources/NavigatorView.ts +1 -1
  60. package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
  61. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -34
  62. package/front_end/panels/timeline/TimelineUIUtils.ts +51 -3
  63. package/front_end/services/window_bounds/WindowBoundsService.ts +27 -0
  64. package/front_end/services/window_bounds/window_bounds.ts +9 -0
  65. package/front_end/third_party/acorn/README.chromium +2 -2
  66. package/front_end/third_party/acorn/acorn.ts +1 -1
  67. package/front_end/third_party/acorn/package/CHANGELOG.md +31 -1
  68. package/front_end/third_party/acorn/package/README.md +1 -1
  69. package/front_end/third_party/acorn/package/dist/acorn.d.ts +3 -0
  70. package/front_end/third_party/acorn/package/dist/acorn.js +772 -708
  71. package/front_end/third_party/acorn/package/dist/acorn.mjs +767 -703
  72. package/front_end/third_party/acorn/package/dist/bin.js +47 -21
  73. package/front_end/third_party/acorn/package/package.json +1 -1
  74. package/front_end/third_party/acorn-loose/README.chromium +2 -2
  75. package/front_end/third_party/acorn-loose/package/CHANGELOG.md +12 -0
  76. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +27 -7
  77. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +28 -8
  78. package/front_end/third_party/acorn-loose/package/package.json +2 -2
  79. package/front_end/third_party/codemirror.next/bundle.ts +4 -3
  80. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  81. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +39 -1
  82. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  83. package/front_end/third_party/codemirror.next/package.json +4 -4
  84. package/front_end/third_party/i18n/i18n-impl.ts +1 -1
  85. package/front_end/third_party/lit-html/README.chromium +2 -2
  86. package/front_end/third_party/lit-html/package/CHANGELOG.md +216 -28
  87. package/front_end/third_party/lit-html/package/LICENSE +9 -9
  88. package/front_end/third_party/lit-html/package/README.md +12 -162
  89. package/front_end/third_party/lit-html/package/async-directive.d.ts +23 -54
  90. package/front_end/third_party/lit-html/package/async-directive.d.ts.map +1 -1
  91. package/front_end/third_party/lit-html/package/async-directive.js +2 -7
  92. package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
  93. package/front_end/third_party/lit-html/package/development/async-directive.d.ts +23 -54
  94. package/front_end/third_party/lit-html/package/development/async-directive.d.ts.map +1 -1
  95. package/front_end/third_party/lit-html/package/development/async-directive.js +44 -194
  96. package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
  97. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts +6 -5
  98. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts.map +1 -1
  99. package/front_end/third_party/lit-html/package/development/directive-helpers.js +25 -9
  100. package/front_end/third_party/lit-html/package/development/directive-helpers.js.map +1 -1
  101. package/front_end/third_party/lit-html/package/development/directive.d.ts +3 -16
  102. package/front_end/third_party/lit-html/package/development/directive.d.ts.map +1 -1
  103. package/front_end/third_party/lit-html/package/development/directive.js +6 -1
  104. package/front_end/third_party/lit-html/package/development/directive.js.map +1 -1
  105. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts +7 -14
  106. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts.map +1 -1
  107. package/front_end/third_party/lit-html/package/development/directives/async-append.js +17 -58
  108. package/front_end/third_party/lit-html/package/development/directives/async-append.js.map +1 -1
  109. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts +9 -14
  110. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts.map +1 -1
  111. package/front_end/third_party/lit-html/package/development/directives/async-replace.js +57 -37
  112. package/front_end/third_party/lit-html/package/development/directives/async-replace.js.map +1 -1
  113. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts +2 -3
  114. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts.map +1 -1
  115. package/front_end/third_party/lit-html/package/development/directives/cache.js +4 -6
  116. package/front_end/third_party/lit-html/package/development/directives/cache.js.map +1 -1
  117. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts +2 -2
  118. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts.map +1 -1
  119. package/front_end/third_party/lit-html/package/development/directives/class-map.js +17 -7
  120. package/front_end/third_party/lit-html/package/development/directives/class-map.js.map +1 -1
  121. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts +3 -2
  122. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts.map +1 -1
  123. package/front_end/third_party/lit-html/package/development/directives/guard.js +3 -2
  124. package/front_end/third_party/lit-html/package/development/directives/guard.js.map +1 -1
  125. package/front_end/third_party/lit-html/package/development/directives/live.d.ts +4 -3
  126. package/front_end/third_party/lit-html/package/development/directives/live.d.ts.map +1 -1
  127. package/front_end/third_party/lit-html/package/development/directives/live.js +5 -7
  128. package/front_end/third_party/lit-html/package/development/directives/live.js.map +1 -1
  129. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts +58 -0
  130. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts.map +1 -0
  131. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js +85 -0
  132. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js.map +1 -0
  133. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts +14 -11
  134. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts.map +1 -1
  135. package/front_end/third_party/lit-html/package/development/directives/ref.js +13 -11
  136. package/front_end/third_party/lit-html/package/development/directives/ref.js.map +1 -1
  137. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts +8 -4
  138. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts.map +1 -1
  139. package/front_end/third_party/lit-html/package/development/directives/repeat.js +23 -9
  140. package/front_end/third_party/lit-html/package/development/directives/repeat.js.map +1 -1
  141. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts +1 -2
  142. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts.map +1 -1
  143. package/front_end/third_party/lit-html/package/development/directives/style-map.js +1 -2
  144. package/front_end/third_party/lit-html/package/development/directives/style-map.js.map +1 -1
  145. package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -2
  146. package/front_end/third_party/lit-html/package/development/directives/template-content.js +1 -2
  147. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts +6 -4
  148. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts.map +1 -1
  149. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js +7 -5
  150. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js.map +1 -1
  151. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts +4 -1
  152. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts.map +1 -1
  153. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js +3 -0
  154. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js.map +1 -1
  155. package/front_end/third_party/lit-html/package/development/directives/until.d.ts +12 -8
  156. package/front_end/third_party/lit-html/package/development/directives/until.d.ts.map +1 -1
  157. package/front_end/third_party/lit-html/package/development/directives/until.js +63 -23
  158. package/front_end/third_party/lit-html/package/development/directives/until.js.map +1 -1
  159. package/front_end/third_party/lit-html/package/development/experimental-hydrate.d.ts.map +1 -1
  160. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js +9 -8
  161. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js.map +1 -1
  162. package/front_end/third_party/lit-html/package/development/lit-html.d.ts +81 -136
  163. package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
  164. package/front_end/third_party/lit-html/package/development/lit-html.js +249 -76
  165. package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
  166. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts +1 -41
  167. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts.map +1 -1
  168. package/front_end/third_party/lit-html/package/development/polyfill-support.js +40 -21
  169. package/front_end/third_party/lit-html/package/development/polyfill-support.js.map +1 -1
  170. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts +12 -10
  171. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts.map +1 -1
  172. package/front_end/third_party/lit-html/package/development/private-ssr-support.js +11 -3
  173. package/front_end/third_party/lit-html/package/development/private-ssr-support.js.map +1 -1
  174. package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
  175. package/front_end/third_party/lit-html/package/development/static.js +6 -5
  176. package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
  177. package/front_end/third_party/lit-html/package/directive-helpers.d.ts +6 -5
  178. package/front_end/third_party/lit-html/package/directive-helpers.d.ts.map +1 -1
  179. package/front_end/third_party/lit-html/package/directive-helpers.js +2 -2
  180. package/front_end/third_party/lit-html/package/directive-helpers.js.map +1 -1
  181. package/front_end/third_party/lit-html/package/directive.d.ts +3 -16
  182. package/front_end/third_party/lit-html/package/directive.d.ts.map +1 -1
  183. package/front_end/third_party/lit-html/package/directive.js +1 -1
  184. package/front_end/third_party/lit-html/package/directive.js.map +1 -1
  185. package/front_end/third_party/lit-html/package/directives/async-append.d.ts +7 -14
  186. package/front_end/third_party/lit-html/package/directives/async-append.d.ts.map +1 -1
  187. package/front_end/third_party/lit-html/package/directives/async-append.js +2 -6
  188. package/front_end/third_party/lit-html/package/directives/async-append.js.map +1 -1
  189. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts +9 -14
  190. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts.map +1 -1
  191. package/front_end/third_party/lit-html/package/directives/async-replace.js +2 -5
  192. package/front_end/third_party/lit-html/package/directives/async-replace.js.map +1 -1
  193. package/front_end/third_party/lit-html/package/directives/cache.d.ts +2 -3
  194. package/front_end/third_party/lit-html/package/directives/cache.d.ts.map +1 -1
  195. package/front_end/third_party/lit-html/package/directives/cache.js +2 -5
  196. package/front_end/third_party/lit-html/package/directives/cache.js.map +1 -1
  197. package/front_end/third_party/lit-html/package/directives/class-map.d.ts +2 -2
  198. package/front_end/third_party/lit-html/package/directives/class-map.d.ts.map +1 -1
  199. package/front_end/third_party/lit-html/package/directives/class-map.js +2 -4
  200. package/front_end/third_party/lit-html/package/directives/class-map.js.map +1 -1
  201. package/front_end/third_party/lit-html/package/directives/guard.d.ts +3 -2
  202. package/front_end/third_party/lit-html/package/directives/guard.d.ts.map +1 -1
  203. package/front_end/third_party/lit-html/package/directives/guard.js +2 -4
  204. package/front_end/third_party/lit-html/package/directives/guard.js.map +1 -1
  205. package/front_end/third_party/lit-html/package/directives/live.d.ts +4 -3
  206. package/front_end/third_party/lit-html/package/directives/live.d.ts.map +1 -1
  207. package/front_end/third_party/lit-html/package/directives/live.js +1 -4
  208. package/front_end/third_party/lit-html/package/directives/live.js.map +1 -1
  209. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts +58 -0
  210. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts.map +1 -0
  211. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js +7 -0
  212. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js.map +1 -0
  213. package/front_end/third_party/lit-html/package/directives/ref.d.ts +14 -11
  214. package/front_end/third_party/lit-html/package/directives/ref.d.ts.map +1 -1
  215. package/front_end/third_party/lit-html/package/directives/ref.js +2 -5
  216. package/front_end/third_party/lit-html/package/directives/ref.js.map +1 -1
  217. package/front_end/third_party/lit-html/package/directives/repeat.d.ts +8 -4
  218. package/front_end/third_party/lit-html/package/directives/repeat.d.ts.map +1 -1
  219. package/front_end/third_party/lit-html/package/directives/repeat.js +2 -5
  220. package/front_end/third_party/lit-html/package/directives/repeat.js.map +1 -1
  221. package/front_end/third_party/lit-html/package/directives/style-map.d.ts +1 -2
  222. package/front_end/third_party/lit-html/package/directives/style-map.d.ts.map +1 -1
  223. package/front_end/third_party/lit-html/package/directives/style-map.js +2 -4
  224. package/front_end/third_party/lit-html/package/directives/style-map.js.map +1 -1
  225. package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -2
  226. package/front_end/third_party/lit-html/package/directives/template-content.js +2 -4
  227. package/front_end/third_party/lit-html/package/directives/template-content.js.map +1 -1
  228. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts +6 -4
  229. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts.map +1 -1
  230. package/front_end/third_party/lit-html/package/directives/unsafe-html.js +2 -4
  231. package/front_end/third_party/lit-html/package/directives/unsafe-html.js.map +1 -1
  232. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts +4 -1
  233. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts.map +1 -1
  234. package/front_end/third_party/lit-html/package/directives/unsafe-svg.js.map +1 -1
  235. package/front_end/third_party/lit-html/package/directives/until.d.ts +12 -8
  236. package/front_end/third_party/lit-html/package/directives/until.d.ts.map +1 -1
  237. package/front_end/third_party/lit-html/package/directives/until.js +2 -6
  238. package/front_end/third_party/lit-html/package/directives/until.js.map +1 -1
  239. package/front_end/third_party/lit-html/package/experimental-hydrate.d.ts.map +1 -1
  240. package/front_end/third_party/lit-html/package/experimental-hydrate.js +2 -5
  241. package/front_end/third_party/lit-html/package/experimental-hydrate.js.map +1 -1
  242. package/front_end/third_party/lit-html/package/lit-html.d.ts +81 -136
  243. package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
  244. package/front_end/third_party/lit-html/package/lit-html.js +1 -1
  245. package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
  246. package/front_end/third_party/lit-html/package/package.json +75 -24
  247. package/front_end/third_party/lit-html/package/polyfill-support.d.ts +1 -41
  248. package/front_end/third_party/lit-html/package/polyfill-support.d.ts.map +1 -1
  249. package/front_end/third_party/lit-html/package/polyfill-support.js +1 -1
  250. package/front_end/third_party/lit-html/package/polyfill-support.js.map +1 -1
  251. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts +12 -10
  252. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts.map +1 -1
  253. package/front_end/third_party/lit-html/package/private-ssr-support.js +2 -2
  254. package/front_end/third_party/lit-html/package/private-ssr-support.js.map +1 -1
  255. package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
  256. package/front_end/third_party/lit-html/package/static.js +1 -1
  257. package/front_end/third_party/lit-html/package/static.js.map +1 -1
  258. package/front_end/third_party/marked/README.chromium +2 -2
  259. package/front_end/third_party/marked/marked.ts +2 -2
  260. package/front_end/third_party/marked/package/README.md +7 -1
  261. package/front_end/third_party/marked/package/bin/marked.js +214 -0
  262. package/front_end/third_party/marked/package/lib/marked.cjs +2907 -0
  263. package/front_end/third_party/marked/package/lib/marked.esm.d.ts +1 -3
  264. package/front_end/third_party/marked/package/lib/marked.esm.js +627 -586
  265. package/front_end/third_party/marked/package/lib/marked.umd.js +2913 -0
  266. package/front_end/third_party/marked/package/man/marked.1 +5 -24
  267. package/front_end/third_party/marked/package/man/marked.1.txt +21 -31
  268. package/front_end/third_party/marked/package/marked.min.js +1 -1
  269. package/front_end/third_party/marked/package/package.json +41 -32
  270. package/front_end/third_party/marked/package/src/Lexer.js +109 -108
  271. package/front_end/third_party/marked/package/src/Parser.js +38 -15
  272. package/front_end/third_party/marked/package/src/Renderer.js +5 -5
  273. package/front_end/third_party/marked/package/src/Slugger.js +2 -2
  274. package/front_end/third_party/marked/package/src/TextRenderer.js +2 -2
  275. package/front_end/third_party/marked/package/src/Tokenizer.js +215 -190
  276. package/front_end/third_party/marked/package/src/defaults.js +6 -9
  277. package/front_end/third_party/marked/package/src/helpers.js +16 -27
  278. package/front_end/third_party/marked/package/src/marked.js +146 -63
  279. package/front_end/third_party/marked/package/src/rules.js +20 -45
  280. package/front_end/third_party/wasmparser/README.chromium +2 -2
  281. package/front_end/third_party/wasmparser/package/.github/workflows/main.yml +47 -0
  282. package/front_end/third_party/wasmparser/package/CHANGELOG.md +12 -0
  283. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +53 -53
  284. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
  285. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +53 -53
  286. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
  287. package/front_end/third_party/wasmparser/package/package.json +1 -1
  288. package/front_end/third_party/wasmparser/package/src/WasmParser.ts +53 -53
  289. package/front_end/ui/components/text_editor/TextEditor.ts +29 -0
  290. package/front_end/ui/components/text_editor/config.ts +36 -14
  291. package/front_end/ui/components/text_editor/javascript.ts +14 -9
  292. package/front_end/ui/components/text_editor/theme.ts +29 -4
  293. package/front_end/ui/legacy/InspectorView.ts +1 -1
  294. package/front_end/ui/legacy/ViewManager.ts +6 -0
  295. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +20 -0
  296. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
  297. package/front_end/ui/legacy/components/utils/Linkifier.ts +49 -79
  298. package/front_end/ui/legacy/themeColors.css +2 -0
  299. package/inspector_overlay/main.ts +3 -0
  300. package/package.json +1 -1
@@ -30,7 +30,6 @@
30
30
  import * as Protocol from '../../generated/protocol.js';
31
31
  import * as TextUtils from '../../models/text_utils/text_utils.js';
32
32
  import * as Common from '../common/common.js';
33
- import type * as Platform from '../platform/platform.js';
34
33
  import * as i18n from '../i18n/i18n.js';
35
34
 
36
35
  import type {DebuggerModel} from './DebuggerModel.js';
@@ -165,8 +164,8 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
165
164
  }
166
165
 
167
166
  // TODO(crbug.com/1253323): Cast to RawPathString will be removed when migration to branded types is complete.
168
- contentURL(): Platform.DevToolsPath.RawPathString {
169
- return this.sourceURL as Platform.DevToolsPath.RawPathString;
167
+ contentURL(): string {
168
+ return this.sourceURL;
170
169
  }
171
170
 
172
171
  contentType(): Common.ResourceType.ResourceType {
@@ -313,10 +312,6 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
313
312
  return !this.sourceURL;
314
313
  }
315
314
 
316
- isInlineScriptWithSourceURL(): boolean {
317
- return Boolean(this.hasSourceURL) && this.isInlineScript();
318
- }
319
-
320
315
  async setBlackboxedRanges(positions: Protocol.Debugger.ScriptPosition[]): Promise<boolean> {
321
316
  const response = await this.debuggerModel.target().debuggerAgent().invoke_setBlackboxedRanges(
322
317
  {scriptId: this.scriptId, positions});
@@ -155,14 +155,6 @@ const UIStrings = {
155
155
  */
156
156
  hideScrollPerformanceBottlenecks: 'Hide scroll performance bottlenecks',
157
157
  /**
158
- *@description Title of a setting under the Rendering category that can be invoked through the Command Menu
159
- */
160
- showHittestBorders: 'Show hit-test borders',
161
- /**
162
- *@description Title of a setting under the Rendering category that can be invoked through the Command Menu
163
- */
164
- hideHittestBorders: 'Hide hit-test borders',
165
- /**
166
158
  *@description Title of a Rendering setting that can be invoked through the Command Menu
167
159
  */
168
160
  emulateAFocusedPage: 'Emulate a focused page',
@@ -665,24 +657,6 @@ Common.Settings.registerSettingExtension({
665
657
  defaultValue: false,
666
658
  });
667
659
 
668
- Common.Settings.registerSettingExtension({
669
- category: Common.Settings.SettingCategory.RENDERING,
670
- settingName: 'showHitTestBorders',
671
- settingType: Common.Settings.SettingType.BOOLEAN,
672
- storageType: Common.Settings.SettingStorageType.Session,
673
- options: [
674
- {
675
- value: true,
676
- title: i18nLazyString(UIStrings.showHittestBorders),
677
- },
678
- {
679
- value: false,
680
- title: i18nLazyString(UIStrings.hideHittestBorders),
681
- },
682
- ],
683
- defaultValue: false,
684
- });
685
-
686
660
  Common.Settings.registerSettingExtension({
687
661
  category: Common.Settings.SettingCategory.RENDERING,
688
662
  title: i18nLazyString(UIStrings.emulateAFocusedPage),
@@ -95,16 +95,6 @@ const UIStrings = {
95
95
  */
96
96
  highlightsFramesRedDetectedToBe: 'Highlights frames (red) detected to be ads.',
97
97
  /**
98
- * @description The name of a checkbox setting in the Rendering tool. This setting shows borders
99
- * around hit-test regions. 'hit-test regions' are areas on the page where the browser is listening
100
- * for mouse clicks.
101
- */
102
- hittestBorders: 'Hit-test borders',
103
- /**
104
- * @description Explanation text for the 'Hit-test borders' setting in the Rendering tool.
105
- */
106
- showsBordersAroundHittestRegions: 'Shows borders around hit-test regions.',
107
- /**
108
98
  * @description The name of a checkbox setting in the Rendering tool. This setting shows an overlay
109
99
  * with Core Web Vitals. Core Web Vitals: https://support.google.com/webmasters/answer/9205520?hl=en
110
100
  */
@@ -246,9 +236,6 @@ export class RenderingOptionsView extends UI.Widget.VBox {
246
236
  this.appendCheckbox(
247
237
  i18nString(UIStrings.highlightAdFrames), i18nString(UIStrings.highlightsFramesRedDetectedToBe),
248
238
  Common.Settings.Settings.instance().moduleSetting('showAdHighlights'));
249
- this.appendCheckbox(
250
- i18nString(UIStrings.hittestBorders), i18nString(UIStrings.showsBordersAroundHittestRegions),
251
- Common.Settings.Settings.instance().moduleSetting('showHitTestBorders'));
252
239
  this.appendCheckbox(
253
240
  i18nString(UIStrings.coreWebVitals), i18nString(UIStrings.showsAnOverlayWithCoreWebVitals),
254
241
  Common.Settings.Settings.instance().moduleSetting('showWebVitals'));
@@ -365,11 +365,15 @@ export class MainImpl {
365
365
  'Enable CSS <length> authoring tool in the Styles pane (https://goo.gle/length-feedback)', undefined,
366
366
  'https://developer.chrome.com/blog/new-in-devtools-96/#length');
367
367
 
368
+ // Display precise changes in the Changes tab.
369
+ Root.Runtime.experiments.register('preciseChanges', 'Display more precise changes in the Changes tab');
370
+
368
371
  Root.Runtime.experiments.enableExperimentsByDefault([
369
372
  'sourceOrderViewer',
370
373
  'hideIssuesFeature',
371
374
  'bfcacheDebugging',
372
375
  'cssTypeComponentLength',
376
+ 'preciseChanges',
373
377
  Root.Runtime.ExperimentName.SYNC_SETTINGS,
374
378
  ]);
375
379
 
@@ -32,7 +32,6 @@
32
32
 
33
33
  import * as Common from '../../core/common/common.js';
34
34
  import * as SDK from '../../core/sdk/sdk.js';
35
- import type * as Platform from '../../core/platform/platform.js';
36
35
  import type * as Protocol from '../../generated/protocol.js';
37
36
  import type * as TextUtils from '../text_utils/text_utils.js';
38
37
  import * as Workspace from '../workspace/workspace.js';
@@ -630,7 +629,7 @@ export class ModelBreakpoint {
630
629
  const positions = debuggerLocations.map(loc => {
631
630
  const script = loc.script() as SDK.Script.Script;
632
631
  return {
633
- url: script.sourceURL as Platform.DevToolsPath.RawPathString,
632
+ url: script.sourceURL,
634
633
  scriptId: script.scriptId,
635
634
  scriptHash: script.hash,
636
635
  lineNumber: loc.lineNumber,
@@ -645,7 +644,7 @@ export class ModelBreakpoint {
645
644
  // at least signal a warning to the developer that this #breakpoint wasn't
646
645
  // really resolved.
647
646
  const position = {
648
- url: this.#breakpoint.url() as Platform.DevToolsPath.RawPathString,
647
+ url: this.#breakpoint.url(),
649
648
  scriptId: '' as Protocol.Runtime.ScriptId,
650
649
  scriptHash: '',
651
650
  lineNumber,
@@ -794,7 +793,7 @@ export class ModelBreakpoint {
794
793
  }
795
794
 
796
795
  interface Position {
797
- url: Platform.DevToolsPath.RawPathString;
796
+ url: string;
798
797
  scriptId: Protocol.Runtime.ScriptId;
799
798
  scriptHash: string;
800
799
  lineNumber: number;
@@ -75,11 +75,7 @@ export class DefaultScriptMapping implements DebuggerSourceMapping {
75
75
  if (!uiSourceCode) {
76
76
  return null;
77
77
  }
78
- const lineNumber = rawLocation.lineNumber - (script.isInlineScriptWithSourceURL() ? script.lineOffset : 0);
79
- let columnNumber = rawLocation.columnNumber || 0;
80
- if (script.isInlineScriptWithSourceURL() && !lineNumber && columnNumber) {
81
- columnNumber -= script.columnOffset;
82
- }
78
+ const {lineNumber, columnNumber = 0} = rawLocation;
83
79
  return uiSourceCode.uiLocation(lineNumber, columnNumber);
84
80
  }
85
81
 
@@ -89,10 +85,6 @@ export class DefaultScriptMapping implements DebuggerSourceMapping {
89
85
  if (!script) {
90
86
  return [];
91
87
  }
92
- if (script.isInlineScriptWithSourceURL()) {
93
- return [this.#debuggerModel.createRawLocation(
94
- script, lineNumber + script.lineOffset, lineNumber ? columnNumber : columnNumber + script.columnOffset)];
95
- }
96
88
  return [this.#debuggerModel.createRawLocation(script, lineNumber, columnNumber)];
97
89
  }
98
90
 
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
- import type * as Platform from '../../core/platform/platform.js';
7
6
  import * as SDK from '../../core/sdk/sdk.js';
8
7
  import * as TextUtils from '../text_utils/text_utils.js';
9
8
  import * as Workspace from '../workspace/workspace.js';
@@ -421,7 +420,7 @@ class Binding implements TextUtils.ContentProvider.ContentProvider {
421
420
  return this.resources.values().next().value;
422
421
  }
423
422
 
424
- contentURL(): Platform.DevToolsPath.RawPathString {
423
+ contentURL(): string {
425
424
  return this.firstResource().contentURL();
426
425
  }
427
426
 
@@ -127,30 +127,22 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
127
127
  if (!scriptFile.hasScripts([script])) {
128
128
  return null;
129
129
  }
130
- const lineNumber = rawLocation.lineNumber - (script.isInlineScriptWithSourceURL() ? script.lineOffset : 0);
131
- let columnNumber = rawLocation.columnNumber || 0;
132
- if (script.isInlineScriptWithSourceURL() && !lineNumber && columnNumber) {
133
- columnNumber -= script.columnOffset;
134
- }
130
+ const {lineNumber, columnNumber = 0} = rawLocation;
135
131
  return uiSourceCode.uiLocation(lineNumber, columnNumber);
136
132
  }
137
133
 
138
134
  uiLocationToRawLocations(uiSourceCode: Workspace.UISourceCode.UISourceCode, lineNumber: number, columnNumber: number):
139
135
  SDK.DebuggerModel.Location[] {
140
136
  const scriptFile = this.#uiSourceCodeToScriptFile.get(uiSourceCode);
141
- if (!scriptFile || typeof scriptFile.script === 'undefined') {
137
+ if (!scriptFile) {
142
138
  return [];
143
139
  }
144
140
 
145
- const script = scriptFile.script;
141
+ const {script} = scriptFile;
146
142
  if (!script) {
147
143
  return [];
148
144
  }
149
145
 
150
- if (script.isInlineScriptWithSourceURL()) {
151
- return [this.debuggerModel.createRawLocation(
152
- script, lineNumber + script.lineOffset, lineNumber ? columnNumber : columnNumber + script.columnOffset)];
153
- }
154
146
  return [this.debuggerModel.createRawLocation(script, lineNumber, columnNumber)];
155
147
  }
156
148
 
@@ -29,7 +29,6 @@
29
29
  */
30
30
 
31
31
  import * as Common from '../../core/common/common.js';
32
- import type * as Platform from '../../core/platform/platform.js';
33
32
  import * as SDK from '../../core/sdk/sdk.js';
34
33
  import type * as TextUtils from '../text_utils/text_utils.js';
35
34
  import * as Workspace from '../workspace/workspace.js';
@@ -298,7 +297,7 @@ export class StyleFile implements TextUtils.ContentProvider.ContentProvider {
298
297
  Common.EventTarget.removeEventListeners(this.#eventListeners);
299
298
  }
300
299
 
301
- contentURL(): Platform.DevToolsPath.RawPathString {
300
+ contentURL(): string {
302
301
  console.assert(this.headers.size > 0);
303
302
  return this.headers.values().next().value.originalContentProvider().contentURL();
304
303
  }
@@ -165,21 +165,6 @@ class ScriptMapping implements Bindings.DebuggerWorkspaceBinding.DebuggerSourceM
165
165
  if (!formatData || !script) {
166
166
  return null;
167
167
  }
168
- if (script.isInlineScriptWithSourceURL()) {
169
- // Inline scripts with #sourceURL= have lineEndings wrt. the inline script (and not wrt. the containing document),
170
- // but `rawLocation` will always use locations wrt. the containing document, because that is what the back-end is
171
- // sending. This is a hack, because what we are really doing here is deciding the location based on /how/ the
172
- // script is displayed, which is really something this layer cannot and should not have to decide: The
173
- // SourceFormatter should not have to know whether a script is displayed inline (in its containing document) or
174
- // stand-alone.
175
- const [relativeLineNumber, relativeColumnNumber] = script.toRelativeLocation(rawLocation);
176
- const [formattedLineNumber, formattedColumnNumber] =
177
- formatData.mapping.originalToFormatted(relativeLineNumber, relativeColumnNumber);
178
- return formatData.formattedSourceCode.uiLocation(formattedLineNumber, formattedColumnNumber);
179
- }
180
- // Here we either have an inline script without a #sourceURL= or a stand-alone script. For stand-alone scripts, no
181
- // translation must be applied. For inline scripts, also no translation must be applied, because the line-endings
182
- // tables in the mapping are the same as in the containing document.
183
168
  const [lineNumber, columnNumber] =
184
169
  formatData.mapping.originalToFormatted(rawLocation.lineNumber, rawLocation.columnNumber || 0);
185
170
  return formatData.formattedSourceCode.uiLocation(lineNumber, columnNumber);
@@ -28,6 +28,8 @@
28
28
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
  */
30
30
 
31
+ // TODO(crbug.com/1253323): All casts to UrlString will be removed from this file when migration to branded types is complete.
32
+
31
33
  import * as Common from '../../core/common/common.js';
32
34
  import * as Host from '../../core/host/host.js';
33
35
  import * as i18n from '../../core/i18n/i18n.js';
@@ -82,7 +84,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
82
84
  constructor(
83
85
  manager: IsolatedFileSystemManager, path: string, embedderPath: string, domFileSystem: FileSystem, type: string) {
84
86
  // TODO(crbug.com/1253323): Cast to UrlString will be removed when migration to branded types is complete.
85
- super(path as Platform.DevToolsPath.UrlString, type);
87
+ super(path, type);
86
88
  this.manager = manager;
87
89
  this.embedderPathInternal = embedderPath;
88
90
  this.domFileSystem = domFileSystem;
@@ -174,9 +176,8 @@ export class IsolatedFileSystem extends PlatformFileSystem {
174
176
  this.initialGitFoldersInternal.add(parentFolder);
175
177
  }
176
178
  if (this.isFileExcluded(entry.fullPath + '/')) {
177
- // TODO(crbug.com/1253323): Cast to RawPathString will be removed when migration to branded types is complete.
178
179
  this.excludedEmbedderFolders.push(Common.ParsedURL.ParsedURL.capFilePrefix(
179
- this.path() + entry.fullPath as Platform.DevToolsPath.RawPathString, Host.Platform.isWin()));
180
+ this.path() + entry.fullPath as Platform.DevToolsPath.UrlString, Host.Platform.isWin()));
180
181
  continue;
181
182
  }
182
183
  ++pendingRequests;
@@ -552,9 +553,9 @@ export class IsolatedFileSystem extends PlatformFileSystem {
552
553
  Common.ResourceType.resourceTypes.Document;
553
554
  }
554
555
 
555
- tooltipForURL(url: Platform.DevToolsPath.RawPathString): string {
556
- const path =
557
- Platform.StringUtilities.trimMiddle(Common.ParsedURL.ParsedURL.capFilePrefix(url, Host.Platform.isWin()), 150);
556
+ tooltipForURL(url: string): string {
557
+ const path = Platform.StringUtilities.trimMiddle(
558
+ Common.ParsedURL.ParsedURL.capFilePrefix(url as Platform.DevToolsPath.UrlString, Host.Platform.isWin()), 150);
558
559
  return i18nString(UIStrings.linkedToS, {PH1: path});
559
560
  }
560
561
 
@@ -5,6 +5,7 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as Host from '../../core/host/host.js';
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
+ import type * as Platform from '../../core/platform/platform.js';
8
9
  import * as SDK from '../../core/sdk/sdk.js';
9
10
 
10
11
  import type * as TextUtils from '../text_utils/text_utils.js';
@@ -92,7 +93,9 @@ export class ContextMenuProvider implements UI.ContextMenu.Provider {
92
93
  const binding = uiSourceCode && PersistenceImpl.instance().binding(uiSourceCode);
93
94
  const fileURL = binding ? binding.fileSystem.contentURL() : contentProvider.contentURL();
94
95
  if (fileURL.startsWith('file://')) {
95
- const path = Common.ParsedURL.ParsedURL.capFilePrefix(fileURL, Host.Platform.isWin());
96
+ // TODO(crbug.com/1253323): Cast to UrlString will be removed when migration to branded types is complete.
97
+ const path =
98
+ Common.ParsedURL.ParsedURL.capFilePrefix(fileURL as Platform.DevToolsPath.UrlString, Host.Platform.isWin());
96
99
  contextMenu.revealSection().appendItem(
97
100
  i18nString(UIStrings.openInContainingFolder),
98
101
  () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.showItemInFolder(path));
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import type * as Common from '../../core/common/common.js';
6
- import type * as Platform from '../../core/platform/platform.js';
7
6
  import * as i18n from '../../core/i18n/i18n.js';
8
7
  import type * as TextUtils from '../text_utils/text_utils.js';
9
8
 
@@ -16,9 +15,9 @@ const UIStrings = {
16
15
  const str_ = i18n.i18n.registerUIStrings('models/persistence/PlatformFileSystem.ts', UIStrings);
17
16
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
18
17
  export class PlatformFileSystem {
19
- private readonly pathInternal: Platform.DevToolsPath.UrlString;
18
+ private readonly pathInternal: string;
20
19
  private readonly typeInternal: string;
21
- constructor(path: Platform.DevToolsPath.UrlString, type: string) {
20
+ constructor(path: string, type: string) {
22
21
  this.pathInternal = path;
23
22
  this.typeInternal = type;
24
23
  }
@@ -35,7 +34,7 @@ export class PlatformFileSystem {
35
34
  return [];
36
35
  }
37
36
 
38
- path(): Platform.DevToolsPath.UrlString {
37
+ path(): string {
39
38
  return this.pathInternal;
40
39
  }
41
40
 
@@ -29,10 +29,9 @@
29
29
  */
30
30
 
31
31
  import type * as Common from '../../core/common/common.js';
32
- import type * as Platform from '../../core/platform/platform.js';
33
32
 
34
33
  export abstract class ContentProvider {
35
- abstract contentURL(): Platform.DevToolsPath.RawPathString;
34
+ abstract contentURL(): string;
36
35
  abstract contentType(): Common.ResourceType.ResourceType;
37
36
  abstract contentEncoded(): Promise<boolean>;
38
37
  abstract requestContent(): Promise<DeferredContent>;
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import type * as Common from '../../core/common/common.js';
6
- import type * as Platform from '../../core/platform/platform.js';
7
6
 
8
7
  import type {ContentProvider, DeferredContent, SearchMatch} from './ContentProvider.js';
9
8
  import {performSearchInContent} from './TextUtils.js';
@@ -30,8 +29,8 @@ export class StaticContentProvider implements ContentProvider {
30
29
  }
31
30
 
32
31
  // TODO(crbug.com/1253323): Cast to PawPathString will be removed when migration to branded types is complete.
33
- contentURL(): Platform.DevToolsPath.RawPathString {
34
- return this.contentURLInternal as Platform.DevToolsPath.RawPathString;
32
+ contentURL(): string {
33
+ return this.contentURLInternal;
35
34
  }
36
35
 
37
36
  contentType(): Common.ResourceType.ResourceType {
@@ -192,8 +192,8 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
192
192
  }
193
193
 
194
194
  // TODO(crbug.com/1253323): Cast to RawPathString will be removed when migration to branded types is complete.
195
- contentURL(): Platform.DevToolsPath.RawPathString {
196
- return this.url() as Platform.DevToolsPath.RawPathString;
195
+ contentURL(): string {
196
+ return this.url();
197
197
  }
198
198
 
199
199
  contentType(): Common.ResourceType.ResourceType {
@@ -5,9 +5,14 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as Host from '../../core/host/host.js';
7
7
  import * as Diff from '../../third_party/diff/diff.js';
8
+ import * as FormatterModule from '../formatter/formatter.js';
8
9
  import * as Persistence from '../persistence/persistence.js';
9
10
  import * as Workspace from '../workspace/workspace.js';
10
11
 
12
+ interface DiffRequestOptions {
13
+ shouldFormatDiff: boolean;
14
+ }
15
+
11
16
  export class WorkspaceDiffImpl extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
12
17
  private readonly uiSourceCodeDiffs: WeakMap<Workspace.UISourceCode.UISourceCode, UISourceCodeDiff>;
13
18
  private readonly loadingUISourceCodes:
@@ -29,8 +34,9 @@ export class WorkspaceDiffImpl extends Common.ObjectWrapper.ObjectWrapper<EventT
29
34
  workspace.uiSourceCodes().forEach(this.updateModifiedState.bind(this));
30
35
  }
31
36
 
32
- requestDiff(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise<Diff.Diff.DiffArray|null> {
33
- return this.uiSourceCodeDiff(uiSourceCode).requestDiff();
37
+ requestDiff(uiSourceCode: Workspace.UISourceCode.UISourceCode, diffRequestOptions: DiffRequestOptions):
38
+ Promise<Diff.Diff.DiffArray|null> {
39
+ return this.uiSourceCodeDiff(uiSourceCode).requestDiff(diffRequestOptions);
34
40
  }
35
41
 
36
42
  subscribeToDiffChange(uiSourceCode: Workspace.UISourceCode.UISourceCode, callback: () => void, thisObj?: Object):
@@ -212,9 +218,9 @@ export class UISourceCodeDiff extends Common.ObjectWrapper.ObjectWrapper<UISourc
212
218
  }
213
219
  }
214
220
 
215
- requestDiff(): Promise<Diff.Diff.DiffArray|null> {
221
+ requestDiff(diffRequestOptions: DiffRequestOptions): Promise<Diff.Diff.DiffArray|null> {
216
222
  if (!this.requestDiffPromise) {
217
- this.requestDiffPromise = this.innerRequestDiff();
223
+ this.requestDiffPromise = this.innerRequestDiff(diffRequestOptions);
218
224
  }
219
225
  return this.requestDiffPromise;
220
226
  }
@@ -231,12 +237,12 @@ export class UISourceCodeDiff extends Common.ObjectWrapper.ObjectWrapper<UISourc
231
237
  return content.content || ('error' in content && content.error) || '';
232
238
  }
233
239
 
234
- private async innerRequestDiff(): Promise<Diff.Diff.DiffArray|null> {
240
+ private async innerRequestDiff({shouldFormatDiff}: DiffRequestOptions): Promise<Diff.Diff.DiffArray|null> {
235
241
  if (this.dispose) {
236
242
  return null;
237
243
  }
238
244
 
239
- const baseline = await this.originalContent();
245
+ let baseline = await this.originalContent();
240
246
  if (baseline === null) {
241
247
  return null;
242
248
  }
@@ -264,6 +270,14 @@ export class UISourceCodeDiff extends Common.ObjectWrapper.ObjectWrapper<UISourc
264
270
  if (current === null || baseline === null) {
265
271
  return null;
266
272
  }
273
+ if (shouldFormatDiff) {
274
+ baseline = (await FormatterModule.ScriptFormatter.format(
275
+ this.uiSourceCode.contentType(), this.uiSourceCode.mimeType(), baseline))
276
+ .formattedContent;
277
+ current = (await FormatterModule.ScriptFormatter.format(
278
+ this.uiSourceCode.contentType(), this.uiSourceCode.mimeType(), current))
279
+ .formattedContent;
280
+ }
267
281
  return Diff.Diff.DiffWrapper.lineDiff(baseline.split(/\r\n|\n|\r/), current.split(/\r\n|\n|\r/));
268
282
  }
269
283
  }
@@ -24,6 +24,8 @@
24
24
  margin-bottom: -1px;
25
25
  background-color: var(--color-background-elevation-1);
26
26
  display: flex;
27
+ flex-direction: column;
28
+ justify-content: space-around;
27
29
  align-items: center;
28
30
  flex: 0 0 150px;
29
31
  }
@@ -424,66 +424,6 @@ const UIStrings = {
424
424
  * @description Description text for not restored reason ContentMediaPlay.
425
425
  */
426
426
  contentMediaPlay: 'A media player was playing upon navigating away.',
427
- /**
428
- * @description Description text for not restored reason EmbedderPopupBlockerTabHelper.
429
- */
430
- embedderPopupBlockerTabHelper: 'EmbedderPopupBlockerTabHelper',
431
- /**
432
- * @description Description text for not restored reason EmbedderSafeBrowsingTriggeredPopupBlocker.
433
- */
434
- embedderSafeBrowsingTriggeredPopupBlocker: 'EmbedderSafeBrowsingTriggeredPopupBlocker',
435
- /**
436
- * @description Description text for not restored reason EmbedderSafeBrowsingThreatDetails.
437
- */
438
- embedderSafeBrowsingThreatDetails: 'EmbedderSafeBrowsingThreatDetails',
439
- /**
440
- * @description Description text for not restored reason EmbedderAppBannerManager.
441
- */
442
- embedderAppBannerManager: 'EmbedderAppBannerManager',
443
- /**
444
- * @description Description text for not restored reason EmbedderDomDistillerViewerSource.
445
- */
446
- embedderDomDistillerViewerSource: 'EmbedderDomDistillerViewerSource',
447
- /**
448
- * @description Description text for not restored reason EmbedderDomDistillerSelfDeletingRequestDelegate.
449
- */
450
- embedderDomDistillerSelfDeletingRequestDelegate: 'EmbedderDomDistillerSelfDeletingRequestDelegate',
451
- /**
452
- * @description Description text for not restored reason EmbedderOomInterventionTabHelper.
453
- */
454
- embedderOomInterventionTabHelper: 'EmbedderOomInterventionTabHelper',
455
- /**
456
- * @description Description text for not restored reason EmbedderOfflinePage.
457
- */
458
- embedderOfflinePage: 'EmbedderOfflinePage',
459
- /**
460
- * @description Description text for not restored reason EmbedderChromePasswordManagerClientBindCredentialManager.
461
- */
462
- embedderChromePasswordManagerClientBindCredentialManager: 'EmbedderChromePasswordManagerClientBindCredentialManager',
463
- /**
464
- * @description Description text for not restored reason EmbedderPermissionRequestManager.
465
- */
466
- embedderPermissionRequestManager: 'EmbedderPermissionRequestManager',
467
- /**
468
- * @description Description text for not restored reason EmbedderModalDialog.
469
- */
470
- embedderModalDialog: 'EmbedderModalDialog',
471
- /**
472
- * @description Description text for not restored reason EmbedderExtensions.
473
- */
474
- embedderExtensions: 'EmbedderExtensions',
475
- /**
476
- * @description Description text for not restored reason EmbedderExtensionMessaging.
477
- */
478
- embedderExtensionMessaging: 'EmbedderExtensionMessaging',
479
- /**
480
- * @description Description text for not restored reason EmbedderExtensionMessagingForOpenPort.
481
- */
482
- embedderExtensionMessagingForOpenPort: 'EmbedderExtensionMessagingForOpenPort',
483
- /**
484
- * @description Description text for not restored reason EmbedderExtensionSentMessageToCachedFrame.
485
- */
486
- embedderExtensionSentMessageToCachedFrame: 'EmbedderExtensionSentMessageToCachedFrame',
487
427
  };
488
428
 
489
429
  const str_ = i18n.i18n.registerUIStrings('panels/application/BackForwardCacheStrings.ts', UIStrings);
@@ -601,23 +541,23 @@ export const NotRestoredReasonDescription = {
601
541
  'ContentMediaSession': {name: i18nLazyString(UIStrings.contentMediaSession)},
602
542
  'ContentMediaSessionService': {name: i18nLazyString(UIStrings.contentMediaSessionService)},
603
543
  'ContentMediaPlay': {name: i18nLazyString(UIStrings.contentMediaPlay)},
604
- 'EmbedderPopupBlockerTabHelper': {name: i18nLazyString(UIStrings.embedderPopupBlockerTabHelper)},
544
+ 'EmbedderPopupBlockerTabHelper': {name: i18n.i18n.lockedLazyString('EmbedderPopupBlockerTabHelper')},
605
545
  'EmbedderSafeBrowsingTriggeredPopupBlocker':
606
- {name: i18nLazyString(UIStrings.embedderSafeBrowsingTriggeredPopupBlocker)},
607
- 'EmbedderSafeBrowsingThreatDetails': {name: i18nLazyString(UIStrings.embedderSafeBrowsingThreatDetails)},
608
- 'EmbedderAppBannerManager': {name: i18nLazyString(UIStrings.embedderAppBannerManager)},
609
- 'EmbedderDomDistillerViewerSource': {name: i18nLazyString(UIStrings.embedderDomDistillerViewerSource)},
546
+ {name: i18n.i18n.lockedLazyString('EmbedderSafeBrowsingTriggeredPopupBlocker')},
547
+ 'EmbedderSafeBrowsingThreatDetails': {name: i18n.i18n.lockedLazyString('EmbedderSafeBrowsingThreatDetails')},
548
+ 'EmbedderAppBannerManager': {name: i18n.i18n.lockedLazyString('EmbedderAppBannerManager')},
549
+ 'EmbedderDomDistillerViewerSource': {name: i18n.i18n.lockedLazyString('EmbedderDomDistillerViewerSource')},
610
550
  'EmbedderDomDistillerSelfDeletingRequestDelegate':
611
- {name: i18nLazyString(UIStrings.embedderDomDistillerSelfDeletingRequestDelegate)},
612
- 'EmbedderOomInterventionTabHelper': {name: i18nLazyString(UIStrings.embedderOomInterventionTabHelper)},
613
- 'EmbedderOfflinePage': {name: i18nLazyString(UIStrings.embedderOfflinePage)},
551
+ {name: i18n.i18n.lockedLazyString('EmbedderDomDistillerSelfDeletingRequestDelegate')},
552
+ 'EmbedderOomInterventionTabHelper': {name: i18n.i18n.lockedLazyString('EmbedderOomInterventionTabHelper')},
553
+ 'EmbedderOfflinePage': {name: i18n.i18n.lockedLazyString('EmbedderOfflinePage')},
614
554
  'EmbedderChromePasswordManagerClientBindCredentialManager':
615
- {name: i18nLazyString(UIStrings.embedderChromePasswordManagerClientBindCredentialManager)},
616
- 'EmbedderPermissionRequestManager': {name: i18nLazyString(UIStrings.embedderPermissionRequestManager)},
617
- 'EmbedderModalDialog': {name: i18nLazyString(UIStrings.embedderModalDialog)},
618
- 'EmbedderExtensions': {name: i18nLazyString(UIStrings.embedderExtensions)},
619
- 'EmbedderExtensionMessaging': {name: i18nLazyString(UIStrings.embedderExtensionMessaging)},
620
- 'EmbedderExtensionMessagingForOpenPort': {name: i18nLazyString(UIStrings.embedderExtensionMessagingForOpenPort)},
555
+ {name: i18n.i18n.lockedLazyString('EmbedderChromePasswordManagerClientBindCredentialManager')},
556
+ 'EmbedderPermissionRequestManager': {name: i18n.i18n.lockedLazyString('EmbedderPermissionRequestManager')},
557
+ 'EmbedderModalDialog': {name: i18n.i18n.lockedLazyString('EmbedderModalDialog')},
558
+ 'EmbedderExtensions': {name: i18n.i18n.lockedLazyString('EmbedderExtensions')},
559
+ 'EmbedderExtensionMessaging': {name: i18n.i18n.lockedLazyString('EmbedderExtensionMessaging')},
560
+ 'EmbedderExtensionMessagingForOpenPort': {name: i18n.i18n.lockedLazyString('EmbedderExtensionMessagingForOpenPort')},
621
561
  'EmbedderExtensionSentMessageToCachedFrame':
622
- {name: i18nLazyString(UIStrings.embedderExtensionSentMessageToCachedFrame)},
562
+ {name: i18n.i18n.lockedLazyString('EmbedderExtensionSentMessageToCachedFrame')},
623
563
  };
@@ -5,22 +5,36 @@
5
5
  import * as SDK from '../../core/sdk/sdk.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
7
  import * as ApplicationComponents from './components/components.js';
8
+ import type * as Protocol from '../../generated/protocol.js';
8
9
 
9
10
  import {ReportingApiReportsView} from './ReportingApiReportsView.js';
10
11
 
11
12
  export class ReportingApiView extends UI.SplitWidget.SplitWidget {
13
+ private readonly endpointsGrid = new ApplicationComponents.EndpointsGrid.EndpointsGrid();
14
+ private endpoints: Map<string, Protocol.Network.ReportingApiEndpoint[]>;
15
+
12
16
  constructor() {
13
17
  super(/* isVertical: */ false, /* secondIsSidebar: */ true);
18
+ this.endpoints = new Map();
14
19
  const mainTarget = SDK.TargetManager.TargetManager.instance().mainTarget();
15
20
  const networkManager = mainTarget && mainTarget.model(SDK.NetworkManager.NetworkManager);
16
21
  if (networkManager) {
22
+ networkManager.addEventListener(
23
+ SDK.NetworkManager.Events.ReportingApiEndpointsChangedForOrigin,
24
+ event => this.onEndpointsChangedForOrigin(event.data), this);
25
+
17
26
  const reportingApiReportsView = new ReportingApiReportsView(networkManager);
18
27
  const reportingApiEndpointsView = new UI.Widget.VBox();
19
28
  reportingApiEndpointsView.setMinimumSize(0, 40);
20
- reportingApiEndpointsView.contentElement.appendChild(new ApplicationComponents.EndpointsGrid.EndpointsGrid());
29
+ reportingApiEndpointsView.contentElement.appendChild(this.endpointsGrid);
21
30
  this.setMainWidget(reportingApiReportsView);
22
31
  this.setSidebarWidget(reportingApiEndpointsView);
23
32
  networkManager.enableReportingApi();
24
33
  }
25
34
  }
35
+
36
+ private onEndpointsChangedForOrigin(data: Protocol.Network.ReportingApiEndpointsChangedForOriginEvent): void {
37
+ this.endpoints.set(data.origin, data.endpoints);
38
+ this.endpointsGrid.data = {endpoints: this.endpoints};
39
+ }
26
40
  }