chrome-devtools-frontend 1.0.1571007 → 1.0.1571573

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 (65) hide show
  1. package/agents/prompts/README.md +18 -0
  2. package/agents/prompts/devtools-imports.md +47 -0
  3. package/agents/prompts/verification.md +27 -0
  4. package/front_end/core/host/UserMetrics.ts +1 -1
  5. package/front_end/core/root/Runtime.ts +48 -34
  6. package/front_end/core/sdk/CSSProperty.ts +1 -1
  7. package/front_end/core/sdk/CookieModel.ts +1 -1
  8. package/front_end/core/sdk/DOMModel.ts +1 -1
  9. package/front_end/core/sdk/OverlayModel.ts +3 -2
  10. package/front_end/entrypoints/main/MainImpl.ts +29 -18
  11. package/front_end/generated/SupportedCSSProperties.js +2 -6
  12. package/front_end/models/issues_manager/ContrastCheckTrigger.ts +2 -2
  13. package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
  14. package/front_end/models/trace/ModelImpl.ts +0 -4
  15. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +1 -1
  16. package/front_end/panels/ai_assistance/PatchWidget.ts +10 -15
  17. package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +5 -4
  18. package/front_end/panels/ai_assistance/components/ChatMessage.ts +3 -2
  19. package/front_end/panels/application/FrameDetailsView.ts +2 -1
  20. package/front_end/panels/application/components/ReportsGrid.ts +2 -1
  21. package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +3 -5
  22. package/front_end/panels/common/AiCodeCompletionTeaser.ts +5 -5
  23. package/front_end/panels/console/ConsoleInsightTeaser.ts +10 -11
  24. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
  25. package/front_end/panels/css_overview/CSSOverviewModel.ts +1 -1
  26. package/front_end/panels/elements/ComputedStyleModel.ts +11 -13
  27. package/front_end/panels/elements/ComputedStyleWidget.ts +3 -3
  28. package/front_end/panels/elements/ElementsPanel.ts +5 -2
  29. package/front_end/panels/elements/ElementsSidebarPane.ts +1 -1
  30. package/front_end/panels/elements/PlatformFontsWidget.ts +1 -1
  31. package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
  32. package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
  33. package/front_end/panels/emulation/DeviceModeWrapper.ts +101 -62
  34. package/front_end/panels/explain/components/ConsoleInsight.ts +27 -23
  35. package/front_end/panels/explain/components/consoleInsight.css +1 -1
  36. package/front_end/panels/network/RequestTimingView.ts +4 -3
  37. package/front_end/panels/network/components/RequestHeadersView.css +2 -2
  38. package/front_end/panels/network/components/RequestHeadersView.ts +7 -6
  39. package/front_end/panels/profiler/HeapProfileView.ts +3 -3
  40. package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
  41. package/front_end/panels/recorder/RecorderController.ts +6 -7
  42. package/front_end/panels/recorder/recorderController.css +1 -1
  43. package/front_end/panels/security/CookieControlsView.ts +2 -2
  44. package/front_end/panels/security/CookieReportView.ts +7 -7
  45. package/front_end/panels/settings/AISettingsTab.ts +5 -5
  46. package/front_end/panels/settings/components/SyncSection.ts +4 -3
  47. package/front_end/panels/sources/CallStackSidebarPane.ts +4 -1
  48. package/front_end/panels/sources/NavigatorView.ts +1 -1
  49. package/front_end/panels/sources/SourcesPanel.ts +3 -1
  50. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +1 -1
  51. package/front_end/panels/timeline/ThreadAppender.ts +1 -1
  52. package/front_end/panels/timeline/TimelineController.ts +4 -3
  53. package/front_end/panels/timeline/TimelinePanel.ts +4 -3
  54. package/front_end/panels/whats_new/ReleaseNoteView.ts +4 -3
  55. package/front_end/third_party/chromium/README.chromium +1 -1
  56. package/front_end/ui/components/markdown_view/CodeBlock.ts +3 -6
  57. package/front_end/ui/components/markdown_view/MarkdownLink.ts +3 -4
  58. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +3 -4
  59. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +9 -6
  60. package/front_end/ui/components/panel_feedback/panelFeedback.css +2 -2
  61. package/front_end/ui/kit/link/Link.ts +1 -14
  62. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +1 -1
  63. package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +5 -4
  64. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -1
  65. package/package.json +1 -1
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  /* eslint-disable @devtools/no-imperative-dom-api */
6
+ import '../../ui/kit/kit.js';
6
7
 
7
8
  import * as Common from '../../core/common/common.js';
8
9
  import * as Host from '../../core/host/host.js';
@@ -500,12 +501,12 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
500
501
  </tr>` : nothing}
501
502
  <tr class=network-timing-footer>
502
503
  <td colspan=1>
503
- <x-link
504
+ <devtools-link
504
505
  href="https://developer.chrome.com/docs/devtools/network/reference/#timing-explanation"
505
506
  class=devtools-link
506
- jslog=${VisualLogging.link().track({click: true, keydown:'Enter|Space'}).context('explanation')}>
507
+ .jslogContext=${'explanation'}>
507
508
  ${i18nString(UIStrings.explanation)}
508
- </x-link>
509
+ </devtools-link>
509
510
  <td></td>
510
511
  <td class=${input.wasThrottled ? 'throttled' : ''} title=${ifDefined(throttledRequestTitle)}>
511
512
  ${input.wasThrottled ? html` <devtools-icon name=watch @click=${revealThrottled}></devtools-icon>` : nothing}
@@ -147,11 +147,11 @@ div.raw-headers-row {
147
147
  color: var(--sys-color-on-surface);
148
148
  }
149
149
 
150
- x-link {
150
+ devtools-link {
151
151
  position: relative;
152
152
  }
153
153
 
154
- x-link .inline-icon {
154
+ devtools-link .inline-icon {
155
155
  padding-right: 3px;
156
156
  }
157
157
 
@@ -2,6 +2,7 @@
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
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
+ import '../../../ui/kit/kit.js';
5
6
 
6
7
  import * as Common from '../../../core/common/common.js';
7
8
  import * as Host from '../../../core/host/host.js';
@@ -306,22 +307,22 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
306
307
  // Disabled until https://crbug.com/1079231 is fixed.
307
308
  // clang-format off
308
309
  return html`
309
- <x-link
310
+ <devtools-link
310
311
  href="https://goo.gle/devtools-override"
311
312
  class="link devtools-link"
312
- jslog=${VisualLogging.link('devtools-override').track({click: true})}
313
+ .jslogContext=${'devtools-override'}
313
314
  >
314
315
  <devtools-icon name="help" class="inline-icon medium">
315
316
  </devtools-icon>
316
- </x-link>
317
- <x-link
317
+ </devtools-link>
318
+ <devtools-link
318
319
  @click=${revealHeadersFile}
319
320
  class="link devtools-link"
320
321
  title=${UIStrings.revealHeaderOverrides}
321
- jslog=${VisualLogging.link('reveal-header-overrides').track({click: true})}
322
+ .jslogContext=${'reveal-header-overrides'}
322
323
  >
323
324
  ${fileIcon}${Persistence.NetworkPersistenceManager.HEADERS_FILENAME}
324
- </x-link>
325
+ </devtools-link>
325
326
  `;
326
327
  // clang-format on
327
328
  }
@@ -144,7 +144,7 @@ export class HeapProfileView extends ProfileView implements UI.SearchableView.Se
144
144
 
145
145
  this.timelineOverview = new HeapTimelineOverview();
146
146
 
147
- if (Root.Runtime.experiments.isEnabled('sampling-heap-profiler-timeline')) {
147
+ if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.SAMPLING_HEAP_PROFILER_TIMELINE)) {
148
148
  this.timelineOverview.addEventListener(Events.IDS_RANGE_CHANGED, this.onIdsRangeChanged.bind(this));
149
149
  this.timelineOverview.show(this.element, this.element.firstChild);
150
150
  this.timelineOverview.start();
@@ -368,7 +368,7 @@ export class SamplingHeapProfileType extends SamplingHeapProfileTypeBase {
368
368
  }
369
369
 
370
370
  override hasTemporaryView(): boolean {
371
- return Root.Runtime.experiments.isEnabled('sampling-heap-profiler-timeline');
371
+ return Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.SAMPLING_HEAP_PROFILER_TIMELINE);
372
372
  }
373
373
 
374
374
  override startSampling(): void {
@@ -378,7 +378,7 @@ export class SamplingHeapProfileType extends SamplingHeapProfileTypeBase {
378
378
  }
379
379
 
380
380
  void heapProfilerModel.startSampling();
381
- if (Root.Runtime.experiments.isEnabled('sampling-heap-profiler-timeline')) {
381
+ if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.SAMPLING_HEAP_PROFILER_TIMELINE)) {
382
382
  this.updateTimer = window.setTimeout(() => {
383
383
  void this.updateStats();
384
384
  }, this.updateIntervalMs);
@@ -1337,8 +1337,8 @@ export class HeapSnapshotProfileType extends
1337
1337
  }
1338
1338
 
1339
1339
  override customContent(): Element|null {
1340
- const showOptionToExposeInternalsInHeapSnapshot =
1341
- Root.Runtime.experiments.isEnabled('show-option-tp-expose-internals-in-heap-snapshot');
1340
+ const showOptionToExposeInternalsInHeapSnapshot = Root.Runtime.experiments.isEnabled(
1341
+ Root.Runtime.ExperimentName.SHOW_OPTION_TO_EXPOSE_INTERNALS_IN_HEAP_SNAPSHOT);
1342
1342
  const exposeInternalsInHeapSnapshotCheckbox =
1343
1343
  SettingsUI.SettingsUI.createSettingCheckbox(i18nString(UIStrings.exposeInternals), this.exposeInternals);
1344
1344
  this.customContentInternal = exposeInternalsInHeapSnapshotCheckbox;
@@ -1,6 +1,7 @@
1
1
  // Copyright 2023 The Chromium Authors
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
+ import '../../ui/kit/kit.js';
4
5
 
5
6
  import * as Common from '../../core/common/common.js';
6
7
  import * as Host from '../../core/host/host.js';
@@ -1193,13 +1194,11 @@ export class RecorderController extends LitElement {
1193
1194
  <div class="empty-state-header">${i18nString(UIStrings.header)}</div>
1194
1195
  <div class="empty-state-description">
1195
1196
  <span>${i18nString(UIStrings.recordingDescription)}</span>
1196
- <x-link
1197
+ <devtools-link
1197
1198
  class="x-link devtools-link"
1198
1199
  href=${RECORDER_EXPLANATION_URL}
1199
- jslog=${VisualLogging.link()
1200
- .track({ click: true, keydown: 'Enter|Space' })
1201
- .context('learn-more')}
1202
- >${i18nString(UIStrings.learnMore)}</x-link>
1200
+ .jslogContext=${'learn-more'}
1201
+ >${i18nString(UIStrings.learnMore)}</devtools-link>
1203
1202
  </div>
1204
1203
  <devtools-button .variant=${Buttons.Button.Variant.TONAL} jslogContext=${Actions.RecorderActions.CREATE_RECORDING} @click=${this.#onCreateNewRecording}>${i18nString(UIStrings.createRecording)}</devtools-button>
1205
1204
  </div>
@@ -1474,9 +1473,9 @@ export class RecorderController extends LitElement {
1474
1473
  }
1475
1474
  ></devtools-button>
1476
1475
  <div class="feedback">
1477
- <x-link class="x-link" title=${i18nString(UIStrings.sendFeedback)} href=${
1476
+ <devtools-link class="x-link" title=${i18nString(UIStrings.sendFeedback)} href=${
1478
1477
  FEEDBACK_URL
1479
- } jslog=${VisualLogging.link('feedback').track({click: true})}>${i18nString(UIStrings.sendFeedback)}</x-link>
1478
+ } .jslogContext=${'feedback'}>${i18nString(UIStrings.sendFeedback)}</devtools-link>
1480
1479
  </div>
1481
1480
  <div class="separator"></div>
1482
1481
  <devtools-shortcut-dialog
@@ -167,7 +167,7 @@ devtools-recording-list-view {
167
167
  font: var(--sys-typescale-body4-regular);
168
168
  color: var(--sys-color-on-surface-subtle);
169
169
 
170
- > x-link {
170
+ > devtools-link {
171
171
  white-space: nowrap;
172
172
  margin-left: var(--sys-size-3);
173
173
  cursor: pointer;
@@ -304,8 +304,8 @@ const DEFAULT_VIEW: View = (input: ViewInput, _output: object, target: HTMLEleme
304
304
  class="medium"
305
305
  style="color: var(--icon-warning); margin-right: var(--sys-size-2);">
306
306
  </devtools-icon>
307
- ${i18nFormatString(UIStrings.upperDeprecationWarning, {
308
- PH1: UI.Fragment.html`<x-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" jslog=${VisualLogging.link('privacy-sandbox-update').track({click: true})}>${i18nString(UIStrings.blogPostLink)}</x-link>`,
307
+ ${i18nFormatStringTemplate(UIStrings.upperDeprecationWarning, {
308
+ PH1: html`<devtools-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" .jslogContext=${'privacy-sandbox-update'}>${i18nString(UIStrings.blogPostLink)}</devtools-link>`,
309
309
  })}
310
310
  </div>
311
311
  <div class="body">
@@ -4,6 +4,7 @@
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
5
 
6
6
  import '../../ui/legacy/components/data_grid/data_grid.js';
7
+ import '../../ui/kit/kit.js';
7
8
 
8
9
  import * as Common from '../../core/common/common.js';
9
10
  import * as i18n from '../../core/i18n/i18n.js';
@@ -15,7 +16,6 @@ import type * as TextUtils from '../../models/text_utils/text_utils.js';
15
16
  import * as uiI18n from '../../ui/i18n/i18n.js';
16
17
  import * as UI from '../../ui/legacy/legacy.js';
17
18
  import * as Lit from '../../ui/lit/lit.js';
18
- import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
19
19
  import * as NetworkForward from '../network/forward/forward.js';
20
20
 
21
21
  import cookieReportViewStyles from './cookieReportView.css.js';
@@ -187,6 +187,7 @@ const UIStrings = {
187
187
  const str_ = i18n.i18n.registerUIStrings('panels/security/CookieReportView.ts', UIStrings);
188
188
  export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
189
189
  export const i18nFormatString = uiI18n.getFormatLocalizedString.bind(undefined, str_);
190
+ export const i18nFormatStringTemplate = uiI18n.getFormatLocalizedStringTemplate.bind(undefined, str_);
190
191
 
191
192
  export interface ViewInput {
192
193
  cookieRows: IssuesManager.CookieIssue.CookieReportInfo[];
@@ -221,11 +222,10 @@ const DEFAULT_VIEW: View = (input, output, target) => {
221
222
  class="medium"
222
223
  style="color: var(--icon-warning); margin-right: var(--sys-size-2);">
223
224
  </devtools-icon>
224
- ${i18nFormatString(UIStrings.upperDeprecationWarning, {
225
- PH1: UI.Fragment
226
- .html`<x-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" jslog=${
227
- VisualLogging.link('privacy-sandbox-update').track({click: true})}>${
228
- i18nString(UIStrings.blogPostLink)}</x-link>`,
225
+ ${i18nFormatStringTemplate(UIStrings.upperDeprecationWarning, {
226
+ PH1:
227
+ html`<devtools-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" .jslogContext=${
228
+ 'privacy-sandbox-update'}>${i18nString(UIStrings.blogPostLink)}</devtools-link>`,
229
229
  })}
230
230
  </div>
231
231
  <div class="body">
@@ -239,7 +239,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
239
239
  <div class="report overflow-auto">
240
240
  <div class="header">
241
241
  <h1>${i18nString(UIStrings.title)}</h1>
242
- <div class="body">${i18nString(UIStrings.body)} <x-link class="devtools-link" href="https://developers.google.com/privacy-sandbox/cookies/prepare/audit-cookies" jslog=${VisualLogging.link('learn-more').track({click: true})}>${i18nString(UIStrings.learnMoreLink)}</x-link></div>
242
+ <div class="body">${i18nString(UIStrings.body)} <devtools-link class="devtools-link" href="https://developers.google.com/privacy-sandbox/cookies/prepare/audit-cookies" .jslogContext=${'learn-more'}>${i18nString(UIStrings.learnMoreLink)}</devtools-link></div>
243
243
  </div>
244
244
  ${input.cookieRows.length > 0 ?
245
245
  html`
@@ -2,6 +2,8 @@
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
+ import '../../ui/kit/kit.js';
6
+
5
7
  import * as Common from '../../core/common/common.js';
6
8
  import * as Host from '../../core/host/host.js';
7
9
  import * as i18n from '../../core/i18n/i18n.js';
@@ -348,14 +350,12 @@ export const AI_SETTINGS_TAB_DEFAULT_VIEW: View = (input, _output, target): void
348
350
  <h3 class="expansion-grid-whole-row">${i18nString(UIStrings.thingsToConsider)}</h3>
349
351
  ${settingData.toConsiderSettingItems.map(item => renderSettingItem(item))}
350
352
  <div class="expansion-grid-whole-row">
351
- <x-link
353
+ <devtools-link
352
354
  href=${settingData.learnMoreLink.url}
353
355
  class="link"
354
356
  tabindex=${tabindex}
355
- jslog=${VisualLogging.link(settingData.learnMoreLink.linkJSLogContext).track({
356
- click: true,
357
- })}
358
- >${i18nString(UIStrings.learnMore)}</x-link>
357
+ .jslogContext=${settingData.learnMoreLink.linkJSLogContext}
358
+ >${i18nString(UIStrings.learnMore)}</devtools-link>
359
359
  </div>
360
360
  </div>
361
361
  </div>
@@ -4,6 +4,7 @@
4
4
 
5
5
  import '../../../ui/components/settings/settings.js';
6
6
  import '../../../ui/components/tooltips/tooltips.js';
7
+ import '../../../ui/kit/kit.js';
7
8
 
8
9
  import * as Common from '../../../core/common/common.js';
9
10
  import * as Host from '../../../core/host/host.js';
@@ -179,12 +180,12 @@ const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement)
179
180
  <div class="plan-details">
180
181
  ${getGdpSubscriptionText(input.gdpProfile)}
181
182
  &nbsp;·&nbsp;
182
- <x-link
183
- .jslog=${VisualLogging.link().track({click: true, keydown: 'Enter|Space'}).context('view-profile')}
183
+ <devtools-link
184
+ .jslogContext=${'view-profile'}
184
185
  class="link"
185
186
  href=${Host.GdpClient.GOOGLE_DEVELOPER_PROGRAM_PROFILE_LINK}>
186
187
  ${i18nString(UIStrings.viewProfile)}
187
- </x-link></div>
188
+ </devtools-link></div>
188
189
  ${hasReceiveBadgesCheckbox ? html`
189
190
  <div class="setting-container" ${ref(el => {
190
191
  output.highlightReceiveBadgesSetting = () => {
@@ -45,6 +45,7 @@ import {Directives, html, render} from '../../ui/lit/lit.js';
45
45
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
46
46
 
47
47
  import callStackSidebarPaneStyles from './callStackSidebarPane.css.js';
48
+ import {QuickSourceView, SourcesPanel} from './SourcesPanel.js';
48
49
 
49
50
  const UIStrings = {
50
51
  /**
@@ -285,7 +286,9 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
285
286
  if (this.maxAsyncStackChainDepth === defaultMaxAsyncStackChainDepth) {
286
287
  this.list.selectNextItem(true /* canWrap */, false /* center */);
287
288
  const selectedItem = this.list.selectedItem();
288
- if (selectedItem) {
289
+ if (selectedItem &&
290
+ (UI.Context.Context.instance().flavor(QuickSourceView) ||
291
+ UI.Context.Context.instance().flavor(SourcesPanel))) {
289
292
  this.activateItem(selectedItem);
290
293
  }
291
294
  }
@@ -179,7 +179,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
179
179
  private authoredNode?: NavigatorGroupTreeNode;
180
180
  private deployedNode?: NavigatorGroupTreeNode;
181
181
  private navigatorGroupByFolderSetting: Common.Settings.Setting<boolean>;
182
- private navigatorGroupByAuthoredExperiment?: string;
182
+ private navigatorGroupByAuthoredExperiment?: Root.Runtime.ExperimentName;
183
183
  #workspace!: Workspace.Workspace.WorkspaceImpl;
184
184
  private groupByFrame?: boolean;
185
185
  private groupByAuthored?: boolean;
@@ -429,6 +429,7 @@ export class SourcesPanel extends UI.Panel.Panel implements
429
429
  SourcesPanel.updateResizerAndSidebarButtons(this);
430
430
  }
431
431
  this.editorView.setMainWidget(this.#sourcesView);
432
+ this.callstackPane.requestUpdate();
432
433
  }
433
434
 
434
435
  override willHide(): void {
@@ -638,7 +639,8 @@ export class SourcesPanel extends UI.Panel.Panel implements
638
639
  }
639
640
 
640
641
  private addExperimentMenuItem(
641
- menuSection: UI.ContextMenu.Section, experiment: string, menuItem: Common.UIString.LocalizedString): void {
642
+ menuSection: UI.ContextMenu.Section, experiment: Root.Runtime.ExperimentName,
643
+ menuItem: Common.UIString.LocalizedString): void {
642
644
  /** menu handler **/
643
645
  function toggleExperiment(): void {
644
646
  const checked = Root.Runtime.experiments.isEnabled(experiment);
@@ -327,7 +327,7 @@ export class CompatibilityTracksAppender {
327
327
  }
328
328
  };
329
329
  const threads = Trace.Handlers.Threads.threadsInTrace(this.#parsedTrace.data);
330
- const showAllEvents = Root.Runtime.experiments.isEnabled('timeline-show-all-events');
330
+ const showAllEvents = Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_SHOW_ALL_EVENTS);
331
331
 
332
332
  for (const {pid, tid, name, type, entries, tree} of threads) {
333
333
  if (this.#parsedTrace.data.Meta.traceIsGeneric) {
@@ -151,7 +151,7 @@ export class ThreadAppender implements TrackAppender {
151
151
  #headerAppended = false;
152
152
  readonly threadType: Trace.Handlers.Threads.ThreadType = Trace.Handlers.Threads.ThreadType.MAIN_THREAD;
153
153
  readonly isOnMainFrame: boolean;
154
- #showAllEventsEnabled = Root.Runtime.experiments.isEnabled('timeline-show-all-events');
154
+ #showAllEventsEnabled = Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_SHOW_ALL_EVENTS);
155
155
  #url = '';
156
156
  #headerNestingLevel: number|null = null;
157
157
  constructor(
@@ -229,7 +229,7 @@ export class TimelineController implements Tracing.TracingManager.TracingManager
229
229
  // 'disabled-by-default-v8.cpu_profiler'
230
230
  // └ default: on, option: enableJSSampling
231
231
  const categoriesArray = [
232
- Root.Runtime.experiments.isEnabled('timeline-show-all-events') ? '*' : '-*',
232
+ Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_SHOW_ALL_EVENTS) ? '*' : '-*',
233
233
  Trace.Types.Events.Categories.Console,
234
234
  Trace.Types.Events.Categories.Loading,
235
235
  Trace.Types.Events.Categories.UserTiming,
@@ -251,13 +251,14 @@ export class TimelineController implements Tracing.TracingManager.TracingManager
251
251
  'navigation,rail',
252
252
  ];
253
253
 
254
- if (Root.Runtime.experiments.isEnabled('timeline-v8-runtime-call-stats') && options.enableJSSampling) {
254
+ if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_V8_RUNTIME_CALL_STATS) &&
255
+ options.enableJSSampling) {
255
256
  categoriesArray.push(disabledByDefault('v8.runtime_stats_sampling'));
256
257
  }
257
258
  if (options.enableJSSampling) {
258
259
  categoriesArray.push(disabledByDefault('v8.cpu_profiler'));
259
260
  }
260
- if (Root.Runtime.experiments.isEnabled('timeline-invalidation-tracking')) {
261
+ if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_INVALIDATION_TRACKING)) {
261
262
  categoriesArray.push(disabledByDefault('devtools.timeline.invalidationTracking'));
262
263
  }
263
264
  if (options.capturePictures) {
@@ -732,8 +732,9 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
732
732
 
733
733
  #instantiateNewModel(): Trace.TraceModel.Model {
734
734
  const config = Trace.Types.Configuration.defaults();
735
- config.showAllEvents = Root.Runtime.experiments.isEnabled('timeline-show-all-events');
736
- config.includeRuntimeCallStats = Root.Runtime.experiments.isEnabled('timeline-v8-runtime-call-stats');
735
+ config.showAllEvents = Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_SHOW_ALL_EVENTS);
736
+ config.includeRuntimeCallStats =
737
+ Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_V8_RUNTIME_CALL_STATS);
737
738
  config.debugMode = Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_DEBUG_MODE);
738
739
 
739
740
  const traceEngineModel = Trace.TraceModel.Model.createWithAllHandlers(config);
@@ -2089,7 +2090,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2089
2090
 
2090
2091
  #applyActiveFilters(traceIsGeneric: boolean, exclusiveFilter: Trace.Extras.TraceFilter.TraceFilter|null = null):
2091
2092
  void {
2092
- if (traceIsGeneric || Root.Runtime.experiments.isEnabled('timeline-show-all-events')) {
2093
+ if (traceIsGeneric || Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_SHOW_ALL_EVENTS)) {
2093
2094
  return;
2094
2095
  }
2095
2096
 
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import '../../ui/components/markdown_view/markdown_view.js';
6
+ import '../../ui/kit/kit.js';
6
7
 
7
8
  import * as i18n from '../../core/i18n/i18n.js';
8
9
  import type * as Platform from '../../core/platform/platform.js';
@@ -87,14 +88,14 @@ export class ReleaseNoteView extends UI.Panel.Panel {
87
88
  <div class="video-container">
88
89
  ${releaseNote.videoLinks.map((value: {description: string, link: Platform.DevToolsPath.UrlString, type?: VideoType}) => {
89
90
  return html`
90
- <x-link
91
+ <devtools-link
91
92
  href=${value.link}
92
- jslog=${VisualLogging.link().track({click: true}).context('learn-more')}>
93
+ .jslogContext=${'learn-more'}>
93
94
  <div class="video">
94
95
  <img class="thumbnail" src=${input.getThumbnailPath(value.type ?? VideoType.WHATS_NEW)}>
95
96
  <div class="thumbnail-description"><span>${value.description}</span></div>
96
97
  </div>
97
- </x-link>
98
+ </devtools-link>
98
99
  `;
99
100
  })}
100
101
  </div>
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
2
  URL: https://chromium.googlesource.com/chromium/src
3
3
  Version: N/A
4
- Revision: 45ca275b4749431e27f80dc5defcf893accdf583
4
+ Revision: 68ce69fc7f71cb8b57403cba5397e1d12753b37c
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -3,7 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view, @devtools/enforce-custom-element-definitions-location */
5
5
 
6
- import '../../../ui/legacy/legacy.js'; // for x-link
6
+ import '../../../ui/kit/kit.js';
7
7
 
8
8
  import * as i18n from '../../../core/i18n/i18n.js';
9
9
  import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
@@ -204,12 +204,9 @@ export class CodeBlock extends HTMLElement {
204
204
  #renderNotice(): Lit.TemplateResult {
205
205
  // clang-format off
206
206
  return html`<p class="notice">
207
- <x-link class="link" href="https://support.google.com/legal/answer/13505487" jslog=${
208
- VisualLogging.link('code-disclaimer').track({
209
- click: true,
210
- })}>
207
+ <devtools-link class="link" href="https://support.google.com/legal/answer/13505487" .jslogContext=${'code-disclaimer'}>
211
208
  ${i18nString(UIStrings.disclaimer)}
212
- </x-link>
209
+ </devtools-link>
213
210
  </p>`;
214
211
  // clang-format on
215
212
  }
@@ -3,10 +3,9 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view, @devtools/enforce-custom-element-definitions-location */
5
5
 
6
- import '../../legacy/legacy.js'; // Required for <x-link>.
6
+ import '../../kit/kit.js';
7
7
 
8
8
  import {html, render} from '../../lit/lit.js';
9
- import * as VisualLogging from '../../visual_logging/visual_logging.js';
10
9
 
11
10
  import markdownLinkStyles from './markdownLink.css.js';
12
11
  import {getMarkdownLink} from './MarkdownLinksMap.js';
@@ -38,8 +37,8 @@ export class MarkdownLink extends HTMLElement {
38
37
  // clang-format off
39
38
  const output = html`
40
39
  <style>${markdownLinkStyles}</style>
41
- <x-link class="devtools-link" href=${this.#linkUrl} jslog=${VisualLogging.link().track({click: true})}
42
- >${this.#linkText}</x-link>`;
40
+ <devtools-link class="devtools-link" href=${this.#linkUrl}
41
+ >${this.#linkText}</devtools-link>`;
43
42
  render(output, this.#shadow, {host: this});
44
43
  // clang-format on
45
44
  }
@@ -3,13 +3,12 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view, @devtools/enforce-custom-element-definitions-location */
5
5
 
6
- import '../../legacy/legacy.js';
6
+ import '../../kit/kit.js';
7
7
 
8
8
  import * as i18n from '../../../core/i18n/i18n.js';
9
9
  import * as Platform from '../../../core/platform/platform.js';
10
10
  import * as ComponentHelpers from '../../components/helpers/helpers.js';
11
11
  import {html, render} from '../../lit/lit.js';
12
- import * as VisualLogging from '../../visual_logging/visual_logging.js';
13
12
 
14
13
  import panelFeedbackStyles from './panelFeedback.css.js';
15
14
 
@@ -68,14 +67,14 @@ export class PanelFeedback extends HTMLElement {
68
67
  <h2 class="flex">
69
68
  <devtools-icon name="experiment" class="extra-large" style="color: var(--icon-primary);"></devtools-icon> ${i18nString(UIStrings.previewFeature)}
70
69
  </h2>
71
- <p>${i18nString(UIStrings.previewText)} <x-link href=${this.#props.feedbackUrl} jslog=${VisualLogging.link('feedback').track({click: true})}>${i18nString(UIStrings.previewTextFeedbackLink)}</x-link></p>
70
+ <p>${i18nString(UIStrings.previewText)} <devtools-link href=${this.#props.feedbackUrl} .jslogContext=${'feedback'}>${i18nString(UIStrings.previewTextFeedbackLink)}</devtools-link></p>
72
71
  <div class="video">
73
72
  <div class="thumbnail">
74
73
  <img src=${videoThumbnailUrl} role="presentation" />
75
74
  </div>
76
75
  <div class="video-description">
77
76
  <h3>${i18nString(UIStrings.videoAndDocumentation)}</h3>
78
- <x-link class="quick-start-link" href=${this.#props.quickStartUrl} jslog=${VisualLogging.link('css-overview.quick-start').track({click: true})}>${this.#props.quickStartLinkText}</x-link>
77
+ <devtools-link class="quick-start-link" href=${this.#props.quickStartUrl} .jslogContext=${'css-overview.quick-start'}>${this.#props.quickStartLinkText}</devtools-link>
79
78
  </div>
80
79
  </div>
81
80
  </div>
@@ -4,6 +4,7 @@
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view, @devtools/enforce-custom-element-definitions-location */
5
5
 
6
6
  import '../../../ui/legacy/legacy.js';
7
+ import '../../../ui/kit/kit.js';
7
8
 
8
9
  import * as i18n from '../../../core/i18n/i18n.js';
9
10
  import * as Root from '../../../core/root/root.js';
@@ -45,7 +46,7 @@ export class PreviewToggle extends HTMLElement {
45
46
  #helperText: string|null = null;
46
47
  #feedbackURL: string|null = null;
47
48
  #learnMoreURL: string|undefined;
48
- #experiment = '';
49
+ #experiment: Root.Runtime.ExperimentName|'' = '';
49
50
  #onChangeCallback?: (checked: boolean) => void;
50
51
 
51
52
  set data(data: PreviewToggleData) {
@@ -59,7 +60,7 @@ export class PreviewToggle extends HTMLElement {
59
60
  }
60
61
 
61
62
  #render(): void {
62
- const checked = Root.Runtime.experiments.isEnabled(this.#experiment);
63
+ const checked = this.#experiment && Root.Runtime.experiments.isEnabled(this.#experiment);
63
64
  // Disabled until https://crbug.com/1079231 is fixed.
64
65
  // clang-format off
65
66
  render(
@@ -75,14 +76,14 @@ export class PreviewToggle extends HTMLElement {
75
76
  </devtools-checkbox>
76
77
  <div class="spacer"></div>
77
78
  ${this.#feedbackURL && !this.#helperText
78
- ? html`<div class="feedback"><x-link class="x-link" href=${this.#feedbackURL}>${i18nString(UIStrings.shortFeedbackLink)}</x-link></div>`
79
+ ? html`<div class="feedback"><devtools-link class="x-link" href=${this.#feedbackURL}>${i18nString(UIStrings.shortFeedbackLink)}</devtools-link></div>`
79
80
  : nothing}
80
81
  ${this.#learnMoreURL
81
- ? html`<div class="learn-more"><x-link class="x-link" href=${this.#learnMoreURL}>${i18nString(UIStrings.learnMoreLink)}</x-link></div>`
82
+ ? html`<div class="learn-more"><devtools-link class="x-link" href=${this.#learnMoreURL}>${i18nString(UIStrings.learnMoreLink)}</devtools-link></div>`
82
83
  : nothing}
83
84
  <div class="helper">
84
85
  ${this.#helperText && this.#feedbackURL
85
- ? html`<p>${this.#helperText} <x-link class="x-link" href=${this.#feedbackURL}>${i18nString(UIStrings.previewTextFeedbackLink)}</x-link></p>`
86
+ ? html`<p>${this.#helperText} <devtools-link class="x-link" href=${this.#feedbackURL}>${i18nString(UIStrings.previewTextFeedbackLink)}</devtools-link></p>`
86
87
  : nothing}
87
88
  </div>
88
89
  </div>`,
@@ -95,7 +96,9 @@ export class PreviewToggle extends HTMLElement {
95
96
 
96
97
  #checkboxChanged(event: Event): void {
97
98
  const checked = (event.target as HTMLInputElement).checked;
98
- Root.Runtime.experiments.setEnabled(this.#experiment, checked);
99
+ if (this.#experiment) {
100
+ Root.Runtime.experiments.setEnabled(this.#experiment, checked);
101
+ }
99
102
  this.#onChangeCallback?.(checked);
100
103
  }
101
104
  }
@@ -54,7 +54,7 @@ h3 {
54
54
  gap: 20px;
55
55
  }
56
56
 
57
- x-link {
57
+ devtools-link {
58
58
  color: var(--sys-color-primary);
59
59
  text-decoration-line: underline;
60
60
  }
@@ -72,7 +72,7 @@ x-link.quick-start-link {
72
72
  }
73
73
 
74
74
  @media (forced-colors: active) {
75
- x-link {
75
+ devtools-link {
76
76
  color: linktext;
77
77
  }
78
78
  }
@@ -82,20 +82,7 @@ export class Link extends HTMLElement {
82
82
  }
83
83
 
84
84
  #onJslogContextChange(): void {
85
- let jslogContext = this.jslogContext;
86
- if (!jslogContext) {
87
- try {
88
- if (!this.href) {
89
- return;
90
- }
91
- const urlForContext = new URL(this.href);
92
- urlForContext.search = '';
93
- jslogContext = Platform.StringUtilities.toKebabCase(urlForContext.toString());
94
- } catch {
95
- return;
96
- }
97
- }
98
-
85
+ const jslogContext = this.jslogContext ?? undefined;
99
86
  const jslog = VisualLogging.link().track({click: true, keydown: 'Enter|Space'}).context(jslogContext);
100
87
  this.setAttribute('jslog', jslog.toString());
101
88
  }
@@ -242,7 +242,7 @@ export class ContrastDetails extends Common.ObjectWrapper.ObjectWrapper<EventTyp
242
242
  this.setVisible(true);
243
243
  this.hideNoContrastInfoAvailableMessage();
244
244
 
245
- const isAPCAEnabled = Root.Runtime.experiments.isEnabled('apca');
245
+ const isAPCAEnabled = Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.APCA);
246
246
 
247
247
  const fgColor = this.contrastInfo.color();
248
248
  const bgColor = this.contrastInfo.bgColor();