chrome-devtools-frontend 1.0.1030457 → 1.0.1031822

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 (339) hide show
  1. package/config/gni/devtools_grd_files.gni +4 -0
  2. package/front_end/Tests.js +0 -28
  3. package/front_end/core/host/UserMetrics.ts +2 -1
  4. package/front_end/core/i18n/locales/af.json +301 -31
  5. package/front_end/core/i18n/locales/am.json +307 -37
  6. package/front_end/core/i18n/locales/ar.json +299 -29
  7. package/front_end/core/i18n/locales/as.json +294 -24
  8. package/front_end/core/i18n/locales/az.json +302 -32
  9. package/front_end/core/i18n/locales/be.json +303 -33
  10. package/front_end/core/i18n/locales/bg.json +296 -26
  11. package/front_end/core/i18n/locales/bn.json +294 -24
  12. package/front_end/core/i18n/locales/bs.json +298 -28
  13. package/front_end/core/i18n/locales/ca.json +302 -32
  14. package/front_end/core/i18n/locales/cs.json +295 -25
  15. package/front_end/core/i18n/locales/cy.json +294 -24
  16. package/front_end/core/i18n/locales/da.json +299 -29
  17. package/front_end/core/i18n/locales/de.json +301 -31
  18. package/front_end/core/i18n/locales/el.json +301 -31
  19. package/front_end/core/i18n/locales/en-GB.json +294 -24
  20. package/front_end/core/i18n/locales/en-US.json +13 -10
  21. package/front_end/core/i18n/locales/en-XL.json +13 -10
  22. package/front_end/core/i18n/locales/es-419.json +298 -28
  23. package/front_end/core/i18n/locales/es.json +306 -36
  24. package/front_end/core/i18n/locales/et.json +299 -29
  25. package/front_end/core/i18n/locales/eu.json +301 -31
  26. package/front_end/core/i18n/locales/fa.json +301 -31
  27. package/front_end/core/i18n/locales/fi.json +295 -25
  28. package/front_end/core/i18n/locales/fil.json +295 -25
  29. package/front_end/core/i18n/locales/fr-CA.json +296 -26
  30. package/front_end/core/i18n/locales/fr.json +296 -26
  31. package/front_end/core/i18n/locales/gl.json +296 -26
  32. package/front_end/core/i18n/locales/gu.json +295 -25
  33. package/front_end/core/i18n/locales/he.json +300 -30
  34. package/front_end/core/i18n/locales/hi.json +306 -36
  35. package/front_end/core/i18n/locales/hr.json +298 -28
  36. package/front_end/core/i18n/locales/hu.json +301 -31
  37. package/front_end/core/i18n/locales/hy.json +296 -26
  38. package/front_end/core/i18n/locales/id.json +295 -25
  39. package/front_end/core/i18n/locales/is.json +294 -24
  40. package/front_end/core/i18n/locales/it.json +298 -28
  41. package/front_end/core/i18n/locales/ja.json +300 -30
  42. package/front_end/core/i18n/locales/ka.json +294 -24
  43. package/front_end/core/i18n/locales/kk.json +305 -35
  44. package/front_end/core/i18n/locales/km.json +300 -30
  45. package/front_end/core/i18n/locales/kn.json +302 -32
  46. package/front_end/core/i18n/locales/ko.json +297 -27
  47. package/front_end/core/i18n/locales/ky.json +297 -27
  48. package/front_end/core/i18n/locales/lo.json +297 -27
  49. package/front_end/core/i18n/locales/lt.json +295 -25
  50. package/front_end/core/i18n/locales/lv.json +301 -31
  51. package/front_end/core/i18n/locales/mk.json +294 -24
  52. package/front_end/core/i18n/locales/ml.json +297 -27
  53. package/front_end/core/i18n/locales/mn.json +296 -26
  54. package/front_end/core/i18n/locales/mr.json +298 -28
  55. package/front_end/core/i18n/locales/ms.json +296 -26
  56. package/front_end/core/i18n/locales/my.json +301 -31
  57. package/front_end/core/i18n/locales/ne.json +302 -32
  58. package/front_end/core/i18n/locales/nl.json +304 -34
  59. package/front_end/core/i18n/locales/no.json +294 -24
  60. package/front_end/core/i18n/locales/or.json +303 -33
  61. package/front_end/core/i18n/locales/pa.json +301 -31
  62. package/front_end/core/i18n/locales/pl.json +298 -28
  63. package/front_end/core/i18n/locales/pt-PT.json +299 -29
  64. package/front_end/core/i18n/locales/pt.json +298 -28
  65. package/front_end/core/i18n/locales/ro.json +297 -27
  66. package/front_end/core/i18n/locales/ru.json +296 -26
  67. package/front_end/core/i18n/locales/si.json +299 -29
  68. package/front_end/core/i18n/locales/sk.json +301 -31
  69. package/front_end/core/i18n/locales/sl.json +301 -31
  70. package/front_end/core/i18n/locales/sq.json +304 -34
  71. package/front_end/core/i18n/locales/sr-Latn.json +296 -26
  72. package/front_end/core/i18n/locales/sr.json +296 -26
  73. package/front_end/core/i18n/locales/sv.json +295 -25
  74. package/front_end/core/i18n/locales/sw.json +298 -28
  75. package/front_end/core/i18n/locales/ta.json +301 -31
  76. package/front_end/core/i18n/locales/te.json +333 -63
  77. package/front_end/core/i18n/locales/th.json +294 -24
  78. package/front_end/core/i18n/locales/tr.json +294 -24
  79. package/front_end/core/i18n/locales/uk.json +296 -26
  80. package/front_end/core/i18n/locales/ur.json +295 -25
  81. package/front_end/core/i18n/locales/uz.json +298 -28
  82. package/front_end/core/i18n/locales/vi.json +303 -33
  83. package/front_end/core/i18n/locales/zh-HK.json +294 -24
  84. package/front_end/core/i18n/locales/zh-TW.json +300 -30
  85. package/front_end/core/i18n/locales/zh.json +299 -29
  86. package/front_end/core/i18n/locales/zu.json +302 -32
  87. package/front_end/core/platform/string-utilities.ts +2 -5
  88. package/front_end/core/root/Runtime.ts +1 -0
  89. package/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -4
  90. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -4
  91. package/front_end/core/sdk/NetworkRequest.ts +0 -4
  92. package/front_end/core/sdk/Resource.ts +0 -5
  93. package/front_end/core/sdk/Script.ts +71 -76
  94. package/front_end/core/sdk/Target.ts +4 -0
  95. package/front_end/entrypoints/inspector_main/InspectorMain.ts +4 -1
  96. package/front_end/entrypoints/main/MainImpl.ts +4 -0
  97. package/front_end/generated/InspectorBackendCommands.js +10 -8
  98. package/front_end/generated/protocol-mapping.d.ts +16 -2
  99. package/front_end/generated/protocol-proxy-api.d.ts +11 -1
  100. package/front_end/generated/protocol.ts +75 -1
  101. package/front_end/models/bindings/CompilerScriptMapping.ts +6 -3
  102. package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
  103. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -4
  104. package/front_end/models/bindings/IgnoreListManager.ts +10 -8
  105. package/front_end/models/bindings/ResourceMapping.ts +0 -4
  106. package/front_end/models/bindings/StylesSourceMapping.ts +0 -5
  107. package/front_end/models/extensions/ExtensionServer.ts +2 -3
  108. package/front_end/models/issues_manager/AttributionReportingIssue.ts +8 -0
  109. package/front_end/models/issues_manager/DeprecationIssue.ts +9 -0
  110. package/front_end/models/issues_manager/descriptions/arTooManyConcurrentRequests.md +5 -0
  111. package/front_end/models/javascript_metadata/NativeFunctions.js +6 -2
  112. package/front_end/models/persistence/NetworkPersistenceManager.ts +4 -6
  113. package/front_end/models/persistence/PersistenceActions.ts +5 -4
  114. package/front_end/models/text_utils/CodeMirrorUtils.ts +17 -4
  115. package/front_end/models/text_utils/ContentProvider.ts +0 -1
  116. package/front_end/models/text_utils/StaticContentProvider.ts +0 -4
  117. package/front_end/models/workspace/UISourceCode.ts +10 -5
  118. package/front_end/panels/application/components/StackTrace.ts +2 -2
  119. package/front_end/panels/elements/AccessibilityTreeView.ts +8 -2
  120. package/front_end/panels/elements/CSSRuleValidator.ts +107 -123
  121. package/front_end/panels/elements/ElementsTreeOutline.ts +23 -7
  122. package/front_end/panels/elements/TopLayerContainer.ts +17 -28
  123. package/front_end/panels/elements/accessibilityTreeView.css +10 -0
  124. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +4 -5
  125. package/front_end/panels/elements/components/CSSHintDetailsView.ts +23 -20
  126. package/front_end/panels/elements/components/accessibilityTreeNode.css +9 -0
  127. package/front_end/panels/elements/components/cssHintDetailsView.css +8 -2
  128. package/front_end/panels/elements/stylesSectionTree.css +1 -1
  129. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +12 -0
  130. package/front_end/panels/network/components/RequestHeadersView.css +1 -0
  131. package/front_end/panels/network/components/RequestHeadersView.ts +7 -0
  132. package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +7 -0
  133. package/front_end/panels/sources/NavigatorView.ts +22 -0
  134. package/front_end/panels/sources/ScopeChainSidebarPane.ts +3 -3
  135. package/front_end/services/puppeteer/PuppeteerConnection.ts +7 -1
  136. package/front_end/third_party/codemirror.next/bundle.ts +1 -1
  137. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  138. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
  139. package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
  140. package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
  141. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
  142. package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
  143. package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
  144. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
  145. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
  146. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1247 -116
  147. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +15 -2
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +95 -76
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +7 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.d.ts +37 -0
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.d.ts.map +1 -0
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js +297 -0
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ChromeTargetManager.js.map +1 -0
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +4 -0
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +10 -2
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +2 -2
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.d.ts +4 -0
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.js +16 -2
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js +36 -36
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js.map +1 -1
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts +45 -0
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -0
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.js +196 -0
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FirefoxTargetManager.js.map +1 -0
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +8 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +105 -72
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +4 -0
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +6 -0
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +5 -5
  187. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
  188. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +4 -0
  189. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
  190. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +29 -8
  191. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
  194. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +43 -68
  195. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
  196. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +0 -2
  197. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js.map +1 -1
  199. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +10 -1
  200. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts.map +1 -1
  201. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js +21 -5
  202. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js.map +1 -1
  203. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TargetManager.d.ts +55 -0
  204. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TargetManager.d.ts.map +1 -0
  205. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TargetManager.js +18 -0
  206. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TargetManager.js.map +1 -0
  207. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts +21 -0
  208. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +47 -2
  210. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
  212. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +3 -2
  215. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js +1 -1
  218. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
  220. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js +2 -1
  221. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
  222. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +0 -3
  224. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.d.ts +1 -0
  226. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.d.ts.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.js.map +1 -1
  228. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
  230. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts +3 -0
  231. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts.map +1 -1
  232. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js +3 -0
  233. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js.map +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +15 -2
  235. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
  236. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +95 -76
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +7 -1
  240. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
  241. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.d.ts +37 -0
  242. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.d.ts.map +1 -0
  243. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js +293 -0
  244. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ChromeTargetManager.js.map +1 -0
  245. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +4 -0
  246. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
  247. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +10 -2
  248. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js.map +1 -1
  249. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
  250. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +3 -3
  251. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
  252. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts +4 -0
  253. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts.map +1 -1
  254. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js +14 -1
  255. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js.map +1 -1
  256. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts.map +1 -1
  257. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js +36 -36
  258. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js.map +1 -1
  259. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts +45 -0
  260. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.d.ts.map +1 -0
  261. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.js +192 -0
  262. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FirefoxTargetManager.js.map +1 -0
  263. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +8 -1
  264. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
  265. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +106 -73
  266. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
  267. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +4 -0
  268. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
  269. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +6 -0
  270. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
  271. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
  272. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +5 -5
  273. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -1
  274. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +4 -0
  275. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
  276. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +30 -9
  277. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
  278. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +1 -1
  279. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
  280. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +45 -47
  281. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
  282. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +0 -2
  283. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -1
  284. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js.map +1 -1
  285. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +10 -1
  286. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -1
  287. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +21 -5
  288. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js.map +1 -1
  289. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TargetManager.d.ts +55 -0
  290. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TargetManager.d.ts.map +1 -0
  291. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TargetManager.js +17 -0
  292. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TargetManager.js.map +1 -0
  293. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts +21 -0
  294. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts.map +1 -1
  295. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +44 -1
  296. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
  297. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
  298. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
  299. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  300. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +3 -2
  301. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  302. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
  303. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js +1 -1
  304. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map +1 -1
  305. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
  306. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +1 -0
  307. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
  308. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -1
  309. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +0 -3
  310. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js.map +1 -1
  311. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.d.ts +1 -0
  312. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.d.ts.map +1 -1
  313. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.js.map +1 -1
  314. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
  315. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
  316. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts +3 -0
  317. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts.map +1 -1
  318. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js +3 -0
  319. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js.map +1 -1
  320. package/front_end/third_party/puppeteer/package/lib/types.d.ts +37 -2
  321. package/front_end/third_party/puppeteer/package/package.json +7 -6
  322. package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +64 -0
  323. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +2 -3
  324. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +97 -17
  325. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +1 -1
  326. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewerUtils.ts +4 -0
  327. package/front_end/ui/legacy/Icon.ts +1 -1
  328. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +9 -7
  329. package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -11
  330. package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -1
  331. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +49 -0
  332. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +18 -17
  333. package/package.json +1 -1
  334. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/tsconfig.cjs.tsbuildinfo +0 -1
  335. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/tsconfig.tsbuildinfo +0 -1
  336. package/front_end/third_party/puppeteer/package/lib/cjs/vendor/tsconfig.cjs.tsbuildinfo +0 -1
  337. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/tsconfig.esm.tsbuildinfo +0 -1
  338. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/tsconfig.tsbuildinfo +0 -1
  339. package/front_end/third_party/puppeteer/package/lib/esm/vendor/tsconfig.esm.tsbuildinfo +0 -1
@@ -14,53 +14,53 @@ import {
14
14
 
15
15
  const UIStrings = {
16
16
  /**
17
- *@description Hint prefix for deprecated properties.
17
+ *@description The type of the CSS rule validation message that is shown in the Style panel. "Deprecated property" means that the property in the declaration is deprecated and should not be used.
18
18
  */
19
- deprecatedPropertyHintPrefix: 'Deprecated Property',
19
+ deprecatedPropertyHintPrefix: 'Deprecated property',
20
20
  /**
21
- *@description Hint prefix for rule validation.
21
+ *@description The type of the CSS rule validation message that is shown in the Style panel. "Inactive property" means that a property declaration was valid syntactially but didn't have expected effect.
22
22
  */
23
- ruleValidationHintPrefix: 'Inactive rule',
23
+ inactivePropertyHintPrefix: 'Inactive property',
24
24
  /**
25
- *@description Hint for rules that was violated because of same elements rule.
26
- *@example {flex-wrap: nowrap} REASON_RULE_CODE
27
- *@example {align-content} AFFECTED_RULE_CODE
25
+ *@description The message that is shown in the Style panel when the user hovers over a property that has not effect due to some other property.
26
+ *@example {flex-wrap: nowrap} REASON_PROPERTY_DECLARATION_CODE
27
+ *@example {align-content} AFFECTED_PROPERTY_DECLARATION_CODE
28
28
  */
29
29
  ruleViolatedBySameElementRuleReason:
30
- 'This element has {REASON_RULE_CODE} rule, therefore {AFFECTED_RULE_CODE} has no effect.',
30
+ 'This element has the {REASON_PROPERTY_DECLARATION_CODE} property and therefore, {AFFECTED_PROPERTY_DECLARATION_CODE} has no effect.',
31
31
  /**
32
- *@description Possible fix for rules that was violated because of same elements rule.
33
- *@example {flex-wrap: nowrap} REASON_RULE_CODE
32
+ *@description The message that is shown in the Style panel when the user hovers over a property declaration that has not effect due to some other property.
33
+ *@example {flex-wrap: nowrap} REASON_PROPERTY_DECLARATION_CODE
34
34
  */
35
35
  ruleViolatedBySameElementRuleFix:
36
- 'For this property to work, please remove or change the value of {REASON_RULE_CODE}',
36
+ 'For this property to work, please remove or change the value of {REASON_PROPERTY_DECLARATION_CODE}.',
37
37
  /**
38
- *@description Possible fix for rules that was violated because of same elements rule.
39
- *@example {display: block} EXISTING_RULE
40
- *@example {display: flex} TARGET_RULE
38
+ *@description The message that is shown in the Style panel when the user hovers over a property declaration that has not effect due to the current property value.
39
+ *@example {display: block} EXISTING_PROPERTY_DECLARATION
40
+ *@example {display: flex} TARGET_PROPERTY_DECLARATION
41
41
  */
42
42
  ruleViolatedBySameElementRuleChangeSuggestion:
43
- 'For this property to work, please change the {EXISTING_RULE} rule to {TARGET_RULE}',
43
+ 'For this property to work, please change the {EXISTING_PROPERTY_DECLARATION} rule to {TARGET_PROPERTY_DECLARATION}.',
44
44
  /**
45
- *@description Hint for rules that was violated because of parent element rule.
46
- *@example {display: block} REASON_RULE_CODE
47
- *@example {flex} AFFECTED_RULE_CODE
45
+ *@description The message that is shown in the Style panel when the user hovers over a property declaration that has not effect due to properties of the parent element.
46
+ *@example {display: block} REASON_PROPERTY_DECLARATION_CODE
47
+ *@example {flex} AFFECTED_PROPERTY_DECLARATION_CODE
48
48
  */
49
49
  ruleViolatedByParentElementRuleReason:
50
- 'Parent element has {REASON_RULE_CODE} rule, therefore this elements {AFFECTED_RULE_CODE} has no effect',
50
+ 'The parent element has the {REASON_PROPERTY_DECLARATION_CODE} property and therefore, this element\'s property {AFFECTED_PROPERTY_DECLARATION_CODE} has no effect.',
51
51
  /**
52
- *@description Posible fix for rules that was violated because of parent element rule.
52
+ *@description The message that is shown in the Style panel when the user hovers over a property declaration that has not effect due to the properties of the parent element.
53
53
  *@example {display: block} EXISTING_PARENT_ELEMENT_RULE
54
54
  *@example {display: flex} TARGET_PARENT_ELEMENT_RULE
55
55
  */
56
56
  ruleViolatedByParentElementRuleFix:
57
- 'Please change parent elements {EXISTING_PARENT_ELEMENT_RULE} to {TARGET_PARENT_ELEMENT_RULE} to fix this issue.',
57
+ 'Please change the parent element\'s property declaration from {EXISTING_PARENT_ELEMENT_RULE} to {TARGET_PARENT_ELEMENT_RULE} to fix this issue.',
58
58
  };
59
59
  const str_ = i18n.i18n.registerUIStrings('panels/elements/CSSRuleValidator.ts', UIStrings);
60
60
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
61
61
 
62
62
  export const enum AuthoringHintType {
63
- RULE_VALIDATION = 'ruleValidation',
63
+ INACTIVE_PROPERTY = 'ruleValidation',
64
64
  DEPRECATED_PROPERTY = 'deprecatedProperty',
65
65
  }
66
66
 
@@ -68,19 +68,20 @@ export class AuthoringHint {
68
68
  readonly #hintType: AuthoringHintType;
69
69
  readonly #hintMessage: string;
70
70
  readonly #possibleFixMessage: string|null;
71
- readonly #learnMore: string|null;
71
+ readonly #learnMoreLink: string|undefined;
72
72
 
73
- constructor(property: string, hintType: AuthoringHintType, hintMessage: string, possibleFixMessage: string|null, showLearnMore: boolean) {
73
+ constructor(
74
+ hintType: AuthoringHintType, hintMessage: string, possibleFixMessage: string|null, learnMoreLink?: string) {
74
75
  this.#hintType = hintType;
75
76
  this.#hintMessage = hintMessage;
76
77
  this.#possibleFixMessage = possibleFixMessage;
77
- this.#learnMore = showLearnMore ? property : null; // TODO: Add Goo.gle short link base url
78
+ this.#learnMoreLink = learnMoreLink;
78
79
  }
79
80
 
80
81
  getHintPrefix(): string {
81
82
  switch (this.#hintType) {
82
- case AuthoringHintType.RULE_VALIDATION:
83
- return i18nString(UIStrings.ruleValidationHintPrefix);
83
+ case AuthoringHintType.INACTIVE_PROPERTY:
84
+ return i18nString(UIStrings.inactivePropertyHintPrefix);
84
85
  case AuthoringHintType.DEPRECATED_PROPERTY:
85
86
  return i18nString(UIStrings.deprecatedPropertyHintPrefix);
86
87
  }
@@ -94,8 +95,8 @@ export class AuthoringHint {
94
95
  return this.#possibleFixMessage;
95
96
  }
96
97
 
97
- getLearnMoreLink(): string|null {
98
- return this.#learnMore;
98
+ getLearnMoreLink(): string|undefined {
99
+ return this.#learnMoreLink;
99
100
  }
100
101
  }
101
102
 
@@ -106,6 +107,9 @@ export abstract class CSSRuleValidator {
106
107
  this.#affectedProperties = affectedProperties;
107
108
  }
108
109
 
110
+ /**
111
+ * If `isRuleValid` returns false, it means there is a hint to be shown. The hint is retrieved by invoking `getAuthoringHint`.
112
+ */
109
113
  abstract isRuleValid(computedStyles: Map<String, String>|null, parentsComputedStyles?: Map<String, String>|null):
110
114
  boolean;
111
115
 
@@ -134,20 +138,18 @@ export class AlignContentValidator extends CSSRuleValidator {
134
138
  }
135
139
 
136
140
  getAuthoringHint(): AuthoringHint {
137
- const reasonRuleCode = buildStyledPropertyText('flex-wrap');
138
- const affectedRuleCode = buildStyledPropertyText('align-content');
141
+ const reasonPropertyDeclaration = buildStyledPropertyText('flex-wrap');
142
+ const affectedPropertyDeclarationCode = buildStyledPropertyText('align-content');
139
143
 
140
144
  return new AuthoringHint(
141
- 'align-content',
142
- AuthoringHintType.RULE_VALIDATION,
143
- i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
144
- 'REASON_RULE_CODE': reasonRuleCode,
145
- 'AFFECTED_RULE_CODE': affectedRuleCode,
146
- }),
147
- i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
148
- 'REASON_RULE_CODE': reasonRuleCode,
149
- }),
150
- true,
145
+ AuthoringHintType.INACTIVE_PROPERTY,
146
+ i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
147
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
148
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
149
+ }),
150
+ i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
151
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
152
+ }),
151
153
  );
152
154
  }
153
155
  }
@@ -167,22 +169,20 @@ export class FlexItemValidator extends CSSRuleValidator {
167
169
  getAuthoringHint(
168
170
  property: string, computedStyles: Map<String, String>|null,
169
171
  parentsComputedStyles: Map<String, String>|null): AuthoringHint {
170
- const reasonRuleCode = buildStyledRuleText('display', parentsComputedStyles?.get('display'));
171
- const affectedRuleCode = buildStyledPropertyText(property);
172
- const targetParentRuleCode = buildStyledRuleText('display', 'flex');
172
+ const reasonPropertyDeclaration = buildStyledRuleText('display', parentsComputedStyles?.get('display'));
173
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
174
+ const targeParentPropertyDeclaration = buildStyledRuleText('display', 'flex');
173
175
 
174
176
  return new AuthoringHint(
175
- property,
176
- AuthoringHintType.RULE_VALIDATION,
177
- i18nString(UIStrings.ruleViolatedByParentElementRuleReason, {
178
- 'REASON_RULE_CODE': reasonRuleCode,
179
- 'AFFECTED_RULE_CODE': affectedRuleCode,
180
- }),
181
- i18nString(UIStrings.ruleViolatedByParentElementRuleFix, {
182
- 'EXISTING_PARENT_ELEMENT_RULE': reasonRuleCode,
183
- 'TARGET_PARENT_ELEMENT_RULE': targetParentRuleCode,
184
- }),
185
- true,
177
+ AuthoringHintType.INACTIVE_PROPERTY,
178
+ i18nString(UIStrings.ruleViolatedByParentElementRuleReason, {
179
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
180
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
181
+ }),
182
+ i18nString(UIStrings.ruleViolatedByParentElementRuleFix, {
183
+ 'EXISTING_PARENT_ELEMENT_RULE': reasonPropertyDeclaration,
184
+ 'TARGET_PARENT_ELEMENT_RULE': targeParentPropertyDeclaration,
185
+ }),
186
186
  );
187
187
  }
188
188
  }
@@ -200,22 +200,20 @@ export class FlexContainerValidator extends CSSRuleValidator {
200
200
  }
201
201
 
202
202
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
203
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
203
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
204
204
  const targetRuleCode = buildStyledRuleText('display', 'flex');
205
- const affectedRuleCode = buildStyledPropertyText(property);
205
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
206
206
 
207
207
  return new AuthoringHint(
208
- property,
209
- AuthoringHintType.RULE_VALIDATION,
208
+ AuthoringHintType.INACTIVE_PROPERTY,
210
209
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
211
- 'REASON_RULE_CODE': reasonRuleCode,
212
- 'AFFECTED_RULE_CODE': affectedRuleCode,
210
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
211
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
213
212
  }),
214
213
  i18nString(UIStrings.ruleViolatedBySameElementRuleChangeSuggestion, {
215
- 'EXISTING_RULE': reasonRuleCode,
216
- 'TARGET_RULE': targetRuleCode,
214
+ 'EXISTING_PROPERTY_DECLARATION': reasonPropertyDeclaration,
215
+ 'TARGET_PROPERTY_DECLARATION': targetRuleCode,
217
216
  }),
218
- true,
219
217
  );
220
218
  }
221
219
  }
@@ -242,22 +240,20 @@ export class GridContainerValidator extends CSSRuleValidator {
242
240
  }
243
241
 
244
242
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
245
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
243
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
246
244
  const targetRuleCode = buildStyledRuleText('display', 'grid');
247
- const affectedRuleCode = buildStyledPropertyText(property);
245
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
248
246
 
249
247
  return new AuthoringHint(
250
- property,
251
- AuthoringHintType.RULE_VALIDATION,
248
+ AuthoringHintType.INACTIVE_PROPERTY,
252
249
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
253
- 'REASON_RULE_CODE': reasonRuleCode,
254
- 'AFFECTED_RULE_CODE': affectedRuleCode,
250
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
251
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
255
252
  }),
256
253
  i18nString(UIStrings.ruleViolatedBySameElementRuleChangeSuggestion, {
257
- 'EXISTING_RULE': reasonRuleCode,
258
- 'TARGET_RULE': targetRuleCode,
254
+ 'EXISTING_PROPERTY_DECLARATION': reasonPropertyDeclaration,
255
+ 'TARGET_PROPERTY_DECLARATION': targetRuleCode,
259
256
  }),
260
- true,
261
257
  );
262
258
  }
263
259
  }
@@ -283,22 +279,20 @@ export class GridItemValidator extends CSSRuleValidator {
283
279
  getAuthoringHint(
284
280
  property: string, computedStyles: Map<String, String>|null,
285
281
  parentComputedStyles: Map<String, String>|null): AuthoringHint {
286
- const reasonRuleCode = buildStyledRuleText('display', parentComputedStyles?.get('display'));
287
- const targetParentRuleCode = buildStyledRuleText('display', 'grid');
288
- const affectedRuleCode = buildStyledPropertyText(property);
282
+ const reasonPropertyDeclaration = buildStyledRuleText('display', parentComputedStyles?.get('display'));
283
+ const targeParentPropertyDeclaration = buildStyledRuleText('display', 'grid');
284
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
289
285
 
290
286
  return new AuthoringHint(
291
- property,
292
- AuthoringHintType.RULE_VALIDATION,
287
+ AuthoringHintType.INACTIVE_PROPERTY,
293
288
  i18nString(UIStrings.ruleViolatedByParentElementRuleReason, {
294
- 'REASON_RULE_CODE': reasonRuleCode,
295
- 'AFFECTED_RULE_CODE': affectedRuleCode,
289
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
290
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
296
291
  }),
297
292
  i18nString(UIStrings.ruleViolatedByParentElementRuleFix, {
298
- 'EXISTING_PARENT_ELEMENT_RULE': reasonRuleCode,
299
- 'TARGET_PARENT_ELEMENT_RULE': targetParentRuleCode,
293
+ 'EXISTING_PARENT_ELEMENT_RULE': reasonPropertyDeclaration,
294
+ 'TARGET_PARENT_ELEMENT_RULE': targeParentPropertyDeclaration,
300
295
  }),
301
- true,
302
296
  );
303
297
  }
304
298
  }
@@ -321,20 +315,18 @@ export class FlexGridValidator extends CSSRuleValidator {
321
315
  }
322
316
 
323
317
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
324
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
325
- const affectedRuleCode = buildStyledPropertyText(property);
318
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
319
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
326
320
 
327
321
  return new AuthoringHint(
328
- property,
329
- AuthoringHintType.RULE_VALIDATION,
322
+ AuthoringHintType.INACTIVE_PROPERTY,
330
323
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
331
- 'REASON_RULE_CODE': reasonRuleCode,
332
- 'AFFECTED_RULE_CODE': affectedRuleCode,
324
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
325
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
333
326
  }),
334
327
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
335
- 'REASON_RULE_CODE': reasonRuleCode,
328
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
336
329
  }),
337
- true,
338
330
  );
339
331
  }
340
332
  }
@@ -360,20 +352,18 @@ export class MulticolFlexGridValidator extends CSSRuleValidator {
360
352
  }
361
353
 
362
354
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
363
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
364
- const affectedRuleCode = buildStyledPropertyText(property);
355
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
356
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
365
357
 
366
358
  return new AuthoringHint(
367
- property,
368
- AuthoringHintType.RULE_VALIDATION,
359
+ AuthoringHintType.INACTIVE_PROPERTY,
369
360
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
370
- 'REASON_RULE_CODE': reasonRuleCode,
371
- 'AFFECTED_RULE_CODE': affectedRuleCode,
361
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
362
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
372
363
  }),
373
364
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
374
- 'REASON_RULE_CODE': reasonRuleCode,
365
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
375
366
  }),
376
- true,
377
367
  );
378
368
  }
379
369
  }
@@ -400,20 +390,18 @@ export class PaddingValidator extends CSSRuleValidator {
400
390
  }
401
391
 
402
392
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
403
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
404
- const affectedRuleCode = buildStyledPropertyText(property);
393
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
394
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
405
395
 
406
396
  return new AuthoringHint(
407
- property,
408
- AuthoringHintType.RULE_VALIDATION,
397
+ AuthoringHintType.INACTIVE_PROPERTY,
409
398
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
410
- 'REASON_RULE_CODE': reasonRuleCode,
411
- 'AFFECTED_RULE_CODE': affectedRuleCode,
399
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
400
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
412
401
  }),
413
402
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
414
- 'REASON_RULE_CODE': reasonRuleCode,
403
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
415
404
  }),
416
- true,
417
405
  );
418
406
  }
419
407
  }
@@ -437,20 +425,18 @@ export class PositionValidator extends CSSRuleValidator {
437
425
  }
438
426
 
439
427
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
440
- const reasonRuleCode = buildStyledRuleText('position', computedStyles?.get('position'));
441
- const affectedRuleCode = buildStyledPropertyText(property);
428
+ const reasonPropertyDeclaration = buildStyledRuleText('position', computedStyles?.get('position'));
429
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
442
430
 
443
431
  return new AuthoringHint(
444
- property,
445
- AuthoringHintType.RULE_VALIDATION,
432
+ AuthoringHintType.INACTIVE_PROPERTY,
446
433
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
447
- 'REASON_RULE_CODE': reasonRuleCode,
448
- 'AFFECTED_RULE_CODE': affectedRuleCode,
434
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
435
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
449
436
  }),
450
437
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
451
- 'REASON_RULE_CODE': reasonRuleCode,
438
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
452
439
  }),
453
- true,
454
440
  );
455
441
  }
456
442
  }
@@ -472,20 +458,18 @@ export class ZIndexValidator extends CSSRuleValidator {
472
458
  }
473
459
 
474
460
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
475
- const reasonRuleCode = buildStyledRuleText('position', computedStyles?.get('position'));
476
- const affectedRuleCode = buildStyledPropertyText(property);
461
+ const reasonPropertyDeclaration = buildStyledRuleText('position', computedStyles?.get('position'));
462
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
477
463
 
478
464
  return new AuthoringHint(
479
- property,
480
- AuthoringHintType.RULE_VALIDATION,
465
+ AuthoringHintType.INACTIVE_PROPERTY,
481
466
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
482
- 'REASON_RULE_CODE': reasonRuleCode,
483
- 'AFFECTED_RULE_CODE': affectedRuleCode,
467
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
468
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
484
469
  }),
485
470
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
486
- 'REASON_RULE_CODE': reasonRuleCode,
471
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
487
472
  }),
488
- true,
489
473
  );
490
474
  }
491
475
  }
@@ -103,7 +103,7 @@ export class ElementsTreeOutline extends
103
103
  private treeElementBeingDragged?: ElementsTreeElement;
104
104
  private dragOverTreeElement?: ElementsTreeElement;
105
105
  private updateModifiedNodesTimeout?: number;
106
- private topLayerContainer?: TopLayerContainer;
106
+ #topLayerContainerByParent: Map<UI.TreeOutline.TreeElement, TopLayerContainer> = new Map();
107
107
 
108
108
  constructor(omitRootDOMNode?: boolean, selectEnabled?: boolean, hideGutter?: boolean) {
109
109
  super();
@@ -453,7 +453,7 @@ export class ElementsTreeOutline extends
453
453
  }
454
454
  }
455
455
 
456
- this.createTopLayerContainer();
456
+ void this.createTopLayerContainer(this.rootElement(), this.rootDOMNode.domModel());
457
457
 
458
458
  if (selectedNode) {
459
459
  this.revealAndSelectNode(selectedNode, true);
@@ -1183,9 +1183,16 @@ export class ElementsTreeOutline extends
1183
1183
  });
1184
1184
  }
1185
1185
 
1186
- createTopLayerContainer(): void {
1187
- this.topLayerContainer = new TopLayerContainer(this);
1188
- void this.topLayerContainer.throttledUpdateTopLayerElements();
1186
+ async createTopLayerContainer(parent: UI.TreeOutline.TreeElement, domModel: SDK.DOMModel.DOMModel): Promise<void> {
1187
+ if (!parent.treeOutline || !(parent.treeOutline instanceof ElementsTreeOutline)) {
1188
+ return;
1189
+ }
1190
+ const container = new TopLayerContainer(parent.treeOutline, domModel);
1191
+ await container.throttledUpdateTopLayerElements();
1192
+ if (container.currentTopLayerElements.size > 0) {
1193
+ parent.appendChild(container);
1194
+ }
1195
+ this.#topLayerContainerByParent.set(parent, container);
1189
1196
  }
1190
1197
 
1191
1198
  private createElementTreeElement(node: SDK.DOMModel.DOMNode, isClosingTag?: boolean): ElementsTreeElement {
@@ -1342,6 +1349,9 @@ export class ElementsTreeOutline extends
1342
1349
  isClosingTag?: boolean): ElementsTreeElement {
1343
1350
  const newElement = this.createElementTreeElement(child, isClosingTag);
1344
1351
  treeElement.insertChild(newElement, index);
1352
+ if (child.nodeType() === Node.DOCUMENT_NODE) {
1353
+ void this.createTopLayerContainer(newElement, child.domModel());
1354
+ }
1345
1355
  return newElement;
1346
1356
  }
1347
1357
 
@@ -1447,8 +1457,14 @@ export class ElementsTreeOutline extends
1447
1457
  }
1448
1458
  }
1449
1459
 
1450
- private topLayerElementsChanged(): void {
1451
- void this.topLayerContainer?.throttledUpdateTopLayerElements();
1460
+ private async topLayerElementsChanged(): Promise<void> {
1461
+ for (const [parent, container] of this.#topLayerContainerByParent) {
1462
+ await container.throttledUpdateTopLayerElements();
1463
+ if (container.currentTopLayerElements.size > 0 && container.parent !== parent) {
1464
+ parent.appendChild(container);
1465
+ }
1466
+ container.hidden = container.currentTopLayerElements.size === 0;
1467
+ }
1452
1468
  }
1453
1469
 
1454
1470
  private static treeOutlineSymbol = Symbol('treeOutline');
@@ -14,23 +14,24 @@ import {type ElementsTreeElement} from './ElementsTreeElement.js';
14
14
 
15
15
  const UIStrings = {
16
16
  /**
17
- * @description Top layer is rendered closest to the user within a viewport, therefore its elements always appear on top of all other content
18
- */
19
- topLayer: 'top-layer',
17
+ *@description Link text content in Elements Tree Outline of the Elements panel. When clicked, it "reveals" the true location of an element.
18
+ */
19
+ reveal: 'reveal',
20
20
  };
21
21
 
22
22
  const str_ = i18n.i18n.registerUIStrings('panels/elements/TopLayerContainer.ts', UIStrings);
23
23
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
24
24
 
25
25
  export class TopLayerContainer extends UI.TreeOutline.TreeElement {
26
- domContainer: ElementsTreeOutline.ElementsTreeOutline;
26
+ tree: ElementsTreeOutline.ElementsTreeOutline;
27
+ domModel: SDK.DOMModel.DOMModel;
27
28
  currentTopLayerElements: Set<ElementsTreeElement>;
28
29
  topLayerUpdateThrottler: Common.Throttler.Throttler;
29
- #inserted = false;
30
30
 
31
- constructor(domContainer: ElementsTreeOutline.ElementsTreeOutline) {
31
+ constructor(tree: ElementsTreeOutline.ElementsTreeOutline, domModel: SDK.DOMModel.DOMModel) {
32
32
  super('#top-layer');
33
- this.domContainer = domContainer;
33
+ this.tree = tree;
34
+ this.domModel = domModel;
34
35
  this.currentTopLayerElements = new Set();
35
36
  this.topLayerUpdateThrottler = new Common.Throttler.Throttler(1);
36
37
  }
@@ -44,26 +45,19 @@ export class TopLayerContainer extends UI.TreeOutline.TreeElement {
44
45
  this.removeCurrentTopLayerElementsAdorners();
45
46
  this.currentTopLayerElements = new Set();
46
47
 
47
- const domModel = this.domContainer.rootDOMNode?.domModel();
48
- if (!domModel) {
49
- this.hidden = true;
50
- return;
51
- }
52
-
53
- const newTopLayerElementsIDs = await domModel.getTopLayerElements();
48
+ const newTopLayerElementsIDs = await this.domModel.getTopLayerElements();
54
49
  if (!newTopLayerElementsIDs || newTopLayerElementsIDs.length === 0) {
55
- this.hidden = true;
56
50
  return;
57
51
  }
58
52
 
59
53
  let topLayerElementIndex = 0;
60
54
  for (let i = 0; i < newTopLayerElementsIDs.length; i++) {
61
- const topLayerDOMNode = domModel.idToDOMNode.get(newTopLayerElementsIDs[i]);
55
+ const topLayerDOMNode = this.domModel.idToDOMNode.get(newTopLayerElementsIDs[i]);
62
56
  if (topLayerDOMNode && topLayerDOMNode.nodeName() !== '::backdrop') {
63
57
  const topLayerElementShortcut = new SDK.DOMModel.DOMNodeShortcut(
64
- domModel.target(), topLayerDOMNode.backendNodeId(), 0, topLayerDOMNode.nodeName());
58
+ this.domModel.target(), topLayerDOMNode.backendNodeId(), 0, topLayerDOMNode.nodeName());
65
59
  const topLayerElementRepresentation = new ElementsTreeOutline.ShortcutTreeElement(topLayerElementShortcut);
66
- const topLayerTreeElement = this.domContainer.treeElementByNode.get(topLayerDOMNode);
60
+ const topLayerTreeElement = this.tree.treeElementByNode.get(topLayerDOMNode);
67
61
  if (!topLayerTreeElement) {
68
62
  continue;
69
63
  }
@@ -73,21 +67,16 @@ export class TopLayerContainer extends UI.TreeOutline.TreeElement {
73
67
  this.currentTopLayerElements.add(topLayerTreeElement);
74
68
  this.appendChild(topLayerElementRepresentation);
75
69
  // Add the element's backdrop if previous top layer element is a backdrop.
76
- const previousTopLayerDOMNode = (i > 0) ? domModel.idToDOMNode.get(newTopLayerElementsIDs[i - 1]) : undefined;
70
+ const previousTopLayerDOMNode =
71
+ (i > 0) ? this.domModel.idToDOMNode.get(newTopLayerElementsIDs[i - 1]) : undefined;
77
72
  if (previousTopLayerDOMNode && previousTopLayerDOMNode.nodeName() === '::backdrop') {
78
73
  const backdropElementShortcut = new SDK.DOMModel.DOMNodeShortcut(
79
- domModel.target(), previousTopLayerDOMNode.backendNodeId(), 0, previousTopLayerDOMNode.nodeName());
74
+ this.domModel.target(), previousTopLayerDOMNode.backendNodeId(), 0, previousTopLayerDOMNode.nodeName());
80
75
  const backdropElementRepresentation = new ElementsTreeOutline.ShortcutTreeElement(backdropElementShortcut);
81
76
  topLayerElementRepresentation.appendChild(backdropElementRepresentation);
82
77
  }
83
78
  }
84
79
  }
85
-
86
- this.hidden = topLayerElementIndex <= 0;
87
- if (!this.hidden && !this.#inserted) {
88
- this.domContainer.appendChild(this);
89
- this.#inserted = true;
90
- }
91
80
  }
92
81
 
93
82
  private removeCurrentTopLayerElementsAdorners(): void {
@@ -118,8 +107,8 @@ export class TopLayerContainer extends UI.TreeOutline.TreeElement {
118
107
  adorner.addInteraction(onClick, {
119
108
  isToggle: false,
120
109
  shouldPropagateOnKeydown: false,
121
- ariaLabelDefault: i18nString(UIStrings.topLayer),
122
- ariaLabelActive: i18nString(UIStrings.topLayer),
110
+ ariaLabelDefault: i18nString(UIStrings.reveal),
111
+ ariaLabelActive: i18nString(UIStrings.reveal),
123
112
  });
124
113
  adorner.addEventListener('mousedown', e => e.consume(), false);
125
114
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright 2022 The Chromium Authors. All rights reserved.
3
+ * Use of this source code is governed by a BSD-style license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ .accessibility-tree-view-container {
8
+ height: 100%;
9
+ overflow: auto;
10
+ }
@@ -77,16 +77,15 @@ export class AccessibilityTreeNode extends HTMLElement {
77
77
  const name = LitHtml.html`"<span class='attribute-value'>${this.#name}</span>"`;
78
78
  const properties = this.#properties.map(
79
79
  ({name, value}) => isPrintable(value.type) ?
80
- LitHtml.html`&nbsp<span class='attribute-name'>${name}</span>:&nbsp<span class='attribute-value'>${
80
+ LitHtml.html` <span class='attribute-name'>${name}</span>:&nbsp;<span class='attribute-value'>${
81
81
  value.value}</span>` :
82
82
  LitHtml.nothing);
83
-
83
+ const content = this.#ignored ? LitHtml.html`<span>${i18nString(UIStrings.ignored)}</span>` :
84
+ LitHtml.html`${role}&nbsp;${name}${properties}`;
84
85
  await Coordinator.RenderCoordinator.RenderCoordinator.instance().write('Accessibility node render', () => {
85
86
  // clang-format off
86
87
  LitHtml.render(
87
- this.#ignored ?
88
- LitHtml.html`<span>${i18nString(UIStrings.ignored)}</span>` :
89
- LitHtml.html`${role}&nbsp${name}${properties}`,
88
+ LitHtml.html`<div class='container'>${content}</div>`,
90
89
  this.#shadow,
91
90
  {host: this});
92
91
  // clang-format on