chrome-devtools-frontend 1.0.1515446 → 1.0.1515988

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 (215) hide show
  1. package/docs/contributing/infrastructure.md +131 -82
  2. package/front_end/Tests.js +3 -29
  3. package/front_end/core/common/Progress.ts +73 -55
  4. package/front_end/core/host/UserMetrics.ts +0 -1
  5. package/front_end/core/protocol_client/InspectorBackend.ts +2 -0
  6. package/front_end/core/root/Runtime.ts +0 -1
  7. package/front_end/core/sdk/CSSMatchedStyles.ts +12 -10
  8. package/front_end/core/sdk/CSSModel.ts +1 -31
  9. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +27 -7
  10. package/front_end/core/sdk/DebuggerModel.ts +1 -31
  11. package/front_end/core/sdk/EnhancedTracesParser.ts +81 -50
  12. package/front_end/core/sdk/NetworkManager.ts +1 -31
  13. package/front_end/core/sdk/NetworkRequest.ts +1 -31
  14. package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1003 -0
  15. package/front_end/core/sdk/RehydratingConnection.ts +13 -18
  16. package/front_end/core/sdk/RehydratingObject.ts +8 -31
  17. package/front_end/core/sdk/RemoteObject.ts +1 -31
  18. package/front_end/core/sdk/ResourceTreeModel.ts +1 -31
  19. package/front_end/core/sdk/RuntimeModel.ts +1 -31
  20. package/front_end/core/sdk/ServiceWorkerManager.ts +1 -31
  21. package/front_end/core/sdk/SourceMap.ts +1 -31
  22. package/front_end/core/sdk/TraceObject.ts +8 -3
  23. package/front_end/entrypoints/main/MainImpl.ts +0 -2
  24. package/front_end/entrypoints/main/main-meta.ts +2 -2
  25. package/front_end/generated/InspectorBackendCommands.js +4 -4
  26. package/front_end/generated/SupportedCSSProperties.js +12 -0
  27. package/front_end/generated/protocol.ts +10 -1
  28. package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -3
  29. package/front_end/models/ai_assistance/ConversationHandler.ts +4 -6
  30. package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -1
  31. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +107 -72
  32. package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +2 -2
  33. package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
  34. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +178 -85
  35. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +308 -218
  36. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +161 -97
  37. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +78 -58
  38. package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +10 -1
  39. package/front_end/models/ai_assistance/performance/AIContext.ts +19 -21
  40. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +123 -55
  41. package/front_end/models/bindings/ContentProviderBasedProject.ts +6 -4
  42. package/front_end/models/breakpoints/BreakpointManager.ts +3 -3
  43. package/front_end/models/har/Writer.ts +11 -11
  44. package/front_end/models/javascript_metadata/NativeFunctions.js +7 -7
  45. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +3 -3
  46. package/front_end/models/persistence/IsolatedFileSystem.ts +4 -4
  47. package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -7
  48. package/front_end/models/persistence/PersistenceImpl.ts +8 -8
  49. package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
  50. package/front_end/models/text_utils/TextUtils.ts +26 -0
  51. package/front_end/models/trace/ModelImpl.ts +2 -16
  52. package/front_end/models/trace/Processor.ts +14 -8
  53. package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +4 -4
  54. package/front_end/models/trace/handlers/FramesHandler.ts +2 -2
  55. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -10
  56. package/front_end/models/trace/handlers/MetaHandler.ts +11 -9
  57. package/front_end/models/trace/handlers/ScreenshotsHandler.ts +1 -1
  58. package/front_end/models/trace/handlers/ScriptsHandler.ts +5 -5
  59. package/front_end/models/trace/handlers/UserInteractionsHandler.ts +2 -14
  60. package/front_end/models/trace/handlers/UserTimingsHandler.ts +3 -4
  61. package/front_end/models/trace/insights/CLSCulprits.ts +1 -1
  62. package/front_end/models/trace/insights/DocumentLatency.ts +8 -7
  63. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
  64. package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
  65. package/front_end/models/trace/insights/ImageDelivery.ts +1 -1
  66. package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
  67. package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
  68. package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
  69. package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
  70. package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
  71. package/front_end/models/trace/insights/types.ts +2 -0
  72. package/front_end/models/trace/types/Configuration.ts +12 -0
  73. package/front_end/models/trace/types/TraceEvents.ts +41 -64
  74. package/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +1 -1
  75. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +21 -99
  76. package/front_end/panels/application/ServiceWorkersView.ts +0 -1
  77. package/front_end/panels/application/components/BackForwardCacheStrings.ts +8 -2
  78. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
  79. package/front_end/panels/common/BadgeNotification.ts +10 -8
  80. package/front_end/panels/common/GdpSignUpDialog.ts +30 -14
  81. package/front_end/panels/common/gdpSignUpDialog.css +4 -0
  82. package/front_end/panels/console/ConsoleView.ts +23 -28
  83. package/front_end/panels/console/ConsoleViewport.ts +2 -2
  84. package/front_end/panels/console/consoleView.css +11 -1
  85. package/front_end/panels/coverage/CoverageView.ts +2 -2
  86. package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
  87. package/front_end/panels/elements/StyleEditorWidget.ts +8 -19
  88. package/front_end/panels/elements/StylePropertyTreeElement.ts +39 -25
  89. package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
  90. package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -3
  91. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
  92. package/front_end/panels/layers/LayerTreeModel.ts +3 -3
  93. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -4
  94. package/front_end/panels/network/NetworkLogView.ts +1 -1
  95. package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
  96. package/front_end/panels/network/NetworkSearchScope.ts +6 -6
  97. package/front_end/panels/search/SearchView.ts +220 -159
  98. package/front_end/panels/settings/components/SyncSection.ts +64 -10
  99. package/front_end/panels/settings/components/syncSection.css +6 -0
  100. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +1 -4
  101. package/front_end/panels/sources/SourcesSearchScope.ts +4 -4
  102. package/front_end/panels/sources/TabbedEditorContainer.ts +5 -5
  103. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -5
  104. package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -15
  105. package/front_end/panels/timeline/TimelinePanel.ts +41 -22
  106. package/front_end/panels/timeline/TracingLayerTree.ts +4 -5
  107. package/front_end/panels/timeline/components/ExportTraceOptions.ts +37 -22
  108. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +17 -7
  109. package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
  110. package/front_end/third_party/axe-core/README.chromium +1 -0
  111. package/front_end/third_party/chromium/README.chromium +1 -1
  112. package/front_end/third_party/codemirror/README.chromium +1 -0
  113. package/front_end/third_party/codemirror.next/README.chromium +1 -0
  114. package/front_end/third_party/csp_evaluator/README.chromium +1 -0
  115. package/front_end/third_party/diff/README.chromium +1 -0
  116. package/front_end/third_party/i18n/README.chromium +1 -0
  117. package/front_end/third_party/intl-messageformat/README.chromium +1 -0
  118. package/front_end/third_party/json5/README.chromium +1 -0
  119. package/front_end/third_party/legacy-javascript/README.chromium +1 -0
  120. package/front_end/third_party/lighthouse/README.chromium +1 -0
  121. package/front_end/third_party/lit/README.chromium +1 -0
  122. package/front_end/third_party/marked/README.chromium +1 -0
  123. package/front_end/third_party/puppeteer/README.chromium +2 -2
  124. package/front_end/third_party/puppeteer/package/README.md +6 -3
  125. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +11 -1
  127. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +2 -2
  129. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +5 -1
  131. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +30 -8
  133. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  134. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +1 -3
  136. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
  138. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  140. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js +8 -2
  141. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
  142. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +5 -1
  143. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +8 -2
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -0
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  153. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +12 -2
  154. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +22 -8
  155. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +11 -1
  157. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +2 -2
  159. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +5 -1
  161. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +30 -8
  163. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +1 -3
  166. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  169. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js +8 -2
  170. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +5 -1
  172. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  173. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +8 -2
  174. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -0
  179. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  180. package/front_end/third_party/puppeteer/package/lib/types.d.ts +12 -2
  181. package/front_end/third_party/puppeteer/package/package.json +4 -4
  182. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +1 -1
  183. package/front_end/third_party/puppeteer/package/src/api/Page.ts +13 -2
  184. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +50 -8
  185. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +0 -1
  186. package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +8 -1
  187. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +21 -5
  188. package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
  189. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +12 -0
  190. package/front_end/third_party/puppeteer-replay/README.chromium +1 -0
  191. package/front_end/third_party/third-party-web/README.chromium +1 -0
  192. package/front_end/third_party/vscode.web-custom-data/README.chromium +1 -0
  193. package/front_end/third_party/wasmparser/README.chromium +1 -0
  194. package/front_end/third_party/web-vitals/README.chromium +1 -0
  195. package/front_end/ui/components/text_editor/config.ts +66 -16
  196. package/front_end/ui/components/tooltips/Tooltip.ts +17 -1
  197. package/front_end/ui/legacy/ContextMenu.ts +2 -2
  198. package/front_end/ui/legacy/GlassPane.ts +7 -3
  199. package/front_end/ui/legacy/ProgressIndicator.ts +33 -21
  200. package/front_end/ui/legacy/TabbedPane.ts +2 -2
  201. package/front_end/ui/legacy/Treeoutline.ts +10 -5
  202. package/front_end/ui/legacy/UIUtils.ts +42 -10
  203. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +14 -14
  204. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
  205. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +4 -2
  206. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -29
  207. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +14 -14
  208. package/front_end/ui/visual_logging/Debugging.ts +24 -12
  209. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  210. package/inspector_overlay/highlight_common.ts +1 -27
  211. package/inspector_overlay/highlight_grid_common.ts +1 -27
  212. package/inspector_overlay/tool_highlight.ts +1 -27
  213. package/inspector_overlay/tool_persistent.ts +1 -27
  214. package/inspector_overlay/tool_source_order.ts +1 -27
  215. package/package.json +3 -3
@@ -1046,13 +1046,6 @@ export class LinkableNameRenderer extends rendererBase(SDK.CSSPropertyParserMatc
1046
1046
  ruleBlock: '@position-try',
1047
1047
  isDefined: Boolean(this.#matchedStyles.positionTryRules().find(pt => pt.name().text === match.text)),
1048
1048
  };
1049
- case SDK.CSSPropertyParserMatchers.LinkableNameProperties.FUNCTION:
1050
- return {
1051
- jslogContext: 'css-function',
1052
- metric: null,
1053
- ruleBlock: '@function',
1054
- isDefined: Boolean(this.#matchedStyles.getRegisteredFunction(match.text)),
1055
- };
1056
1049
  }
1057
1050
  }
1058
1051
 
@@ -1065,15 +1058,7 @@ export class LinkableNameRenderer extends rendererBase(SDK.CSSPropertyParserMatc
1065
1058
  isDefined,
1066
1059
  onLinkActivate: (): void => {
1067
1060
  metric && Host.userMetrics.swatchActivated(metric);
1068
- if (match.propertyName === SDK.CSSPropertyParserMatchers.LinkableNameProperties.FUNCTION) {
1069
- const functionName = this.#matchedStyles.getRegisteredFunction(match.text);
1070
- if (!functionName) {
1071
- return;
1072
- }
1073
- this.#stylesPane.jumpToFunctionDefinition(functionName);
1074
- } else {
1075
- this.#stylesPane.jumpToSectionBlock(`${ruleBlock} ${match.text}`);
1076
- }
1061
+ this.#stylesPane.jumpToSectionBlock(`${ruleBlock} ${match.text}`);
1077
1062
  },
1078
1063
  jslogContext,
1079
1064
  };
@@ -1609,7 +1594,7 @@ export class LengthRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.L
1609
1594
  }
1610
1595
 
1611
1596
  // clang-format off
1612
- export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.MathFunctionMatch) {
1597
+ export class BaseFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.BaseFunctionMatch) {
1613
1598
  // clang-format on
1614
1599
  readonly #stylesPane: StylesSidebarPane;
1615
1600
  readonly #matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles;
@@ -1627,7 +1612,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
1627
1612
  this.#propertyName = propertyName;
1628
1613
  }
1629
1614
 
1630
- override render(match: SDK.CSSPropertyParserMatchers.MathFunctionMatch, context: RenderingContext): Node[] {
1615
+ override render(match: SDK.CSSPropertyParserMatchers.BaseFunctionMatch<string>, context: RenderingContext): Node[] {
1631
1616
  const childTracingContexts = context.tracing?.evaluation(match.args, {match, context});
1632
1617
  const renderedArgs = match.args.map((arg, idx) => {
1633
1618
  const span = document.createElement('span');
@@ -1651,7 +1636,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
1651
1636
  if (evaluation) {
1652
1637
  return evaluation;
1653
1638
  }
1654
- } else if (!match.isArithmeticFunctionCall()) {
1639
+ } else if (match instanceof SDK.CSSPropertyParserMatchers.MathFunctionMatch && !match.isArithmeticFunctionCall()) {
1655
1640
  void this.applyMathFunction(renderedArgs, match, context);
1656
1641
  }
1657
1642
 
@@ -1659,7 +1644,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
1659
1644
  }
1660
1645
 
1661
1646
  async applyEvaluation(
1662
- span: HTMLSpanElement, match: SDK.CSSPropertyParserMatchers.MathFunctionMatch,
1647
+ span: HTMLSpanElement, match: SDK.CSSPropertyParserMatchers.BaseFunctionMatch<string>,
1663
1648
  context: RenderingContext): Promise<boolean> {
1664
1649
  const value = context.matchedResult.getComputedText(match.node, match => {
1665
1650
  if (match instanceof SDK.CSSPropertyParserMatchers.RelativeColorChannelMatch) {
@@ -1678,7 +1663,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
1678
1663
  }
1679
1664
 
1680
1665
  async applyMathFunction(
1681
- renderedArgs: HTMLElement[], match: SDK.CSSPropertyParserMatchers.MathFunctionMatch,
1666
+ renderedArgs: HTMLElement[], match: SDK.CSSPropertyParserMatchers.BaseFunctionMatch<string>,
1682
1667
  context: RenderingContext): Promise<void> {
1683
1668
  // To understand which argument was selected by the function, we evaluate the function as well as all the arguments
1684
1669
  // and compare the function result to the values of all its arguments. Evaluating the arguments eliminates nested
@@ -1701,6 +1686,14 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
1701
1686
  }
1702
1687
  }
1703
1688
 
1689
+ export class MathFunctionRenderer extends BaseFunctionRenderer {
1690
+ override readonly matchType = SDK.CSSPropertyParserMatchers.MathFunctionMatch;
1691
+ }
1692
+
1693
+ export class CustomFunctionRenderer extends BaseFunctionRenderer {
1694
+ override readonly matchType = SDK.CSSPropertyParserMatchers.CustomFunctionMatch;
1695
+ }
1696
+
1704
1697
  // clang-format off
1705
1698
  export class AnchorFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.AnchorFunctionMatch) {
1706
1699
  // clang-format on
@@ -1871,6 +1864,7 @@ export function getPropertyRenderers(
1871
1864
  new PositionTryRenderer(matchedStyles),
1872
1865
  new LengthRenderer(stylesPane, propertyName, treeElement),
1873
1866
  new MathFunctionRenderer(stylesPane, matchedStyles, computedStyles, propertyName, treeElement),
1867
+ new CustomFunctionRenderer(stylesPane, matchedStyles, computedStyles, propertyName, treeElement),
1874
1868
  new AutoBaseRenderer(computedStyles),
1875
1869
  new BinOpRenderer(),
1876
1870
  new RelativeColorChannelRenderer(treeElement),
@@ -2264,15 +2258,15 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
2264
2258
  return;
2265
2259
  }
2266
2260
  this.lastComputedValue = computedValue;
2267
- this.innerUpdateTitle();
2261
+ this.#updateTitle();
2268
2262
  }
2269
2263
 
2270
2264
  updateTitle(): void {
2271
2265
  this.lastComputedValue = this.#computeCSSExpression(this.property.ownerStyle, this.property.value);
2272
- this.innerUpdateTitle();
2266
+ this.#updateTitle();
2273
2267
  }
2274
2268
 
2275
- private innerUpdateTitle(): void {
2269
+ #updateTitle(): void {
2276
2270
  this.#tooltipKeyCounts.clear();
2277
2271
  this.updateState();
2278
2272
  if (this.isExpandable()) {
@@ -2460,6 +2454,26 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
2460
2454
  return container;
2461
2455
  }
2462
2456
 
2457
+ #getLinkableFunction(functionName: string, matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles):
2458
+ InlineEditor.LinkSwatch.LinkSwatch {
2459
+ const swatch = new InlineEditor.LinkSwatch.LinkSwatch();
2460
+ const registeredFunction = matchedStyles.getRegisteredFunction(functionName);
2461
+ const isDefined = Boolean(registeredFunction);
2462
+ swatch.data = {
2463
+ jslogContext: 'css-function',
2464
+ text: functionName,
2465
+ tooltip: isDefined ? undefined : {title: i18nString(UIStrings.sIsNotDefined, {PH1: functionName})},
2466
+ isDefined,
2467
+ onLinkActivate: (): void => {
2468
+ if (!registeredFunction) {
2469
+ return;
2470
+ }
2471
+ this.#parentPane.jumpToFunctionDefinition(registeredFunction);
2472
+ },
2473
+ };
2474
+ return swatch;
2475
+ }
2476
+
2463
2477
  getTracingTooltip(
2464
2478
  functionName: string, node: CodeMirror.SyntaxNode, matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
2465
2479
  computedStyles: Map<string, string>, context: RenderingContext): Lit.TemplateResult {
@@ -2474,7 +2488,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
2474
2488
  const tooltipId = this.getTooltipId(`${functionName}-trace`);
2475
2489
  // clang-format off
2476
2490
  return html`
2477
- <span tabIndex=-1 class=tracing-anchor aria-details=${tooltipId}>${functionName}</span>
2491
+ <span tabIndex=-1 class=tracing-anchor aria-details=${tooltipId}>${functionName.startsWith('--') ? this.#getLinkableFunction(functionName, matchedStyles) : functionName}</span>
2478
2492
  <devtools-tooltip
2479
2493
  id=${tooltipId}
2480
2494
  use-hotkey
@@ -623,10 +623,10 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
623
623
  }
624
624
 
625
625
  override onResize(): void {
626
- void this.resizeThrottler.schedule(this.innerResize.bind(this));
626
+ void this.resizeThrottler.schedule(this.#resize.bind(this));
627
627
  }
628
628
 
629
- private innerResize(): Promise<void> {
629
+ #resize(): Promise<void> {
630
630
  const width = this.contentElement.getBoundingClientRect().width + 'px';
631
631
  this.allSections().forEach(section => {
632
632
  section.propertiesTreeOutline.element.style.width = width;
@@ -220,13 +220,14 @@ devtools-icon.icon-link {
220
220
  }
221
221
 
222
222
  .styles-pane-button {
223
- height: 15px;
224
- margin: 0 0 0 6px;
223
+ width: var(--sys-size-8);
224
+ height: var(--sys-size-8);
225
+ margin-left: var(--sys-size-4);
225
226
  position: absolute;
226
- top: -1px;
227
227
  display: inline-flex;
228
228
  align-items: center;
229
229
  justify-content: center;
230
+ user-select: none;
230
231
  }
231
232
  /* Matched styles */
232
233
 
@@ -735,12 +735,12 @@ export class Layers3DView extends Common.ObjectWrapper.eventMixin<EventTypes, ty
735
735
  this.updateScheduled = true;
736
736
  requestAnimationFrame(() => requestAnimationFrame(() => {
737
737
  this.updateScheduled = false;
738
- this.innerUpdate();
738
+ this.#update();
739
739
  }));
740
740
  }
741
741
  }
742
742
 
743
- private innerUpdate(): void {
743
+ #update(): void {
744
744
  if (!this.layerTree?.root()) {
745
745
  this.failBanner.show(this.contentElement);
746
746
  return;
@@ -138,7 +138,7 @@ export class AgentLayerTree extends SDK.LayerTreeBase.LayerTreeBase {
138
138
 
139
139
  async setLayers(payload: Protocol.LayerTree.Layer[]|null): Promise<void> {
140
140
  if (!payload) {
141
- this.innerSetLayers(payload);
141
+ this.#setLayers(payload);
142
142
  return;
143
143
  }
144
144
  const idsToResolve = new Set<Protocol.DOM.BackendNodeId>();
@@ -150,10 +150,10 @@ export class AgentLayerTree extends SDK.LayerTreeBase.LayerTreeBase {
150
150
  idsToResolve.add(backendNodeId);
151
151
  }
152
152
  await this.resolveBackendNodeIds(idsToResolve);
153
- this.innerSetLayers(payload);
153
+ this.#setLayers(payload);
154
154
  }
155
155
 
156
- private innerSetLayers(layers: Protocol.LayerTree.Layer[]|null): void {
156
+ #setLayers(layers: Protocol.LayerTree.Layer[]|null): void {
157
157
  this.setRoot(null);
158
158
  this.setContentRoot(null);
159
159
  // Payload will be null when not in the composited mode.
@@ -400,8 +400,8 @@ export class CPUThrottlingCard {
400
400
  }
401
401
 
402
402
  private async runCalibration(): Promise<void> {
403
- this.progress.setWorked(0);
404
- this.progress.setTotalWork(1);
403
+ this.progress.worked = 0;
404
+ this.progress.totalWork = 1;
405
405
 
406
406
  this.controller = new CalibrationController();
407
407
 
@@ -412,7 +412,7 @@ export class CPUThrottlingCard {
412
412
  }
413
413
 
414
414
  for await (const result of this.controller.iterator()) {
415
- this.progress.setWorked(result.progress);
415
+ this.progress.worked = result.progress;
416
416
  }
417
417
  } catch (e) {
418
418
  console.error(e);
@@ -424,7 +424,7 @@ export class CPUThrottlingCard {
424
424
  if (result && (result.low || result.mid)) {
425
425
  this.setting.set(result);
426
426
  // Let the user bask in the glory of a 100% progress bar, for a bit.
427
- this.progress.setWorked(1);
427
+ this.progress.worked = 1;
428
428
  await new Promise(resolve => setTimeout(resolve, 200));
429
429
  }
430
430
 
@@ -1963,7 +1963,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
1963
1963
 
1964
1964
  const progressIndicator = this.progressBarContainer.createChild('devtools-progress');
1965
1965
  await HAR.Writer.Writer.write(stream, this.harRequests(), options, progressIndicator);
1966
- progressIndicator.done();
1966
+ progressIndicator.done = true;
1967
1967
  void stream.close();
1968
1968
  }
1969
1969
 
@@ -279,7 +279,7 @@ export class NetworkLogViewColumns {
279
279
 
280
280
  this.updateColumns();
281
281
  this.#dataGrid.addEventListener(DataGrid.DataGrid.Events.SORTING_CHANGED, this.sortHandler, this);
282
- this.#dataGrid.setHeaderContextMenuCallback(this.innerHeaderContextMenu.bind(this));
282
+ this.#dataGrid.setHeaderContextMenuCallback(this.#headerContextMenu.bind(this));
283
283
 
284
284
  this.activeWaterfallSortId = WaterfallSortIds.StartTime;
285
285
  this.#dataGrid.markColumnAsSortedBy(INITIAL_SORT_COLUMN, DataGrid.DataGrid.Order.Ascending);
@@ -405,7 +405,7 @@ export class NetworkLogViewColumns {
405
405
  this.waterfallHeaderElement.addEventListener('click', waterfallHeaderClicked.bind(this));
406
406
  this.waterfallHeaderElement.addEventListener('contextmenu', event => {
407
407
  const contextMenu = new UI.ContextMenu.ContextMenu(event);
408
- this.innerHeaderContextMenu(contextMenu);
408
+ this.#headerContextMenu(contextMenu);
409
409
  void contextMenu.show();
410
410
  });
411
411
  this.waterfallHeaderElement.createChild('div', 'hover-layer');
@@ -627,7 +627,7 @@ export class NetworkLogViewColumns {
627
627
  return fragment;
628
628
  }
629
629
 
630
- private innerHeaderContextMenu(contextMenu: UI.ContextMenu.SubMenu): void {
630
+ #headerContextMenu(contextMenu: UI.ContextMenu.SubMenu): void {
631
631
  const columnConfigs = this.columns.filter(columnConfig => columnConfig.hideable);
632
632
  const nonRequestResponseHeaders =
633
633
  columnConfigs.filter(columnConfig => !columnConfig.isRequestHeader && !columnConfig.isResponseHeader);
@@ -29,7 +29,7 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
29
29
 
30
30
  performIndexing(progress: Common.Progress.Progress): void {
31
31
  queueMicrotask(() => {
32
- progress.done();
32
+ progress.done = true;
33
33
  });
34
34
  }
35
35
 
@@ -40,14 +40,14 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
40
40
  const promises = [];
41
41
  const requests =
42
42
  this.#networkLog.requests().filter(request => searchConfig.filePathMatchesFileQuery(request.url()));
43
- progress.setTotalWork(requests.length);
43
+ progress.totalWork = requests.length;
44
44
  for (const request of requests) {
45
45
  const promise = this.searchRequest(searchConfig, request, progress);
46
46
  promises.push(promise);
47
47
  }
48
48
  const resultsWithNull = await Promise.all(promises);
49
49
  const results = (resultsWithNull.filter(result => result !== null));
50
- if (progress.isCanceled()) {
50
+ if (progress.canceled) {
51
51
  searchFinishedCallback(false);
52
52
  return;
53
53
  }
@@ -56,7 +56,7 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
56
56
  searchResultCallback(result);
57
57
  }
58
58
  }
59
- progress.done();
59
+ progress.done = true;
60
60
  searchFinishedCallback(true);
61
61
  }
62
62
 
@@ -64,7 +64,7 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
64
64
  searchConfig: Workspace.SearchConfig.SearchConfig, request: SDK.NetworkRequest.NetworkRequest,
65
65
  progress: Common.Progress.Progress): Promise<NetworkSearchResult|null> {
66
66
  const bodyMatches = await NetworkSearchScope.#responseBodyMatches(searchConfig, request);
67
- if (progress.isCanceled()) {
67
+ if (progress.canceled) {
68
68
  return null;
69
69
  }
70
70
  const locations = [];
@@ -84,7 +84,7 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
84
84
  for (const match of bodyMatches) {
85
85
  locations.push(NetworkForward.UIRequestLocation.UIRequestLocation.bodyMatch(request, match));
86
86
  }
87
- progress.incrementWorked();
87
+ ++progress.worked;
88
88
  return new NetworkSearchResult(request, locations);
89
89
 
90
90
  function headerMatchesQuery(header: SDK.NetworkRequest.NameValue): boolean {