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
@@ -3,6 +3,8 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
+ import type * as Platform from '../../../core/platform/platform.js';
7
+ import type * as Protocol from '../../../generated/protocol.js';
6
8
 
7
9
  const UIStrings = {
8
10
  /**
@@ -552,7 +554,10 @@ const UIStrings = {
552
554
  const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheStrings.ts', UIStrings);
553
555
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
554
556
 
555
- export const NotRestoredReasonDescription = {
557
+ type NotRestoredReason =
558
+ Record<Protocol.Page.BackForwardCacheNotRestoredReason, {name: () => Platform.UIString.LocalizedString}>;
559
+
560
+ export const NotRestoredReasonDescription: NotRestoredReason = {
556
561
  NotPrimaryMainFrame: {name: i18nLazyString(UIStrings.notMainFrame)},
557
562
  BackForwardCacheDisabled: {name: i18nLazyString(UIStrings.backForwardCacheDisabled)},
558
563
  RelatedActiveContentsExist: {name: i18nLazyString(UIStrings.relatedActiveContentsExist)},
@@ -567,6 +572,7 @@ export const NotRestoredReasonDescription = {
567
572
  JavaScriptExecution: {name: i18nLazyString(UIStrings.JavaScriptExecution)},
568
573
  RendererProcessKilled: {name: i18nLazyString(UIStrings.rendererProcessKilled)},
569
574
  RendererProcessCrashed: {name: i18nLazyString(UIStrings.rendererProcessCrashed)},
575
+ // @ts-expect-error kept for backwards compatibly
570
576
  GrantedMediaStreamAccess: {name: i18nLazyString(UIStrings.grantedMediaStreamAccess)},
571
577
  CacheFlushed: {name: i18nLazyString(UIStrings.cacheFlushed)},
572
578
  ServiceWorkerVersionActivation: {name: i18nLazyString(UIStrings.serviceWorkerVersionActivation)},
@@ -713,4 +719,4 @@ export const NotRestoredReasonDescription = {
713
719
  {name: i18n.i18n.lockedLazyString('CacheLimitPrunedOnModerateMemoryPressure')},
714
720
  CacheLimitPrunedOnCriticalMemoryPressure:
715
721
  {name: i18n.i18n.lockedLazyString('CacheLimitPrunedOnCriticalMemoryPressure')},
716
- };
722
+ } as const;
@@ -176,7 +176,6 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
176
176
  }
177
177
  };
178
178
 
179
- const {on} = UI.UIUtils.HTMLElementWithLightDOMTemplate;
180
179
  const classes =
181
180
  (breakpoint: SDK.CategorizedBreakpoint.CategorizedBreakpoint): ReturnType<typeof Lit.Directives.classMap> =>
182
181
  Lit.Directives.classMap({
@@ -239,7 +238,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
239
238
  ?indeterminate=${breakpoints.some(breakpoint => !breakpoint.enabled()) &&
240
239
  breakpoints.some(breakpoint => breakpoint.enabled())}
241
240
  ?checked=${!breakpoints.some(breakpoint => !breakpoint.enabled())}
242
- @change=${on((e: Event) => onCheckboxClicked(e, category))}
241
+ @change=${(e: Event) => onCheckboxClicked(e, category)}
243
242
  >${getLocalizedCategory(category)}</devtools-checkbox>
244
243
  <ul
245
244
  role="group"
@@ -257,7 +256,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
257
256
  ?checked=${breakpoint.enabled()}
258
257
  aria-description=${breakpoint === input.highlightedItem ? i18nString(UIStrings.breakpointHit)
259
258
  : Lit.nothing}
260
- @change=${on((e: Event) => onCheckboxClicked(e, breakpoint))}
259
+ @change=${(e: Event) => onCheckboxClicked(e, breakpoint)}
261
260
  >${Sources.CategorizedBreakpointL10n.getLocalizedBreakpointName(breakpoint.name)}</devtools-checkbox>
262
261
  </li>`)}
263
262
  </ul>
@@ -21,16 +21,16 @@ const UIStrings = {
21
21
  /**
22
22
  * @description Title for close button
23
23
  */
24
- dismiss: 'Dismiss',
24
+ close: 'Close',
25
25
  /**
26
26
  * @description Activity based badge award notification text
27
27
  * @example {Badge Title} PH1
28
28
  */
29
- activityBasedBadgeAwardMessage: 'You earned the {PH1} badge! It has been added to your Developer Profile.',
29
+ activityBasedBadgeAwardMessage: 'You earned the {PH1} badge! It’s been added to your Developer Profile.',
30
30
  /**
31
31
  * @description Action title for navigating to the badge settings in Google Developer Profile section
32
32
  */
33
- badgeSettings: 'Badge settings',
33
+ manageSettings: 'Manage settings',
34
34
  /**
35
35
  * @description Action title for opening the Google Developer Program profile page of the user in a new tab
36
36
  */
@@ -55,7 +55,7 @@ const UIStrings = {
55
55
  /**
56
56
  * @description Action title for enabling the "Receive badges" setting
57
57
  */
58
- receiveBadges: 'Receive badges',
58
+ receiveBadges: 'Turn on badges',
59
59
  /**
60
60
  * @description Action title for creating a Google Developer Program profle
61
61
  */
@@ -103,10 +103,10 @@ const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement)
103
103
  class="dismiss notification-button"
104
104
  @click=${input.onCloseClick}
105
105
  jslog=${VisualLogging.action('badge-notification.dismiss').track({click: true})}
106
- aria-label=${i18nString(UIStrings.dismiss)}
106
+ aria-label=${i18nString(UIStrings.close)}
107
107
  .iconName=${'cross'}
108
108
  .variant=${Buttons.Button.Variant.ICON}
109
- .title=${i18nString(UIStrings.dismiss)}
109
+ .title=${i18nString(UIStrings.close)}
110
110
  .inverseColorTheme=${true}
111
111
  ></devtools-button>`;
112
112
 
@@ -114,7 +114,7 @@ const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement)
114
114
  <style>${badgeNotificationStyles}</style>
115
115
  <div class="container">
116
116
  <div class="badge-container">
117
- <img class="badge-image" src=${input.imageUri}>
117
+ <img class="badge-image" role="presentation" src=${input.imageUri}>
118
118
  </div>
119
119
  <div class="action-and-text-container">
120
120
  <div class="label-container">
@@ -145,6 +145,8 @@ export class BadgeNotification extends UI.Widget.Widget {
145
145
  super(element);
146
146
  this.#view = view;
147
147
 
148
+ // eslint-disable-next-line
149
+ this.contentElement.role = 'alert';
148
150
  this.markAsRoot();
149
151
  }
150
152
 
@@ -240,7 +242,7 @@ export class BadgeNotification extends UI.Widget.Widget {
240
242
  message: i18nString(UIStrings.activityBasedBadgeAwardMessage, {PH1: badge.title}),
241
243
  actions: [
242
244
  {
243
- label: i18nString(UIStrings.badgeSettings),
245
+ label: i18nString(UIStrings.manageSettings),
244
246
  onClick: () => {
245
247
  this.#close();
246
248
  revealBadgeSettings();
@@ -39,8 +39,7 @@ const UIStrings = {
39
39
  /**
40
40
  * @description Body for the first section of the GDP sign up dialog.
41
41
  */
42
- designedForSuccessBody:
43
- 'Grow your skills, build with AI, and receive badges you can showcase in your developer profile',
42
+ designedForSuccessBody: 'Grow your skills, build with AI, and earn badges you can showcase in your developer profile',
44
43
  /**
45
44
  * @description Title for the second section of the GDP sign up dialog.
46
45
  */
@@ -48,23 +47,32 @@ const UIStrings = {
48
47
  /**
49
48
  * @description Body for the second section of the GDP sign up dialog.
50
49
  */
51
- keepUpdatedBody: 'The latest DevTools features, event invites, and tailored insights directly in your inbox',
50
+ keepUpdatedBody: 'The latest DevTools features, event invites, and tailored insights land directly in your inbox',
52
51
  /**
53
52
  * @description Title for the third section of the GDP sign up dialog.
54
53
  */
55
- thingsToConsider: 'Things to consider',
54
+ tailorProfile: 'Tailor your profile',
55
+ /**
56
+ * @description Body for the third section of the GDP sign up dialog.
57
+ */
58
+ tailorProfileBody:
59
+ 'The name on your Google Account and your interests will be used in your Google Developer Profile. Your name may appear where you contribute and can be changed at any time.',
56
60
  /**
57
61
  * @description Body for the third section of the GDP sign up dialog.
58
62
  * @example {Content Policy} PH1
59
63
  * @example {Terms of Service} PH2
60
64
  * @example {Privacy Policy} PH3
61
65
  */
62
- thingsToConsiderBody:
63
- 'By creating a Developer Profile, you agree to the {PH1}. Google’s {PH2} and {PH3} apply to your use of this service. The name on your Google Account and your interests will be used in your Google Developer Profile. Your name may appear where you contribute and can be changed at any time.',
66
+ tailorProfileBodyDisclaimer:
67
+ 'By creating a Developer Profile, you agree to the {PH1}. Google’s {PH2} and {PH3} apply to your use of this service.',
64
68
  /**
65
69
  * @description Button text for learning more about the Google Developer Program.
66
70
  */
67
71
  learnMore: 'Learn more',
72
+ /**
73
+ * @description Accessible text for learning more about the Google Developer Program.
74
+ */
75
+ learnMoreAccessibleText: 'Learn more about the Google Developer Program',
68
76
  /**
69
77
  * @description Link text for Content Policy.
70
78
  */
@@ -106,14 +114,14 @@ export const DEFAULT_VIEW: View = (input, _output, target): void => {
106
114
  render(
107
115
  html`
108
116
  <style>${styles}</style>
109
- <div class="gdp-sign-up-dialog-header"></div>
117
+ <div class="gdp-sign-up-dialog-header" role="img" tabindex="0" aria-label="Google Developer Program"></div>
110
118
  <div class="main-content">
111
119
  <div class="section">
112
120
  <div class="icon-container">
113
121
  <devtools-icon name="trophy"></devtools-icon>
114
122
  </div>
115
123
  <div class="text-container">
116
- <h3 class="section-title">${i18nString(UIStrings.designedForSuccess)}</h3>
124
+ <h2 class="section-title">${i18nString(UIStrings.designedForSuccess)}</h2>
117
125
  <div class="section-text">${i18nString(UIStrings.designedForSuccessBody)}</div>
118
126
  </div>
119
127
  </div>
@@ -122,7 +130,7 @@ export const DEFAULT_VIEW: View = (input, _output, target): void => {
122
130
  <devtools-icon name="mark-email-unread"></devtools-icon>
123
131
  </div>
124
132
  <div class="text-container">
125
- <h3 class="section-title">${i18nString(UIStrings.keepUpdated)}</h3>
133
+ <h2 class="section-title">${i18nString(UIStrings.keepUpdated)}</h2>
126
134
  <div class="section-text">${i18nString(UIStrings.keepUpdatedBody)}</div>
127
135
  </div>
128
136
  <div class="switch-container">
@@ -140,19 +148,24 @@ export const DEFAULT_VIEW: View = (input, _output, target): void => {
140
148
  <devtools-icon name="google"></devtools-icon>
141
149
  </div>
142
150
  <div class="text-container">
143
- <h3 class="section-title">${i18nString(UIStrings.thingsToConsider)}</h3>
144
- <div class="section-text">${i18n.i18n.getFormatLocalizedString(str_, UIStrings.thingsToConsiderBody, {
151
+ <h2 class="section-title">${i18nString(UIStrings.tailorProfile)}</h2>
152
+ <div class="section-text">
153
+ <div>${i18nString(UIStrings.tailorProfileBody)}</div><br/>
154
+ <div>${i18n.i18n.getFormatLocalizedString(str_, UIStrings.tailorProfileBodyDisclaimer, {
145
155
  PH1: UI.XLink.XLink.create(CONTENT_POLICY_URL, i18nString(UIStrings.contentPolicy), 'link', undefined, 'gdp.content-policy'),
146
156
  PH2: UI.XLink.XLink.create(TERMS_OF_SERVICE_URL, i18nString(UIStrings.termsOfService), 'link',
147
157
  undefined, 'gdp.terms-of-service'),
148
158
  PH3: UI.XLink.XLink.create(PRIVACY_POLICY_URL, i18nString(UIStrings.privacyPolicy), 'link',
149
159
  undefined, 'gdp.privacy-policy'),
150
160
  })}</div>
161
+ </div>
151
162
  </div>
152
163
  </div>
153
164
  </div>
154
165
  <div class="buttons">
155
166
  <devtools-button
167
+ aria-label=${i18nString(UIStrings.learnMoreAccessibleText)}
168
+ .title=${i18nString(UIStrings.learnMoreAccessibleText)}
156
169
  .variant=${Buttons.Button.Variant.OUTLINED}
157
170
  .jslogContext=${'learn-more'}
158
171
  @click=${() => UI.UIUtils.openInNewTab(GDP_PROGRAM_URL as Platform.DevToolsPath.UrlString)}>${i18nString(UIStrings.learnMore)}</devtools-button>
@@ -180,10 +193,12 @@ export class GdpSignUpDialog extends UI.Widget.VBox {
180
193
  #dialog: UI.Dialog.Dialog;
181
194
  #keepMeUpdated = false;
182
195
  #isSigningUp = false;
196
+ #onSuccess?: () => void;
183
197
 
184
- constructor(options: {dialog: UI.Dialog.Dialog}, view?: View) {
198
+ constructor(options: {dialog: UI.Dialog.Dialog, onSuccess?: () => void}, view?: View) {
185
199
  super();
186
200
  this.#dialog = options.dialog;
201
+ this.#onSuccess = options.onSuccess;
187
202
  this.#view = view ?? DEFAULT_VIEW;
188
203
  this.requestUpdate();
189
204
  }
@@ -202,6 +217,7 @@ export class GdpSignUpDialog extends UI.Widget.VBox {
202
217
  Common.Settings.Settings.instance().moduleSetting('receive-gdp-badges').set(true);
203
218
  await Badges.UserBadges.instance().initialize();
204
219
  Badges.UserBadges.instance().recordAction(Badges.BadgeAction.GDP_SIGN_UP_COMPLETE);
220
+ this.#onSuccess?.();
205
221
  this.#dialog.hide();
206
222
  } else {
207
223
  Snackbars.Snackbar.Snackbar.show({message: i18nString(UIStrings.signUpFailed)}, this.#dialog.contentElement);
@@ -227,14 +243,14 @@ export class GdpSignUpDialog extends UI.Widget.VBox {
227
243
  this.#view(viewInput, undefined, this.contentElement);
228
244
  }
229
245
 
230
- static show(): void {
246
+ static show({onSuccess}: {onSuccess?: () => void} = {}): void {
231
247
  const dialog = new UI.Dialog.Dialog();
232
248
  dialog.setAriaLabel(i18nString(UIStrings.gdpDialogAriaLabel));
233
249
  dialog.setMaxContentSize(new Geometry.Size(384, 500));
234
250
  dialog.setSizeBehavior(UI.GlassPane.SizeBehavior.SET_EXACT_WIDTH_MAX_HEIGHT);
235
251
  dialog.setDimmed(true);
236
252
 
237
- new GdpSignUpDialog({dialog}).show(dialog.contentElement);
253
+ new GdpSignUpDialog({dialog, onSuccess}).show(dialog.contentElement);
238
254
  dialog.show(undefined, /* stack */ true);
239
255
  }
240
256
  }
@@ -17,6 +17,10 @@
17
17
  background-repeat: no-repeat;
18
18
  background-size: contain;
19
19
  margin: 0;
20
+
21
+ &:focus-visible {
22
+ outline: 2px solid var(--sys-color-state-focus-ring);
23
+ }
20
24
  }
21
25
 
22
26
  :host-context(.theme-with-dark-background) & .gdp-sign-up-dialog-header {
@@ -322,7 +322,7 @@ export class ConsoleView extends UI.Widget.VBox implements
322
322
  private buildHiddenCacheTimeout?: number;
323
323
  private searchShouldJumpBackwards?: boolean;
324
324
  private searchProgressIndicator?: UI.ProgressIndicator.ProgressIndicator;
325
- private innerSearchTimeoutId?: number;
325
+ #searchTimeoutId?: number;
326
326
  private muteViewportUpdates?: boolean;
327
327
  private waitForScrollTimeout?: number;
328
328
  private issueCounter: IssueCounter.IssueCounter.IssueCounter;
@@ -1051,18 +1051,13 @@ export class ConsoleView extends UI.Widget.VBox implements
1051
1051
  return;
1052
1052
  }
1053
1053
 
1054
- // Track any adjacent messages.
1055
- const originatingMessage = viewMessage.consoleMessage().originatingMessage();
1056
- const adjacent = Boolean(originatingMessage && lastMessage?.consoleMessage() === originatingMessage);
1057
- viewMessage.setAdjacentUserCommandResult(adjacent);
1058
-
1059
- // Ensure any parent groups for this message are shown.
1060
1054
  const currentGroup = viewMessage.consoleGroup();
1061
- showGroup(currentGroup, this.visibleViewMessages);
1062
1055
 
1063
- // Determine whether this message should actually be visible.
1064
- const shouldShowMessage = !currentGroup?.messagesHidden();
1065
- if (shouldShowMessage) {
1056
+ if (!currentGroup?.messagesHidden()) {
1057
+ const originatingMessage = viewMessage.consoleMessage().originatingMessage();
1058
+ const adjacent = Boolean(originatingMessage && lastMessage?.consoleMessage() === originatingMessage);
1059
+ viewMessage.setAdjacentUserCommandResult(adjacent);
1060
+ showGroup(currentGroup, this.visibleViewMessages);
1066
1061
  this.visibleViewMessages.push(viewMessage);
1067
1062
  this.searchMessage(this.visibleViewMessages.length - 1);
1068
1063
  }
@@ -1216,8 +1211,8 @@ export class ConsoleView extends UI.Widget.VBox implements
1216
1211
  const stream = new Bindings.FileUtils.FileOutputStream();
1217
1212
 
1218
1213
  const progressIndicator = document.createElement('devtools-progress');
1219
- progressIndicator.setTitle(i18nString(UIStrings.writingFile));
1220
- progressIndicator.setTotalWork(this.itemCount());
1214
+ progressIndicator.title = i18nString(UIStrings.writingFile);
1215
+ progressIndicator.totalWork = this.itemCount();
1221
1216
 
1222
1217
  const chunkSize = 350;
1223
1218
 
@@ -1227,7 +1222,7 @@ export class ConsoleView extends UI.Widget.VBox implements
1227
1222
  this.progressToolbarItem.element.appendChild(progressIndicator);
1228
1223
 
1229
1224
  let messageIndex = 0;
1230
- while (messageIndex < this.itemCount() && !progressIndicator.isCanceled()) {
1225
+ while (messageIndex < this.itemCount() && !progressIndicator.canceled) {
1231
1226
  const messageContents = [];
1232
1227
  let i;
1233
1228
  for (i = 0; i < chunkSize && i + messageIndex < this.itemCount(); ++i) {
@@ -1236,11 +1231,11 @@ export class ConsoleView extends UI.Widget.VBox implements
1236
1231
  }
1237
1232
  messageIndex += i;
1238
1233
  await stream.write(messageContents.join('\n') + '\n');
1239
- progressIndicator.setWorked(messageIndex);
1234
+ progressIndicator.worked = messageIndex;
1240
1235
  }
1241
1236
 
1242
1237
  void stream.close();
1243
- progressIndicator.done();
1238
+ progressIndicator.done = true;
1244
1239
  }
1245
1240
 
1246
1241
  private async copyConsole(): Promise<void> {
@@ -1519,21 +1514,21 @@ export class ConsoleView extends UI.Widget.VBox implements
1519
1514
  }
1520
1515
 
1521
1516
  this.searchProgressIndicator = document.createElement('devtools-progress');
1522
- this.searchProgressIndicator.setTitle(i18nString(UIStrings.searching));
1523
- this.searchProgressIndicator.setTotalWork(this.visibleViewMessages.length);
1517
+ this.searchProgressIndicator.title = i18nString(UIStrings.searching);
1518
+ this.searchProgressIndicator.totalWork = this.visibleViewMessages.length;
1524
1519
  this.progressToolbarItem.element.appendChild(this.searchProgressIndicator);
1525
1520
 
1526
- this.innerSearch(0);
1521
+ this.#search(0);
1527
1522
  }
1528
1523
 
1529
1524
  private cleanupAfterSearch(): void {
1530
1525
  delete this.searchShouldJumpBackwards;
1531
- if (this.innerSearchTimeoutId) {
1532
- clearTimeout(this.innerSearchTimeoutId);
1533
- delete this.innerSearchTimeoutId;
1526
+ if (this.#searchTimeoutId) {
1527
+ clearTimeout(this.#searchTimeoutId);
1528
+ this.#searchTimeoutId = undefined;
1534
1529
  }
1535
1530
  if (this.searchProgressIndicator) {
1536
- this.searchProgressIndicator.done();
1531
+ this.searchProgressIndicator.done = true;
1537
1532
  delete this.searchProgressIndicator;
1538
1533
  }
1539
1534
  }
@@ -1542,9 +1537,9 @@ export class ConsoleView extends UI.Widget.VBox implements
1542
1537
  // This method is sniffed in tests.
1543
1538
  }
1544
1539
 
1545
- private innerSearch(index: number): void {
1546
- delete this.innerSearchTimeoutId;
1547
- if (this.searchProgressIndicator?.isCanceled()) {
1540
+ #search(index: number): void {
1541
+ this.#searchTimeoutId = undefined;
1542
+ if (this.searchProgressIndicator?.canceled) {
1548
1543
  this.cleanupAfterSearch();
1549
1544
  return;
1550
1545
  }
@@ -1566,9 +1561,9 @@ export class ConsoleView extends UI.Widget.VBox implements
1566
1561
  return;
1567
1562
  }
1568
1563
 
1569
- this.innerSearchTimeoutId = window.setTimeout(this.innerSearch.bind(this, index), 100);
1564
+ this.#searchTimeoutId = window.setTimeout(this.#search.bind(this, index), 100);
1570
1565
  if (this.searchProgressIndicator) {
1571
- this.searchProgressIndicator.setWorked(index);
1566
+ this.searchProgressIndicator.worked = index;
1572
1567
  }
1573
1568
  }
1574
1569
 
@@ -435,13 +435,13 @@ export class ConsoleViewport {
435
435
 
436
436
  refresh(): void {
437
437
  this.observer.disconnect();
438
- this.innerRefresh();
438
+ this.#refresh();
439
439
  if (this.#stickToBottom) {
440
440
  this.observer.observe(this.#contentElement, this.observerConfig);
441
441
  }
442
442
  }
443
443
 
444
- private innerRefresh(): void {
444
+ #refresh(): void {
445
445
  if (!this.visibleHeight()) {
446
446
  return;
447
447
  } // Do nothing for invisible controls.
@@ -325,14 +325,24 @@
325
325
  .console-view-object-properties-section {
326
326
  padding: 0;
327
327
  position: relative;
328
- vertical-align: top;
329
328
  color: inherit;
330
329
  display: inline-block;
331
330
  overflow-wrap: break-word;
332
331
  max-width: 100%;
332
+ vertical-align: top;
333
333
  margin-top: -1.5px;
334
334
  }
335
335
 
336
+ /* Console content is rendered in "Noto Sans Mono" on Linux, which has a
337
+ * different actual line-height than the fonts used on Windows or MacOS.
338
+ * "vertical-align: middle" breaks the layout when expanding an object such
339
+ * that it spans multiple lines. We therefore align to the top, and use a
340
+ * different "margin-top" on Linux to compensate for the line-height difference.
341
+ */
342
+ .platform-linux .console-view-object-properties-section {
343
+ margin-top: 0;
344
+ }
345
+
336
346
  .info-note {
337
347
  background-color: var(--sys-color-tonal-container);
338
348
  }
@@ -643,12 +643,12 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
643
643
  const view = UI.ViewManager.ViewManager.instance().view(coverageViewId);
644
644
  return view?.widget();
645
645
  })
646
- .then(widget => this.innerHandleAction(widget as CoverageView, actionId));
646
+ .then(widget => this.#handleAction(widget as CoverageView, actionId));
647
647
 
648
648
  return true;
649
649
  }
650
650
 
651
- private innerHandleAction(coverageView: CoverageView, actionId: string): void {
651
+ #handleAction(coverageView: CoverageView, actionId: string): void {
652
652
  switch (actionId) {
653
653
  case 'coverage.toggle-recording':
654
654
  coverageView.toggleRecording();
@@ -1830,7 +1830,7 @@ export class ElementsTreeOutline extends
1830
1830
 
1831
1831
  console.assert(!treeElement.isClosingTag());
1832
1832
 
1833
- this.innerUpdateChildren(treeElement);
1833
+ this.#updateChildren(treeElement);
1834
1834
  }
1835
1835
 
1836
1836
  insertChildElement(
@@ -1858,7 +1858,7 @@ export class ElementsTreeOutline extends
1858
1858
  }
1859
1859
  }
1860
1860
 
1861
- private innerUpdateChildren(treeElement: ElementsTreeElement): void {
1861
+ #updateChildren(treeElement: ElementsTreeElement): void {
1862
1862
  if (this.treeElementsBeingUpdated.has(treeElement)) {
1863
1863
  return;
1864
1864
  }
@@ -3,7 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable rulesdir/no-imperative-dom-api */
5
5
 
6
- import * as Buttons from '../../ui/components/buttons/buttons.js';
6
+ import * as IconButton from '../../ui/components/icon_button/icon_button.js';
7
7
  import * as UI from '../../ui/legacy/legacy.js';
8
8
 
9
9
  import type * as ElementsComponents from './components/components.js';
@@ -120,7 +120,9 @@ export class StyleEditorWidget extends UI.Widget.VBox {
120
120
  static createTriggerButton(
121
121
  pane: StylesSidebarPane, section: StylePropertiesSection, editorClass: {new(): Editor}, buttonTitle: string,
122
122
  triggerKey: string): HTMLElement {
123
- const triggerButton = createButton(buttonTitle);
123
+ const triggerButton = IconButton.Icon.create('flex-wrap', 'styles-pane-button');
124
+ triggerButton.title = buttonTitle;
125
+ triggerButton.role = 'button';
124
126
 
125
127
  triggerButton.onclick = async event => {
126
128
  event.stopPropagation();
@@ -146,28 +148,15 @@ export class StyleEditorWidget extends UI.Widget.VBox {
146
148
  scrollerElement.addEventListener('scroll', onScroll);
147
149
  }
148
150
  };
151
+ triggerButton.onmouseup = event => {
152
+ // Stop propagation to prevent the property editor from being activated.
153
+ event.stopPropagation();
154
+ };
149
155
 
150
156
  return triggerButton;
151
157
  }
152
158
  }
153
159
 
154
- function createButton(buttonTitle: string): Buttons.Button.Button {
155
- const button = new Buttons.Button.Button();
156
- button.data = {
157
- variant: Buttons.Button.Variant.ICON,
158
- size: Buttons.Button.Size.SMALL,
159
- iconName: 'flex-wrap',
160
- title: buttonTitle,
161
- jslogContext: 'flex-wrap',
162
- };
163
- button.classList.add('styles-pane-button');
164
- button.onmouseup = event => {
165
- // Stop propagation to prevent the property editor from being activated.
166
- event.stopPropagation();
167
- };
168
- return button;
169
- }
170
-
171
160
  function ensureTreeElementForProperty(section: StylePropertiesSection, propertyName: string): StylePropertyTreeElement {
172
161
  const target = section.propertiesTreeOutline.rootElement().children().find(
173
162
  child => child instanceof StylePropertyTreeElement && child.property.name === propertyName);