chrome-devtools-frontend 1.0.1679704 → 1.0.1681498

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 (125) hide show
  1. package/AUTHORS +1 -0
  2. package/front_end/core/platform/TypescriptUtilities.ts +0 -9
  3. package/front_end/core/platform/platform.ts +1 -1
  4. package/front_end/core/sdk/ConsoleModel.ts +6 -3
  5. package/front_end/core/sdk/DOMModel.ts +110 -0
  6. package/front_end/core/sdk/EmulationModel.ts +4 -2
  7. package/front_end/core/sdk/NetworkManager.ts +15 -9
  8. package/front_end/core/sdk/OverlayModel.ts +3 -2
  9. package/front_end/core/sdk/PageResourceLoader.ts +4 -3
  10. package/front_end/core/sdk/RuntimeModel.ts +5 -3
  11. package/front_end/core/sdk/SDKSettings.ts +66 -0
  12. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +4 -2
  13. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +32 -0
  14. package/front_end/entrypoints/main/MainImpl.ts +1 -1
  15. package/front_end/entrypoints/main/main-meta.ts +82 -0
  16. package/front_end/entrypoints/shell/shell.ts +0 -3
  17. package/front_end/entrypoints/trace_app/trace_app.ts +0 -3
  18. package/front_end/generated/InspectorBackendCommands.ts +3 -1
  19. package/front_end/generated/SupportedCSSProperties.ts +20 -0
  20. package/front_end/generated/protocol-mapping.d.ts +7 -0
  21. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  22. package/front_end/generated/protocol.ts +15 -3
  23. package/front_end/models/ai_code_completion/debug.ts +6 -3
  24. package/front_end/models/ai_code_generation/debug.ts +6 -3
  25. package/front_end/models/badges/UserBadges.ts +9 -2
  26. package/front_end/models/emulation/DeviceModeModel.ts +16 -27
  27. package/front_end/models/emulation/EmulatedDevices.ts +30 -125
  28. package/front_end/models/extensions/ExtensionAPI.ts +34 -23
  29. package/front_end/models/logs/NetworkLog.ts +3 -3
  30. package/front_end/models/logs/logs-meta.ts +0 -60
  31. package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -1
  32. package/front_end/panels/application/ServiceWorkersView.ts +1 -1
  33. package/front_end/panels/application/StorageView.ts +2 -0
  34. package/front_end/panels/common/BadgeNotification.ts +1 -1
  35. package/front_end/panels/common/ExtensionPanel.ts +12 -7
  36. package/front_end/panels/common/ExtensionServer.ts +76 -16
  37. package/front_end/panels/common/GdpSignUpDialog.ts +1 -1
  38. package/front_end/panels/console/ConsoleView.ts +4 -2
  39. package/front_end/panels/console/ConsoleViewMessage.ts +3 -2
  40. package/front_end/panels/console/console-meta.ts +19 -5
  41. package/front_end/panels/elements/CSSRuleValidator.ts +12 -12
  42. package/front_end/panels/elements/CSSSpecificityBreakdown.ts +1 -1
  43. package/front_end/panels/elements/ClassesPaneWidget.ts +6 -6
  44. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
  45. package/front_end/panels/elements/ComputedStyleWidget.ts +4 -5
  46. package/front_end/panels/elements/DOMTreeContextMenu.ts +538 -0
  47. package/front_end/panels/elements/ElementIssueUtils.ts +20 -20
  48. package/front_end/panels/elements/ElementStatePaneWidget.ts +6 -6
  49. package/front_end/panels/elements/ElementsPanel.ts +10 -10
  50. package/front_end/panels/elements/ElementsTreeElement.ts +47 -514
  51. package/front_end/panels/elements/ElementsTreeOutline.ts +168 -297
  52. package/front_end/panels/elements/EventListenersWidget.ts +8 -8
  53. package/front_end/panels/elements/LayersWidget.ts +4 -4
  54. package/front_end/panels/elements/LayoutPane.ts +11 -11
  55. package/front_end/panels/elements/MarkerDecorator.ts +3 -3
  56. package/front_end/panels/elements/PlatformFontsWidget.ts +8 -8
  57. package/front_end/panels/elements/PropertiesWidget.ts +4 -4
  58. package/front_end/panels/elements/PropertyRenderer.ts +2 -2
  59. package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
  60. package/front_end/panels/elements/StylePropertiesSection.ts +14 -14
  61. package/front_end/panels/elements/StylePropertyTreeElement.ts +21 -21
  62. package/front_end/panels/elements/StylesSidebarPane.ts +14 -14
  63. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +1 -1
  64. package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -1
  65. package/front_end/panels/elements/components/CSSVariableValueView.ts +3 -3
  66. package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +2 -2
  67. package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
  68. package/front_end/panels/elements/elements-meta.ts +13 -13
  69. package/front_end/panels/elements/elements.ts +3 -0
  70. package/front_end/panels/issues/AffectedCookiesView.ts +2 -0
  71. package/front_end/panels/issues/AffectedElementsView.ts +5 -0
  72. package/front_end/panels/issues/CorsIssueDetailsView.ts +13 -9
  73. package/front_end/panels/issues/IssueView.ts +7 -2
  74. package/front_end/panels/layer_viewer/LayerDetailsView.ts +11 -7
  75. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +2 -0
  76. package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +3 -1
  77. package/front_end/panels/network/NetworkConfigView.ts +2 -1
  78. package/front_end/panels/network/NetworkLogView.ts +5 -2
  79. package/front_end/panels/network/NetworkOverview.ts +11 -5
  80. package/front_end/panels/network/NetworkPanel.ts +3 -2
  81. package/front_end/panels/network/NetworkWaterfallColumn.ts +16 -3
  82. package/front_end/panels/network/RequestHeadersView.ts +4 -4
  83. package/front_end/panels/network/components/ResponseHeaderSection.ts +6 -2
  84. package/front_end/panels/network/network-meta.ts +117 -0
  85. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +2 -1
  86. package/front_end/panels/profiler/ProfileLauncherView.ts +19 -16
  87. package/front_end/panels/profiler/ProfileSidebarTreeElement.ts +1 -1
  88. package/front_end/panels/security/security.ts +6 -0
  89. package/front_end/panels/settings/components/SyncSection.ts +1 -1
  90. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +0 -3
  91. package/front_end/panels/sources/NavigatorView.ts +6 -2
  92. package/front_end/panels/sources/SourcesNavigator.ts +8 -4
  93. package/front_end/panels/sources/SourcesPanel.ts +4 -2
  94. package/front_end/panels/sources/SourcesSearchScope.ts +3 -1
  95. package/front_end/panels/sources/SourcesView.ts +8 -107
  96. package/front_end/panels/sources/TabbedEditorContainer.ts +110 -7
  97. package/front_end/panels/sources/UISourceCodeFrame.ts +2 -2
  98. package/front_end/panels/sources/sources-meta.ts +16 -0
  99. package/front_end/panels/timeline/TimelineLoader.ts +1 -1
  100. package/front_end/panels/timeline/TimelineUIUtils.ts +6 -0
  101. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
  102. package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
  103. package/front_end/panels/timeline/components/MetricCard.ts +4 -3
  104. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -2
  105. package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +1 -1
  106. package/front_end/panels/timeline/components/TimelineSummary.ts +8 -5
  107. package/front_end/panels/web_audio/WebAudioView.ts +8 -0
  108. package/front_end/third_party/chromium/README.chromium +1 -1
  109. package/front_end/third_party/web-vitals/rebuild.sh +1 -1
  110. package/front_end/ui/legacy/TabbedPane.ts +34 -2
  111. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +11 -11
  112. package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +1 -1
  113. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +19 -20
  114. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +2 -2
  115. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +164 -325
  116. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
  117. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +7 -7
  118. package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +1 -1
  119. package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +2 -2
  120. package/front_end/ui/visual_logging/KnownContextValues.ts +40 -0
  121. package/mcp/mcp.ts +0 -3
  122. package/package.json +1 -1
  123. package/front_end/core/sdk/sdk-meta.ts +0 -178
  124. package/front_end/models/badges/badges-meta.ts +0 -27
  125. package/front_end/models/persistence/persistence-meta.ts +0 -69
@@ -62,6 +62,7 @@ import * as UI from '../../ui/legacy/legacy.js';
62
62
  import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
63
63
  import {html, render} from '../../ui/lit/lit.js';
64
64
  import * as SettingUIRegistration from '../../ui/settings/settings.js';
65
+ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
65
66
  import * as PanelsCommon from '../common/common.js';
66
67
 
67
68
  import {getDurationString} from './AppenderUtils.js';
@@ -2235,6 +2236,7 @@ export class TimelineDetailsContentHelper {
2235
2236
 
2236
2237
  this.element = document.createElement('div');
2237
2238
  this.element.classList.add('timeline-details-view-block');
2239
+ this.element.setAttribute('jslog', `${VisualLogging.section('timeline.event-details')}`);
2238
2240
  this.tableElement = this.element.createChild('div', 'vbox timeline-details-chip-body');
2239
2241
  this.fragment.appendChild(this.element);
2240
2242
  }
@@ -2245,6 +2247,7 @@ export class TimelineDetailsContentHelper {
2245
2247
  } else {
2246
2248
  this.element = document.createElement('div');
2247
2249
  this.element.classList.add('timeline-details-view-block');
2250
+ this.element.setAttribute('jslog', `${VisualLogging.section('timeline.event-details')}`);
2248
2251
  this.fragment.appendChild(this.element);
2249
2252
  }
2250
2253
 
@@ -2309,12 +2312,14 @@ export class TimelineDetailsContentHelper {
2309
2312
 
2310
2313
  appendTextRow(title: string, value: string|number|boolean): void {
2311
2314
  const rowElement = this.tableElement.createChild('div', 'timeline-details-view-row');
2315
+ rowElement.setAttribute('jslog', `${VisualLogging.item('detail-row')}`);
2312
2316
  rowElement.createChild('div', 'timeline-details-view-row-title').textContent = title;
2313
2317
  rowElement.createChild('div', 'timeline-details-view-row-value').textContent = value.toString();
2314
2318
  }
2315
2319
 
2316
2320
  appendElementRow(title: string, content: string|Node, isWarning?: boolean, isStacked?: boolean): void {
2317
2321
  const rowElement = this.tableElement.createChild('div', 'timeline-details-view-row');
2322
+ rowElement.setAttribute('jslog', `${VisualLogging.item('detail-row')}`);
2318
2323
  rowElement.setAttribute('data-row-title', title);
2319
2324
  if (isWarning) {
2320
2325
  rowElement.classList.add('timeline-details-warning');
@@ -2403,6 +2408,7 @@ export class TimelineDetailsContentHelper {
2403
2408
 
2404
2409
  const stackTraceElement = document.createElement('div');
2405
2410
  stackTraceElement.classList.add('timeline-details-view-row', 'timeline-details-stack-values');
2411
+ stackTraceElement.setAttribute('jslog', `${VisualLogging.item('detail-row')}`);
2406
2412
  callFrameContents.markAsRoot();
2407
2413
  callFrameContents.show(stackTraceElement);
2408
2414
  return stackTraceElement;
@@ -12,6 +12,7 @@ import * as Buttons from '../../../ui/components/buttons/buttons.js';
12
12
  import * as LegacyComponents from '../../../ui/legacy/components/utils/utils.js';
13
13
  import * as UI from '../../../ui/legacy/legacy.js';
14
14
  import * as Lit from '../../../ui/lit/lit.js';
15
+ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
15
16
 
16
17
  import * as Insights from './insights/insights.js';
17
18
  import {nodeLink} from './insights/NodeLink.js';
@@ -228,7 +229,7 @@ function renderLayoutShiftDetails(
228
229
 
229
230
  // clang-format off
230
231
  return html`
231
- <table class="layout-shift-details-table">
232
+ <table class="layout-shift-details-table" jslog=${VisualLogging.section('layout-shift-details')}>
232
233
  <thead class="table-title">
233
234
  <tr>
234
235
  <th>${i18nString(UIStrings.startTime)}</th>
@@ -271,7 +272,7 @@ function renderLayoutShiftClusterDetails(
271
272
 
272
273
  // clang-format off
273
274
  return html`
274
- <table class="layout-shift-details-table">
275
+ <table class="layout-shift-details-table" jslog=${VisualLogging.section('layout-shift-details')}>
275
276
  <thead class="table-title">
276
277
  <tr>
277
278
  <th>${i18nString(UIStrings.startTime)}</th>
@@ -314,7 +315,7 @@ function renderShiftRow(
314
315
 
315
316
  // clang-format off
316
317
  return html`
317
- <tr class="shift-row" data-ts=${currentShift.ts}>
318
+ <tr class="shift-row" data-ts=${currentShift.ts} jslog=${VisualLogging.tableRow('shift-row')}>
318
319
  <td>${renderStartTime(currentShift, userHasSingleShiftSelected, parsedTrace, onEventClick)}</td>
319
320
  <td>${(score.toFixed(4))}</td>
320
321
  ${elementsShifted.length ? html`
@@ -662,7 +662,7 @@ function renderRecordingSettings(input: ViewInput): Lit.LitTemplate {
662
662
  <setting-checkbox
663
663
  class="network-cache-setting"
664
664
  .data=${{
665
- setting: Common.Settings.Settings.instance().moduleSetting('cache-disabled'),
665
+ setting: Common.Settings.Settings.instance().resolve(SDK.SDKSettings.cacheDisabledSettingDescriptor),
666
666
  textOverride: i18nString(UIStrings.disableNetworkCache),
667
667
  } as Settings.SettingCheckbox.SettingCheckboxData}
668
668
  ></setting-checkbox>
@@ -11,6 +11,7 @@ import * as Buttons from '../../../ui/components/buttons/buttons.js';
11
11
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
12
12
  import * as UIHelpers from '../../../ui/helpers/helpers.js';
13
13
  import * as Lit from '../../../ui/lit/lit.js';
14
+ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
14
15
 
15
16
  import metricCardStyles from './metricCard.css.js';
16
17
  import {type CompareRating, renderCompareText, renderDetailedCompareText} from './MetricCompareStrings.js';
@@ -551,7 +552,7 @@ export class MetricCard extends HTMLElement {
551
552
 
552
553
  // clang-format off
553
554
  return html`
554
- <div class="bucket-summaries histogram">
555
+ <div class="bucket-summaries histogram" jslog=${VisualLogging.canvas('metric-histogram')}>
555
556
  ${goodLabel}
556
557
  <div class="histogram-bar good-bg" style="width: ${this.#getBarWidthForRating('good')}"></div>
557
558
  <div class="histogram-percent">${this.#getPercentLabelForRating('good')}</div>
@@ -585,7 +586,7 @@ export class MetricCard extends HTMLElement {
585
586
  ` : nothing}
586
587
  </div>
587
588
  ${subparts.map(subpart => html`
588
- <div class="subpart-table-row" role="row">
589
+ <div class="subpart-table-row" role="row" jslog=${VisualLogging.tableRow('metric-subpart')}>
589
590
  <div role="cell">${subpart[0]}</div>
590
591
  <div role="cell" class="subpart-table-value">${i18n.TimeUtilities.preciseMillisToString(subpart[1])}</div>
591
592
  ${subpart[2] !== undefined ? html`
@@ -614,7 +615,7 @@ export class MetricCard extends HTMLElement {
614
615
  const output = html`
615
616
  <style>${metricCardStyles}</style>
616
617
  <style>${metricValueStyles}</style>
617
- <div class="metric-card">
618
+ <div class="metric-card" jslog=${VisualLogging.section(Platform.StringUtilities.toKebabCase(this.#data.metric))}>
618
619
  <h3 class="title">
619
620
  ${this.#getTitle()}
620
621
  <devtools-button
@@ -13,6 +13,7 @@ import * as Trace from '../../../models/trace/trace.js';
13
13
  import * as LegacyComponents from '../../../ui/legacy/components/utils/utils.js';
14
14
  import * as UI from '../../../ui/legacy/legacy.js';
15
15
  import * as Lit from '../../../ui/lit/lit.js';
16
+ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
16
17
 
17
18
  import networkRequestDetailsStyles from './networkRequestDetails.css.js';
18
19
  import networkRequestTooltipStyles from './networkRequestTooltip.css.js';
@@ -210,7 +211,9 @@ export const DEFAULT_VIEW: (
210
211
  <style>${networkRequestDetailsStyles}</style>
211
212
  <style>${networkRequestTooltipStyles}</style>
212
213
 
213
- <div class="network-request-details-content">
214
+ <div class="network-request-details-content"
215
+ data-network-request-id=${input.request.args.data.requestId}
216
+ jslog=${VisualLogging.section('timeline.network-request-details')}>
214
217
  ${renderTitle(input.request)}
215
218
  ${renderURL(input.request)}
216
219
  <div class="network-request-details-cols">
@@ -337,7 +340,7 @@ function renderRow(title: string, value?: string|Node|Lit.TemplateResult): Lit.L
337
340
  }
338
341
  // clang-format off
339
342
  return html`
340
- <div class="network-request-details-row">
343
+ <div class="network-request-details-row" jslog=${VisualLogging.item('detail-row')}>
341
344
  <div class="title">${title}</div>
342
345
  <div class="value">${value}</div>
343
346
  </div>`;
@@ -54,7 +54,7 @@ export const TIMELINE_RANGE_SUMMARY_VIEW_DEFAULT_VIEW: View = (input, _output, t
54
54
  if (!value) {
55
55
  continue;
56
56
  }
57
- categories.push({value, color: category.getCSSValue(), title: category.title});
57
+ categories.push({value, color: category.getCSSValue(), title: category.title, name: category.name});
58
58
  }
59
59
  categories.sort((a, b) => b.value - a.value);
60
60
 
@@ -3,9 +3,11 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
+ import * as Platform from '../../../core/platform/platform.js';
6
7
  import * as Buttons from '../../../ui/components/buttons/buttons.js';
7
8
  import * as UI from '../../../ui/legacy/legacy.js';
8
9
  import * as Lit from '../../../ui/lit/lit.js';
10
+ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
9
11
 
10
12
  import timelineSummaryStyles from './timelineSummary.css.js';
11
13
 
@@ -30,6 +32,7 @@ export interface CategoryData {
30
32
  value: number;
31
33
  color: string;
32
34
  title: string;
35
+ name?: string;
33
36
  }
34
37
 
35
38
  interface ViewInput {
@@ -52,15 +55,15 @@ export const CATEGORY_SUMMARY_DEFAULT_VIEW: View = (input, _output, target): voi
52
55
  <style>${timelineSummaryStyles}</style>
53
56
  <style>@scope to (devtools-widget > *) { ${UI.inspectorCommonStyles} }</style>
54
57
  <style>@scope to (devtools-widget > *) { ${Buttons.textButtonStyles} }</style>
55
- <div class=${summaryClasses}>
58
+ <div class=${summaryClasses} jslog=${VisualLogging.section('timeline-summary')}>
56
59
  <div class="summary-range">${i18nString(UIStrings.rangeSS, {PH1: i18n.TimeUtilities.millisToString(input.rangeStart), PH2: i18n.TimeUtilities.millisToString(input.rangeEnd)})}</div>
57
60
  <div class="category-summary">
58
61
  ${input.categories.map(category => {
59
62
  return html`
60
- <div class="category-row">
63
+ <div class="category-row" jslog=${VisualLogging.item(category.name || Platform.StringUtilities.toKebabCase(category.title))}>
61
64
  <div class="category-swatch" style="background-color: ${category.color};"></div>
62
65
  <div class="category-name">${category.title}</div>
63
- <div class="category-value">
66
+ <div class="category-value" jslog=${VisualLogging.value()}>
64
67
  ${i18n.TimeUtilities.preciseMillisToString(category.value)}
65
68
  <div class="background-bar-container">
66
69
  <div class="background-bar" style='width: ${(category.value * 100 / input.total).toFixed(1)}%;'></div>
@@ -68,10 +71,10 @@ export const CATEGORY_SUMMARY_DEFAULT_VIEW: View = (input, _output, target): voi
68
71
  </div>
69
72
  </div>`;
70
73
  })}
71
- <div class="category-row">
74
+ <div class="category-row" jslog=${VisualLogging.item('total')}>
72
75
  <div class="category-swatch"></div>
73
76
  <div class="category-name">${i18nString(UIStrings.total)}</div>
74
- <div class="category-value">
77
+ <div class="category-value" jslog=${VisualLogging.value()}>
75
78
  ${i18n.TimeUtilities.preciseMillisToString(input.total)}
76
79
  <div class="background-bar-container">
77
80
  <div class="background-bar"></div>
@@ -49,6 +49,10 @@ const UIStrings = {
49
49
  * @description Label for the callback buffer size of an audio context.
50
50
  */
51
51
  callbackBufferSize: 'Callback buffer size',
52
+ /**
53
+ * @description Label for the render quantum size of an audio context.
54
+ */
55
+ renderQuantumSize: 'Render quantum size',
52
56
  /**
53
57
  * @description Label in the WebAudio tool for the maximum number of output channels of an audio context.
54
58
  */
@@ -149,6 +153,10 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
149
153
  <div class="context-detail-row-entry">${i18nString(UIStrings.callbackBufferSize)}</div>
150
154
  <div class="context-detail-row-value">${selectedContext.callbackBufferSize} frames</div>
151
155
  </div>` : ''}
156
+ <div class="context-detail-row">
157
+ <div class="context-detail-row-entry">${i18nString(UIStrings.renderQuantumSize)}</div>
158
+ <div class="context-detail-row-value">${selectedContext.renderQuantumSize} frames</div>
159
+ </div>
152
160
  <div class="context-detail-row">
153
161
  <div class="context-detail-row-entry">${i18nString(UIStrings.maxOutputChannels)}</div>
154
162
  <div class="context-detail-row-value">${selectedContext.maxOutputChannelCount} ch</div>
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
2
  URL: Internal
3
3
  Version: N/A
4
- Revision: 2606b89d677c6df418e67f3e551560a430c328be
4
+ Revision: ca1960ebbf919625140331d83f55552e8fe05333
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -33,6 +33,6 @@ cd -
33
33
 
34
34
  # Copy the source files to our repo, and build it.
35
35
  cp -r tmp-repo/src package/src
36
- ../../../node_modules/.bin/tsc --ignoreConfig -d -t esnext -m esnext --moduleResolution bundler --strict --outDir package/dist/modules/ package/src/**/*.ts package/src/index.ts
36
+ vpython3 ../../../third_party/typescript/typescript.py --ignoreConfig --skipLibCheck -d -t esnext -m esnext --moduleResolution bundler --strict --outDir package/dist/modules/ package/src/**/*.ts package/src/index.ts
37
37
 
38
38
  echo "Rebuild complete."
@@ -1672,6 +1672,24 @@ export interface TabbedPaneTabDelegate {
1672
1672
  }
1673
1673
 
1674
1674
  export class TabbedPaneElement extends WidgetElement<TabbedPane> {
1675
+ #closeableTabs = false;
1676
+ #allowTabReorder = false;
1677
+ #automaticReorder = false;
1678
+
1679
+ set closeableTabs(closeable: boolean) {
1680
+ this.#closeableTabs = closeable;
1681
+ this.getWidget()?.setCloseableTabs(closeable);
1682
+ }
1683
+
1684
+ set allowTabReorder(allow: boolean) {
1685
+ this.#allowTabReorder = allow;
1686
+ this.getWidget()?.setAllowTabReorder(this.#allowTabReorder, this.#automaticReorder);
1687
+ }
1688
+
1689
+ set automaticReorder(automatic: boolean) {
1690
+ this.#automaticReorder = automatic;
1691
+ this.getWidget()?.setAllowTabReorder(this.#allowTabReorder, this.#automaticReorder);
1692
+ }
1675
1693
  readonly #tabObserver = new MutationObserver(() => this.#updateTabs());
1676
1694
 
1677
1695
  constructor() {
@@ -1679,6 +1697,8 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
1679
1697
 
1680
1698
  registerWidgetConfig(this, widgetConfig(element => {
1681
1699
  const widget = new TabbedPane(element as TabbedPaneElement);
1700
+ widget.setCloseableTabs(this.#closeableTabs);
1701
+ widget.setAllowTabReorder(this.#allowTabReorder, this.#automaticReorder);
1682
1702
  const slot = widget.contentElement.querySelector('slot:not([name])');
1683
1703
  if (slot) {
1684
1704
  slot.addEventListener('slotchange', () => this.#syncTabs());
@@ -1696,6 +1716,13 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
1696
1716
  }
1697
1717
  this.dispatchEvent(new CustomEvent('select', {detail: {tabId: widget.selectedTabId}}));
1698
1718
  });
1719
+ widget.addEventListener(Events.TabClosed, event => {
1720
+ this.dispatchEvent(new CustomEvent('close', {detail: {tabId: event.data.tabId}}));
1721
+ });
1722
+ widget.addEventListener(Events.TabOrderChanged, event => {
1723
+ this.dispatchEvent(new CustomEvent(
1724
+ 'taborderchanged', {detail: {tabId: event.data.tabId, tabIds: widget.tabIds()}}));
1725
+ });
1699
1726
  this.#syncTabs(widget);
1700
1727
  return widget;
1701
1728
  }));
@@ -1719,8 +1746,10 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
1719
1746
  const slot = widget.contentElement.querySelector('slot:not([name])') as HTMLSlotElement | null;
1720
1747
  const nodes = slot ? slot.assignedElements() : [];
1721
1748
  for (const child of nodes) {
1722
- this.#tabObserver.observe(
1723
- child, {attributes: true, attributeFilter: ['title', 'jslogcontext', 'selected', 'disabled']});
1749
+ this.#tabObserver.observe(child, {
1750
+ attributes: true,
1751
+ attributeFilter: ['title', 'jslogcontext', 'selected', 'disabled', 'closeable', 'uncloseable'],
1752
+ });
1724
1753
  }
1725
1754
  }
1726
1755
 
@@ -1737,6 +1766,8 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
1737
1766
  const jslogContext = child.getAttribute('jslogcontext') || undefined;
1738
1767
  const selected = child.hasAttribute('selected');
1739
1768
  const enabled = !child.hasAttribute('disabled');
1769
+ const isCloseable =
1770
+ child.hasAttribute('closeable') ? true : (child.hasAttribute('uncloseable') ? false : undefined);
1740
1771
  const view = Widget.getOrCreateWidget(child as HTMLElement);
1741
1772
  view.setHideOnDetach();
1742
1773
  if (widget.selectedTabId !== id) {
@@ -1752,6 +1783,7 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
1752
1783
  jslogContext,
1753
1784
  selected,
1754
1785
  enabled,
1786
+ isCloseable,
1755
1787
  });
1756
1788
  }
1757
1789
 
@@ -18,49 +18,49 @@ import {type ContrastInfo, Events as ContrastInfoEvents} from './ContrastInfo.js
18
18
 
19
19
  const UIStrings = {
20
20
  /**
21
- * @description Label for when no contrast information is available in the color picker
21
+ * @description Text displayed when no contrast information is available in the color picker.
22
22
  */
23
23
  noContrastInformationAvailable: 'No contrast information available',
24
24
  /**
25
- * @description Text of a DOM element in Contrast Details of the Color Picker
25
+ * @description Label for the contrast ratio section in the contrast details of the color picker.
26
26
  */
27
27
  contrastRatio: 'Contrast ratio',
28
28
  /**
29
- * @description Text to show more content
29
+ * @description Tooltip and title for the expand button in the contrast details of the color picker to show more details.
30
30
  */
31
31
  showMore: 'Show more',
32
32
  /**
33
- * @description Choose bg color text content in Contrast Details of the Color Picker
33
+ * @description Prompt message in the contrast details of the color picker asking the user to pick a background color.
34
34
  */
35
35
  pickBackgroundColor: 'Pick background color',
36
36
  /**
37
- * @description Tooltip text that appears when hovering over largeicon eyedropper button in Contrast Details of the Color Picker
37
+ * @description Tooltip and title for the eyedropper button in the contrast details of the color picker to pick a background color.
38
38
  */
39
39
  toggleBackgroundColorPicker: 'Toggle background color picker',
40
40
  /**
41
- * @description Text of a button in Contrast Details of the Color Picker
41
+ * @description Tooltip and accessible name for the button in the contrast details of the color picker to apply a suggested color to fix low contrast.
42
42
  * @example {rgba(0 0 0 / 100%) } PH1
43
43
  */
44
44
  useSuggestedColorStoFixLow: 'Use suggested color {PH1}to fix low contrast',
45
45
  /**
46
- * @description Label for the APCA contrast in Color Picker
46
+ * @description Label for the APCA contrast ratio in the contrast details of the color picker.
47
47
  */
48
48
  apca: 'APCA',
49
49
  /**
50
- * @description Label aa text content in Contrast Details of the Color Picker
50
+ * @description Label for the WCAG AA contrast threshold in the contrast details of the color picker.
51
51
  */
52
52
  aa: 'AA',
53
53
  /**
54
- * @description Text that starts with a colon and includes a placeholder
54
+ * @description Label prefixing a contrast threshold value with a colon in the contrast details of the color picker.
55
55
  * @example {3.0} PH1
56
56
  */
57
57
  placeholderWithColon: ': {PH1}',
58
58
  /**
59
- * @description Label aaa text content in Contrast Details of the Color Picker
59
+ * @description Label for the WCAG AAA contrast threshold in the contrast details of the color picker.
60
60
  */
61
61
  aaa: 'AAA',
62
62
  /**
63
- * @description Text to show less content
63
+ * @description Tooltip and title for the expand button in the contrast details of the color picker to show fewer details.
64
64
  */
65
65
  showLess: 'Show less',
66
66
  } as const;
@@ -8,7 +8,7 @@ import * as UI from '../../legacy.js';
8
8
 
9
9
  const UIStrings = {
10
10
  /**
11
- * @description Menu warning that some color will be clipped after conversion to match the target gamut
11
+ * @description Warning item in the color format picker context menu indicating that converting to a narrower gamut will cause color shifts.
12
12
  */
13
13
  colorShiftWarning: '⚠️ Conversion to a narrow gamut will cause color shifts',
14
14
  } as const;
@@ -53,80 +53,79 @@ import spectrumStyles from './spectrum.css.js';
53
53
 
54
54
  const UIStrings = {
55
55
  /**
56
- * @description Tooltip text that appears when hovering over largeicon eyedropper button in Spectrum of the Color Picker
56
+ * @description Tooltip and title for the eyedropper button in the color picker.
57
57
  * @example {c} PH1
58
58
  */
59
59
  toggleColorPicker: 'Eye dropper [{PH1}]',
60
60
  /**
61
- * @description Aria label for hue slider in Color Picker
61
+ * @description Accessible name for the hue slider in the color picker.
62
62
  */
63
63
  changeHue: 'Change hue',
64
64
  /**
65
- * @description Aria label for alpha slider in Color Picker. Alpha refers to the alpha channel of a
66
- * color, and this tool allows the user to change the alpha value.
65
+ * @description Accessible name for the alpha slider in the color picker.
67
66
  */
68
67
  changeAlpha: 'Change alpha',
69
68
  /**
70
- * @description Aria label for HEX color format input
69
+ * @description Accessible name for the HEX color format input field in the color picker.
71
70
  */
72
71
  hex: 'HEX',
73
72
  /**
74
- * @description Aria label for color format switcher button in Color Picker
73
+ * @description Accessible name and tooltip for the color format switcher button in the color picker.
75
74
  */
76
75
  changeColorFormat: 'Change color format',
77
76
  /**
78
- * @description Screen reader reads this text when palette switcher button receives focus
77
+ * @description Accessible name and tooltip for the palette switcher button in the color picker.
79
78
  */
80
79
  previewPalettes: 'Preview palettes',
81
80
  /**
82
- * @description Tooltip text that appears when hovering over the largeicon add button in the Spectrum of the Color Picker
81
+ * @description Tooltip and title for the button to add the current color to a custom palette in the color picker.
83
82
  */
84
83
  addToPalette: 'Add to palette',
85
84
  /**
86
- * @description Title text content in Spectrum of the Color Picker
85
+ * @description Header title for the color palettes preview section in the color picker.
87
86
  */
88
- colorPalettes: 'Color Palettes',
87
+ colorPalettes: 'Color palettes',
89
88
  /**
90
- * @description Label for close button in Color Picker
89
+ * @description Label for the button to return to the main color picker view from the palette preview in the color picker.
91
90
  */
92
91
  returnToColorPicker: 'Return to color picker',
93
92
  /**
94
- * @description Aria label which declares hex value of a swatch in the Color Picker
93
+ * @description Accessible name for a color swatch in the color picker palette.
95
94
  * @example {#969696} PH1
96
95
  */
97
96
  colorS: 'Color {PH1}',
98
97
  /**
99
- * @description Color element title in Spectrum of the Color Picker
98
+ * @description Tooltip for a material palette color swatch explaining how to view alternate color shades in the color picker.
100
99
  * @example {#9c1724} PH1
101
100
  */
102
101
  longclickOrLongpressSpaceToShow: 'Long-click or long-press space to show alternate shades of {PH1}',
103
102
  /**
104
- * @description A context menu item in the Color Picker to organize the user-defined color palette (removes the user-defined color to which this action is performed)"
103
+ * @description Context menu item in the custom color palette to delete the selected color in the color picker.
105
104
  */
106
105
  removeColor: 'Remove color',
107
106
  /**
108
- * @description A context menu item in the Color Picker to organize the user-defined color palette (removes all user-defined colors to the right of the color to which this action is performed)"
107
+ * @description Context menu item in the custom color palette to delete all colors positioned to the right of the selected color in the color picker.
109
108
  */
110
109
  removeAllToTheRight: 'Remove all to the right',
111
110
  /**
112
- * @description A context menu item in the Color Picker to organize the user-defined color palette (removes all user-defined colors)"
111
+ * @description Context menu item in the custom color palette to delete all colors from the palette in the color picker.
113
112
  */
114
113
  clearPalette: 'Clear palette',
115
114
  /**
116
- * @description Aria label for RGBA and HSLA color format inputs in Color Picker
115
+ * @description Accessible name for an individual channel input field within a color format in the color picker.
117
116
  * @example {R} PH1
118
117
  * @example {RGBA} PH2
119
118
  */
120
119
  sInS: '{PH1} in {PH2}',
121
120
  /**
122
- * @description Swatch copy icon title in Spectrum of the Color Picker
121
+ * @description Tooltip and title for the copy icon on the color swatch in the color picker.
123
122
  */
124
123
  copyColorToClipboard: 'Copy color to clipboard',
125
124
  /**
126
- * @description Aria text for the swatch position. Swatch is the color picker spectrum tool.
125
+ * @description Accessible announcement explaining keyboard controls to move the color swatch in the color picker spectrum.
127
126
  */
128
127
  pressArrowKeysMessage:
129
- 'Press arrow keys with or without modifiers to move swatch position. Arrow key with Shift key moves position largely, with Ctrl key it is less and with Alt key it is even less',
128
+ 'Use arrow keys to move the swatch position. Use Shift to move further, Ctrl to move less, and Alt to move even less.',
130
129
  } as const;
131
130
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/color_picker/Spectrum.ts', UIStrings);
132
131
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -15,7 +15,7 @@ import * as Components from '../utils/utils.js';
15
15
 
16
16
  import {CustomPreviewComponent} from './CustomPreviewComponent.js';
17
17
  import objectPopoverStyles from './objectPopover.css.js';
18
- import {ObjectPropertiesSection, ObjectPropertiesSectionWidget} from './ObjectPropertiesSection.js';
18
+ import {ObjectPropertiesSectionWidget, valueElementForFunctionDescription} from './ObjectPropertiesSection.js';
19
19
  import objectValueStyles from './objectValue.css.js';
20
20
 
21
21
  const UIStrings = {
@@ -68,7 +68,7 @@ export class ObjectPopoverHelper {
68
68
  if (result.type === 'function') {
69
69
  titleElement.classList.add('source-code');
70
70
  // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
71
- render(ObjectPropertiesSection.valueElementForFunctionDescription(result.description), titleElement);
71
+ render(valueElementForFunctionDescription(result.description), titleElement);
72
72
  } else {
73
73
  titleElement.classList.add('monospace');
74
74
  titleElement.createChild('span').textContent = description;