chrome-devtools-frontend 1.0.1578729 → 1.0.1581449

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 (314) hide show
  1. package/agents/prompts/creating-a-model.md +51 -0
  2. package/docs/cookbook/devtools_on_devtools.md +2 -2
  3. package/docs/feature-specs/elements-gutter-decorators.md +40 -0
  4. package/docs/feature-specs/elements-tree-edit-html.md +14 -0
  5. package/docs/feature-specs/elements-tree-node-title.md +46 -0
  6. package/docs/feature-specs/elements-tree-selection-and-hover.md +31 -0
  7. package/docs/feature-specs/images/elements-gutter-decorators-multiple.png +0 -0
  8. package/docs/get_the_code.md +3 -3
  9. package/front_end/core/host/UserMetrics.ts +3 -7
  10. package/front_end/core/root/Runtime.ts +0 -1
  11. package/front_end/core/sdk/NetworkManager.ts +0 -35
  12. package/front_end/core/sdk/OverlayModel.ts +10 -0
  13. package/front_end/devtools_compatibility.js +4 -0
  14. package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -0
  15. package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +530 -0
  16. package/front_end/entrypoints/greendev_floaty/floaty.css +258 -0
  17. package/front_end/entrypoints/greendev_floaty/floaty.html +31 -0
  18. package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +422 -0
  19. package/front_end/entrypoints/inspector_main/InspectorMain.ts +0 -38
  20. package/front_end/generated/ARIAProperties.js +0 -6
  21. package/front_end/generated/InspectorBackendCommands.ts +10 -4
  22. package/front_end/generated/SupportedCSSProperties.js +39 -31
  23. package/front_end/generated/protocol-mapping.d.ts +12 -0
  24. package/front_end/generated/protocol-proxy-api.d.ts +12 -0
  25. package/front_end/generated/protocol.ts +57 -2
  26. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +32 -2
  27. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +110 -6
  28. package/front_end/models/computed_style/computed_style.ts +9 -0
  29. package/front_end/models/issues_manager/CorsIssue.ts +11 -14
  30. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
  31. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +33 -4
  32. package/front_end/panels/ai_assistance/components/ChatInput.ts +52 -19
  33. package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -4
  34. package/front_end/panels/ai_assistance/components/ChatView.ts +4 -0
  35. package/front_end/panels/ai_assistance/components/chatInput.css +10 -3
  36. package/front_end/panels/application/DeviceBoundSessionsView.ts +51 -76
  37. package/front_end/panels/changes/changesSidebar.css +5 -0
  38. package/front_end/panels/common/AiCodeGenerationTeaser.ts +2 -2
  39. package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +4 -4
  40. package/front_end/panels/common/ExtensionPanel.ts +4 -0
  41. package/front_end/panels/common/FreDialog.ts +4 -0
  42. package/front_end/panels/coverage/CoverageListView.ts +18 -3
  43. package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +89 -0
  44. package/front_end/panels/elements/ComputedStyleWidget.ts +12 -8
  45. package/front_end/panels/elements/ElementsPanel.ts +4 -3
  46. package/front_end/panels/elements/ElementsSidebarPane.ts +11 -8
  47. package/front_end/panels/elements/ElementsTreeElement.ts +92 -121
  48. package/front_end/panels/elements/ElementsTreeOutline.ts +26 -15
  49. package/front_end/panels/elements/MetricsSidebarPane.ts +2 -2
  50. package/front_end/panels/elements/PlatformFontsWidget.ts +7 -5
  51. package/front_end/panels/elements/PropertiesWidget.ts +3 -6
  52. package/front_end/panels/elements/StylesSidebarPane.ts +4 -3
  53. package/front_end/panels/elements/elements.ts +4 -3
  54. package/front_end/panels/elements/elementsTreeOutline.css +16 -5
  55. package/front_end/panels/greendev/GreenDevPanel.css +241 -0
  56. package/front_end/panels/greendev/GreenDevPanel.ts +308 -0
  57. package/front_end/panels/greendev/GreenDevShared.ts +13 -0
  58. package/front_end/panels/greendev/greendev-meta.ts +52 -0
  59. package/front_end/panels/greendev/greendev.ts +9 -0
  60. package/front_end/panels/issues/CorsIssueDetailsView.ts +4 -4
  61. package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -1
  62. package/front_end/panels/lighthouse/lighthouseStartView.css +6 -0
  63. package/front_end/panels/network/NetworkLogView.ts +2 -5
  64. package/front_end/panels/security/SecurityPanel.ts +0 -4
  65. package/front_end/panels/security/SecurityPanelSidebar.ts +2 -42
  66. package/front_end/panels/security/security-meta.ts +2 -14
  67. package/front_end/panels/security/security.ts +0 -4
  68. package/front_end/panels/settings/EditFileSystemView.ts +8 -8
  69. package/front_end/panels/settings/SettingsScreen.ts +4 -4
  70. package/front_end/panels/sources/SourcesSearchScope.ts +2 -1
  71. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +47 -26
  72. package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +121 -39
  73. package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +106 -101
  74. package/front_end/third_party/chromium/README.chromium +1 -1
  75. package/front_end/third_party/puppeteer/README.chromium +2 -2
  76. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +35 -0
  77. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
  78. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +19 -0
  79. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
  80. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +16 -1
  81. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
  82. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
  83. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
  84. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +1 -1
  85. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +21 -0
  86. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  87. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +6 -0
  88. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts +13 -1
  90. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts.map +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js +56 -36
  92. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +2 -2
  94. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +32 -8
  96. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +5 -1
  98. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  99. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +32 -2
  100. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
  101. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -2
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +20 -0
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -1
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +25 -8
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts +2 -0
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +23 -0
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +3 -2
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +10 -6
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js +1 -1
  119. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +29 -0
  121. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +46 -6
  123. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +5 -1
  125. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +18 -0
  127. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js +2 -2
  129. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  131. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +13 -1
  132. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
  133. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/JSHandle.js +2 -2
  134. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/JSHandle.js.map +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +7 -2
  136. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +43 -7
  138. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts +10 -1
  140. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts.map +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js +34 -4
  142. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Cookie.d.ts +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Cookie.d.ts.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +1 -1
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +1 -1
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +1 -0
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -0
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +4 -0
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +2 -2
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +129 -3
  169. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +233 -65
  170. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +35 -0
  171. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +19 -0
  173. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +16 -1
  175. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +21 -0
  180. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +6 -0
  182. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts +13 -1
  184. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js +56 -36
  186. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js.map +1 -1
  187. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +2 -2
  188. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
  189. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +30 -6
  190. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +5 -1
  192. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +32 -2
  194. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -2
  196. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
  197. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +20 -0
  198. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
  199. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -1
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +25 -8
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts +2 -0
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +23 -0
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +3 -2
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +10 -6
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +29 -0
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +46 -6
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +5 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +19 -1
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js +3 -3
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +14 -2
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/JSHandle.js +3 -3
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/JSHandle.js.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +7 -2
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +43 -8
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts +10 -1
  234. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts.map +1 -1
  235. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js +31 -3
  236. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js.map +1 -1
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts +1 -1
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts.map +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +1 -1
  240. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -1
  241. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +1 -1
  242. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -1
  243. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js +1 -1
  244. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js.map +1 -1
  245. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  246. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +1 -0
  247. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  248. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  249. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -0
  250. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  251. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +4 -0
  252. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
  253. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  254. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +2 -2
  255. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -1
  256. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  257. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  258. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  259. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  260. package/front_end/third_party/puppeteer/package/lib/types.d.ts +129 -3
  261. package/front_end/third_party/puppeteer/package/package.json +4 -4
  262. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +46 -0
  263. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +21 -0
  264. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
  265. package/front_end/third_party/puppeteer/package/src/api/Page.ts +23 -0
  266. package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +88 -56
  267. package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +33 -8
  268. package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +61 -3
  269. package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +23 -2
  270. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +29 -8
  271. package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +30 -0
  272. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -2
  273. package/front_end/third_party/puppeteer/package/src/bidi/core/UserContext.ts +1 -0
  274. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +85 -8
  275. package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +36 -1
  276. package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +5 -5
  277. package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +23 -2
  278. package/front_end/third_party/puppeteer/package/src/cdp/JSHandle.ts +3 -3
  279. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +60 -8
  280. package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +36 -3
  281. package/front_end/third_party/puppeteer/package/src/common/Cookie.ts +1 -1
  282. package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
  283. package/front_end/third_party/puppeteer/package/src/injected/XPathQuerySelector.ts +1 -1
  284. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +1 -0
  285. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +2 -0
  286. package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +4 -0
  287. package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +8 -6
  288. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  289. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  290. package/front_end/ui/components/text_editor/AutocompleteHistory.ts +2 -1
  291. package/front_end/ui/components/text_editor/TextEditorHistory.ts +1 -1
  292. package/front_end/ui/legacy/InplaceEditor.ts +1 -1
  293. package/front_end/ui/legacy/SearchableView.ts +5 -2
  294. package/front_end/ui/legacy/Widget.ts +15 -0
  295. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -0
  296. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +50 -1
  297. package/front_end/ui/legacy/components/data_grid/SortableDataGrid.ts +59 -9
  298. package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +2 -1
  299. package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
  300. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +28 -15
  301. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +2 -2
  302. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +3 -3
  303. package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -3
  304. package/front_end/ui/visual_logging/Debugging.ts +1 -1
  305. package/front_end/ui/visual_logging/KnownContextValues.ts +13 -0
  306. package/mcp/mcp.ts +1 -0
  307. package/package.json +1 -1
  308. package/front_end/panels/security/CookieControlsTreeElement.ts +0 -21
  309. package/front_end/panels/security/CookieControlsView.ts +0 -447
  310. package/front_end/panels/security/CookieReportTreeElement.ts +0 -21
  311. package/front_end/panels/security/CookieReportView.ts +0 -549
  312. package/front_end/panels/security/cookieControlsView.css +0 -139
  313. package/front_end/panels/security/cookieReportView.css +0 -90
  314. /package/front_end/{panels/elements → models/computed_style}/ComputedStyleModel.ts +0 -0
@@ -1,549 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
-
6
- import '../../ui/legacy/components/data_grid/data_grid.js';
7
- import '../../ui/kit/kit.js';
8
-
9
- import * as Common from '../../core/common/common.js';
10
- import * as i18n from '../../core/i18n/i18n.js';
11
- import * as Platform from '../../core/platform/platform.js';
12
- import * as SDK from '../../core/sdk/sdk.js';
13
- import * as Protocol from '../../generated/protocol.js';
14
- import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
15
- import type * as TextUtils from '../../models/text_utils/text_utils.js';
16
- import * as uiI18n from '../../ui/i18n/i18n.js';
17
- import * as UI from '../../ui/legacy/legacy.js';
18
- import * as Lit from '../../ui/lit/lit.js';
19
- import * as NetworkForward from '../network/forward/forward.js';
20
-
21
- import cookieReportViewStyles from './cookieReportView.css.js';
22
-
23
- const {render, html, Directives: {ref}} = Lit;
24
-
25
- const UIStrings = {
26
- /**
27
- * @description Title in the header for the third-party cookie report in the Security & Privacy Panel
28
- */
29
- title: 'Third-party cookies',
30
- /**
31
- * @description Explanation in the header about the cookies listed in the report
32
- */
33
- body: 'This site might not work if third-party cookies and other cookies are limited in Chrome.',
34
- /**
35
- * @description A link the user can follow to learn more about third party cookie usage
36
- */
37
- learnMoreLink: 'Learn more about how third-party cookies are used',
38
- /**
39
- * @description Column header for Cookie Report table. This column will contain the name of the cookie
40
- */
41
- name: 'Name',
42
- /**
43
- * @description Column header for Cookie Report table. This column will contain the domain of the cookie
44
- */
45
- domain: 'Domain',
46
- /**
47
- * @description Column header for Cookie Report table. This column will contain the type of the cookie. E.g. Advertisement, Marketing, etc.
48
- */
49
- type: 'Type',
50
- /**
51
- * @description Column header for Cookie Report table. This column will contain the third-party of the cookie. E.g. Amazon Analytics, etc.
52
- */
53
- platform: 'Platform',
54
- /**
55
- * @description Column header for Cookie Report table, This column will contain the actionable step the user can take (if any) for the cookie
56
- */
57
- recommendation: 'Recommendation',
58
- /**
59
- * @description Column header for Cookie Report table. This column will contain the blocked or allowed status of the cookie. See status strings below for more information on the different statuses
60
- */
61
- status: 'Status',
62
- /**
63
- * @description Status string in the cookie report for a third-party cookie that is allowed without any sort of exception. This is also used as filter chip text to allow the user to filter the table based on cookie status
64
- */
65
- allowed: 'Allowed',
66
- /**
67
- * @description Status string in the cookie report for a third-party cookie that is allowed due to a grace period or heuristic exception. Otherwise, this would have been blocked. This is also used as filter chip text to allow the user to filter the table based on cookie status
68
- */
69
- allowedByException: 'Allowed by exception',
70
- /**
71
- * @description Status string in the cookie report for a third-party cookie that was blocked. This is also used as filter chip text to allow the user to filter the table based on cookie status
72
- */
73
- blocked: 'Blocked',
74
- /**
75
- * @description String in the Cookie Report table. This is used when any data could not be fetched and that cell is unknown
76
- */
77
- unknown: 'Unknown',
78
- /**
79
- * @description Display name for the Cookie Report table. This string is used by the data grid for accessibility.
80
- */
81
- report: 'Third-Party Cookie Report',
82
- /**
83
- * @description The main string the user sees when there are no cookie issues to show. This will take place of the table
84
- */
85
- emptyReport: 'Not a crumb left',
86
- /**
87
- * @description Explanation to the user that there were no third-party cookie related issues found which is why they are not seeing the table/report
88
- */
89
- emptyReportExplanation: 'No issues with third-party cookies found',
90
- /**
91
- * @description String in Cookie Report table. This is used when a cookie's domain has an entry in the third-party cookie migration readiness list GitHub.
92
- * @example {guidance} PH1
93
- */
94
- gitHubResource: 'Review {PH1} from third-party site',
95
- /**
96
- * @description Label for a link to an entry in the third-party cookie migration readiness list GitHub.
97
- */
98
- guidance: 'guidance',
99
- /**
100
- * @description String in Cookie Report table. This is used when a cookie has a grace period exception.
101
- * @example {reported issues} PH1
102
- */
103
- gracePeriod: 'Review {PH1}. Grace period exception is active.',
104
- /**
105
- * @description Label for a link to third-party cookie site compatibility look-up.
106
- */
107
- reportedIssues: 'reported issues',
108
- /**
109
- * @description String in Cookie Report table. This is used when a cookie has a heuristics exception.
110
- */
111
- heuristics: 'Action needed later. Heuristics based exception is active.',
112
- /**
113
- * @description String in Cookie Report table. This is used when a cookie's domain does not have an entry in the third-party cookie migration readiness list Github nor a grace period nor heuristics exception.
114
- */
115
- other: 'Contact third-party site for more info',
116
- /**
117
- * @description String representing the Advertising cookie type. Used to format 'ad' category from the Third Party Web dataset.
118
- */
119
- adCookieTypeString: 'Advertising',
120
- /**
121
- * @description String representing the Analytics cookie type. Used to format 'analytics' category from the Third Party Web dataset.
122
- */
123
- analyticsCookieTypeString: 'Analytics',
124
- /**
125
- * @description String representing the Social cookie type. Used to format 'social' category from the Third Party Web dataset.
126
- */
127
- socialCookieTypeString: 'Social',
128
- /**
129
- * @description String representing the Video cookie type. Used to format 'video' category from the Third Party Web dataset.
130
- */
131
- videoCookieTypeString: 'Video',
132
- /**
133
- * @description String representing the Utility cookie type. Used to format 'utility' category from the Third Party Web dataset.
134
- */
135
- utilityCookieTypeString: 'Utility',
136
- /**
137
- * @description String representing the Hosting cookie type. Used to format 'hosting' category from the Third Party Web dataset.
138
- */
139
- hostingCookieTypeString: 'Hosting',
140
- /**
141
- * @description String representing the Marketing cookie type. Used to format 'marketing' category from the Third Party Web dataset.
142
- */
143
- marketingCookieTypeString: 'Marketing',
144
- /**
145
- * @description String representing the Customer Success cookie type. Used to format 'customer-success' category from the Third Party Web dataset.
146
- */
147
- customerSuccessCookieTypeString: 'Customer Success',
148
- /**
149
- * @description String representing the Content cookie type. Used to format 'content' category from the Third Party Web dataset.
150
- */
151
- contentCookieTypeString: 'Content',
152
- /**
153
- * @description String representing the CDN cookie type. Used to format 'cdn' category from the Third Party Web dataset.
154
- */
155
- cdnCookieTypeString: 'CDN',
156
- /**
157
- * @description String representing the Tag Manager cookie type. Used to format 'tag-manager' category from the Third Party Web dataset.
158
- */
159
- tagManagerCookieTypeString: 'Tag Manager',
160
- /**
161
- * @description String representing the Consent Provider cookie type. Used to format 'consent-provider' category from the Third Party Web dataset.
162
- */
163
- consentProviderCookieTypeString: 'Consent Provider',
164
- /**
165
- * @description String representing the Other cookie type. Used to format 'other' category from the Third Party Web dataset.
166
- */
167
- otherCookieTypeString: 'Other',
168
- /**
169
- * @description String that shows up in the context menu when right clicking one of the entries in the cookie report.
170
- */
171
- showRequestsWithThisCookie: 'Show requests with this cookie',
172
- /**
173
- * @description First part of the deprecation warning message.
174
- * @example {maintaining its current approach to user choice for third-party cookies} PH1
175
- */
176
- upperDeprecationWarning: 'Chrome is {PH1} and third-party cookie exceptions are being phased out.',
177
- /**
178
- * @description Text for the blog post link inside the deprecation warning.
179
- */
180
- blogPostLink: 'maintaining its current approach to user choice for third-party cookies',
181
- /**
182
- * @description Second part of the deprecation warning message.
183
- */
184
- lowerDeprecationWarning:
185
- 'The Controls and Third-Party cookie sections will be removed and the Privacy and Security panel will revert to its former name, the Security panel. As always, third-party cookies can be inspected from the Cookies pane in the Application panel.',
186
- } as const;
187
- const str_ = i18n.i18n.registerUIStrings('panels/security/CookieReportView.ts', UIStrings);
188
- export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
189
- export const i18nFormatString = uiI18n.getFormatLocalizedString.bind(undefined, str_);
190
- export const i18nFormatStringTemplate = uiI18n.getFormatLocalizedStringTemplate.bind(undefined, str_);
191
-
192
- export interface ViewInput {
193
- cookieRows: IssuesManager.CookieIssue.CookieReportInfo[];
194
- filterItems: UI.FilterBar.Item[];
195
- filters: TextUtils.TextUtils.ParsedFilter[];
196
- searchText: string;
197
- onSearchFilterChanged: (e: CustomEvent<string>) => void;
198
- onFilterChanged: () => void;
199
- onSortingChanged: () => void;
200
- populateContextMenu: (event: CustomEvent<{menu: UI.ContextMenu.ContextMenu, element: HTMLElement}>) => void;
201
- }
202
- export interface ViewOutput {
203
- namedBitSetFilterUI?: UI.FilterBar.NamedBitSetFilterUI;
204
- }
205
-
206
- export interface CookieReportNodeData {
207
- name: string;
208
- domain: string;
209
- type: string;
210
- platform: string;
211
- status: string;
212
- recommendation: HTMLElement;
213
- }
214
-
215
- export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
216
- const DEFAULT_VIEW: View = (input, output, target) => {
217
- const deprecationMessage = html`
218
- <div class="deprecation-warning">
219
- <div class="body">
220
- <devtools-icon
221
- name="warning"
222
- class="medium"
223
- style="color: var(--icon-warning); margin-right: var(--sys-size-2);">
224
- </devtools-icon>
225
- ${i18nFormatStringTemplate(UIStrings.upperDeprecationWarning, {
226
- PH1:
227
- html`<devtools-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" jslogcontext="privacy-sandbox-update">${
228
- i18nString(UIStrings.blogPostLink)}</devtools-link>`,
229
- })}
230
- </div>
231
- <div class="body">
232
- ${i18nString(UIStrings.lowerDeprecationWarning)}
233
- </div>
234
- </div>
235
- `;
236
-
237
- // clang-format off
238
- render(html `
239
- <div class="report overflow-auto">
240
- <div class="header">
241
- <h1>${i18nString(UIStrings.title)}</h1>
242
- <div class="body">${i18nString(UIStrings.body)} <devtools-link class="devtools-link" href="https://developers.google.com/privacy-sandbox/cookies/prepare/audit-cookies" jslogcontext="learn-more">${i18nString(UIStrings.learnMoreLink)}</devtools-link></div>
243
- </div>
244
- ${input.cookieRows.length > 0 ?
245
- html`
246
- <div class="filters-container">
247
- <devtools-toolbar>
248
- <devtools-toolbar-input
249
- type="filter"
250
- style="flex-grow: 0.4;"
251
- @change=${input.onSearchFilterChanged}
252
- value=${input.searchText}
253
- ></devtools-toolbar-input>
254
- </devtools-toolbar>
255
- <devtools-named-bit-set-filter
256
- class="filter"
257
- aria-label="Third-party cookie status filters"
258
- @filterChanged=${input.onFilterChanged}
259
- .options=${{items: input.filterItems}}
260
- ${ref((el?: Element) => {
261
- if(el instanceof UI.FilterBar.NamedBitSetFilterUIElement){
262
- output.namedBitSetFilterUI = el.getOrCreateNamedBitSetFilterUI();
263
- }
264
- })}
265
- ></devtools-named-bit-set-filter>
266
- </div>
267
- <!-- @ts-ignore -->
268
- <devtools-data-grid
269
- name=${i18nString(UIStrings.report)}
270
- striped
271
- .filters=${input.filters}
272
- @sort=${input.onSortingChanged}
273
- @contextmenu=${input.populateContextMenu.bind(input)}
274
- >
275
- <table>
276
- <tr>
277
- <th id="name" sortable>${i18nString(UIStrings.name)}</th>
278
- <th id="domain" sortable>${i18nString(UIStrings.domain)}</th>
279
- <th id="type" sortable>${i18nString(UIStrings.type)}</th>
280
- <th id="platform" sortable>${i18nString(UIStrings.platform)}</th>
281
- <th id="status" sortable>${i18nString(UIStrings.status)}</th>
282
- <th id="recommendation" sortable>${i18nString(UIStrings.recommendation)}</th>
283
- </tr>
284
- ${[...input.cookieRows.values()].map(row => html`
285
- <tr data-name=${row.name} data-domain=${row.domain}>
286
- <td>${row.name}</td>
287
- <td>${row.domain}</td>
288
- <td>${CookieReportView.getCookieTypeString(row.type)}</td>
289
- <td>${row.platform ?? i18nString(UIStrings.unknown)}</td>
290
- <td>${CookieReportView.getStatusString(row.status)}</td>
291
- <td>${CookieReportView.getRecommendation(row.domain, row.insight)}</td>
292
- </tr>
293
- `)}
294
- </table>
295
- </devtools-data-grid>
296
- ` :
297
- html `
298
- <div class="empty-report">
299
- <devtools-icon
300
- class="cookie-off"
301
- name="cookie_off"
302
- ></devtools-icon>
303
- <div class="empty-report-title">
304
- ${i18nString(UIStrings.emptyReport)}
305
- </div>
306
- <div class="body">
307
- ${i18nString(UIStrings.emptyReportExplanation)}
308
- </div>
309
- </div>
310
- <div class="deprecation-divider"></div>
311
- `
312
- }
313
-
314
- ${deprecationMessage}
315
-
316
- </div>
317
- `, target);
318
- // clang-format on
319
- };
320
-
321
- export class CookieReportView extends UI.Widget.VBox {
322
- #issuesManager?: IssuesManager.IssuesManager.IssuesManager;
323
- namedBitSetFilterUI?: UI.FilterBar.NamedBitSetFilterUI;
324
- #cookieRows = new Map<string, IssuesManager.CookieIssue.CookieReportInfo>();
325
- #view: View;
326
- filterItems: UI.FilterBar.Item[] = [];
327
- searchText: string;
328
-
329
- constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
330
- super(element, {useShadowDom: true});
331
- this.#view = view;
332
- this.registerRequiredCSS(cookieReportViewStyles);
333
- this.searchText = Common.Settings.Settings.instance().createSetting('cookie-report-search-query', '').get();
334
-
335
- SDK.TargetManager.TargetManager.instance().addModelListener(
336
- SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.PrimaryPageChanged,
337
- this.#onPrimaryPageChanged, this);
338
-
339
- this.#issuesManager = IssuesManager.IssuesManager.IssuesManager.instance();
340
- this.#issuesManager.addEventListener(
341
- IssuesManager.IssuesManager.Events.ISSUE_ADDED, this.#onIssueEventReceived, this);
342
- for (const issue of this.#issuesManager.issues()) {
343
- if (issue instanceof IssuesManager.CookieIssue.CookieIssue) {
344
- this.#onIssueAdded(issue);
345
- }
346
- }
347
-
348
- this.requestUpdate();
349
- }
350
-
351
- override performUpdate(): void {
352
- this.filterItems = this.#buildFilterItems();
353
- const viewInput = {
354
- cookieRows: [...this.#cookieRows.values()].filter(row => {
355
- if (this.namedBitSetFilterUI) {
356
- return this.namedBitSetFilterUI.accept(CookieReportView.getStatusString(row.status));
357
- }
358
- return true;
359
- }),
360
- filters: [{
361
- key: 'name,domain',
362
- regex: RegExp(Platform.StringUtilities.escapeForRegExp(this.searchText), 'i'),
363
- negative: false,
364
- }],
365
- searchText: this.searchText,
366
- filterItems: this.filterItems,
367
- onSearchFilterChanged: (e: CustomEvent<string>) => this.onSearchFilterChanged(e),
368
- onFilterChanged: () => this.requestUpdate(),
369
- onSortingChanged: () => this.requestUpdate(),
370
- populateContextMenu: this.populateContextMenu.bind(this),
371
- };
372
- this.#view(viewInput, this, this.contentElement);
373
- }
374
-
375
- #onPrimaryPageChanged(): void {
376
- this.#cookieRows.clear();
377
- this.namedBitSetFilterUI = undefined;
378
- this.requestUpdate();
379
- }
380
-
381
- #onIssueEventReceived(event: Common.EventTarget.EventTargetEvent<IssuesManager.IssuesManager.IssueAddedEvent>): void {
382
- if (event.data.issue instanceof IssuesManager.CookieIssue.CookieIssue) {
383
- if (this.#cookieRows.has(event.data.issue.cookieId())) {
384
- return;
385
- }
386
- this.#onIssueAdded(event.data.issue);
387
- this.requestUpdate();
388
- }
389
- }
390
-
391
- #onIssueAdded(issue: IssuesManager.CookieIssue.CookieIssue): void {
392
- const info = issue.makeCookieReportEntry();
393
- if (info) {
394
- this.#cookieRows.set(issue.cookieId(), info);
395
- }
396
- }
397
-
398
- onSearchFilterChanged(e: CustomEvent<string>): void {
399
- this.searchText = e.detail ? e.detail : '';
400
- Common.Settings.Settings.instance().createSetting('cookie-report-search-query', '').set(this.searchText);
401
- this.requestUpdate();
402
- }
403
-
404
- #buildFilterItems(): UI.FilterBar.Item[] {
405
- const filterItems: UI.FilterBar.Item[] = [];
406
-
407
- if (this.#cookieRows.values().some(n => n.status === IssuesManager.CookieIssue.CookieStatus.BLOCKED)) {
408
- filterItems.push({
409
- name: UIStrings.blocked,
410
- label: () => i18nString(UIStrings.blocked),
411
- title: UIStrings.blocked,
412
- jslogContext: 'blocked',
413
- });
414
- }
415
- if (this.#cookieRows.values().some(n => n.status === IssuesManager.CookieIssue.CookieStatus.ALLOWED)) {
416
- filterItems.push({
417
- name: UIStrings.allowed,
418
- label: () => i18nString(UIStrings.allowed),
419
- title: UIStrings.allowed,
420
- jslogContext: 'allowed',
421
- });
422
- }
423
- if (this.#cookieRows.values().some(
424
- n => n.status === IssuesManager.CookieIssue.CookieStatus.ALLOWED_BY_GRACE_PERIOD ||
425
- n.status === IssuesManager.CookieIssue.CookieStatus.ALLOWED_BY_HEURISTICS)) {
426
- filterItems.push({
427
- name: UIStrings.allowedByException,
428
- label: () => i18nString(UIStrings.allowedByException),
429
- title: UIStrings.allowedByException,
430
- jslogContext: 'allowed-by-exception',
431
- });
432
- }
433
-
434
- return filterItems;
435
- }
436
-
437
- populateContextMenu(event: CustomEvent<{menu: UI.ContextMenu.ContextMenu, element: HTMLElement}>): void {
438
- const {menu, element} = event.detail;
439
- const {domain, name} = element?.dataset;
440
- if (!domain || !name) {
441
- return;
442
- }
443
-
444
- menu.revealSection().appendItem(i18nString(UIStrings.showRequestsWithThisCookie), () => {
445
- const requestFilter = NetworkForward.UIFilter.UIRequestFilter.filters([
446
- {
447
- filterType: NetworkForward.UIFilter.FilterType.CookieDomain,
448
- filterValue: domain,
449
- },
450
- {
451
- filterType: NetworkForward.UIFilter.FilterType.CookieName,
452
- filterValue: name,
453
- },
454
- ]);
455
- void Common.Revealer.reveal(requestFilter);
456
- }, {jslogContext: 'show-requests-with-this-cookie'});
457
- }
458
-
459
- static getStatusString(status: IssuesManager.CookieIssue.CookieStatus): string {
460
- switch (status) {
461
- case IssuesManager.CookieIssue.CookieStatus.BLOCKED:
462
- return i18nString(UIStrings.blocked);
463
- case IssuesManager.CookieIssue.CookieStatus.ALLOWED_BY_GRACE_PERIOD:
464
- case IssuesManager.CookieIssue.CookieStatus.ALLOWED_BY_HEURISTICS:
465
- return i18nString(UIStrings.allowedByException);
466
- case IssuesManager.CookieIssue.CookieStatus.ALLOWED:
467
- return i18nString(UIStrings.allowed);
468
- }
469
- }
470
-
471
- static getRecommendation(domain: string, insight?: Protocol.Audits.CookieIssueInsight): HTMLElement {
472
- const recElem = document.createElement('div');
473
-
474
- render(CookieReportView.getRecommendationText(domain, insight), recElem, {host: this});
475
- return recElem;
476
- }
477
-
478
- static getRecommendationText(domain: string, insight?: Protocol.Audits.CookieIssueInsight): Lit.TemplateResult {
479
- if (!insight) {
480
- return html`${i18nString(UIStrings.other)}`;
481
- }
482
-
483
- switch (insight.type) {
484
- case Protocol.Audits.InsightType.GitHubResource: {
485
- const githubLink = html`<devtools-link href=${
486
- insight.tableEntryUrl ??
487
- 'https://github.com/privacysandbox/privacy-sandbox-dev-support/blob/main/3pc-migration-readiness.md'} jslogcontext="readiness-list-link">${
488
- i18nString(UIStrings.guidance)}</devtools-link>`;
489
-
490
- return html`${uiI18n.getFormatLocalizedStringTemplate(str_, UIStrings.gitHubResource, {
491
- PH1: githubLink,
492
- })}`;
493
- }
494
- case Protocol.Audits.InsightType.GracePeriod: {
495
- const url = SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inspectedURL();
496
- const gracePeriodLink = html`<devtools-link
497
- href=${
498
- 'https://developers.google.com/privacy-sandbox/cookies/dashboard?url=' +
499
- // The order of the URLs matters - needs to be 1P + 3P.
500
- (url ? Common.ParsedURL.ParsedURL.fromString(url)?.host + '+' : '') +
501
- (domain.charAt(0) === '.' ? domain.substring(1) : domain)}
502
- jslogcontext="compatibility-lookup-link">${i18nString(UIStrings.reportedIssues)}</devtools-link>`;
503
-
504
- return html`${uiI18n.getFormatLocalizedStringTemplate(str_, UIStrings.gracePeriod, {
505
- PH1: gracePeriodLink,
506
- })}`;
507
- }
508
- case Protocol.Audits.InsightType.Heuristics:
509
- return html`${i18nString(UIStrings.heuristics)}`;
510
- default:
511
- return html`${i18nString(UIStrings.other)}`;
512
- }
513
- }
514
-
515
- static getCookieTypeString(type?: string): string {
516
- if (!type) {
517
- return i18nString(UIStrings.otherCookieTypeString);
518
- }
519
-
520
- switch (type) {
521
- case 'ad':
522
- return i18nString(UIStrings.adCookieTypeString);
523
- case 'analytics':
524
- return i18nString(UIStrings.analyticsCookieTypeString);
525
- case 'social':
526
- return i18nString(UIStrings.socialCookieTypeString);
527
- case 'video':
528
- return i18nString(UIStrings.videoCookieTypeString);
529
- case 'utility':
530
- return i18nString(UIStrings.utilityCookieTypeString);
531
- case 'hosting':
532
- return i18nString(UIStrings.hostingCookieTypeString);
533
- case 'marketing':
534
- return i18nString(UIStrings.marketingCookieTypeString);
535
- case 'customer-success':
536
- return i18nString(UIStrings.customerSuccessCookieTypeString);
537
- case 'content':
538
- return i18nString(UIStrings.contentCookieTypeString);
539
- case 'cdn':
540
- return i18nString(UIStrings.cdnCookieTypeString);
541
- case 'tag-manager':
542
- return i18nString(UIStrings.tagManagerCookieTypeString);
543
- case 'consent-provider':
544
- return i18nString(UIStrings.consentProviderCookieTypeString);
545
- default:
546
- return i18nString(UIStrings.otherCookieTypeString);
547
- }
548
- }
549
- }
@@ -1,139 +0,0 @@
1
- /*
2
- * Copyright 2024 The Chromium Authors
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
- .overflow-auto {
8
- height: 100%;
9
- }
10
-
11
- .controls {
12
- display: flex;
13
- flex-direction: column;
14
- padding: var(--sys-size-5) var(--sys-size-3) var(--sys-size-5) var(--sys-size-5);
15
- min-width: var(--sys-size-33);
16
- }
17
-
18
- .header {
19
- display: flex;
20
- flex-direction: column;
21
- gap: var(--sys-size-2);
22
- padding-left: var(--sys-size-5);
23
- }
24
-
25
- h1 {
26
- margin: 0;
27
- font: var(--sys-typescale-headline4);
28
- }
29
-
30
- .card-container {
31
- max-width: 100%;
32
- }
33
-
34
- .card {
35
- display: flex;
36
- flex-direction: column;
37
- padding: var(--sys-size-6) var(--sys-size-8);
38
- gap: var(--sys-size-6);
39
-
40
- &.enterprise-disabled {
41
- color: var(--sys-color-token-subtle);
42
- }
43
- }
44
-
45
- .card-header {
46
- display: flex;
47
- align-items: center;
48
- }
49
-
50
- .card-header > .lhs {
51
- width: 100%;
52
- display: flex;
53
- justify-content: space-between;
54
- align-items: center;
55
- padding-right: var(--sys-size-9);
56
-
57
- & > devtools-icon {
58
- height: var(--sys-size-11);
59
- width: var(--sys-size-11);
60
- }
61
- }
62
-
63
- .text {
64
- display: flex;
65
- flex-direction: column;
66
- gap: var(--sys-size-2);
67
- }
68
-
69
- h2 {
70
- font: var(--sys-typescale-headline5);
71
- margin: 0;
72
- }
73
-
74
- .body {
75
- font: var(--sys-typescale-body4-regular);
76
- }
77
-
78
- .checkbox-label {
79
- gap: var(--sys-size-8);
80
- display: flex;
81
- align-items: center;
82
- }
83
-
84
- .card-row {
85
- padding-top: var(--sys-size-4);
86
- padding-bottom: var(--sys-size-4);
87
- padding-left: var(--sys-size-8);
88
- }
89
-
90
- h3 {
91
- font: var(--sys-typescale-body4-medium);
92
- margin: 0;
93
- }
94
-
95
- .devtools-link {
96
- color: var(--sys-color-primary);
97
- text-decoration-line: underline;
98
- cursor: pointer;
99
- }
100
-
101
- .enterprise {
102
- display: flex;
103
- flex-direction: row;
104
- justify-content: space-between;
105
- gap: var(--sys-size-9);
106
- padding: var(--sys-size-6) var(--sys-size-8) var(--sys-size-6) var(--sys-size-11);
107
- align-items: center;
108
-
109
- > .anchor{
110
- display: flex;
111
- flex-direction: row;
112
- gap: var(--sys-size-9);
113
- }
114
- }
115
-
116
- input[type="checkbox"] {
117
- flex-shrink: 0;
118
- }
119
-
120
- .main-text {
121
- color: var(--sys-color-on-surface);
122
- }
123
-
124
- .subtext {
125
- color: var(--sys-color-on-surface-subtle);
126
- }
127
-
128
- .deprecation-divider {
129
- border-bottom: 1px solid var(--sys-color-divider);
130
- margin: var(--sys-size-2) calc(var(--sys-size-3) * -1) var(--sys-size-6) calc(var(--sys-size-5) * -1);
131
- }
132
-
133
- .deprecation-warning {
134
- padding: 0 var(--sys-size-5);
135
- }
136
-
137
- .deprecation-warning > .body:first-child {
138
- margin-bottom: var(--sys-size-4);
139
- }