chrome-devtools-frontend 1.0.1522585 → 1.0.1525561

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 (357) hide show
  1. package/AUTHORS +1 -0
  2. package/docs/README.md +1 -0
  3. package/docs/policy/README.md +1 -0
  4. package/docs/policy/console-policy.md +144 -0
  5. package/docs/policy/images/console-policy1.png +0 -0
  6. package/docs/policy/images/console-policy2.png +0 -0
  7. package/docs/policy/images/console-policy3.png +0 -0
  8. package/docs/policy/slow-close.md +22 -19
  9. package/docs/ui_engineering.md +22 -0
  10. package/front_end/Tests.js +1 -1
  11. package/front_end/core/common/Color.ts +13 -9
  12. package/front_end/core/common/ColorConverter.ts +9 -7
  13. package/front_end/core/common/Gzip.ts +1 -1
  14. package/front_end/core/common/MapWithDefault.ts +5 -3
  15. package/front_end/core/common/ResourceType.ts +0 -12
  16. package/front_end/core/common/ReturnToPanel.ts +6 -4
  17. package/front_end/core/common/Trie.ts +4 -2
  18. package/front_end/core/host/AidaClient.ts +3 -3
  19. package/front_end/core/host/GdpClient.ts +7 -5
  20. package/front_end/core/host/InspectorFrontendHostAPI.ts +7 -5
  21. package/front_end/core/host/Platform.ts +5 -3
  22. package/front_end/core/host/UserMetrics.ts +6 -4
  23. package/front_end/core/platform/ArrayUtilities.ts +1 -1
  24. package/front_end/core/platform/StringUtilities.ts +34 -31
  25. package/front_end/core/root/Runtime.ts +1 -1
  26. package/front_end/core/sdk/CSSMetadata.ts +6 -4
  27. package/front_end/core/sdk/CSSPropertyParser.ts +17 -13
  28. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +19 -13
  29. package/front_end/core/sdk/ChildTargetManager.ts +35 -0
  30. package/front_end/core/sdk/DOMModel.ts +1 -1
  31. package/front_end/core/sdk/EventBreakpointsModel.ts +4 -2
  32. package/front_end/core/sdk/HttpReasonPhraseStrings.ts +4 -2
  33. package/front_end/core/sdk/NetworkManager.ts +8 -48
  34. package/front_end/core/sdk/NetworkRequest.ts +0 -28
  35. package/front_end/core/sdk/PageResourceLoader.ts +1 -1
  36. package/front_end/core/sdk/PreloadingModel.ts +22 -18
  37. package/front_end/core/sdk/RehydratingConnection.ts +1 -1
  38. package/front_end/core/sdk/RehydratingObject.ts +1 -1
  39. package/front_end/core/sdk/RemoteObject.ts +1 -1
  40. package/front_end/core/sdk/ResourceTreeModel.ts +2 -0
  41. package/front_end/{models/source_map_scopes → core/sdk}/ScopeTreeCache.ts +8 -7
  42. package/front_end/core/sdk/ScreenCaptureModel.ts +24 -20
  43. package/front_end/core/sdk/Target.ts +7 -1
  44. package/front_end/core/sdk/TraceObject.ts +2 -2
  45. package/front_end/core/sdk/sdk.ts +2 -0
  46. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +7 -0
  47. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +15 -12
  48. package/front_end/entrypoints/formatter_worker/Substitute.ts +6 -4
  49. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -16
  50. package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -1
  51. package/front_end/entrypoints/main/MainImpl.ts +6 -4
  52. package/front_end/generated/InspectorBackendCommands.js +2 -2
  53. package/front_end/generated/protocol-mapping.d.ts +3 -2
  54. package/front_end/generated/protocol-proxy-api.d.ts +3 -1
  55. package/front_end/generated/protocol.ts +7 -1
  56. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +55 -14
  57. package/front_end/models/ai_assistance/agents/StylingAgent.ts +83 -222
  58. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +23 -0
  59. package/front_end/models/ai_assistance/performance/AIContext.ts +19 -4
  60. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +4 -2
  61. package/front_end/models/autofill_manager/AutofillManager.ts +4 -2
  62. package/front_end/models/cpu_profile/CPUProfileDataModel.ts +1 -1
  63. package/front_end/models/crux-manager/CrUXManager.ts +1 -1
  64. package/front_end/models/extensions/HostUrlPattern.ts +13 -5
  65. package/front_end/models/formatter/FormatterWorkerPool.ts +1 -1
  66. package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +1 -1
  67. package/front_end/models/issues_manager/CookieIssue.ts +2 -2
  68. package/front_end/models/issues_manager/MarkdownIssueDescription.ts +1 -1
  69. package/front_end/models/issues_manager/SharedDictionaryIssue.ts +20 -0
  70. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  71. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  72. package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
  73. package/front_end/models/network_time_calculator/Calculator.ts +4 -2
  74. package/front_end/models/network_time_calculator/RequestTimeRanges.ts +6 -4
  75. package/front_end/models/source_map_scopes/NamesResolver.ts +8 -8
  76. package/front_end/models/source_map_scopes/source_map_scopes.ts +0 -2
  77. package/front_end/models/text_utils/ContentProvider.ts +6 -4
  78. package/front_end/models/trace/extras/TraceTree.ts +1 -1
  79. package/front_end/models/trace/handlers/FramesHandler.ts +7 -5
  80. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +13 -7
  81. package/front_end/models/trace/handlers/MetaHandler.ts +16 -14
  82. package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +20 -8
  83. package/front_end/models/trace/handlers/helpers.ts +1 -1
  84. package/front_end/models/trace/handlers/types.ts +23 -19
  85. package/front_end/models/trace/helpers/Timing.ts +4 -2
  86. package/front_end/models/trace/helpers/Trace.ts +8 -4
  87. package/front_end/models/trace/insights/DocumentLatency.ts +1 -1
  88. package/front_end/models/trace/insights/INPBreakdown.ts +13 -2
  89. package/front_end/models/trace/insights/LCPBreakdown.ts +14 -2
  90. package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -2
  91. package/front_end/models/trace/types/File.ts +12 -8
  92. package/front_end/models/trace/types/Timing.ts +1 -1
  93. package/front_end/models/trace/types/TraceEvents.ts +37 -23
  94. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
  95. package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +12 -10
  96. package/front_end/panels/application/KeyValueStorageItemsView.ts +31 -33
  97. package/front_end/panels/application/components/InterestGroupAccessGrid.ts +6 -11
  98. package/front_end/panels/application/components/OriginTrialTreeView.ts +7 -5
  99. package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -0
  100. package/front_end/panels/application/components/ReportsGrid.ts +4 -10
  101. package/front_end/panels/application/components/SharedStorageAccessGrid.ts +5 -13
  102. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
  103. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +3 -7
  104. package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -2
  105. package/front_end/panels/application/preloading/components/RuleSetGrid.ts +3 -10
  106. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -2
  107. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +7 -5
  108. package/front_end/panels/changes/ChangesSidebar.ts +105 -96
  109. package/front_end/panels/changes/ChangesView.ts +69 -69
  110. package/front_end/panels/changes/CombinedDiffView.ts +1 -1
  111. package/front_end/panels/changes/changesSidebar.css +3 -0
  112. package/front_end/panels/changes/changesView.css +4 -0
  113. package/front_end/panels/console/ConsoleView.ts +2 -2
  114. package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +22 -35
  115. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
  116. package/front_end/panels/elements/ElementStatePaneWidget.ts +12 -0
  117. package/front_end/panels/elements/ElementsTreeElement.ts +9 -5
  118. package/front_end/panels/elements/ElementsTreeOutline.ts +11 -8
  119. package/front_end/panels/elements/PropertyRenderer.ts +19 -15
  120. package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -4
  121. package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
  122. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +4 -2
  123. package/front_end/panels/elements/components/AdornerManager.ts +5 -3
  124. package/front_end/panels/lighthouse/LighthouseController.ts +5 -0
  125. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +43 -46
  126. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +260 -157
  127. package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +28 -21
  128. package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
  129. package/front_end/panels/network/NetworkDataGridNode.ts +2 -44
  130. package/front_end/panels/network/NetworkLogView.ts +6 -4
  131. package/front_end/panels/network/RequestPreviewView.ts +0 -7
  132. package/front_end/panels/network/components/RequestHeadersView.ts +0 -6
  133. package/front_end/panels/network/components/components.ts +0 -2
  134. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +1 -1
  135. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +4 -2
  136. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +12 -19
  137. package/front_end/panels/search/SearchResultsPane.ts +2 -3
  138. package/front_end/panels/security/IPProtectionView.ts +1 -1
  139. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +4 -0
  140. package/front_end/panels/settings/emulation/utils/StructuredHeaders.ts +45 -37
  141. package/front_end/panels/sources/BreakpointsViewUtils.ts +11 -9
  142. package/front_end/panels/sources/DebuggerPlugin.ts +8 -4
  143. package/front_end/panels/sources/SourcesPanel.ts +1 -1
  144. package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
  145. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +4 -2
  146. package/front_end/panels/timeline/CountersGraph.ts +12 -5
  147. package/front_end/panels/timeline/EasterEgg.d.ts +5 -3
  148. package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +8 -6
  149. package/front_end/panels/timeline/ModificationsManager.ts +5 -3
  150. package/front_end/panels/timeline/ThreadAppender.ts +7 -5
  151. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -8
  152. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
  153. package/front_end/panels/timeline/TimelinePanel.ts +10 -8
  154. package/front_end/panels/timeline/TimelineSelection.ts +4 -2
  155. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -3
  156. package/front_end/panels/timeline/components/BreadcrumbsUI.ts +6 -4
  157. package/front_end/panels/timeline/components/Utils.ts +1 -1
  158. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +5 -3
  159. package/front_end/panels/timeline/utils/Helpers.ts +1 -1
  160. package/front_end/panels/utils/utils.ts +1 -7
  161. package/front_end/services/trace_bounds/TraceBounds.ts +4 -2
  162. package/front_end/services/tracing/PerformanceTracing.ts +1 -1
  163. package/front_end/third_party/chromium/README.chromium +1 -1
  164. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  165. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  166. package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
  167. package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
  168. package/front_end/third_party/codemirror.next/package.json +3 -2
  169. package/front_end/third_party/puppeteer/README.chromium +2 -2
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts +8 -10
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js +8 -10
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +28 -30
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +27 -29
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +34 -38
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +34 -38
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts +8 -1
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts.map +1 -1
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js +12 -14
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js.map +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +92 -108
  187. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  188. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +33 -39
  189. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  190. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +5 -3
  192. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
  194. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
  196. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +4 -2
  197. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +14 -5
  199. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
  201. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  202. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +12 -6
  203. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +24 -2
  206. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
  208. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts +1 -0
  209. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  210. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +3 -0
  211. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
  212. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
  213. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
  215. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts +6 -8
  217. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts.map +1 -1
  218. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js +6 -8
  219. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js.map +1 -1
  220. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
  222. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +6 -3
  226. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts +5 -7
  228. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +5 -7
  230. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -1
  231. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  232. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  233. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  235. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +188 -224
  236. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +140 -166
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts +8 -10
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts.map +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js +8 -10
  240. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js.map +1 -1
  241. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +28 -30
  242. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
  243. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +27 -29
  244. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
  245. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +34 -38
  246. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
  247. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +34 -38
  248. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
  249. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts +8 -1
  250. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts.map +1 -1
  251. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js +12 -14
  252. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js.map +1 -1
  253. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +92 -108
  254. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  255. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +33 -39
  256. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  257. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
  258. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +5 -3
  259. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
  260. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
  261. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +1 -1
  262. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
  263. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +4 -2
  264. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  265. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +15 -6
  266. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
  267. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
  268. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  269. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +12 -6
  270. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  271. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  272. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +24 -2
  273. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
  274. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
  275. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  276. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +3 -0
  277. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
  278. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
  279. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
  280. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
  281. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
  282. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts +6 -8
  283. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts.map +1 -1
  284. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js +6 -8
  285. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js.map +1 -1
  286. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
  287. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
  288. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +1 -1
  289. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  290. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +6 -3
  291. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  292. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts +5 -7
  293. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  294. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +5 -7
  295. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -1
  296. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  297. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  298. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  299. package/front_end/third_party/puppeteer/package/lib/types.d.ts +188 -224
  300. package/front_end/third_party/puppeteer/package/package.json +3 -3
  301. package/front_end/third_party/puppeteer/package/src/api/Dialog.ts +8 -10
  302. package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +27 -29
  303. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +34 -38
  304. package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +17 -14
  305. package/front_end/third_party/puppeteer/package/src/api/Page.ts +92 -108
  306. package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +5 -3
  307. package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +5 -1
  308. package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +28 -3
  309. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +16 -7
  310. package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +28 -2
  311. package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +4 -0
  312. package/front_end/third_party/puppeteer/package/src/cdp/PredefinedNetworkConditions.ts +13 -22
  313. package/front_end/third_party/puppeteer/package/src/common/Device.ts +6 -8
  314. package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
  315. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +6 -3
  316. package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +5 -7
  317. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  318. package/front_end/ui/components/chrome_link/ChromeLink.ts +4 -2
  319. package/front_end/ui/components/dialogs/Dialog.ts +13 -9
  320. package/front_end/ui/components/docs/linear_memory_inspector/basic.ts +21 -9
  321. package/front_end/ui/components/highlighting/HighlightElement.ts +77 -0
  322. package/front_end/ui/components/highlighting/HighlightManager.ts +58 -1
  323. package/front_end/ui/components/highlighting/highlighting.ts +2 -0
  324. package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +5 -3
  325. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -3
  326. package/front_end/ui/components/menus/SelectMenu.ts +6 -4
  327. package/front_end/ui/components/survey_link/SurveyLink.ts +4 -2
  328. package/front_end/ui/components/text_editor/config.ts +10 -6
  329. package/front_end/ui/components/text_editor/javascript.ts +8 -4
  330. package/front_end/ui/components/tooltips/Tooltip.ts +22 -5
  331. package/front_end/ui/legacy/ForwardedInputEventHandler.ts +4 -2
  332. package/front_end/ui/legacy/GlassPane.ts +1 -1
  333. package/front_end/ui/legacy/SettingsUI.ts +1 -5
  334. package/front_end/ui/legacy/Treeoutline.ts +12 -33
  335. package/front_end/ui/legacy/UIUtils.ts +19 -1
  336. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +12 -10
  337. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +30 -32
  338. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  339. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +25 -25
  340. package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
  341. package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +4 -2
  342. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +4 -2
  343. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +8 -6
  344. package/front_end/ui/legacy/components/perf_ui/PieChart.ts +6 -4
  345. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -3
  346. package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +18 -20
  347. package/front_end/ui/legacy/components/source_frame/XMLView.ts +22 -16
  348. package/front_end/ui/legacy/components/source_frame/xmlView.css +0 -2
  349. package/front_end/ui/legacy/components/utils/Linkifier.ts +6 -4
  350. package/front_end/ui/visual_logging/Debugging.ts +10 -6
  351. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -3
  352. package/inspector_overlay/common.ts +5 -3
  353. package/inspector_overlay/highlight_grid_common.ts +1 -1
  354. package/package.json +1 -1
  355. package/front_end/Images/src/bundle.svg +0 -3
  356. package/front_end/panels/network/components/WebBundleInfoView.css +0 -27
  357. package/front_end/panels/network/components/WebBundleInfoView.ts +0 -95
package/AUTHORS CHANGED
@@ -33,6 +33,7 @@ Danny Eldridge <me@heardanieljames.com>
33
33
  Derek Li <the.derekli@gmail.com>
34
34
  Douglas Chiang <douglasdothnc@gmail.com>
35
35
  Dragonish <no.web.developer@outlook.com>
36
+ Eden Wang <nedenwang@gmail.com>
36
37
  Edward Trist <edwardtrist@gmail.com>
37
38
  Ergün Erdoğmuş <erdogmusergun@gmail.com>
38
39
  Eric Rannaud <eric.rannaud@gmail.com>
package/docs/README.md CHANGED
@@ -60,6 +60,7 @@ below.**
60
60
 
61
61
  ### Policies
62
62
 
63
+ * [Chromium DevTools Console Policy](./policy/console-policy.md)
63
64
  * [Chromium DevTools Slow-Close Policy](./policy/slow-close.md)
64
65
  * [DevTools Page Zoom Accessibility Policy](./policy/gar-page-zoom-policy.md)
65
66
 
@@ -3,5 +3,6 @@
3
3
  This folder contains the policies relevant to the development of the Chromium
4
4
  DevTools.
5
5
 
6
+ 1. [Chromium DevTools Console Policy](./console-policy.md)
6
7
  1. [Chromium DevTools Slow-Close Policy](./slow-close.md)
7
8
  2. [DevTools Page Zoom Accessibility Policy](./gar-page-zoom-policy.md)
@@ -0,0 +1,144 @@
1
+ # Chromium DevTools Console Policy
2
+
3
+ [goo.gle/devtools-console-policy](http://goo.gle/devtools-console-policy)
4
+ ([go/chrome-devtools:console-policy](http://go/chrome-devtools:console-policy))
5
+
6
+ **TL;DR:** This policy outlines a strategy to keep the signal to noise ratio in
7
+ the Console panel of Chromium DevTools high, by setting clear expectations for
8
+ Chromium teams what kind of information is presented to web developers via the
9
+ Console and how it is presented. Console spam, specifically from Chromium
10
+ itself, is a known pain point for developers (e.g.
11
+ [crbug/338403584](http://crbug.com/338403584)).
12
+
13
+ ## Background
14
+
15
+ The [Console panel](https://developer.chrome.com/docs/devtools/console) in the
16
+ Chromium Developer Tools is usually the first place where web developers check
17
+ in case something is not working as expected, and ideally they would come across
18
+ an error or warning message here that helps them to quickly resolve the issue at
19
+ hand. The panel shows all the messages that are logged by the web application
20
+ but also the browser (potentially on behalf of the web application, for example
21
+ logging uncaught exceptions).
22
+
23
+ In order for it to remain useful to web developers, the signal to noise ratio
24
+ must be as high as possible, and it’s crucially important to keep in mind that
25
+ the information shown is (a) relevant to what the developer is looking for right
26
+ now and (b) actionable wrt. to the issue at hand. Putting it the other way
27
+ around, while the developer is focused on investigating a concrete problem it
28
+ doesn’t help to show a lot of messages around potential issues, suggested
29
+ improvements, or things that went wrong without any useful breadcrumbs (prime
30
+ examples here are error messages from somewhere deep in Blink which contain no
31
+ stack traces and basically just repeat the information that is already present
32
+ on a JavaScript exception throw at the same time).
33
+
34
+ ## Common problems
35
+
36
+ ### Useless anchor
37
+
38
+ A common problem we’ve observed is console messages from Chromium without a
39
+ meaningful and actionable stack trace. Consider the following example, where the
40
+ location attached to the console message is the first line of the main document.
41
+ The inexperienced web developer will probably be puzzled how come
42
+ `<!doctype html>` activates fingerprinting protection on the current page.
43
+
44
+ ![](./images/console-policy1.png "Useless message anchors")
45
+
46
+ ### For your information
47
+
48
+ From a Chromium team working on a specific feature, it might be totally
49
+ reasonable to _”let the developer know what’s going on”_, because something
50
+ could break. But from a user’s perspective, messages that basically only convey
51
+ non-actionable information and aren’t relevant in the context of the problem
52
+ that the developer is investigating are useless at best. Consider the following
53
+ example:
54
+
55
+ ![](./images/console-policy2.png "Confusing FYI messages")
56
+
57
+ The first warning message says that Fingerprinting protection is active, but
58
+ doesn’t tell the developer whether that’s a problem or not, and what they can do
59
+ about it. It’s highly confusing. The second warning message states that two
60
+ third-party cookies were blocked, but also leaves the developer wondering if
61
+ that’s something to be concerned about or caused any actual problem.
62
+
63
+ Similar messages that fall into this bucket:
64
+
65
+ * `Third-party cookie will be blocked. Learn more in the Issues tab`
66
+ * `[Violation] 'setTimeout' handler took <N>ms`
67
+ * `[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>`
68
+ * `Specifying 'overflow: visible' on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/view-transitions/blob/main/debugging_overflow_on_images.md for details.`
69
+
70
+ Logging a message to the Console panel just to tell the developer to open
71
+ another panel or read some article is specifically annoying, and over time will
72
+ result in training web developers on ignoring messages produced by Chromium
73
+ itself.
74
+
75
+ ### Repetition
76
+
77
+ Repeating the same message over and over again (independent of whether it’s
78
+ actionable and meaningful) is another source of problems:
79
+
80
+ ![](./images/console-policy3.png "Repeated console messages")
81
+
82
+ DevTools has a feature to group similar messages, which most users have enabled,
83
+ so the pain they feel from a lot of repeated information is manageable. But that
84
+ also gives rise to a new problem: Problems might be hidden through the grouping
85
+ feature outside of the viewport, because the grouping somewhat breaks the
86
+ chronological order.
87
+
88
+ ## Best practice
89
+
90
+ Specifically for the purpose of being able to present developers with actionable
91
+ information, coupled with traces of data that are relevant to the issue, we’ve
92
+ introduced the [Issues panel], and as part of
93
+ [crbug/40173406](http://crbug.com/40173406) and related bugs already migrated a
94
+ few spammy console messages to issues.
95
+
96
+ In general, reserve the use of `context->AddConsoleMessage(...)` and similar
97
+ APIs for rare cases when the console message adds significant value, favor a
98
+ well-worded and helpful issue over a console message, and specifically don’t
99
+ spit out a console message when you are already raising an exception (exceptions
100
+ can be coupled with issues internally to provide more actionable information).
101
+
102
+ ## Building empathy
103
+
104
+ Many Chromies might not be able to immediately relate to the struggles of web
105
+ developers, and might not have first hand experience with sifting through
106
+ endless logs of useless information produced by frameworks, libraries, and
107
+ eventually the browser. But imagine the following scenario: You are using `gdb`
108
+ or `lldb` and instead of helping you diagnose the crash somewhere deep in your
109
+ C++ code for Autofill in the browser process, it’s spamming you with pages of
110
+ potential performance improvements in the renderer code for `<canvas>` elements.
111
+ At best that would be very confusing, but more likely you’d be very frustrated
112
+ with the tool after a while. This is exactly what happens if we spam web
113
+ developers with potential performance issues.
114
+
115
+ We have a [logging policy for Chromium] to prevent ourselves from being
116
+ overwhelmed by log messages from other Chromium teams, for the same reason.
117
+
118
+ ## GTM strategy
119
+
120
+ The most common cause for spammy console messages from Chromium is an
121
+ insufficient Go-To-Market (GTM) strategy for features or (potentially breaking)
122
+ changes when it comes to developer adoption. Oftentimes it’s unclear what
123
+ exactly the expectations are and what are the critical user journeys that web
124
+ developers go through. Spending a bit more time on this aspect and involving
125
+ DevRel early on can help to shine light on the matter and avoid sprinkling log
126
+ messages all over the place to _”raise awareness”_. Specifically consider:
127
+
128
+ - The precise target audience for your information, because not all web
129
+ developers are equal at all times.
130
+ - Under which exact circumstances that piece of information is required.
131
+ - Is it a nice to have (e.g. _”X could be faster if you did Y”_ or _”using A
132
+ poses a potential security risk for your users”_) or a critically important
133
+ piece of information (e.g. _”X will stop working in the next release unless
134
+ you do Y”_).
135
+
136
+ Feel free to reach out to [devtools-dev@chromium.org] with questions, and ping
137
+ [dsv@chromium.org](mailto:dsv@chromium.org) (Chrome DevTools TL) or
138
+ [hablich@chromium.org](mailto:hablich@chromium.org) (Chrome DevTools PM)
139
+ directly (specifically in case of code reviews which add new problematic console
140
+ messages).
141
+
142
+ [Issues panel]: https://developer.chrome.com/docs/devtools/issues
143
+ [logging policy for Chromium]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#logging
144
+ [devtools-dev@chromium.org]: https://groups.google.com/a/chromium.org/g/devtools-dev
@@ -4,11 +4,11 @@
4
4
  <small>([go/chrome-devtools:slow-close-policy])</small>
5
5
 
6
6
  In November 2024, we instituted a slow close policy for Chrome DevTools to
7
- automatically maintain hygiene of our bug database. We ended up with a list
8
- of over 1650 open bugs and over 750 open feature requests, some of them going
9
- back over 10 years, which was not only challenging to maintain, but also made
10
- it difficult to determine what's relevant and where we should invest our
11
- resources best.
7
+ automatically maintain hygiene of our bug database. We ended up with a list of
8
+ over 1650 open bugs and over 750 open feature requests, some of them going back
9
+ over 10 years, which was not only challenging to maintain, but also made it
10
+ difficult to determine what's relevant and where we should invest our resources
11
+ best.
12
12
 
13
13
  By automatically nudging and closing stale bugs and feature requests, we can
14
14
  reduce this burden, and better communicate to our users what will actually be
@@ -20,28 +20,31 @@ actioned, and hear from them what remains relevant.
20
20
 
21
21
  The criteria for slow close:
22
22
 
23
- - Status: unassigned
24
- - Type: Bug or Feature Request
25
- - Created: over 3 years ago
26
- - Last updated: over 90 days ago
27
- - Popularity: (cc count + vote count) < 10
28
- - No open descendants
23
+ - Status: unassigned
24
+ - Type: Bug or Feature Request
25
+ - Created: over 3 years ago
26
+ - Last updated: over 90 days ago
27
+ - Popularity: (cc count + vote count) < 10
28
+ - No open descendants
29
29
 
30
30
  Googlers can mark issues as exempt from slow close by adding them to the
31
31
  [`DevTools-Blintz-Close-Exempt` hotlist](https://issues.chromium.org/hotlists/6459983).
32
+ All issues on the
33
+ [`ChromeTooling-Icebox`](https://issues.chromium.org/hotlists/7363836) are also
34
+ automatically exempt from slow close.
32
35
 
33
36
  ## Process
34
37
 
35
38
  The automation runs on a daily basis, and performs the following steps:
36
39
 
37
- - Issues that meet the criteria outlined above are added to the
38
- [`DevTools-Blintz-Close-Candidate` hotlist](https://issues.chromium.org/hotlists/6459982)
39
- for closure.
40
- - If 14 days have passed and no updates have occurred, the issue will be closed
41
- and moved to the
42
- [`DevTools-Blintz-Close` hotlist](https://issues.chromium.org/hotlists/6460812)
43
- for recording purposes.
44
- - No more than 25 issues will be updated in a single run.
40
+ - Issues that meet the criteria outlined above are added to the
41
+ [`DevTools-Blintz-Close-Candidate` hotlist](https://issues.chromium.org/hotlists/6459982)
42
+ for closure.
43
+ - If 14 days have passed and no updates have occurred, the issue will be
44
+ closed and moved to the
45
+ [`DevTools-Blintz-Close` hotlist](https://issues.chromium.org/hotlists/6460812)
46
+ for recording purposes.
47
+ - No more than 25 issues will be updated in a single run.
45
48
 
46
49
  ## Implementation
47
50
 
@@ -1299,3 +1299,25 @@ export class NodeIndicatorProvider implements UI.Toolbar.Provider {
1299
1299
  }
1300
1300
  }
1301
1301
  ```
1302
+
1303
+ ## Highlighting text
1304
+
1305
+ ### (UI.UIUtils.highlightRangesWithStyleClass or Highlighting.HighlightManager)
1306
+
1307
+ Use the `<devtools-highlight>` component to highlight text ranges within its
1308
+ container. The component takes two attributes: `ranges`, which is a
1309
+ space-separated list of `offset,length` pairs, and `current-range`, which is a
1310
+ single `offset,length` pair to highlight with a different color.
1311
+
1312
+ The component will automatically sort and merge the ranges provided.
1313
+
1314
+ ```html
1315
+ <div style="position:relative">
1316
+ <devtools-highlight ranges="10,2 1,3 2,3" current-range="5,3">
1317
+ This is some text to highlight.
1318
+ </devtools-highlight>
1319
+ </div>
1320
+ ```
1321
+
1322
+ In this example, the ranges `1,3` and `2,3` will be merged into `1,4`. The
1323
+ ranges `10,2` and the current range `5,3` will also be highlighted.
@@ -1065,7 +1065,7 @@
1065
1065
  this.fail(text);
1066
1066
  } // This will throw.
1067
1067
  }
1068
- // Neither PASS nor FAIL, so wait for more messages.
1068
+ /** Neither PASS nor FAIL, so wait for more messages. **/
1069
1069
  function onConsoleMessage(event) {
1070
1070
  const text = event.data.messageText;
1071
1071
  if (text === 'PASS') {
@@ -47,11 +47,13 @@ import {
47
47
  rgbToHwb,
48
48
  } from './ColorUtils.js';
49
49
 
50
- // <hue> is defined as a <number> or <angle>
51
- // and we hold this in degrees. However, after
52
- // the conversions, these degrees can result in
53
- // negative values. That's why we normalize the hue to be
54
- // between [0 - 360].
50
+ /**
51
+ * <hue> is defined as a <number> or <angle>
52
+ * and we hold this in degrees. However, after
53
+ * the conversions, these degrees can result in
54
+ * negative values. That's why we normalize the hue to be
55
+ * between [0 - 360].
56
+ **/
55
57
  function normalizeHue(hue: number): number {
56
58
  // Even though it is highly unlikely, hue can be
57
59
  // very negative like -400. The initial modulo
@@ -60,9 +62,11 @@ function normalizeHue(hue: number): number {
60
62
  return ((hue % 360) + 360) % 360;
61
63
  }
62
64
 
63
- // Parses angle in the form of
64
- // `<angle>deg`, `<angle>turn`, `<angle>grad and `<angle>rad`
65
- // and returns the canonicalized `degree`.
65
+ /**
66
+ * Parses angle in the form of
67
+ * `<angle>deg`, `<angle>turn`, `<angle>grad and `<angle>rad`
68
+ * and returns the canonicalized `degree`.
69
+ **/
66
70
  function parseAngle(angleText: string): number|null {
67
71
  const angle = angleText.replace(/(deg|g?rad|turn)$/, '');
68
72
  // @ts-expect-error: isNaN can accept strings
@@ -90,7 +94,7 @@ function parseAngle(angleText: string): number|null {
90
94
  return number;
91
95
  }
92
96
 
93
- // Returns the `Format` equivalent from the format text
97
+ /** Returns the `Format` equivalent from the format text **/
94
98
  export function getFormat(formatText: string): Format|null {
95
99
  switch (formatText) {
96
100
  case Format.HEX:
@@ -50,13 +50,15 @@ class Matrix3x3 {
50
50
  }
51
51
  }
52
52
 
53
- // A transfer function mapping encoded values to linear values,
54
- // represented by this 7-parameter piecewise function:
55
- //
56
- // linear = sign(encoded) * (c*|encoded| + f) , 0 <= |encoded| < d
57
- // = sign(encoded) * ((a*|encoded| + b)^g + e), d <= |encoded|
58
- //
59
- // (A simple gamma transfer function sets g to gamma and a to 1.)
53
+ /**
54
+ * A transfer function mapping encoded values to linear values,
55
+ * represented by this 7-parameter piecewise function:
56
+ *
57
+ * linear = sign(encoded) * (c*|encoded| + f) , 0 <= |encoded| < d
58
+ * = sign(encoded) * ((a*|encoded| + b)^g + e), d <= |encoded|
59
+ *
60
+ * (A simple gamma transfer function sets g to gamma and a to 1.)
61
+ **/
60
62
  class TransferFunction {
61
63
  g: number;
62
64
  a: number;
@@ -48,7 +48,7 @@ export async function compress(str: string): Promise<ArrayBuffer> {
48
48
  return buffer;
49
49
  }
50
50
 
51
- // Private coder/decoder
51
+ /** Private coder/decoder **/
52
52
  function gzipCodec(buffer: Uint8Array<ArrayBufferLike>|ArrayBuffer, codecStream: CompressionStream|DecompressionStream):
53
53
  Promise<ArrayBuffer> {
54
54
  const {readable, writable} = new TransformStream();
@@ -2,9 +2,11 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- // Polyfill of https://github.com/tc39/proposal-upsert with a subclass.
6
- //
7
- // TODO: Once the proposal is merged, just replace `MapWithDefault` with `Map` and remove it.
5
+ /**
6
+ * Polyfill of https://github.com/tc39/proposal-upsert with a subclass.
7
+ *
8
+ * TODO: Once the proposal is merged, just replace `MapWithDefault` with `Map` and remove it.
9
+ **/
8
10
  export class MapWithDefault<K, V> extends Map<K, V> {
9
11
  getOrInsert(key: K, defaultValue: V): V {
10
12
  if (!this.has(key)) {
@@ -145,10 +145,6 @@ const UIStrings = {
145
145
  * @description Name of a network initiator type
146
146
  */
147
147
  preflight: 'Preflight',
148
- /**
149
- * @description Name of a network initiator type
150
- */
151
- webbundle: 'WebBundle',
152
148
  /**
153
149
  * @description Name of a network initiator type for FedCM requests
154
150
  */
@@ -212,9 +208,6 @@ export class ResourceType {
212
208
  if (mimeType === 'application/wasm') {
213
209
  return resourceTypes.Wasm;
214
210
  }
215
- if (mimeType === 'application/webbundle') {
216
- return resourceTypes.WebBundle;
217
- }
218
211
 
219
212
  return null;
220
213
  }
@@ -337,10 +330,6 @@ export class ResourceType {
337
330
  return this.#name.startsWith('sm-');
338
331
  }
339
332
 
340
- isWebbundle(): boolean {
341
- return this.#name === 'webbundle';
342
- }
343
-
344
333
  toString(): string {
345
334
  return this.#name;
346
335
  }
@@ -427,7 +416,6 @@ export const resourceTypes = {
427
416
  SourceMapScript: new ResourceType('sm-script', i18nLazyString(UIStrings.script), resourceCategories.Script, true),
428
417
  SourceMapStyleSheet:
429
418
  new ResourceType('sm-stylesheet', i18nLazyString(UIStrings.stylesheet), resourceCategories.Stylesheet, true),
430
- WebBundle: new ResourceType('webbundle', i18nLazyString(UIStrings.webbundle), resourceCategories.Other, false),
431
419
  FedCM: new ResourceType('fedcm', i18nLazyString(UIStrings.fedcm), resourceCategories.Other, false),
432
420
  } as const;
433
421
 
@@ -2,10 +2,12 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- // Set instance of this class as flavor to mark what panel triggered the
6
- // 'elements.toggle-element-search' action if it was not the elements panel.
7
- // This will cause specified panel to be made visible instead of the elements
8
- // panel after the inspection is done.
5
+ /**
6
+ * Set instance of this class as flavor to mark what panel triggered the
7
+ * 'elements.toggle-element-search' action if it was not the elements panel.
8
+ * This will cause specified panel to be made visible instead of the elements
9
+ * panel after the inspection is done.
10
+ **/
9
11
  export class ReturnToPanelFlavor {
10
12
  readonly viewId: string;
11
13
 
@@ -7,8 +7,10 @@
7
7
  // ElementTYpe<string> -> string
8
8
  type ElementType<T extends ArrayLike<unknown>> = T extends ArrayLike<infer E>? E : never;
9
9
 
10
- // Abstracts some generic operations that have different implementions depending
11
- // on whether we operate on strings or array of things.
10
+ /**
11
+ * Abstracts some generic operations that have different implementations depending
12
+ * on whether we operate on strings or array of things.
13
+ **/
12
14
  interface TrieableTrait<T extends ArrayLike<ElementType<T>>> {
13
15
  empty(): T;
14
16
  append(base: T, appendage: ElementType<T>): T;
@@ -93,7 +93,7 @@ export interface FunctionDeclaration<T extends string|number|symbol = string> {
93
93
  parameters: FunctionObjectParam<T>;
94
94
  }
95
95
 
96
- // Raw media bytes.
96
+ /** Raw media bytes. **/
97
97
  export interface MediaBlob {
98
98
  // The IANA standard MIME type of the source data.
99
99
  // Currently supported types are: image/png, image/jpeg.
@@ -113,7 +113,7 @@ export enum FunctionalityType {
113
113
  AGENTIC_CHAT = 5,
114
114
  }
115
115
 
116
- // See: cs/aida.proto (google3).
116
+ /** See: cs/aida.proto (google3). **/
117
117
  export enum ClientFeature {
118
118
  // Unspecified client feature.
119
119
  CLIENT_FEATURE_UNSPECIFIED = 0,
@@ -150,7 +150,7 @@ export enum UserTier {
150
150
  PUBLIC = 3,
151
151
  }
152
152
 
153
- // Googlers: see the Aida `retrieval` proto; this type is based on that.
153
+ /** Googlers: see the Aida `retrieval` proto; this type is based on that. **/
154
154
  export interface RequestFactMetadata {
155
155
  /**
156
156
  * A description of where the fact comes from.
@@ -84,11 +84,13 @@ class GdpError extends Error {
84
84
  }
85
85
  }
86
86
 
87
- // The `batchGet` awards endpoint returns badge names with an
88
- // obfuscated user ID (e.g., `profiles/12345/awards/badge-name`).
89
- // This function normalizes them to use `me` instead of the ID
90
- // (e.g., `profiles/me/awards/badge-path`) to match the format
91
- // used for client-side requests.
87
+ /**
88
+ * The `batchGet` awards endpoint returns badge names with an
89
+ * obfuscated user ID (e.g., `profiles/12345/awards/badge-name`).
90
+ * This function normalizes them to use `me` instead of the ID
91
+ * (e.g., `profiles/me/awards/badge-path`) to match the format
92
+ * used for client-side requests.
93
+ **/
92
94
  function normalizeBadgeName(name: string): string {
93
95
  return name.replace(/profiles\/[^/]+\/awards\//, 'profiles/me/awards/');
94
96
  }
@@ -217,11 +217,13 @@ export interface FunctionCallEvent {
217
217
  context?: number;
218
218
  }
219
219
 
220
- // While `EventDescriptors` are used to dynamically dispatch host binding events,
221
- // the `EventTypes` "type map" is used for type-checking said events by TypeScript.
222
- // `EventTypes` is not used at runtime.
223
- // Please note that the "dispatch" side can't be type-checked as the dispatch is
224
- // done dynamically.
220
+ /**
221
+ * While `EventDescriptors` are used to dynamically dispatch host binding events,
222
+ * the `EventTypes` "type map" is used for type-checking said events by TypeScript.
223
+ * `EventTypes` is not used at runtime.
224
+ * Please note that the "dispatch" side can't be type-checked as the dispatch is
225
+ * done dynamically.
226
+ **/
225
227
  export interface EventTypes {
226
228
  [Events.AppendedToURL]: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString;
227
229
  [Events.CanceledSaveURL]: Platform.DevToolsPath.UrlString;
@@ -35,9 +35,11 @@ export function isWin(): boolean {
35
35
  return _isWin;
36
36
  }
37
37
 
38
- // In Chrome Layout tests the imported 'Platform' object is not writable/
39
- // configurable, which prevents us from monkey-patching 'Platform''s methods.
40
- // We circumvent this by adding 'setPlatformForTests'.
38
+ /**
39
+ * In Chrome Layout tests the imported 'Platform' object is not writable/
40
+ * configurable, which prevents us from monkey-patching 'Platform''s methods.
41
+ * We circumvent this by adding 'setPlatformForTests'.
42
+ **/
41
43
  export function setPlatformForTests(platform: string): void {
42
44
  _platform = platform;
43
45
  _isMac = undefined;
@@ -321,9 +321,11 @@ export class UserMetrics {
321
321
  * 2. Do not update any 'MAX_VALUE' or any other value.
322
322
  */
323
323
 
324
- // Codes below are used to collect UMA histograms in the Chromium port.
325
- // Do not change the values below, additional actions are needed on the Chromium side
326
- // in order to add more codes.
324
+ /**
325
+ * Codes below are used to collect UMA histograms in the Chromium port.
326
+ * Do not change the values below, additional actions are needed on the Chromium side
327
+ * in order to add more codes.
328
+ **/
327
329
  export enum Action {
328
330
  /* eslint-disable @typescript-eslint/naming-convention */
329
331
  WindowDocked = 1,
@@ -807,7 +809,7 @@ export enum DevtoolsExperiments {
807
809
  MAX_VALUE = 110,
808
810
  }
809
811
 
810
- // Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added.
812
+ /** Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added. **/
811
813
  export enum IssueExpanded {
812
814
  /* eslint-disable @typescript-eslint/naming-convention */
813
815
  CrossOriginEmbedderPolicy = 0,
@@ -265,7 +265,7 @@ export function nearestIndexFromEnd<T>(arr: readonly T[], predicate: (arrayItem:
265
265
  return nearestIndex(arr, predicate, NearestSearchStart.END);
266
266
  }
267
267
 
268
- // Type guard for ensuring that `arr` does not contain null or undefined
268
+ /** Type guard for ensuring that `arr` does not contain null or undefined **/
269
269
  export function arrayDoesNotContainNullOrUndefined<T>(arr: Array<T|null|undefined>): arr is T[] {
270
270
  return !arr.includes(null) && !arr.includes(undefined);
271
271
  }