chrome-devtools-frontend 1.0.981004 → 1.0.995227

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 (509) hide show
  1. package/AUTHORS +2 -0
  2. package/config/gni/devtools_grd_files.gni +8 -7
  3. package/config/gni/devtools_image_files.gni +1 -0
  4. package/front_end/.eslintrc.js +10 -0
  5. package/front_end/Images/src/ic_rendering.svg +3 -0
  6. package/front_end/core/common/ParsedURL.ts +44 -28
  7. package/front_end/core/common/ResourceType.ts +1 -1
  8. package/front_end/core/common/SettingRegistration.ts +1 -0
  9. package/front_end/core/host/InspectorFrontendHost.ts +11 -10
  10. package/front_end/core/host/InspectorFrontendHostAPI.ts +15 -14
  11. package/front_end/core/host/Platform.ts +11 -2
  12. package/front_end/core/host/UserMetrics.ts +27 -2
  13. package/front_end/core/i18n/DevToolsLocale.ts +4 -0
  14. package/front_end/core/i18n/locales/af.json +76 -16
  15. package/front_end/core/i18n/locales/am.json +76 -16
  16. package/front_end/core/i18n/locales/ar.json +77 -17
  17. package/front_end/core/i18n/locales/as.json +76 -16
  18. package/front_end/core/i18n/locales/az.json +76 -16
  19. package/front_end/core/i18n/locales/be.json +75 -15
  20. package/front_end/core/i18n/locales/bg.json +76 -16
  21. package/front_end/core/i18n/locales/bn.json +76 -16
  22. package/front_end/core/i18n/locales/bs.json +88 -28
  23. package/front_end/core/i18n/locales/ca.json +76 -16
  24. package/front_end/core/i18n/locales/cs.json +76 -16
  25. package/front_end/core/i18n/locales/cy.json +76 -16
  26. package/front_end/core/i18n/locales/da.json +77 -17
  27. package/front_end/core/i18n/locales/de.json +178 -118
  28. package/front_end/core/i18n/locales/el.json +76 -16
  29. package/front_end/core/i18n/locales/en-GB.json +76 -16
  30. package/front_end/core/i18n/locales/en-US.json +208 -52
  31. package/front_end/core/i18n/locales/en-XL.json +208 -52
  32. package/front_end/core/i18n/locales/es-419.json +76 -16
  33. package/front_end/core/i18n/locales/es.json +76 -16
  34. package/front_end/core/i18n/locales/et.json +76 -16
  35. package/front_end/core/i18n/locales/eu.json +76 -16
  36. package/front_end/core/i18n/locales/fa.json +83 -23
  37. package/front_end/core/i18n/locales/fi.json +76 -16
  38. package/front_end/core/i18n/locales/fil.json +76 -16
  39. package/front_end/core/i18n/locales/fr-CA.json +76 -16
  40. package/front_end/core/i18n/locales/fr.json +76 -16
  41. package/front_end/core/i18n/locales/gl.json +76 -16
  42. package/front_end/core/i18n/locales/gu.json +76 -16
  43. package/front_end/core/i18n/locales/he.json +76 -16
  44. package/front_end/core/i18n/locales/hi.json +76 -16
  45. package/front_end/core/i18n/locales/hr.json +76 -16
  46. package/front_end/core/i18n/locales/hu.json +76 -16
  47. package/front_end/core/i18n/locales/hy.json +76 -16
  48. package/front_end/core/i18n/locales/id.json +79 -19
  49. package/front_end/core/i18n/locales/is.json +75 -15
  50. package/front_end/core/i18n/locales/it.json +124 -64
  51. package/front_end/core/i18n/locales/ja.json +76 -16
  52. package/front_end/core/i18n/locales/ka.json +76 -16
  53. package/front_end/core/i18n/locales/kk.json +76 -16
  54. package/front_end/core/i18n/locales/km.json +76 -16
  55. package/front_end/core/i18n/locales/kn.json +76 -16
  56. package/front_end/core/i18n/locales/ko.json +76 -16
  57. package/front_end/core/i18n/locales/ky.json +76 -16
  58. package/front_end/core/i18n/locales/lo.json +76 -16
  59. package/front_end/core/i18n/locales/lt.json +76 -16
  60. package/front_end/core/i18n/locales/lv.json +76 -16
  61. package/front_end/core/i18n/locales/mk.json +76 -16
  62. package/front_end/core/i18n/locales/ml.json +76 -16
  63. package/front_end/core/i18n/locales/mn.json +76 -16
  64. package/front_end/core/i18n/locales/mr.json +76 -16
  65. package/front_end/core/i18n/locales/ms.json +76 -16
  66. package/front_end/core/i18n/locales/my.json +78 -18
  67. package/front_end/core/i18n/locales/ne.json +76 -16
  68. package/front_end/core/i18n/locales/nl.json +77 -17
  69. package/front_end/core/i18n/locales/no.json +76 -16
  70. package/front_end/core/i18n/locales/or.json +76 -16
  71. package/front_end/core/i18n/locales/pa.json +76 -16
  72. package/front_end/core/i18n/locales/pl.json +78 -18
  73. package/front_end/core/i18n/locales/pt-PT.json +123 -63
  74. package/front_end/core/i18n/locales/pt.json +78 -18
  75. package/front_end/core/i18n/locales/ro.json +76 -16
  76. package/front_end/core/i18n/locales/ru.json +77 -17
  77. package/front_end/core/i18n/locales/si.json +76 -16
  78. package/front_end/core/i18n/locales/sk.json +76 -16
  79. package/front_end/core/i18n/locales/sl.json +76 -16
  80. package/front_end/core/i18n/locales/sq.json +76 -16
  81. package/front_end/core/i18n/locales/sr-Latn.json +76 -16
  82. package/front_end/core/i18n/locales/sr.json +76 -16
  83. package/front_end/core/i18n/locales/sv.json +76 -16
  84. package/front_end/core/i18n/locales/sw.json +76 -16
  85. package/front_end/core/i18n/locales/ta.json +77 -17
  86. package/front_end/core/i18n/locales/te.json +76 -16
  87. package/front_end/core/i18n/locales/th.json +76 -16
  88. package/front_end/core/i18n/locales/tr.json +76 -16
  89. package/front_end/core/i18n/locales/uk.json +76 -16
  90. package/front_end/core/i18n/locales/ur.json +76 -16
  91. package/front_end/core/i18n/locales/uz.json +77 -17
  92. package/front_end/core/i18n/locales/vi.json +76 -16
  93. package/front_end/core/i18n/locales/zh-HK.json +76 -16
  94. package/front_end/core/i18n/locales/zh-TW.json +76 -16
  95. package/front_end/core/i18n/locales/zh.json +76 -16
  96. package/front_end/core/i18n/locales/zu.json +76 -16
  97. package/front_end/core/platform/dom-utilities.ts +16 -0
  98. package/front_end/core/platform/platform.ts +2 -0
  99. package/front_end/core/protocol_client/InspectorBackend.ts +2 -1
  100. package/front_end/core/protocol_client/NodeURL.ts +1 -1
  101. package/front_end/core/root/Runtime.ts +6 -0
  102. package/front_end/core/sdk/AccessibilityModel.ts +7 -6
  103. package/front_end/core/sdk/CSSMatchedStyles.ts +71 -17
  104. package/front_end/core/sdk/CSSMetadata.ts +15 -0
  105. package/front_end/core/sdk/CSSModel.ts +9 -7
  106. package/front_end/core/sdk/CSSProperty.ts +97 -11
  107. package/front_end/core/sdk/CSSStyleSheetHeader.ts +9 -5
  108. package/front_end/core/sdk/CSSSupports.ts +4 -1
  109. package/front_end/core/sdk/ChildTargetManager.ts +3 -1
  110. package/front_end/core/sdk/Connections.ts +3 -2
  111. package/front_end/core/sdk/ConsoleModel.ts +6 -5
  112. package/front_end/core/sdk/Cookie.ts +4 -2
  113. package/front_end/core/sdk/DOMDebuggerModel.ts +10 -6
  114. package/front_end/core/sdk/DOMModel.ts +2 -2
  115. package/front_end/core/sdk/DebuggerModel.ts +27 -5
  116. package/front_end/core/sdk/HeapProfilerModel.ts +2 -1
  117. package/front_end/core/sdk/NetworkManager.ts +13 -12
  118. package/front_end/core/sdk/NetworkRequest.ts +1 -1
  119. package/front_end/core/sdk/PageLoad.ts +3 -1
  120. package/front_end/core/sdk/PageResourceLoader.ts +9 -7
  121. package/front_end/core/sdk/ProfileTreeModel.ts +3 -2
  122. package/front_end/core/sdk/RemoteObject.ts +18 -6
  123. package/front_end/core/sdk/ResourceTreeModel.ts +17 -11
  124. package/front_end/core/sdk/ScreenCaptureModel.ts +3 -0
  125. package/front_end/core/sdk/Script.ts +4 -3
  126. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +2 -1
  127. package/front_end/core/sdk/SourceMap.ts +10 -6
  128. package/front_end/core/sdk/SourceMapManager.ts +47 -5
  129. package/front_end/core/sdk/Target.ts +2 -1
  130. package/front_end/core/sdk/TracingModel.ts +0 -9
  131. package/front_end/devtools_compatibility.js +1 -0
  132. package/front_end/entrypoints/formatter_worker/CSSRuleParser.ts +1 -1
  133. package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +10 -3
  134. package/front_end/entrypoints/main/MainImpl.ts +22 -2
  135. package/front_end/generated/InspectorBackendCommands.js +85 -16
  136. package/front_end/generated/SupportedCSSProperties.js +21 -8
  137. package/front_end/generated/protocol-mapping.d.ts +4 -0
  138. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  139. package/front_end/generated/protocol.ts +174 -28
  140. package/front_end/legacy/legacy-defs.d.ts +0 -4
  141. package/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js +1 -1
  142. package/front_end/legacy_test_runner/test_runner/TestRunner.js +1 -0
  143. package/front_end/models/bindings/BreakpointManager.ts +68 -11
  144. package/front_end/models/bindings/CSSWorkspaceBinding.ts +9 -2
  145. package/front_end/models/bindings/CompilerScriptMapping.ts +3 -2
  146. package/front_end/models/bindings/ContentProviderBasedProject.ts +12 -9
  147. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +10 -8
  148. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -1
  149. package/front_end/models/bindings/DefaultScriptMapping.ts +8 -2
  150. package/front_end/models/bindings/FileUtils.ts +3 -2
  151. package/front_end/models/bindings/IgnoreListManager.ts +5 -5
  152. package/front_end/models/bindings/ResourceUtils.ts +5 -4
  153. package/front_end/models/emulation/EmulatedDevices.ts +17 -0
  154. package/front_end/models/extensions/ExtensionAPI.ts +5 -2
  155. package/front_end/models/extensions/ExtensionPanel.ts +2 -1
  156. package/front_end/models/extensions/ExtensionServer.ts +13 -8
  157. package/front_end/models/issues_manager/AttributionReportingIssue.ts +0 -63
  158. package/front_end/models/issues_manager/CookieIssue.ts +7 -0
  159. package/front_end/models/issues_manager/DeprecationIssue.ts +326 -8
  160. package/front_end/models/issues_manager/IssuesManager.ts +4 -0
  161. package/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  162. package/front_end/models/issues_manager/descriptions/deprecation.md +1 -1
  163. package/front_end/models/logs/LogManager.ts +2 -1
  164. package/front_end/models/logs/NetworkLog.ts +14 -12
  165. package/front_end/models/persistence/Automapping.ts +17 -16
  166. package/front_end/models/persistence/EditFileSystemView.ts +5 -4
  167. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +24 -24
  168. package/front_end/models/persistence/IsolatedFileSystem.ts +2 -2
  169. package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -6
  170. package/front_end/models/persistence/NetworkPersistenceManager.ts +92 -54
  171. package/front_end/models/persistence/PersistenceImpl.ts +7 -7
  172. package/front_end/models/persistence/PlatformFileSystem.ts +7 -8
  173. package/front_end/models/persistence/WorkspaceSettingsTab.ts +3 -2
  174. package/front_end/models/text_utils/CodeMirrorUtils.ts +53 -0
  175. package/front_end/models/text_utils/text_utils.ts +2 -0
  176. package/front_end/models/timeline_model/TimelineModel.ts +32 -30
  177. package/front_end/models/timeline_model/TimelineProfileTree.ts +3 -2
  178. package/front_end/models/workspace/FileManager.ts +9 -6
  179. package/front_end/models/workspace/UISourceCode.ts +16 -14
  180. package/front_end/models/workspace/WorkspaceImpl.ts +40 -16
  181. package/front_end/panels/accessibility/AccessibilitySubPane.ts +2 -1
  182. package/front_end/panels/application/AppManifestView.ts +1 -1
  183. package/front_end/panels/application/ApplicationPanelCacheSection.ts +5 -4
  184. package/front_end/panels/application/ApplicationPanelSidebar.ts +34 -30
  185. package/front_end/panels/application/ApplicationPanelTreeElement.ts +5 -4
  186. package/front_end/panels/application/BackgroundServiceView.ts +2 -1
  187. package/front_end/panels/application/DatabaseQueryView.ts +2 -1
  188. package/front_end/panels/application/InterestGroupTreeElement.ts +3 -2
  189. package/front_end/panels/application/ReportingApiTreeElement.ts +3 -2
  190. package/front_end/panels/application/ResourcesPanel.ts +4 -3
  191. package/front_end/panels/application/ServiceWorkerCacheViews.ts +6 -1
  192. package/front_end/panels/application/TrustTokensTreeElement.ts +3 -2
  193. package/front_end/panels/application/components/BackForwardCacheStrings.ts +10 -1
  194. package/front_end/panels/application/components/BackForwardCacheView.ts +163 -13
  195. package/front_end/panels/application/components/backForwardCacheView.css +15 -4
  196. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +19 -19
  197. package/front_end/panels/changes/ChangesView.ts +38 -0
  198. package/front_end/panels/console/ConsoleFormat.ts +23 -0
  199. package/front_end/panels/console/ConsolePinPane.ts +7 -0
  200. package/front_end/panels/console/ConsolePrompt.ts +11 -1
  201. package/front_end/panels/console/ConsoleSidebar.ts +2 -1
  202. package/front_end/panels/console/ConsoleView.ts +60 -32
  203. package/front_end/panels/console/ConsoleViewMessage.ts +15 -28
  204. package/front_end/panels/console/ConsoleViewport.ts +2 -1
  205. package/front_end/panels/console/ErrorStackParser.ts +8 -4
  206. package/front_end/panels/console/consoleView.css +0 -1
  207. package/front_end/panels/coverage/CoverageListView.ts +1 -1
  208. package/front_end/panels/coverage/CoverageModel.ts +6 -6
  209. package/front_end/panels/coverage/CoverageView.ts +2 -1
  210. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -1
  211. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +7 -6
  212. package/front_end/panels/css_overview/components/cssOverviewStartView.css +0 -48
  213. package/front_end/panels/css_overview/cssOverviewCompletedView.css +5 -0
  214. package/front_end/panels/css_overview/cssOverviewSidebarPanel.css +2 -0
  215. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +2 -1
  216. package/front_end/panels/elements/ComputedStyleWidget.ts +2 -1
  217. package/front_end/panels/elements/ElementStatePaneWidget.ts +4 -6
  218. package/front_end/panels/elements/ElementsPanel.ts +16 -5
  219. package/front_end/panels/elements/ImagePreviewPopover.ts +6 -4
  220. package/front_end/panels/elements/PropertiesWidget.ts +4 -24
  221. package/front_end/panels/elements/StyleEditorWidget.ts +2 -1
  222. package/front_end/panels/elements/StylePropertiesSection.ts +1614 -0
  223. package/front_end/panels/elements/StylePropertyHighlighter.ts +2 -1
  224. package/front_end/panels/elements/StylePropertyTreeElement.ts +20 -1
  225. package/front_end/panels/elements/StylesSidebarPane.ts +97 -1675
  226. package/front_end/panels/elements/elements-legacy.ts +3 -3
  227. package/front_end/panels/elements/elements.ts +3 -0
  228. package/front_end/panels/elements/stylesSidebarPane.css +3 -1
  229. package/front_end/panels/emulation/AdvancedApp.ts +6 -2
  230. package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -1
  231. package/front_end/panels/input/InputTimeline.ts +3 -2
  232. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +0 -50
  233. package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +14 -2
  234. package/front_end/panels/issues/IssueAggregator.ts +8 -0
  235. package/front_end/panels/issues/issues.ts +2 -0
  236. package/front_end/panels/lighthouse/LighthouseController.ts +5 -1
  237. package/front_end/panels/lighthouse/LighthousePanel.ts +3 -1
  238. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
  239. package/front_end/panels/lighthouse/LighthouseTimespanView.ts +3 -3
  240. package/front_end/panels/network/BlockedURLsPane.ts +3 -2
  241. package/front_end/panels/network/NetworkConfigView.ts +6 -0
  242. package/front_end/panels/network/NetworkDataGridNode.ts +4 -0
  243. package/front_end/panels/network/NetworkLogView.ts +3 -3
  244. package/front_end/panels/network/RequestHTMLView.ts +1 -0
  245. package/front_end/panels/network/RequestHeadersView.ts +71 -10
  246. package/front_end/panels/network/networkLogView.css +9 -17
  247. package/front_end/panels/network/requestHeadersTree.css +16 -0
  248. package/front_end/panels/profiler/HeapSnapshotView.ts +5 -2
  249. package/front_end/panels/profiler/LiveHeapProfileView.ts +3 -1
  250. package/front_end/panels/profiler/ProfileView.ts +2 -2
  251. package/front_end/panels/profiler/ProfilesPanel.ts +2 -1
  252. package/front_end/panels/profiler/heapProfiler.css +15 -3
  253. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +4 -2
  254. package/front_end/panels/screencast/ScreencastView.ts +5 -2
  255. package/front_end/panels/search/SearchConfig.ts +2 -1
  256. package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -2
  257. package/front_end/panels/settings/SettingsScreen.ts +4 -1
  258. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +1 -2
  259. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +4 -4
  260. package/front_end/panels/sources/BreakpointEditDialog.ts +0 -1
  261. package/front_end/panels/sources/CSSPlugin.ts +6 -6
  262. package/front_end/panels/sources/CoveragePlugin.ts +2 -1
  263. package/front_end/panels/sources/DebuggerPlugin.ts +4 -4
  264. package/front_end/panels/sources/EditingLocationHistoryManager.ts +4 -1
  265. package/front_end/panels/sources/NavigatorView.ts +28 -20
  266. package/front_end/panels/sources/SearchSourcesView.ts +2 -2
  267. package/front_end/panels/sources/SourcesNavigator.ts +4 -2
  268. package/front_end/panels/sources/SourcesPanel.ts +4 -4
  269. package/front_end/panels/sources/SourcesSearchScope.ts +12 -8
  270. package/front_end/panels/sources/SourcesView.ts +3 -1
  271. package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
  272. package/front_end/panels/sources/components/HeadersView.css +17 -2
  273. package/front_end/panels/sources/components/HeadersView.ts +103 -1
  274. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +9 -9
  275. package/front_end/panels/timeline/TimelinePanel.ts +3 -2
  276. package/front_end/panels/timeline/TimelineUIUtils.ts +7 -0
  277. package/front_end/panels/timeline/timelinePanel.css +1 -2
  278. package/front_end/panels/utils/utils.ts +97 -0
  279. package/front_end/third_party/codemirror.next/bundle.ts +27 -25
  280. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  281. package/front_end/third_party/codemirror.next/chunk/cpp.js +2 -2
  282. package/front_end/third_party/codemirror.next/chunk/java.js +2 -1
  283. package/front_end/third_party/codemirror.next/chunk/json.js +2 -2
  284. package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
  285. package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -2
  286. package/front_end/third_party/codemirror.next/chunk/php.js +2 -1
  287. package/front_end/third_party/codemirror.next/chunk/python.js +2 -2
  288. package/front_end/third_party/codemirror.next/chunk/wast.js +2 -1
  289. package/front_end/third_party/codemirror.next/chunk/xml.js +2 -1
  290. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1884 -2281
  291. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  292. package/front_end/third_party/codemirror.next/package.json +21 -32
  293. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +963 -886
  294. package/front_end/third_party/lighthouse/report/bundle.js +3 -2
  295. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  296. package/front_end/third_party/lit-html/README.chromium +3 -3
  297. package/front_end/third_party/lit-html/package/README.md +1 -1
  298. package/front_end/third_party/lit-html/package/async-directive.d.ts +1 -1
  299. package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
  300. package/front_end/third_party/lit-html/package/development/async-directive.d.ts +1 -1
  301. package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
  302. package/front_end/third_party/lit-html/package/development/directives/choose.d.ts +32 -0
  303. package/front_end/third_party/lit-html/package/development/directives/choose.d.ts.map +1 -0
  304. package/front_end/third_party/lit-html/package/development/directives/choose.js +41 -0
  305. package/front_end/third_party/lit-html/package/development/directives/choose.js.map +1 -0
  306. package/front_end/third_party/lit-html/package/development/directives/join.d.ts +21 -0
  307. package/front_end/third_party/lit-html/package/development/directives/join.d.ts.map +1 -0
  308. package/front_end/third_party/lit-html/package/development/directives/join.js +19 -0
  309. package/front_end/third_party/lit-html/package/development/directives/join.js.map +1 -0
  310. package/front_end/third_party/lit-html/package/development/directives/keyed.d.ts +23 -0
  311. package/front_end/third_party/lit-html/package/development/directives/keyed.d.ts.map +1 -0
  312. package/front_end/third_party/lit-html/package/development/directives/keyed.js +39 -0
  313. package/front_end/third_party/lit-html/package/development/directives/keyed.js.map +1 -0
  314. package/front_end/third_party/lit-html/package/development/directives/map.d.ts +23 -0
  315. package/front_end/third_party/lit-html/package/development/directives/map.d.ts.map +1 -0
  316. package/front_end/third_party/lit-html/package/development/directives/map.js +30 -0
  317. package/front_end/third_party/lit-html/package/development/directives/map.js.map +1 -0
  318. package/front_end/third_party/lit-html/package/development/directives/range.d.ts +24 -0
  319. package/front_end/third_party/lit-html/package/development/directives/range.d.ts.map +1 -0
  320. package/front_end/third_party/lit-html/package/development/directives/range.js +13 -0
  321. package/front_end/third_party/lit-html/package/development/directives/range.js.map +1 -0
  322. package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -1
  323. package/front_end/third_party/lit-html/package/development/directives/when.d.ts +26 -0
  324. package/front_end/third_party/lit-html/package/development/directives/when.d.ts.map +1 -0
  325. package/front_end/third_party/lit-html/package/development/directives/when.js +9 -0
  326. package/front_end/third_party/lit-html/package/development/directives/when.js.map +1 -0
  327. package/front_end/third_party/lit-html/package/development/lit-html.d.ts +182 -1
  328. package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
  329. package/front_end/third_party/lit-html/package/development/lit-html.js +187 -4
  330. package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
  331. package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
  332. package/front_end/third_party/lit-html/package/development/static.js +7 -0
  333. package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
  334. package/front_end/third_party/lit-html/package/directives/choose.d.ts +32 -0
  335. package/front_end/third_party/lit-html/package/directives/choose.d.ts.map +1 -0
  336. package/front_end/third_party/lit-html/package/directives/choose.js +7 -0
  337. package/front_end/third_party/lit-html/package/directives/choose.js.map +1 -0
  338. package/front_end/third_party/lit-html/package/directives/class-map.js +1 -1
  339. package/front_end/third_party/lit-html/package/directives/guard.js +1 -1
  340. package/front_end/third_party/lit-html/package/directives/join.d.ts +21 -0
  341. package/front_end/third_party/lit-html/package/directives/join.d.ts.map +1 -0
  342. package/front_end/third_party/lit-html/package/directives/join.js +7 -0
  343. package/front_end/third_party/lit-html/package/directives/join.js.map +1 -0
  344. package/front_end/third_party/lit-html/package/directives/keyed.d.ts +23 -0
  345. package/front_end/third_party/lit-html/package/directives/keyed.d.ts.map +1 -0
  346. package/front_end/third_party/lit-html/package/directives/keyed.js +7 -0
  347. package/front_end/third_party/lit-html/package/directives/keyed.js.map +1 -0
  348. package/front_end/third_party/lit-html/package/directives/map.d.ts +23 -0
  349. package/front_end/third_party/lit-html/package/directives/map.d.ts.map +1 -0
  350. package/front_end/third_party/lit-html/package/directives/map.js +7 -0
  351. package/front_end/third_party/lit-html/package/directives/map.js.map +1 -0
  352. package/front_end/third_party/lit-html/package/directives/range.d.ts +24 -0
  353. package/front_end/third_party/lit-html/package/directives/range.d.ts.map +1 -0
  354. package/front_end/third_party/lit-html/package/directives/range.js +7 -0
  355. package/front_end/third_party/lit-html/package/directives/range.js.map +1 -0
  356. package/front_end/third_party/lit-html/package/directives/ref.js +1 -1
  357. package/front_end/third_party/lit-html/package/directives/repeat.js +1 -1
  358. package/front_end/third_party/lit-html/package/directives/style-map.js +1 -1
  359. package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -1
  360. package/front_end/third_party/lit-html/package/directives/template-content.js +1 -1
  361. package/front_end/third_party/lit-html/package/directives/unsafe-html.js +1 -1
  362. package/front_end/third_party/lit-html/package/directives/until.js +1 -1
  363. package/front_end/third_party/lit-html/package/directives/when.d.ts +26 -0
  364. package/front_end/third_party/lit-html/package/directives/when.d.ts.map +1 -0
  365. package/front_end/third_party/lit-html/package/directives/when.js +7 -0
  366. package/front_end/third_party/lit-html/package/directives/when.js.map +1 -0
  367. package/front_end/third_party/lit-html/package/lit-html.d.ts +182 -1
  368. package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
  369. package/front_end/third_party/lit-html/package/lit-html.js +1 -1
  370. package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
  371. package/front_end/third_party/lit-html/package/package.json +25 -1
  372. package/front_end/third_party/lit-html/package/private-ssr-support.js +1 -1
  373. package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
  374. package/front_end/third_party/lit-html/package/static.js +1 -1
  375. package/front_end/third_party/lit-html/package/static.js.map +1 -1
  376. package/front_end/third_party/puppeteer/README.chromium +1 -1
  377. package/front_end/third_party/puppeteer/package/README.md +12 -13
  378. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.js +5 -1
  379. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.js.map +1 -1
  380. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +5 -1
  381. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
  382. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +2 -2
  383. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +2 -2
  384. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +2 -2
  385. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
  386. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +13 -6
  387. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
  388. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +5 -1
  389. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
  390. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +1 -0
  391. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
  392. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +4 -1
  393. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -1
  394. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +1 -0
  395. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
  396. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +10 -0
  397. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
  398. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts +4 -2
  399. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -1
  400. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -1
  401. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
  402. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +12 -1
  403. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
  404. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js +5 -1
  405. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js.map +1 -1
  406. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts.map +1 -1
  407. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js +7 -6
  408. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js.map +1 -1
  409. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +8 -1
  410. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
  411. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +6 -2
  412. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
  413. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +6 -2
  414. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
  415. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
  416. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +2 -2
  417. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +2 -2
  418. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +2 -2
  419. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
  420. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +13 -6
  421. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
  422. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +1 -0
  423. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
  424. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +4 -1
  425. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -1
  426. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +1 -0
  427. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
  428. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +10 -0
  429. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
  430. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +4 -2
  431. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -1
  432. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js.map +1 -1
  433. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
  434. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +12 -1
  435. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
  436. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -1
  437. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +2 -5
  438. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js.map +1 -1
  439. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +3 -0
  440. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
  441. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +1 -1
  442. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
  443. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +1 -1
  444. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
  445. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
  446. package/front_end/third_party/puppeteer/package/lib/types.d.ts +10 -6
  447. package/front_end/third_party/puppeteer/package/package.json +17 -17
  448. package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +1 -1
  449. package/front_end/ui/components/data_grid/DataGrid.ts +8 -9
  450. package/front_end/ui/components/data_grid/DataGridController.ts +3 -1
  451. package/front_end/ui/components/docs/panel_introduction_steps/basic.html +25 -0
  452. package/front_end/ui/components/docs/panel_introduction_steps/basic.ts +25 -0
  453. package/front_end/ui/components/input/input.ts +2 -2
  454. package/front_end/ui/components/linkifier/LinkifierUtils.ts +3 -1
  455. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +4 -1
  456. package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +44 -0
  457. package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +56 -0
  458. package/front_end/ui/components/panel_introduction_steps/panel_introduction_steps.ts +5 -0
  459. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +3 -4
  460. package/front_end/ui/components/text_editor/TextEditor.ts +1 -1
  461. package/front_end/ui/components/text_editor/config.ts +1 -35
  462. package/front_end/ui/components/text_editor/javascript.ts +8 -8
  463. package/front_end/ui/components/tree_outline/TreeOutline.ts +10 -9
  464. package/front_end/ui/components/tree_outline/treeOutline.css +1 -1
  465. package/front_end/ui/legacy/ARIAUtils.ts +4 -2
  466. package/front_end/ui/legacy/ContextMenu.ts +14 -0
  467. package/front_end/ui/legacy/DockController.ts +2 -1
  468. package/front_end/ui/legacy/SettingsUI.ts +3 -3
  469. package/front_end/ui/legacy/SoftContextMenu.ts +43 -14
  470. package/front_end/ui/legacy/Toolbar.ts +16 -0
  471. package/front_end/ui/legacy/Treeoutline.ts +17 -7
  472. package/front_end/ui/legacy/UIUtils.ts +2 -2
  473. package/front_end/ui/legacy/View.ts +14 -8
  474. package/front_end/ui/legacy/ViewManager.ts +2 -1
  475. package/front_end/ui/legacy/ViewRegistration.ts +6 -0
  476. package/front_end/ui/legacy/Widget.ts +2 -1
  477. package/front_end/ui/legacy/XLink.ts +8 -3
  478. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +3 -1
  479. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +43 -11
  480. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +98 -48
  481. package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +4 -3
  482. package/front_end/ui/legacy/components/data_grid/dataGrid.css +24 -28
  483. package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +5 -11
  484. package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +8 -1
  485. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -7
  486. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +11 -10
  487. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +7 -1
  488. package/front_end/ui/legacy/components/utils/ImagePreview.ts +18 -9
  489. package/front_end/ui/legacy/components/utils/Linkifier.ts +13 -6
  490. package/front_end/ui/legacy/reportView.css +1 -0
  491. package/front_end/ui/legacy/splitWidget.css +1 -1
  492. package/front_end/ui/legacy/tabbedPane.css +2 -0
  493. package/front_end/ui/legacy/themeColors.css +1 -1
  494. package/front_end/ui/legacy/toolbar.css +17 -1
  495. package/front_end/ui/legacy/utils/focus-changed.ts +3 -1
  496. package/inspector_overlay/.eslintrc.js +9 -0
  497. package/package.json +17 -17
  498. package/scripts/eslint_rules/lib/check_component_naming.js +4 -0
  499. package/scripts/eslint_rules/lib/es_modules_import.js +6 -0
  500. package/scripts/eslint_rules/lib/inject_checkbox_styles.js +121 -0
  501. package/scripts/eslint_rules/tests/es_modules_import_test.js +12 -0
  502. package/scripts/eslint_rules/tests/inject_checkbox_styles_test.js +127 -0
  503. package/front_end/models/issues_manager/descriptions/arAttributionEventSourceTriggerDataTooLarge.md +0 -4
  504. package/front_end/models/issues_manager/descriptions/arAttributionTriggerDataTooLarge.md +0 -4
  505. package/front_end/models/issues_manager/descriptions/arInvalidAttributionData.md +0 -8
  506. package/front_end/models/issues_manager/descriptions/arInvalidEventSourceTriggerData.md +0 -9
  507. package/front_end/models/issues_manager/descriptions/arInvalidTriggerDedupKey.md +0 -5
  508. package/front_end/models/issues_manager/descriptions/arInvalidTriggerPriority.md +0 -5
  509. package/front_end/models/issues_manager/descriptions/arMissingAttributionData.md +0 -7
@@ -814,8 +814,8 @@ export class BackgroundServiceTreeElement extends ApplicationPanelTreeElement {
814
814
  }
815
815
  }
816
816
 
817
- get itemURL(): string {
818
- return `background-service://${this.serviceName}`;
817
+ get itemURL(): Platform.DevToolsPath.UrlString {
818
+ return `background-service://${this.serviceName}` as Platform.DevToolsPath.UrlString;
819
819
  }
820
820
 
821
821
  onselect(selectedByUser?: boolean): boolean {
@@ -848,8 +848,8 @@ export class DatabaseTreeElement extends ApplicationPanelTreeElement {
848
848
  this.setLeadingIcons([icon]);
849
849
  }
850
850
 
851
- get itemURL(): string {
852
- return 'database://' + encodeURI(this.database.name);
851
+ get itemURL(): Platform.DevToolsPath.UrlString {
852
+ return 'database://' + encodeURI(this.database.name) as Platform.DevToolsPath.UrlString;
853
853
  }
854
854
 
855
855
  onselect(selectedByUser?: boolean): boolean {
@@ -886,8 +886,9 @@ export class DatabaseTableTreeElement extends ApplicationPanelTreeElement {
886
886
  this.setLeadingIcons([icon]);
887
887
  }
888
888
 
889
- get itemURL(): string {
890
- return 'database://' + encodeURI(this.database.name) + '/' + encodeURI(this.tableName);
889
+ get itemURL(): Platform.DevToolsPath.UrlString {
890
+ return 'database://' + encodeURI(this.database.name) + '/' + encodeURI(this.tableName) as
891
+ Platform.DevToolsPath.UrlString;
891
892
  }
892
893
 
893
894
  onselect(selectedByUser?: boolean): boolean {
@@ -907,8 +908,8 @@ export class ServiceWorkersTreeElement extends ApplicationPanelTreeElement {
907
908
  this.setLeadingIcons([icon]);
908
909
  }
909
910
 
910
- get itemURL(): string {
911
- return 'service-workers://';
911
+ get itemURL(): Platform.DevToolsPath.UrlString {
912
+ return 'service-workers://' as Platform.DevToolsPath.UrlString;
912
913
  }
913
914
 
914
915
  onselect(selectedByUser?: boolean): boolean {
@@ -930,8 +931,8 @@ export class AppManifestTreeElement extends ApplicationPanelTreeElement {
930
931
  this.setLeadingIcons([icon]);
931
932
  }
932
933
 
933
- get itemURL(): string {
934
- return 'manifest://';
934
+ get itemURL(): Platform.DevToolsPath.UrlString {
935
+ return 'manifest://' as Platform.DevToolsPath.UrlString;
935
936
  }
936
937
 
937
938
  onselect(selectedByUser?: boolean): boolean {
@@ -953,8 +954,8 @@ export class ClearStorageTreeElement extends ApplicationPanelTreeElement {
953
954
  this.setLeadingIcons([icon]);
954
955
  }
955
956
 
956
- get itemURL(): string {
957
- return 'clear-storage://';
957
+ get itemURL(): Platform.DevToolsPath.UrlString {
958
+ return 'clear-storage://' as Platform.DevToolsPath.UrlString;
958
959
  }
959
960
 
960
961
  onselect(selectedByUser?: boolean): boolean {
@@ -1101,8 +1102,9 @@ export class IDBDatabaseTreeElement extends ApplicationPanelTreeElement {
1101
1102
  this.model.addEventListener(IndexedDBModelEvents.DatabaseNamesRefreshed, this.refreshIndexedDB, this);
1102
1103
  }
1103
1104
 
1104
- get itemURL(): string {
1105
- return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name;
1105
+ get itemURL(): Platform.DevToolsPath.UrlString {
1106
+ return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name as
1107
+ Platform.DevToolsPath.UrlString;
1106
1108
  }
1107
1109
 
1108
1110
  onattach(): void {
@@ -1215,8 +1217,9 @@ export class IDBObjectStoreTreeElement extends ApplicationPanelTreeElement {
1215
1217
  this.setLeadingIcons([icon]);
1216
1218
  }
1217
1219
 
1218
- get itemURL(): string {
1219
- return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name + '/' + this.objectStore.name;
1220
+ get itemURL(): Platform.DevToolsPath.UrlString {
1221
+ return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name + '/' + this.objectStore.name as
1222
+ Platform.DevToolsPath.UrlString;
1220
1223
  }
1221
1224
 
1222
1225
  onattach(): void {
@@ -1351,9 +1354,9 @@ export class IDBIndexTreeElement extends ApplicationPanelTreeElement {
1351
1354
  this.refreshObjectStore = refreshObjectStore;
1352
1355
  }
1353
1356
 
1354
- get itemURL(): string {
1357
+ get itemURL(): Platform.DevToolsPath.UrlString {
1355
1358
  return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name + '/' + this.objectStore.name +
1356
- '/' + this.index.name;
1359
+ '/' + this.index.name as Platform.DevToolsPath.UrlString;
1357
1360
  }
1358
1361
 
1359
1362
  markNeedsRefresh(): void {
@@ -1420,8 +1423,9 @@ export class DOMStorageTreeElement extends ApplicationPanelTreeElement {
1420
1423
  this.setLeadingIcons([icon]);
1421
1424
  }
1422
1425
 
1423
- get itemURL(): string {
1424
- return 'storage://' + this.domStorage.securityOrigin + '/' + (this.domStorage.isLocalStorage ? 'local' : 'session');
1426
+ get itemURL(): Platform.DevToolsPath.UrlString {
1427
+ return 'storage://' + this.domStorage.securityOrigin + '/' +
1428
+ (this.domStorage.isLocalStorage ? 'local' : 'session') as Platform.DevToolsPath.UrlString;
1425
1429
  }
1426
1430
 
1427
1431
  onselect(selectedByUser?: boolean): boolean {
@@ -1456,8 +1460,8 @@ export class CookieTreeElement extends ApplicationPanelTreeElement {
1456
1460
  this.setLeadingIcons([icon]);
1457
1461
  }
1458
1462
 
1459
- get itemURL(): string {
1460
- return 'cookies://' + this.cookieDomainInternal;
1463
+ get itemURL(): Platform.DevToolsPath.UrlString {
1464
+ return 'cookies://' + this.cookieDomainInternal as Platform.DevToolsPath.UrlString;
1461
1465
  }
1462
1466
 
1463
1467
  cookieDomain(): string {
@@ -1804,14 +1808,14 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
1804
1808
  }
1805
1809
  }
1806
1810
 
1807
- get itemURL(): string {
1811
+ get itemURL(): Platform.DevToolsPath.UrlString {
1808
1812
  // This is used to persist over reloads/navigation which frame was selected.
1809
1813
  // A frame's title can change on DevTools refresh, so we resort to using
1810
1814
  // the URL instead (even though it is not guaranteed to be unique).
1811
1815
  if (this.frame.isTopFrame()) {
1812
- return 'frame://';
1816
+ return 'frame://' as Platform.DevToolsPath.UrlString;
1813
1817
  }
1814
- return 'frame://' + encodeURI(this.frame.url);
1818
+ return 'frame://' + encodeURI(this.frame.url) as Platform.DevToolsPath.UrlString;
1815
1819
  }
1816
1820
 
1817
1821
  onselect(selectedByUser?: boolean): boolean {
@@ -1965,7 +1969,7 @@ export class FrameResourceTreeElement extends ApplicationPanelTreeElement {
1965
1969
  return resourceToFrameResourceTreeElement.get(resource);
1966
1970
  }
1967
1971
 
1968
- get itemURL(): string {
1972
+ get itemURL(): Platform.DevToolsPath.UrlString {
1969
1973
  return this.resource.url;
1970
1974
  }
1971
1975
 
@@ -2082,8 +2086,8 @@ class FrameWindowTreeElement extends ApplicationPanelTreeElement {
2082
2086
  return false;
2083
2087
  }
2084
2088
 
2085
- get itemURL(): string {
2086
- return this.targetInfo.url;
2089
+ get itemURL(): Platform.DevToolsPath.UrlString {
2090
+ return this.targetInfo.url as Platform.DevToolsPath.UrlString;
2087
2091
  }
2088
2092
  }
2089
2093
 
@@ -2111,7 +2115,7 @@ class WorkerTreeElement extends ApplicationPanelTreeElement {
2111
2115
  return false;
2112
2116
  }
2113
2117
 
2114
- get itemURL(): string {
2115
- return this.targetInfo.url;
2118
+ get itemURL(): Platform.DevToolsPath.UrlString {
2119
+ return this.targetInfo.url as Platform.DevToolsPath.UrlString;
2116
2120
  }
2117
2121
  }
@@ -3,6 +3,7 @@
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';
6
7
  import * as UI from '../../ui/legacy/legacy.js';
7
8
 
8
9
  import type {ResourcesPanel} from './ResourcesPanel.js';
@@ -16,7 +17,7 @@ export class ApplicationPanelTreeElement extends UI.TreeOutline.TreeElement {
16
17
  UI.ARIAUtils.setAccessibleName(this.listItemElement, title);
17
18
  }
18
19
 
19
- get itemURL(): string {
20
+ get itemURL(): Platform.DevToolsPath.UrlString {
20
21
  throw new Error('Unimplemented Method');
21
22
  }
22
23
 
@@ -25,7 +26,7 @@ export class ApplicationPanelTreeElement extends UI.TreeOutline.TreeElement {
25
26
  return false;
26
27
  }
27
28
 
28
- const path: string[] = [];
29
+ const path: Platform.DevToolsPath.UrlString[] = [];
29
30
  for (let el: UI.TreeOutline.TreeElement|null = this; el; el = el.parent) {
30
31
  const url = el instanceof ApplicationPanelTreeElement && el.itemURL;
31
32
  if (!url) {
@@ -56,8 +57,8 @@ export class ExpandableApplicationPanelTreeElement extends ApplicationPanelTreeE
56
57
  this.categoryLink = null;
57
58
  }
58
59
 
59
- get itemURL(): string {
60
- return 'category://' + this.categoryName;
60
+ get itemURL(): Platform.DevToolsPath.UrlString {
61
+ return 'category://' + this.categoryName as Platform.DevToolsPath.UrlString;
61
62
  }
62
63
 
63
64
  setLink(link: string): void {
@@ -457,7 +457,8 @@ export class BackgroundServiceView extends UI.Widget.VBox {
457
457
  * Saves all currently displayed events in a file (JSON format).
458
458
  */
459
459
  private async saveToFile(): Promise<void> {
460
- const fileName = `${this.serviceName}-${Platform.DateUtilities.toISO8601Compact(new Date())}.json`;
460
+ const fileName = `${this.serviceName}-${Platform.DateUtilities.toISO8601Compact(new Date())}.json` as
461
+ Platform.DevToolsPath.RawPathString;
461
462
  const stream = new Bindings.FileUtils.FileOutputStream();
462
463
 
463
464
  const accepted = await stream.open(fileName);
@@ -29,6 +29,7 @@
29
29
 
30
30
  import * as Common from '../../core/common/common.js';
31
31
  import * as i18n from '../../core/i18n/i18n.js';
32
+ import * as Platform from '../../core/platform/platform.js';
32
33
  import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
33
34
  import * as UI from '../../ui/legacy/legacy.js';
34
35
 
@@ -159,7 +160,7 @@ export class DatabaseQueryView extends Common.ObjectWrapper.eventMixin<EventType
159
160
 
160
161
  const selectedElement = index >= 0 ? this.queryResults[index] : null;
161
162
  const changed = this.lastSelectedElement !== selectedElement;
162
- const containerHasFocus = this.queryWrapper === this.element.ownerDocument.deepActiveElement();
163
+ const containerHasFocus = this.queryWrapper === Platform.DOMUtilities.deepActiveElement(this.element.ownerDocument);
163
164
 
164
165
  if (selectedElement && (changed || containerHasFocus) && this.element.hasFocus()) {
165
166
  if (!selectedElement.hasFocus()) {
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as Host from '../../core/host/host.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
+ import type * as Platform from '../../core/platform/platform.js';
7
8
  import * as SDK from '../../core/sdk/sdk.js';
8
9
  import * as UI from '../../ui/legacy/legacy.js';
9
10
 
@@ -35,8 +36,8 @@ export class InterestGroupTreeElement extends ApplicationPanelTreeElement {
35
36
  this.view = new InterestGroupStorageView(this);
36
37
  }
37
38
 
38
- get itemURL(): string {
39
- return 'interest-groups://';
39
+ get itemURL(): Platform.DevToolsPath.UrlString {
40
+ return 'interest-groups://' as Platform.DevToolsPath.UrlString;
40
41
  }
41
42
 
42
43
  async getInterestGroupDetails(owner: string, name: string): Promise<Protocol.Storage.InterestGroupDetails|null> {
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as Host from '../../core/host/host.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
+ import type * as Platform from '../../core/platform/platform.js';
7
8
  import * as UI from '../../ui/legacy/legacy.js';
8
9
 
9
10
  import {ApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
@@ -28,8 +29,8 @@ export class ReportingApiTreeElement extends ApplicationPanelTreeElement {
28
29
  this.setLeadingIcons([icon]);
29
30
  }
30
31
 
31
- get itemURL(): string {
32
- return 'reportingApi://';
32
+ get itemURL(): Platform.DevToolsPath.UrlString {
33
+ return 'reportingApi://' as Platform.DevToolsPath.UrlString;
33
34
  }
34
35
 
35
36
  onselect(selectedByUser?: boolean): boolean {
@@ -3,6 +3,7 @@
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';
6
7
  import * as SDK from '../../core/sdk/sdk.js';
7
8
  import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
8
9
  import * as UI from '../../ui/legacy/legacy.js';
@@ -20,7 +21,7 @@ import {StorageItemsView} from './StorageItemsView.js';
20
21
  let resourcesPanelInstance: ResourcesPanel;
21
22
 
22
23
  export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
23
- private readonly resourcesLastSelectedItemSetting: Common.Settings.Setting<string[]>;
24
+ private readonly resourcesLastSelectedItemSetting: Common.Settings.Setting<Platform.DevToolsPath.UrlString[]>;
24
25
  visibleView: UI.Widget.Widget|null;
25
26
  private pendingViewPromise: Promise<UI.Widget.Widget>|null;
26
27
  private categoryView: StorageCategoryView|null;
@@ -90,11 +91,11 @@ export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
90
91
  this.sidebar.focus();
91
92
  }
92
93
 
93
- lastSelectedItemPath(): string[] {
94
+ lastSelectedItemPath(): Platform.DevToolsPath.UrlString[] {
94
95
  return this.resourcesLastSelectedItemSetting.get();
95
96
  }
96
97
 
97
- setLastSelectedItemPath(path: string[]): void {
98
+ setLastSelectedItemPath(path: Platform.DevToolsPath.UrlString[]): void {
98
99
  this.resourcesLastSelectedItemSetting.set(path);
99
100
  }
100
101
 
@@ -480,7 +480,12 @@ export class DataGridNode extends DataGrid.DataGrid.DataGridNode<DataGridNode> {
480
480
  tooltip = i18nString(UIStrings.varyHeaderWarning);
481
481
  }
482
482
  }
483
- DataGrid.DataGrid.DataGridImpl.setElementText(cell, value || '', true);
483
+ const parentElement = cell.parentElement;
484
+ let gridNode;
485
+ if (parentElement && this.dataGrid) {
486
+ gridNode = this.dataGrid.elementToDataGridNode.get(parentElement);
487
+ }
488
+ DataGrid.DataGrid.DataGridImpl.setElementText(cell, value || '', /* longText= */ true, gridNode);
484
489
  UI.Tooltip.Tooltip.install(cell, tooltip);
485
490
  return cell;
486
491
  }
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
+ import type * as Platform from '../../core/platform/platform.js';
6
7
  import * as SDK from '../../core/sdk/sdk.js';
7
8
  import * as UI from '../../ui/legacy/legacy.js';
8
9
 
@@ -32,8 +33,8 @@ export class TrustTokensTreeElement extends ApplicationPanelTreeElement {
32
33
  this.setLeadingIcons([icon]);
33
34
  }
34
35
 
35
- get itemURL(): string {
36
- return 'trustTokens://';
36
+ get itemURL(): Platform.DevToolsPath.UrlString {
37
+ return 'trustTokens://' as Platform.DevToolsPath.UrlString;
37
38
  }
38
39
 
39
40
  onselect(selectedByUser?: boolean): boolean {
@@ -502,6 +502,14 @@ const UIStrings = {
502
502
  */
503
503
  embedderExtensionSentMessageToCachedFrame:
504
504
  'Extensions with long-lived connection attempted to send messages to frames in back/forward cache.',
505
+ /**
506
+ * @description Description text for not restored reason ErrorDocument.
507
+ */
508
+ errorDocument: 'Back/forward cache is disabled due to a document error.',
509
+ /**
510
+ * @description Description text for not restored reason ErrorDocument.
511
+ */
512
+ fencedFramesEmbedder: 'Pages using FencedFrames cannot be stored in bfcache.',
505
513
  };
506
514
 
507
515
  const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheStrings.ts', UIStrings);
@@ -544,7 +552,6 @@ export const NotRestoredReasonDescription = {
544
552
  'UserAgentOverrideDiffers': {name: i18nLazyString(UIStrings.userAgentOverrideDiffers)},
545
553
  'ForegroundCacheLimit': {name: i18nLazyString(UIStrings.foregroundCacheLimit)},
546
554
  'BackForwardCacheDisabledForDelegate': {name: i18nLazyString(UIStrings.backForwardCacheDisabledForDelegate)},
547
- 'OptInUnloadHeaderNotPresent': {name: i18nLazyString(UIStrings.unloadHandlerExistsInMainFrame)},
548
555
  'UnloadHandlerExistsInMainFrame': {name: i18nLazyString(UIStrings.unloadHandlerExistsInMainFrame)},
549
556
  'UnloadHandlerExistsInSubFrame': {name: i18nLazyString(UIStrings.unloadHandlerExistsInSubFrame)},
550
557
  'ServiceWorkerUnregistration': {name: i18nLazyString(UIStrings.serviceWorkerUnregistration)},
@@ -639,4 +646,6 @@ export const NotRestoredReasonDescription = {
639
646
  'EmbedderExtensionMessagingForOpenPort': {name: i18nLazyString(UIStrings.embedderExtensionMessagingForOpenPort)},
640
647
  'EmbedderExtensionSentMessageToCachedFrame':
641
648
  {name: i18nLazyString(UIStrings.embedderExtensionSentMessageToCachedFrame)},
649
+ 'ErrorDocument': {name: i18nLazyString(UIStrings.errorDocument)},
650
+ 'FencedFramesEmbedder': {name: i18nLazyString(UIStrings.fencedFramesEmbedder)},
642
651
  };
@@ -7,6 +7,7 @@ import * as i18n from '../../../core/i18n/i18n.js';
7
7
  import * as Buttons from '../../../ui/components/buttons/buttons.js';
8
8
  import * as SDK from '../../../core/sdk/sdk.js';
9
9
  import * as LitHtml from '../../../ui/lit-html/lit-html.js';
10
+ import * as Root from '../../../core/root/root.js';
10
11
  import * as ReportView from '../../../ui/components/report_view/report_view.js';
11
12
  import * as UI from '../../../ui/legacy/legacy.js';
12
13
  import * as Protocol from '../../../generated/protocol.js';
@@ -14,6 +15,7 @@ import * as IconButton from '../../../ui/components/icon_button/icon_button.js';
14
15
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
15
16
  import * as Coordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
16
17
  import * as ChromeLink from '../../../ui/components/chrome_link/chrome_link.js';
18
+ import * as ExpandableList from '../../../ui/components/expandable_list/expandable_list.js';
17
19
 
18
20
  import {NotRestoredReasonDescription} from './BackForwardCacheStrings.js';
19
21
  import backForwardCacheViewStyles from './backForwardCacheView.css.js';
@@ -102,7 +104,32 @@ const UIStrings = {
102
104
  * @description Text that precedes displaying a link to the extension which blocked the page from being eligible for back/forward cache.
103
105
  */
104
106
  blockingExtensionId: 'Extension id: ',
107
+ /**
108
+ * @description Label for the 'Frames' section of the back/forward cache view, which shows a frame tree of the
109
+ * page with reasons why the frames can't be cached.
110
+ */
111
+ framesTitle: 'Frames',
112
+ /**
113
+ * @description Top level summary of the total number of issues found in a single frame.
114
+ */
115
+ issuesInSingleFrame: '{n, plural, =1 {# issue found in 1 frame.} other {# issues found in 1 frame.}}',
116
+ /**
117
+ * @description Top level summary of the total number of issues found and the number of frames they were found in.
118
+ * 'm' is never less than 2.
119
+ * @example {3} m
120
+ */
121
+ issuesInMultipleFrames: '{n, plural, =1 {# issue found in {m} frames.} other {# issues found in {m} frames.}}',
122
+ /**
123
+ * @description Shows the number of frames with a particular issue.
124
+ */
125
+ framesPerIssue: '{n, plural, =1 {# frame} other {# frames}}',
126
+ /**
127
+ *@description Title for a frame in the frame tree that doesn't have a URL. Placeholder indicates which number frame with a blank URL it is.
128
+ *@example {3} PH1
129
+ */
130
+ blankURLTitle: 'Blank URL [{PH1}]',
105
131
  };
132
+
106
133
  const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheView.ts', UIStrings);
107
134
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
108
135
 
@@ -226,7 +253,7 @@ export class BackForwardCacheView extends HTMLElement {
226
253
  // as the browser navigates to another unrelated page and goes back to the current page.
227
254
  // We chose "chrome://terms" because it must be cross-site.
228
255
  // Ideally, We want to have our own testing page like "chrome: //bfcache-test".
229
- void resourceTreeModel.navigate('chrome://terms');
256
+ void resourceTreeModel.navigate('chrome://terms' as Platform.DevToolsPath.UrlString);
230
257
  }
231
258
  }
232
259
 
@@ -249,14 +276,15 @@ export class BackForwardCacheView extends HTMLElement {
249
276
  // clang-format off
250
277
  return LitHtml.html`
251
278
  ${this.#renderBackForwardCacheStatus(this.#frame.backForwardCacheDetails.restoredFromCache)}
252
- <div class='url'>
253
- <div class='url-key'>
279
+ <div class='report-line'>
280
+ <div class='report-key'>
254
281
  ${i18nString(UIStrings.url)}
255
282
  </div>
256
- <div class='url-value'>
283
+ <div class='report-value'>
257
284
  ${this.#frame.url}
258
285
  </div>
259
286
  </div>
287
+ ${this.#maybeRenderFrameTree(this.#frame.backForwardCacheDetails.explanationsTree)}
260
288
  <${ReportView.ReportView.ReportSection.litTagName}>
261
289
  <${Buttons.Button.Button.litTagName}
262
290
  .disabled=${isTestRunning || isTestingForbidden}
@@ -271,7 +299,8 @@ export class BackForwardCacheView extends HTMLElement {
271
299
  </${ReportView.ReportView.ReportSection.litTagName}>
272
300
  <${ReportView.ReportView.ReportSectionDivider.litTagName}>
273
301
  </${ReportView.ReportView.ReportSectionDivider.litTagName}>
274
- ${this.#maybeRenderExplanations(this.#frame.backForwardCacheDetails.explanations)}
302
+ ${this.#maybeRenderExplanations(this.#frame.backForwardCacheDetails.explanations,
303
+ this.#frame.backForwardCacheDetails.explanationsTree)}
275
304
  <${ReportView.ReportView.ReportSection.litTagName}>
276
305
  <x-link href="https://web.dev/bfcache/" class="link">
277
306
  ${i18nString(UIStrings.learnMore)}
@@ -281,6 +310,81 @@ export class BackForwardCacheView extends HTMLElement {
281
310
  // clang-format on
282
311
  }
283
312
 
313
+ #maybeRenderFrameTree(explanationTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree|
314
+ undefined): LitHtml.TemplateResult|{} {
315
+ if (!explanationTree || (explanationTree.explanations.length === 0 && explanationTree.children.length === 0) ||
316
+ !Root.Runtime.experiments.isEnabled('bfcacheDisplayTree')) {
317
+ return LitHtml.nothing;
318
+ }
319
+ const treeOutline = new UI.TreeOutline.TreeOutlineInShadow();
320
+ treeOutline.registerCSSFiles([backForwardCacheViewStyles]);
321
+ const urlTreeElement = new UI.TreeOutline.TreeElement();
322
+ treeOutline.appendChild(urlTreeElement);
323
+ const {frameCount, issueCount} = this.#maybeAddFrameSubTree(urlTreeElement, {blankCount: 1}, explanationTree);
324
+ // The translation pipeline does not support nested plurals. We avoid this
325
+ // here by pulling out the logic for one of the plurals into code instead.
326
+ if (frameCount === 1) {
327
+ urlTreeElement.title = i18nString(UIStrings.issuesInSingleFrame, {n: issueCount});
328
+ } else {
329
+ urlTreeElement.title = i18nString(UIStrings.issuesInMultipleFrames, {n: issueCount, m: frameCount});
330
+ }
331
+ // The first element is always the root, so expand it by default (and override its icon).
332
+ const topFrameElement = urlTreeElement.childAt(0);
333
+ if (topFrameElement) {
334
+ topFrameElement.expand();
335
+ topFrameElement.setLeadingIcons([UI.Icon.Icon.create('mediumicon-frame')]);
336
+ }
337
+ return LitHtml.html`
338
+ <div class='report-line'>
339
+ <div class='report-key'>
340
+ ${i18nString(UIStrings.framesTitle)}
341
+ </div>
342
+ <div class='report-value'>
343
+ ${treeOutline.element}
344
+ </div>
345
+ </div>`;
346
+ }
347
+
348
+ // Potentially adds a subtree of the frame tree, if there are any issues. Returns a tuple of how many frames were added,
349
+ // and how many issues there were in total over all those frames.
350
+ #maybeAddFrameSubTree(
351
+ root: UI.TreeOutline.TreeElement, nextBlankURLCount: {blankCount: number},
352
+ explanationTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree|
353
+ undefined): {frameCount: number, issueCount: number} {
354
+ if (!explanationTree || (explanationTree.explanations.length === 0 && explanationTree.children.length === 0)) {
355
+ return {frameCount: 0, issueCount: 0};
356
+ }
357
+ const icon = UI.Icon.Icon.create('mediumicon-frame-embedded');
358
+ let issuecount = explanationTree.explanations.length;
359
+ let framecount = 0;
360
+ let treeElementURL: string;
361
+ if (explanationTree.url.length > 0) {
362
+ treeElementURL = explanationTree.url;
363
+ } else {
364
+ treeElementURL = i18nString(UIStrings.blankURLTitle, {PH1: String(nextBlankURLCount.blankCount)});
365
+ nextBlankURLCount.blankCount += 1;
366
+ }
367
+ const urlTreeElement = new UI.TreeOutline.TreeElement();
368
+ root.appendChild(urlTreeElement);
369
+ urlTreeElement.setLeadingIcons([icon]);
370
+ explanationTree.explanations.forEach(explanation => {
371
+ urlTreeElement.appendChild(new UI.TreeOutline.TreeElement(explanation.reason));
372
+ });
373
+ explanationTree.children.forEach(child => {
374
+ const counts = this.#maybeAddFrameSubTree(urlTreeElement, nextBlankURLCount, child);
375
+ framecount += counts.frameCount;
376
+ issuecount += counts.issueCount;
377
+ });
378
+ if (issuecount > 0) {
379
+ urlTreeElement.title = '(' + String(issuecount) + ') ' + treeElementURL;
380
+ framecount += 1;
381
+ } else if (framecount === 0) {
382
+ root.removeChild(urlTreeElement);
383
+ }
384
+
385
+ return {frameCount: framecount, issueCount: issuecount};
386
+ }
387
+
284
388
  #renderBackForwardCacheStatus(status: boolean|undefined): LitHtml.TemplateResult {
285
389
  switch (status) {
286
390
  case true:
@@ -327,8 +431,32 @@ export class BackForwardCacheView extends HTMLElement {
327
431
  // clang-format on
328
432
  }
329
433
 
330
- #maybeRenderExplanations(explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[]): LitHtml.TemplateResult
331
- |{} {
434
+ #buildReasonToFramesMap(
435
+ explanationTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree,
436
+ nextBlankURLCount: {blankCount: number},
437
+ outputMap: Map<Protocol.Page.BackForwardCacheNotRestoredReason, string[]>): void {
438
+ let url = explanationTree.url;
439
+ if (url.length === 0) {
440
+ url = i18nString(UIStrings.blankURLTitle, {PH1: String(nextBlankURLCount.blankCount)});
441
+ nextBlankURLCount.blankCount += 1;
442
+ }
443
+ explanationTree.explanations.forEach(explanation => {
444
+ let frames: string[]|undefined = outputMap.get(explanation.reason);
445
+ if (frames === undefined) {
446
+ frames = [url];
447
+ outputMap.set(explanation.reason, frames);
448
+ } else {
449
+ frames.push(url);
450
+ }
451
+ });
452
+ explanationTree.children.map(child => {
453
+ this.#buildReasonToFramesMap(child, nextBlankURLCount, outputMap);
454
+ });
455
+ }
456
+
457
+ #maybeRenderExplanations(
458
+ explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[],
459
+ explanationTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree|undefined): LitHtml.TemplateResult|{} {
332
460
  if (explanations.length === 0) {
333
461
  return LitHtml.nothing;
334
462
  }
@@ -340,19 +468,24 @@ export class BackForwardCacheView extends HTMLElement {
340
468
  const circumstantial = explanations.filter(
341
469
  explanation => explanation.type === Protocol.Page.BackForwardCacheNotRestoredReasonType.Circumstantial);
342
470
 
471
+ const reasonToFramesMap: Map<Protocol.Page.BackForwardCacheNotRestoredReason, string[]> = new Map();
472
+ if (explanationTree) {
473
+ this.#buildReasonToFramesMap(explanationTree, {blankCount: 1}, reasonToFramesMap);
474
+ }
343
475
  // Disabled until https://crbug.com/1079231 is fixed.
344
476
  // clang-format off
345
477
  return LitHtml.html`
346
- ${this.#renderExplanations(i18nString(UIStrings.pageSupportNeeded), i18nString(UIStrings.pageSupportNeededExplanation), pageSupportNeeded)}
347
- ${this.#renderExplanations(i18nString(UIStrings.supportPending), i18nString(UIStrings.supportPendingExplanation), supportPending)}
348
- ${this.#renderExplanations(i18nString(UIStrings.circumstantial), i18nString(UIStrings.circumstantialExplanation), circumstantial)}
478
+ ${this.#renderExplanations(i18nString(UIStrings.pageSupportNeeded), i18nString(UIStrings.pageSupportNeededExplanation), pageSupportNeeded, reasonToFramesMap)}
479
+ ${this.#renderExplanations(i18nString(UIStrings.supportPending), i18nString(UIStrings.supportPendingExplanation), supportPending, reasonToFramesMap)}
480
+ ${this.#renderExplanations(i18nString(UIStrings.circumstantial), i18nString(UIStrings.circumstantialExplanation), circumstantial, reasonToFramesMap)}
349
481
  `;
350
482
  // clang-format on
351
483
  }
352
484
 
353
485
  #renderExplanations(
354
486
  category: Platform.UIString.LocalizedString, explainerText: Platform.UIString.LocalizedString,
355
- explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[]): LitHtml.TemplateResult {
487
+ explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[],
488
+ reasonToFramesMap: Map<Protocol.Page.BackForwardCacheNotRestoredReason, string[]>): LitHtml.TemplateResult {
356
489
  // Disabled until https://crbug.com/1079231 is fixed.
357
490
  // clang-format off
358
491
  return LitHtml.html`
@@ -369,7 +502,7 @@ export class BackForwardCacheView extends HTMLElement {
369
502
  </${IconButton.Icon.Icon.litTagName}>
370
503
  </div>
371
504
  </${ReportView.ReportView.ReportSectionHeader.litTagName}>
372
- ${explanations.map(explanation => this.#renderReason(explanation))}
505
+ ${explanations.map(explanation => this.#renderReason(explanation, reasonToFramesMap.get(explanation.reason)))}
373
506
  ` : LitHtml.nothing}
374
507
  `;
375
508
  // clang-format on
@@ -389,7 +522,23 @@ export class BackForwardCacheView extends HTMLElement {
389
522
  return LitHtml.nothing;
390
523
  }
391
524
 
392
- #renderReason(explanation: Protocol.Page.BackForwardCacheNotRestoredExplanation): LitHtml.TemplateResult {
525
+ #renderFramesPerReason(frames: string[]|undefined): LitHtml.TemplateResult|{} {
526
+ if (frames === undefined || frames.length === 0 || !Root.Runtime.experiments.isEnabled('bfcacheDisplayTree')) {
527
+ return LitHtml.nothing;
528
+ }
529
+ const rows = [LitHtml.html`<div>${i18nString(UIStrings.framesPerIssue, {n: frames.length})}</div>`];
530
+ rows.push(...frames.map(url => LitHtml.html`<div class='text-ellipsis' title=${url}>${url}</div>`));
531
+ return LitHtml.html`
532
+ <div class='explanation-frames'>
533
+ <${ExpandableList.ExpandableList.ExpandableList.litTagName} .data=${
534
+ {rows} as
535
+ ExpandableList.ExpandableList.ExpandableListData}></${ExpandableList.ExpandableList.ExpandableList.litTagName}>
536
+ </div>
537
+ `;
538
+ }
539
+
540
+ #renderReason(explanation: Protocol.Page.BackForwardCacheNotRestoredExplanation, frames: string[]|undefined):
541
+ LitHtml.TemplateResult {
393
542
  // clang-format off
394
543
  return LitHtml.html`
395
544
  <${ReportView.ReportView.ReportSection.litTagName}>
@@ -413,6 +562,7 @@ export class BackForwardCacheView extends HTMLElement {
413
562
  <div class='gray-text'>
414
563
  ${explanation.reason}
415
564
  </div>
565
+ ${this.#renderFramesPerReason(frames)}
416
566
  `;
417
567
  // clang-format on
418
568
  }