chrome-devtools-frontend 1.0.951410 → 1.0.952713

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 (214) hide show
  1. package/config/gni/devtools_grd_files.gni +3 -0
  2. package/extension-api/ExtensionAPI.d.ts +1 -1
  3. package/front_end/.eslintrc.js +6 -0
  4. package/front_end/Tests.js +10 -0
  5. package/front_end/core/common/App.ts +0 -3
  6. package/front_end/core/common/AppProvider.ts +0 -3
  7. package/front_end/core/common/JavaScriptMetaData.ts +0 -3
  8. package/front_end/core/common/QueryParamHandler.ts +0 -3
  9. package/front_end/core/common/Runnable.ts +0 -3
  10. package/front_end/core/common/SimpleHistoryManager.ts +0 -3
  11. package/front_end/core/host/UserMetrics.ts +2 -1
  12. package/front_end/core/i18n/locales/en-US.json +3 -0
  13. package/front_end/core/i18n/locales/en-XL.json +3 -0
  14. package/front_end/core/root/Runtime.ts +4 -12
  15. package/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -12
  16. package/front_end/core/sdk/PageResourceLoader.ts +2 -1
  17. package/front_end/core/sdk/TracingManager.ts +0 -3
  18. package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +39 -39
  19. package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +54 -54
  20. package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +20 -20
  21. package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +54 -54
  22. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +145 -144
  23. package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +40 -40
  24. package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +64 -69
  25. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +203 -203
  26. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +109 -108
  27. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +17 -17
  28. package/front_end/entrypoints/inspector_main/InspectorMain.ts +30 -30
  29. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +25 -25
  30. package/front_end/entrypoints/main/ExecutionContextSelector.ts +52 -55
  31. package/front_end/entrypoints/main/MainImpl.ts +49 -49
  32. package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +43 -43
  33. package/front_end/entrypoints/node_app/NodeMain.ts +38 -38
  34. package/front_end/generated/InspectorBackendCommands.js +5 -1
  35. package/front_end/generated/protocol.d.ts +16 -0
  36. package/front_end/legacy/legacy-defs.d.ts +0 -21
  37. package/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -3
  38. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -3
  39. package/front_end/models/bindings/FileUtils.ts +0 -3
  40. package/front_end/models/extensions/ExtensionAPI.ts +2 -1
  41. package/front_end/models/extensions/ExtensionTraceProvider.ts +0 -3
  42. package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +1 -1
  43. package/front_end/models/issues_manager/ClientHintIssue.ts +95 -0
  44. package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +6 -6
  45. package/front_end/models/issues_manager/ContrastCheckTrigger.ts +15 -15
  46. package/front_end/models/issues_manager/CorsIssue.ts +9 -9
  47. package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -5
  48. package/front_end/models/issues_manager/DeprecationIssue.ts +7 -7
  49. package/front_end/models/issues_manager/GenericIssue.ts +5 -5
  50. package/front_end/models/issues_manager/HeavyAdIssue.ts +5 -5
  51. package/front_end/models/issues_manager/Issue.ts +10 -10
  52. package/front_end/models/issues_manager/IssueResolver.ts +11 -10
  53. package/front_end/models/issues_manager/IssuesManager.ts +61 -56
  54. package/front_end/models/issues_manager/LowTextContrastIssue.ts +4 -4
  55. package/front_end/models/issues_manager/MixedContentIssue.ts +7 -7
  56. package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +7 -7
  57. package/front_end/models/issues_manager/QuirksModeIssue.ts +4 -4
  58. package/front_end/models/issues_manager/SameSiteCookieIssue.ts +16 -16
  59. package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +5 -5
  60. package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +32 -31
  61. package/front_end/models/issues_manager/TrustedWebActivityIssue.ts +5 -5
  62. package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +5 -5
  63. package/front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  64. package/front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  65. package/front_end/models/issues_manager/issues_manager.ts +2 -0
  66. package/front_end/models/timeline_model/TimelineModel.ts +1 -1
  67. package/front_end/panels/application/components/BackForwardCacheView.ts +33 -33
  68. package/front_end/panels/application/components/EndpointsGrid.ts +12 -12
  69. package/front_end/panels/application/components/FrameDetailsView.ts +108 -110
  70. package/front_end/panels/application/components/OriginTrialTreeView.ts +45 -45
  71. package/front_end/panels/application/components/PermissionsPolicySection.ts +19 -19
  72. package/front_end/panels/application/components/ReportsGrid.ts +30 -30
  73. package/front_end/panels/application/components/StackTrace.ts +48 -47
  74. package/front_end/panels/application/components/TrustTokensView.ts +31 -31
  75. package/front_end/panels/console/ConsoleView.ts +1 -1
  76. package/front_end/panels/console/ConsoleViewMessage.ts +1 -25
  77. package/front_end/panels/console/consoleView.css +5 -0
  78. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +41 -52
  79. package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
  80. package/front_end/panels/css_overview/CSSOverviewPanel.ts +18 -27
  81. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
  82. package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +6 -6
  83. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +4 -4
  84. package/front_end/panels/elements/ElementsTreeElement.ts +2 -6
  85. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +17 -17
  86. package/front_end/panels/elements/components/AdornerManager.ts +21 -21
  87. package/front_end/panels/elements/components/AdornerSettingsPane.ts +14 -14
  88. package/front_end/panels/elements/components/CSSQuery.ts +16 -16
  89. package/front_end/panels/elements/components/ComputedStyleProperty.ts +14 -14
  90. package/front_end/panels/elements/components/ComputedStyleTrace.ts +15 -15
  91. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +78 -78
  92. package/front_end/panels/elements/components/ElementsPanelLink.ts +16 -16
  93. package/front_end/panels/elements/components/LayoutPane.ts +47 -47
  94. package/front_end/panels/elements/components/NodeText.ts +18 -18
  95. package/front_end/panels/elements/components/QueryContainer.ts +40 -40
  96. package/front_end/panels/elements/components/StylePropertyEditor.ts +18 -18
  97. package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +4 -4
  98. package/front_end/panels/event_listeners/EventListenersUtils.ts +2 -1
  99. package/front_end/panels/issues/AffectedBlockedByResponseView.ts +4 -4
  100. package/front_end/panels/issues/AffectedCookiesView.ts +4 -5
  101. package/front_end/panels/issues/AffectedDirectivesView.ts +19 -19
  102. package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +7 -8
  103. package/front_end/panels/issues/AffectedElementsView.ts +4 -4
  104. package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +7 -8
  105. package/front_end/panels/issues/AffectedHeavyAdView.ts +8 -8
  106. package/front_end/panels/issues/AffectedResourcesView.ts +25 -26
  107. package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +8 -8
  108. package/front_end/panels/issues/AffectedSourcesView.ts +4 -4
  109. package/front_end/panels/issues/AffectedTrustedWebActivityIssueDetailsView.ts +4 -4
  110. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +17 -17
  111. package/front_end/panels/issues/CSPViolationsListView.ts +22 -23
  112. package/front_end/panels/issues/CSPViolationsView.ts +17 -17
  113. package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +13 -13
  114. package/front_end/panels/issues/CorsIssueDetailsView.ts +23 -23
  115. package/front_end/panels/issues/GenericIssueDetailsView.ts +4 -4
  116. package/front_end/panels/issues/HiddenIssuesRow.ts +7 -7
  117. package/front_end/panels/issues/IssueAggregator.ts +95 -95
  118. package/front_end/panels/issues/IssueKindView.ts +14 -14
  119. package/front_end/panels/issues/IssueView.ts +98 -98
  120. package/front_end/panels/issues/IssuesPane.ts +102 -102
  121. package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +5 -5
  122. package/front_end/panels/issues/components/HideIssuesMenu.ts +10 -10
  123. package/front_end/panels/media/PlayerListView.ts +160 -97
  124. package/front_end/panels/media/PlayerMessagesView.ts +1 -0
  125. package/front_end/panels/media/playerListView.css +58 -0
  126. package/front_end/panels/network/NetworkLogView.ts +2 -6
  127. package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -4
  128. package/front_end/panels/network/components/RequestTrustTokensView.ts +40 -40
  129. package/front_end/panels/network/components/WebBundleInfoView.ts +9 -9
  130. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +92 -37
  131. package/front_end/panels/performance_monitor/performanceMonitor.css +32 -0
  132. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +2 -2
  133. package/front_end/panels/search/SearchConfig.ts +0 -6
  134. package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -0
  135. package/front_end/panels/settings/components/SyncSection.ts +14 -14
  136. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +96 -96
  137. package/front_end/panels/sources/BreakpointEditDialog.ts +4 -3
  138. package/front_end/panels/sources/NavigatorView.ts +3 -9
  139. package/front_end/panels/sources/SourceMapNamesResolver.ts +3 -3
  140. package/front_end/panels/sources/SourcesPanel.ts +1 -3
  141. package/front_end/panels/sources/SourcesView.ts +0 -3
  142. package/front_end/panels/sources/TabbedEditorContainer.ts +0 -3
  143. package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
  144. package/front_end/panels/timeline/TimelineLoader.ts +0 -3
  145. package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
  146. package/front_end/panels/timeline/components/WebVitalsLane.ts +77 -76
  147. package/front_end/panels/timeline/components/WebVitalsTimeline.ts +133 -133
  148. package/front_end/panels/timeline/components/WebVitalsTooltip.ts +9 -9
  149. package/front_end/panels/webauthn/WebauthnPane.ts +203 -205
  150. package/front_end/third_party/codemirror.next/bundle.ts +3 -3
  151. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  152. package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -1
  153. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +10 -1
  154. package/front_end/third_party/codemirror.next/codemirror.next.js +2 -1
  155. package/front_end/third_party/codemirror.next/package.json +3 -3
  156. package/front_end/third_party/diff/DiffWrapper.ts +7 -0
  157. package/front_end/ui/components/adorners/Adorner.ts +2 -2
  158. package/front_end/ui/components/buttons/Button.ts +9 -9
  159. package/front_end/ui/components/data_grid/DataGrid.ts +64 -64
  160. package/front_end/ui/components/data_grid/DataGridController.ts +22 -22
  161. package/front_end/ui/components/data_grid/DataGridUtils.ts +3 -0
  162. package/front_end/ui/components/diff_view/DiffView.ts +6 -6
  163. package/front_end/ui/components/expandable_list/ExpandableList.ts +5 -5
  164. package/front_end/ui/components/icon_button/Icon.ts +4 -4
  165. package/front_end/ui/components/icon_button/IconButton.ts +4 -4
  166. package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
  167. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +11 -11
  168. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +50 -50
  169. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -6
  170. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +4 -4
  171. package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +12 -12
  172. package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +11 -11
  173. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +40 -39
  174. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +18 -18
  175. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
  176. package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -4
  177. package/front_end/ui/components/markdown_view/MarkdownImage.ts +5 -5
  178. package/front_end/ui/components/markdown_view/MarkdownLink.ts +2 -2
  179. package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
  180. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +2 -2
  181. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +2 -2
  182. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +4 -4
  183. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +22 -22
  184. package/front_end/ui/components/report_view/ReportView.ts +16 -16
  185. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +14 -14
  186. package/front_end/ui/components/settings/SettingCheckbox.ts +5 -5
  187. package/front_end/ui/components/survey_link/SurveyLink.ts +8 -8
  188. package/front_end/ui/components/text_editor/TextEditor.ts +9 -9
  189. package/front_end/ui/components/text_editor/cursor_tooltip.ts +7 -1
  190. package/front_end/ui/components/text_prompt/TextPrompt.ts +18 -18
  191. package/front_end/ui/components/tree_outline/TreeOutline.ts +69 -70
  192. package/front_end/ui/legacy/ContextFlavorListener.ts +0 -4
  193. package/front_end/ui/legacy/SearchableView.ts +13 -4
  194. package/front_end/ui/legacy/SuggestBox.ts +0 -3
  195. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
  196. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -3
  197. package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -1
  198. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +13 -12
  199. package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -2
  200. package/front_end/ui/legacy/themeColors.css +2 -0
  201. package/front_end/ui/legacy/theme_support/theme_support_impl.ts +34 -7
  202. package/package.json +1 -1
  203. package/scripts/eslint_rules/lib/use_private_class_members.js +41 -0
  204. package/scripts/eslint_rules/tests/use_private_class_members_test.js +62 -0
  205. package/scripts/migration/class-fields/migrate.js +2 -3
  206. package/scripts/migration/class-fields/migrate.sh +1 -3
  207. package/scripts/migration/class-fields/package.json +1 -1
  208. package/config/gni/all_devtools_files.gni +0 -255
  209. package/scripts/build/devtools_file_hashes.py +0 -82
  210. package/scripts/devtools_run/devtools_run_cli +0 -49
  211. package/scripts/devtools_run/package.json +0 -13
  212. package/scripts/unzip.py +0 -20
  213. package/scripts/visualize_deps/jquery_svg.html +0 -57
  214. package/scripts/visualize_deps/run_visualize.js +0 -119
@@ -16,7 +16,7 @@ const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();
16
16
 
17
17
  import {addColumnVisibilityCheckboxes, addSortableColumnItems} from './DataGridContextMenuUtils.js';
18
18
  import type {CellPosition, Column, Row, SortState} from './DataGridUtils.js';
19
- import {calculateColumnWidthPercentageFromWeighting, calculateFirstFocusableCell, getRowEntryForColumnId, handleArrowKeyNavigation, renderCellValue, SortDirection} from './DataGridUtils.js';
19
+ import {calculateColumnWidthPercentageFromWeighting, calculateFirstFocusableCell, getCellTitleFromCellContent, getRowEntryForColumnId, handleArrowKeyNavigation, renderCellValue, SortDirection} from './DataGridUtils.js';
20
20
 
21
21
  import * as i18n from '../../../core/i18n/i18n.js';
22
22
  const UIStrings = {
@@ -85,14 +85,14 @@ export class DataGrid extends HTMLElement {
85
85
  // lookup constant.
86
86
  readonly #rowIndexMap = new WeakMap<Row, number>();
87
87
  readonly #resizeObserver = new ResizeObserver(() => {
88
- this.alignScrollHandlers();
88
+ this.#alignScrollHandlers();
89
89
  });
90
90
 
91
91
  // These have to be bound as they are put onto the global document, not onto
92
92
  // this element, so LitHtml does not bind them for us.
93
- #boundOnResizePointerUp = this.onResizePointerUp.bind(this);
94
- #boundOnResizePointerMove = this.onResizePointerMove.bind(this);
95
- #boundOnResizePointerDown = this.onResizePointerDown.bind(this);
93
+ #boundOnResizePointerUp = this.#onResizePointerUp.bind(this);
94
+ #boundOnResizePointerMove = this.#onResizePointerMove.bind(this);
95
+ #boundOnResizePointerDown = this.#onResizePointerDown.bind(this);
96
96
 
97
97
  /**
98
98
  * Following guidance from
@@ -157,8 +157,8 @@ export class DataGrid extends HTMLElement {
157
157
  this.#cellToFocusIfUserTabsIn = calculateFirstFocusableCell({columns: this.#columns, rows: this.#rows});
158
158
  }
159
159
 
160
- if (this.#hasRenderedAtLeastOnce && this.userHasCellFocused()) {
161
- const [selectedColIndex, selectedRowIndex] = this.tabbableCell();
160
+ if (this.#hasRenderedAtLeastOnce && this.#userHasCellFocused()) {
161
+ const [selectedColIndex, selectedRowIndex] = this.#tabbableCell();
162
162
  const columnOutOfBounds = selectedColIndex > this.#columns.length;
163
163
  const rowOutOfBounds = selectedRowIndex > this.#rows.length;
164
164
 
@@ -173,10 +173,10 @@ export class DataGrid extends HTMLElement {
173
173
  }
174
174
  }
175
175
 
176
- this.render();
176
+ this.#render();
177
177
  }
178
178
 
179
- private shouldAutoScrollToBottom(): boolean {
179
+ #shouldAutoScrollToBottom(): boolean {
180
180
  /**
181
181
  * If the user's last scroll took them to the bottom, then we assume they
182
182
  * want to automatically scroll.
@@ -201,8 +201,8 @@ export class DataGrid extends HTMLElement {
201
201
  return false;
202
202
  }
203
203
 
204
- private scrollToBottomIfRequired(): void {
205
- if (this.#hasRenderedAtLeastOnce === false || !this.shouldAutoScrollToBottom()) {
204
+ #scrollToBottomIfRequired(): void {
205
+ if (this.#hasRenderedAtLeastOnce === false || !this.#shouldAutoScrollToBottom()) {
206
206
  return;
207
207
  }
208
208
 
@@ -218,17 +218,17 @@ export class DataGrid extends HTMLElement {
218
218
  });
219
219
  }
220
220
 
221
- private engageResizeObserver(): void {
221
+ #engageResizeObserver(): void {
222
222
  if (!this.#hasRenderedAtLeastOnce) {
223
223
  this.#resizeObserver.observe(this.#shadow.host);
224
224
  }
225
225
  }
226
226
 
227
- private userHasCellFocused(): boolean {
227
+ #userHasCellFocused(): boolean {
228
228
  return this.#cellUserHasFocused !== null;
229
229
  }
230
230
 
231
- private getTableElementForCellUserHasFocused(): HTMLTableCellElement|null {
231
+ #getTableElementForCellUserHasFocused(): HTMLTableCellElement|null {
232
232
  if (!this.#cellUserHasFocused) {
233
233
  return null;
234
234
  }
@@ -238,13 +238,13 @@ export class DataGrid extends HTMLElement {
238
238
  return cell;
239
239
  }
240
240
 
241
- private async focusTableCellInDOM(cell: HTMLTableCellElement): Promise<void> {
241
+ async #focusTableCellInDOM(cell: HTMLTableCellElement): Promise<void> {
242
242
  await coordinator.write(() => {
243
243
  cell.focus();
244
244
  });
245
245
  }
246
246
 
247
- private focusCellIfRequired([newColumnIndex, newRowIndex]: CellPosition): void {
247
+ #focusCellIfRequired([newColumnIndex, newRowIndex]: CellPosition): void {
248
248
  this.#userHasFocusInDataGrid = true;
249
249
 
250
250
  if (this.#cellUserHasFocused && this.#cellUserHasFocused[0] === newColumnIndex &&
@@ -254,8 +254,8 @@ export class DataGrid extends HTMLElement {
254
254
  }
255
255
 
256
256
  this.#cellUserHasFocused = [newColumnIndex, newRowIndex];
257
- this.render();
258
- const tableCell = this.getTableElementForCellUserHasFocused();
257
+ this.#render();
258
+ const tableCell = this.#getTableElementForCellUserHasFocused();
259
259
  if (!tableCell) {
260
260
  // Return in case the cell is out of bounds and we do nothing
261
261
  return;
@@ -264,10 +264,10 @@ export class DataGrid extends HTMLElement {
264
264
  * add arrow key support, so in the case where we're programatically moving the
265
265
  * focus, ensure we actually focus the cell.
266
266
  */
267
- this.focusTableCellInDOM(tableCell);
267
+ this.#focusTableCellInDOM(tableCell);
268
268
  }
269
269
 
270
- private onTableKeyDown(event: KeyboardEvent): void {
270
+ #onTableKeyDown(event: KeyboardEvent): void {
271
271
  const key = event.key;
272
272
 
273
273
  if (!this.#cellUserHasFocused) {
@@ -278,7 +278,7 @@ export class DataGrid extends HTMLElement {
278
278
  const [focusedColumnIndex, focusedRowIndex] = this.#cellUserHasFocused;
279
279
  const activeColumn = this.#columns[focusedColumnIndex];
280
280
  if (focusedRowIndex === 0 && activeColumn && activeColumn.sortable) {
281
- this.onColumnHeaderClick(activeColumn, focusedColumnIndex);
281
+ this.#onColumnHeaderClick(activeColumn, focusedColumnIndex);
282
282
  }
283
283
  }
284
284
 
@@ -293,10 +293,10 @@ export class DataGrid extends HTMLElement {
293
293
  rows: this.#rows,
294
294
  });
295
295
  event.preventDefault();
296
- this.focusCellIfRequired(nextFocusedCell);
296
+ this.#focusCellIfRequired(nextFocusedCell);
297
297
  }
298
298
 
299
- private onColumnHeaderClick(col: Column, index: number): void {
299
+ #onColumnHeaderClick(col: Column, index: number): void {
300
300
  this.dispatchEvent(new ColumnHeaderClickEvent(col, index));
301
301
  }
302
302
 
@@ -305,7 +305,7 @@ export class DataGrid extends HTMLElement {
305
305
  * Guidance on values of attribute taken from
306
306
  * https://www.w3.org/TR/wai-aria-practices/examples/grid/dataGrids.html.
307
307
  */
308
- private ariaSortForHeader(col: Column): string|undefined {
308
+ #ariaSortForHeader(col: Column): string|undefined {
309
309
  if (col.sortable && (!this.#sortState || this.#sortState.columnId !== col.id)) {
310
310
  // Column is sortable but is not currently sorted
311
311
  return 'none';
@@ -319,7 +319,7 @@ export class DataGrid extends HTMLElement {
319
319
  return undefined;
320
320
  }
321
321
 
322
- private renderEmptyFillerRow(numberOfVisibleRows: number): LitHtml.TemplateResult {
322
+ #renderEmptyFillerRow(numberOfVisibleRows: number): LitHtml.TemplateResult {
323
323
  const emptyCells = this.#columns.map((col, colIndex) => {
324
324
  if (!col.visible) {
325
325
  return LitHtml.nothing;
@@ -337,17 +337,17 @@ export class DataGrid extends HTMLElement {
337
337
  return LitHtml.html`<tr tabindex="-1" class=${emptyRowClasses}>${emptyCells}</tr>`;
338
338
  }
339
339
 
340
- private cleanUpAfterResizeColumnComplete(): void {
340
+ #cleanUpAfterResizeColumnComplete(): void {
341
341
  if (!this.#currentResize) {
342
342
  return;
343
343
  }
344
344
  this.#currentResize.documentForCursorChange.body.style.cursor = this.#currentResize.cursorToRestore;
345
345
  this.#currentResize = null;
346
346
  // Realign the scroll handlers now the table columns have been resized.
347
- this.alignScrollHandlers();
347
+ this.#alignScrollHandlers();
348
348
  }
349
349
 
350
- private onResizePointerDown(event: PointerEvent): void {
350
+ #onResizePointerDown(event: PointerEvent): void {
351
351
  if (event.buttons !== 1 || (Host.Platform.isMac() && event.ctrlKey)) {
352
352
  // Ensure we only react to a left click drag mouse down event.
353
353
  // On Mac we ignore Ctrl-click which can be used to bring up context menus, etc.
@@ -406,7 +406,7 @@ export class DataGrid extends HTMLElement {
406
406
  resizerElement.addEventListener('pointermove', this.#boundOnResizePointerMove);
407
407
  }
408
408
 
409
- private onResizePointerMove(event: PointerEvent): void {
409
+ #onResizePointerMove(event: PointerEvent): void {
410
410
  event.preventDefault();
411
411
  if (!this.#currentResize) {
412
412
  return;
@@ -460,7 +460,7 @@ export class DataGrid extends HTMLElement {
460
460
  this.#currentResize.rightCellCol.style.width = newRightColumnPercentage.toFixed(2) + '%';
461
461
  }
462
462
 
463
- private onResizePointerUp(event: PointerEvent): void {
463
+ #onResizePointerUp(event: PointerEvent): void {
464
464
  event.preventDefault();
465
465
  const resizer = event.target as HTMLElement;
466
466
  if (!resizer) {
@@ -468,10 +468,10 @@ export class DataGrid extends HTMLElement {
468
468
  }
469
469
  resizer.releasePointerCapture(event.pointerId);
470
470
  resizer.removeEventListener('pointermove', this.#boundOnResizePointerMove);
471
- this.cleanUpAfterResizeColumnComplete();
471
+ this.#cleanUpAfterResizeColumnComplete();
472
472
  }
473
473
 
474
- private renderResizeForCell(column: Column, position: CellPosition): LitHtml.TemplateResult|typeof LitHtml.nothing {
474
+ #renderResizeForCell(column: Column, position: CellPosition): LitHtml.TemplateResult|typeof LitHtml.nothing {
475
475
  /**
476
476
  * A resizer for a column is placed at the far right of the _previous column
477
477
  * cell_. So when we get called with [1, 0] that means this dragger is
@@ -480,7 +480,7 @@ export class DataGrid extends HTMLElement {
480
480
  * only resizing it but also the column to its left.
481
481
  */
482
482
  const [columnIndex] = position;
483
- const lastVisibleColumnIndex = this.getIndexOfLastVisibleColumn();
483
+ const lastVisibleColumnIndex = this.#getIndexOfLastVisibleColumn();
484
484
  // If we are in the very last column, there is no column to the right to resize, so don't render a resizer.
485
485
  if (columnIndex === lastVisibleColumnIndex || !column.visible) {
486
486
  return LitHtml.nothing;
@@ -493,7 +493,7 @@ export class DataGrid extends HTMLElement {
493
493
  ></span>`;
494
494
  }
495
495
 
496
- private getIndexOfLastVisibleColumn(): number {
496
+ #getIndexOfLastVisibleColumn(): number {
497
497
  let index = this.#columns.length - 1;
498
498
  for (; index > -1; index--) {
499
499
  const col = this.#columns[index];
@@ -508,7 +508,7 @@ export class DataGrid extends HTMLElement {
508
508
  * This function is called when the user right clicks on the header row of the
509
509
  * data grid.
510
510
  */
511
- private onHeaderContextMenu(event: MouseEvent): void {
511
+ #onHeaderContextMenu(event: MouseEvent): void {
512
512
  if (event.button !== 2) {
513
513
  // 2 = secondary button = right click. We only show context menus if the
514
514
  // user has right clicked.
@@ -531,7 +531,7 @@ export class DataGrid extends HTMLElement {
531
531
  menu.show();
532
532
  }
533
533
 
534
- private onBodyRowContextMenu(event: MouseEvent): void {
534
+ #onBodyRowContextMenu(event: MouseEvent): void {
535
535
  if (event.button !== 2) {
536
536
  // 2 = secondary button = right click. We only show context menus if the
537
537
  // user has right clicked.
@@ -569,7 +569,7 @@ export class DataGrid extends HTMLElement {
569
569
  menu.show();
570
570
  }
571
571
 
572
- private onScroll(event: Event): void {
572
+ #onScroll(event: Event): void {
573
573
  const wrapper = event.target as HTMLElement;
574
574
  if (!wrapper) {
575
575
  return;
@@ -581,10 +581,10 @@ export class DataGrid extends HTMLElement {
581
581
  this.#userScrollState =
582
582
  userIsAtBottom ? UserScrollState.SCROLLED_TO_BOTTOM : UserScrollState.MANUAL_SCROLL_NOT_BOTTOM;
583
583
 
584
- this.render();
584
+ this.#render();
585
585
  }
586
586
 
587
- private alignScrollHandlers(): Promise<void> {
587
+ #alignScrollHandlers(): Promise<void> {
588
588
  return coordinator.read(() => {
589
589
  const columnHeaders = this.#shadow.querySelectorAll<HTMLElement>('th:not(.hidden)');
590
590
  const handlers = this.#shadow.querySelectorAll<HTMLElement>('.cell-resize-handle');
@@ -614,7 +614,7 @@ export class DataGrid extends HTMLElement {
614
614
  * Calculates the index of the first row we want to render, and the last row we want to render.
615
615
  * Pads in each direction by PADDING_ROWS_COUNT so we render some rows that are off scren.
616
616
  */
617
- private calculateTopAndBottomRowIndexes(): Promise<{topVisibleRow: number, bottomVisibleRow: number}> {
617
+ #calculateTopAndBottomRowIndexes(): Promise<{topVisibleRow: number, bottomVisibleRow: number}> {
618
618
  return coordinator.read(() => {
619
619
  const wrapper = this.#shadow.querySelector('.wrapping-container');
620
620
 
@@ -642,7 +642,7 @@ export class DataGrid extends HTMLElement {
642
642
  });
643
643
  }
644
644
 
645
- private onFocusOut(): void {
645
+ #onFocusOut(): void {
646
646
  /**
647
647
  * When any element in the data-grid loses focus, we set this to false. If
648
648
  * the user then focuses another cell, that code will set the focus to true.
@@ -655,7 +655,7 @@ export class DataGrid extends HTMLElement {
655
655
  this.#userHasFocusInDataGrid = false;
656
656
  }
657
657
 
658
- private tabbableCell(): CellPosition {
658
+ #tabbableCell(): CellPosition {
659
659
  /**
660
660
  * If the user has selected a cell, this is the cell that should be
661
661
  * "tabbable" if the user tabs out and into the data-grid. If the user
@@ -672,7 +672,7 @@ export class DataGrid extends HTMLElement {
672
672
  * render only the rows required to fill that table (plus a bit extra for
673
673
  * padding).
674
674
  */
675
- private async render(): Promise<void> {
675
+ async #render(): Promise<void> {
676
676
  if (this.#isRendering) {
677
677
  // If we receive a request to render during a previous render call, we block
678
678
  // the newly requested render (since we could receive a lot of them in quick
@@ -683,7 +683,7 @@ export class DataGrid extends HTMLElement {
683
683
  }
684
684
  this.#isRendering = true;
685
685
 
686
- const {topVisibleRow, bottomVisibleRow} = await this.calculateTopAndBottomRowIndexes();
686
+ const {topVisibleRow, bottomVisibleRow} = await this.#calculateTopAndBottomRowIndexes();
687
687
  const nonHiddenRows = this.#rows.filter(row => !row.hidden);
688
688
  const renderableRows = nonHiddenRows.filter((_, idx) => idx >= topVisibleRow && idx <= bottomVisibleRow);
689
689
  const indexOfFirstVisibleColumn = this.#columns.findIndex(col => col.visible);
@@ -700,13 +700,13 @@ export class DataGrid extends HTMLElement {
700
700
  * have 100% height so they sit over the entire table and can be grabbed
701
701
  * by the user.
702
702
  */
703
- return this.renderResizeForCell(col, [columnIndex, 0]);
703
+ return this.#renderResizeForCell(col, [columnIndex, 0]);
704
704
  })}
705
- <div class="wrapping-container" @scroll=${this.onScroll} @focusout=${this.onFocusOut}>
705
+ <div class="wrapping-container" @scroll=${this.#onScroll} @focusout=${this.#onFocusOut}>
706
706
  <table
707
707
  aria-rowcount=${this.#rows.length}
708
708
  aria-colcount=${this.#columns.length}
709
- @keydown=${this.onTableKeyDown}
709
+ @keydown=${this.#onTableKeyDown}
710
710
  >
711
711
  <colgroup>
712
712
  ${this.#columns.map((col, colIndex) => {
@@ -719,20 +719,20 @@ export class DataGrid extends HTMLElement {
719
719
  })}
720
720
  </colgroup>
721
721
  <thead>
722
- <tr @contextmenu=${this.onHeaderContextMenu}>
722
+ <tr @contextmenu=${this.#onHeaderContextMenu}>
723
723
  ${this.#columns.map((col, columnIndex) => {
724
724
  const thClasses = LitHtml.Directives.classMap({
725
725
  hidden: !col.visible,
726
726
  firstVisibleColumn: columnIndex === indexOfFirstVisibleColumn,
727
727
  });
728
- const tabbableCell = this.tabbableCell();
728
+ const tabbableCell = this.#tabbableCell();
729
729
  const cellIsFocusableCell = anyColumnsSortable && columnIndex === tabbableCell[0] && tabbableCell[1] === 0;
730
730
 
731
731
  return LitHtml.html`<th class=${thClasses}
732
732
  style=${LitHtml.Directives.ifDefined(col.styles ? LitHtml.Directives.styleMap(col.styles) : undefined)}
733
733
  data-grid-header-cell=${col.id}
734
734
  @focus=${(): void => {
735
- this.focusCellIfRequired([columnIndex, 0]);
735
+ this.#focusCellIfRequired([columnIndex, 0]);
736
736
  }}
737
737
  @click=${(): void => {
738
738
  /**
@@ -742,10 +742,10 @@ export class DataGrid extends HTMLElement {
742
742
  * doesn't emit a focus event as the cell is already
743
743
  * focused.
744
744
  */
745
- this.onColumnHeaderClick(col, columnIndex);
745
+ this.#onColumnHeaderClick(col, columnIndex);
746
746
  }}
747
747
  title=${col.title}
748
- aria-sort=${LitHtml.Directives.ifDefined(this.ariaSortForHeader(col))}
748
+ aria-sort=${LitHtml.Directives.ifDefined(this.#ariaSortForHeader(col))}
749
749
  aria-colindex=${columnIndex + 1}
750
750
  data-row-index='0'
751
751
  data-col-index=${columnIndex}
@@ -763,7 +763,7 @@ export class DataGrid extends HTMLElement {
763
763
  if (rowIndex === undefined) {
764
764
  throw new Error('Trying to render a row that has no index in the rowIndexMap');
765
765
  }
766
- const tabbableCell = this.tabbableCell();
766
+ const tabbableCell = this.#tabbableCell();
767
767
  // Remember that row 0 is considered the header row, so the first tbody row is row 1.
768
768
  const tableRowIndex = rowIndex + 1;
769
769
 
@@ -780,7 +780,7 @@ export class DataGrid extends HTMLElement {
780
780
  aria-rowindex=${rowIndex + 1}
781
781
  class=${rowClasses}
782
782
  style=${LitHtml.Directives.ifDefined(row.styles ? LitHtml.Directives.styleMap(row.styles) : undefined)}
783
- @contextmenu=${this.onBodyRowContextMenu}
783
+ @contextmenu=${this.#onBodyRowContextMenu}
784
784
  >${this.#columns.map((col, columnIndex) => {
785
785
  const cell = getRowEntryForColumnId(row, col.id);
786
786
  const cellClasses = LitHtml.Directives.classMap({
@@ -794,19 +794,19 @@ export class DataGrid extends HTMLElement {
794
794
  style=${LitHtml.Directives.ifDefined(col.styles ? LitHtml.Directives.styleMap(col.styles) : undefined)}
795
795
  tabindex=${cellIsFocusableCell ? '0' : '-1'}
796
796
  aria-colindex=${columnIndex + 1}
797
- title=${cell.title || String(cell.value).substr(0, 20)}
797
+ title=${cell.title || getCellTitleFromCellContent(String(cell.value))}
798
798
  data-row-index=${tableRowIndex}
799
799
  data-col-index=${columnIndex}
800
800
  data-grid-value-cell-for-column=${col.id}
801
801
  @focus=${(): void => {
802
- this.focusCellIfRequired([columnIndex, tableRowIndex]);
802
+ this.#focusCellIfRequired([columnIndex, tableRowIndex]);
803
803
  this.dispatchEvent(new BodyCellFocusedEvent(cell, row));
804
804
  }}
805
805
  >${cellOutput}</td>`;
806
806
  })}
807
807
  `;
808
808
  })}
809
- ${this.renderEmptyFillerRow(renderableRows.length)}
809
+ ${this.#renderEmptyFillerRow(renderableRows.length)}
810
810
  <tr class="filler-row-bottom padding-row" style=${LitHtml.Directives.styleMap({
811
811
  height: `${Math.max(0, nonHiddenRows.length - bottomVisibleRow) * ROW_HEIGHT_PIXELS}px`,
812
812
  })}></tr>
@@ -824,21 +824,21 @@ export class DataGrid extends HTMLElement {
824
824
  // back in, that it becomes rendered.
825
825
  // However, if the cell is a column header, we don't do this, as that
826
826
  // can never be not-rendered.
827
- const tabbableCell = this.tabbableCell();
827
+ const tabbableCell = this.#tabbableCell();
828
828
  const currentlyFocusedRowIndex = tabbableCell[1];
829
- const tabbableCellElement = this.getTableElementForCellUserHasFocused();
829
+ const tabbableCellElement = this.#getTableElementForCellUserHasFocused();
830
830
  if (this.#userHasFocusInDataGrid && currentlyFocusedRowIndex > 0 && tabbableCellElement) {
831
- this.focusTableCellInDOM(tabbableCellElement);
831
+ this.#focusTableCellInDOM(tabbableCellElement);
832
832
  }
833
- this.scrollToBottomIfRequired();
834
- this.engageResizeObserver();
833
+ this.#scrollToBottomIfRequired();
834
+ this.#engageResizeObserver();
835
835
  if (this.#hasRenderedAtLeastOnce) {
836
836
  // We may have had a cell's width change on a re-render, or it may have
837
837
  // been hidden entirely, so we need to ensure that the resize handlers are
838
838
  // re-positioned correctly if so.
839
839
 
840
840
  // We don't have to do this on first render as it will fire when the resize observer is engaged.
841
- this.alignScrollHandlers();
841
+ this.#alignScrollHandlers();
842
842
  }
843
843
 
844
844
  this.#isRendering = false;
@@ -848,7 +848,7 @@ export class DataGrid extends HTMLElement {
848
848
  // the end with the most recent data.
849
849
  if (this.#scheduleRender) {
850
850
  this.#scheduleRender = false;
851
- this.render();
851
+ this.#render();
852
852
  }
853
853
  }
854
854
  }
@@ -67,20 +67,20 @@ export class DataGridController extends HTMLElement {
67
67
  this.#contextMenus = data.contextMenus;
68
68
 
69
69
  this.#columns = [...this.#originalColumns];
70
- this.#rows = this.cloneAndFilterRows(data.rows, this.#filters);
70
+ this.#rows = this.#cloneAndFilterRows(data.rows, this.#filters);
71
71
 
72
72
  if (!this.#hasRenderedAtLeastOnce && data.initialSort) {
73
73
  this.#sortState = data.initialSort;
74
74
  }
75
75
 
76
76
  if (this.#sortState) {
77
- this.sortRows(this.#sortState);
77
+ this.#sortRows(this.#sortState);
78
78
  }
79
79
 
80
- this.render();
80
+ this.#render();
81
81
  }
82
82
 
83
- private testRowWithFilter(row: Row, filter: TextUtils.TextUtils.ParsedFilter): boolean {
83
+ #testRowWithFilter(row: Row, filter: TextUtils.TextUtils.ParsedFilter): boolean {
84
84
  let rowMatchesFilter = false;
85
85
 
86
86
  const {key, text, negative, regex} = filter;
@@ -107,7 +107,7 @@ export class DataGridController extends HTMLElement {
107
107
  return negative ? !rowMatchesFilter : rowMatchesFilter;
108
108
  }
109
109
 
110
- private cloneAndFilterRows(rows: Row[], filters: readonly TextUtils.TextUtils.ParsedFilter[]): Row[] {
110
+ #cloneAndFilterRows(rows: Row[], filters: readonly TextUtils.TextUtils.ParsedFilter[]): Row[] {
111
111
  if (filters.length === 0) {
112
112
  return [...rows];
113
113
  }
@@ -116,7 +116,7 @@ export class DataGridController extends HTMLElement {
116
116
  // We assume that the row should be visible by default.
117
117
  let rowShouldBeVisible = true;
118
118
  for (const filter of filters) {
119
- const rowMatchesFilter = this.testRowWithFilter(row, filter);
119
+ const rowMatchesFilter = this.#testRowWithFilter(row, filter);
120
120
  // If there are multiple filters, if any return false we hide the row.
121
121
  // So if we get a false from testRowWithFilter, we can break early and return false.
122
122
  if (!rowMatchesFilter) {
@@ -131,7 +131,7 @@ export class DataGridController extends HTMLElement {
131
131
  });
132
132
  }
133
133
 
134
- private sortRows(state: SortState): void {
134
+ #sortRows(state: SortState): void {
135
135
  const {columnId, direction} = state;
136
136
 
137
137
  this.#rows.sort((row1, row2) => {
@@ -148,15 +148,15 @@ export class DataGridController extends HTMLElement {
148
148
  }
149
149
  return 0;
150
150
  });
151
- this.render();
151
+ this.#render();
152
152
  }
153
153
 
154
- private onColumnHeaderClick(event: ColumnHeaderClickEvent): void {
154
+ #onColumnHeaderClick(event: ColumnHeaderClickEvent): void {
155
155
  const {column} = event.data;
156
- this.applySortOnColumn(column);
156
+ this.#applySortOnColumn(column);
157
157
  }
158
158
 
159
- private applySortOnColumn(column: Column): void {
159
+ #applySortOnColumn(column: Column): void {
160
160
  if (this.#sortState && this.#sortState.columnId === column.id) {
161
161
  const {columnId, direction} = this.#sortState;
162
162
 
@@ -181,25 +181,25 @@ export class DataGridController extends HTMLElement {
181
181
  }
182
182
 
183
183
  if (this.#sortState) {
184
- this.sortRows(this.#sortState);
184
+ this.#sortRows(this.#sortState);
185
185
  } else {
186
186
  // No sortstate = render the original rows.
187
- this.#rows = this.cloneAndFilterRows(this.#originalRows, this.#filters);
188
- this.render();
187
+ this.#rows = this.#cloneAndFilterRows(this.#originalRows, this.#filters);
188
+ this.#render();
189
189
  }
190
190
  }
191
191
 
192
- private onContextMenuColumnSortClick(event: ContextMenuColumnSortClickEvent): void {
193
- this.applySortOnColumn(event.data.column);
192
+ #onContextMenuColumnSortClick(event: ContextMenuColumnSortClickEvent): void {
193
+ this.#applySortOnColumn(event.data.column);
194
194
  }
195
195
 
196
- private onContextMenuHeaderResetClick(): void {
196
+ #onContextMenuHeaderResetClick(): void {
197
197
  this.#sortState = null;
198
198
  this.#rows = [...this.#originalRows];
199
- this.render();
199
+ this.#render();
200
200
  }
201
201
 
202
- private render(): void {
202
+ #render(): void {
203
203
  // Disabled until https://crbug.com/1079231 is fixed.
204
204
  // clang-format off
205
205
  LitHtml.render(LitHtml.html`
@@ -209,9 +209,9 @@ export class DataGridController extends HTMLElement {
209
209
  activeSort: this.#sortState,
210
210
  contextMenus: this.#contextMenus,
211
211
  } as DataGridData}
212
- @columnheaderclick=${this.onColumnHeaderClick}
213
- @contextmenucolumnsortclick=${this.onContextMenuColumnSortClick}
214
- @contextmenuheaderresetclick=${this.onContextMenuHeaderResetClick}
212
+ @columnheaderclick=${this.#onColumnHeaderClick}
213
+ @contextmenucolumnsortclick=${this.#onContextMenuColumnSortClick}
214
+ @contextmenuheaderresetclick=${this.#onContextMenuHeaderResetClick}
215
215
  ></${DataGrid.litTagName}>
216
216
  `, this.#shadow, {
217
217
  host: this,
@@ -256,3 +256,6 @@ export const calculateFirstFocusableCell =
256
256
 
257
257
  return [focusableColIndex, focusableRowIndex];
258
258
  };
259
+
260
+ export const getCellTitleFromCellContent = (text: string): string =>
261
+ text.length < 25 ? text : text.substr(0, 20) + '\u2026';
@@ -189,14 +189,14 @@ class DiffRenderer {
189
189
  ) {
190
190
  }
191
191
 
192
- private render(rows: readonly Row[]): LitHtml.TemplateResult {
192
+ #render(rows: readonly Row[]): LitHtml.TemplateResult {
193
193
  return LitHtml.html`
194
194
  <div class="diff-listing" aria-label=${i18nString(UIStrings.changesDiffViewer)}>
195
- ${rows.map(row => this.renderRow(row))}
195
+ ${rows.map(row => this.#renderRow(row))}
196
196
  </div>`;
197
197
  }
198
198
 
199
- private renderRow(row: Row): LitHtml.TemplateResult {
199
+ #renderRow(row: Row): LitHtml.TemplateResult {
200
200
  const baseNumber =
201
201
  row.type === RowType.Equal || row.type === RowType.Deletion ? String(row.originalLineNumber) : '';
202
202
  const curNumber = row.type === RowType.Equal || row.type === RowType.Addition ? String(row.currentLineNumber) : '';
@@ -215,10 +215,10 @@ class DiffRenderer {
215
215
  <div class="diff-line-number" aria-hidden="true">${curNumber}</div>
216
216
  <div class=${markerClass} aria-hidden="true">${marker}</div>
217
217
  <div class="diff-line-content diff-line-${row.type}" data-line-number=${curNumber}>${screenReaderText}${
218
- this.renderRowContent(row)}</div>`;
218
+ this.#renderRowContent(row)}</div>`;
219
219
  }
220
220
 
221
- private renderRowContent(row: Row): LitHtml.TemplateResult[] {
221
+ #renderRowContent(row: Row): LitHtml.TemplateResult[] {
222
222
  if (row.type === RowType.Spacer) {
223
223
  return row.tokens.map(tok => LitHtml.html`${tok.text}`);
224
224
  }
@@ -249,7 +249,7 @@ class DiffRenderer {
249
249
  await CodeHighlighter.CodeHighlighter.create(currentLines.join('\n'), mimeType),
250
250
  documentMap(currentLines),
251
251
  );
252
- LitHtml.render(renderer.render(rows), parent, {host: this});
252
+ LitHtml.render(renderer.#render(rows), parent, {host: this});
253
253
  }
254
254
  }
255
255
 
@@ -19,19 +19,19 @@ export class ExpandableList extends HTMLElement {
19
19
 
20
20
  set data(data: ExpandableListData) {
21
21
  this.#rows = data.rows;
22
- this.render();
22
+ this.#render();
23
23
  }
24
24
 
25
- private onArrowClick(): void {
25
+ #onArrowClick(): void {
26
26
  this.#expanded = !this.#expanded;
27
- this.render();
27
+ this.#render();
28
28
  }
29
29
 
30
30
  connectedCallback(): void {
31
31
  this.#shadow.adoptedStyleSheets = [expandableListStyles];
32
32
  }
33
33
 
34
- private render(): void {
34
+ #render(): void {
35
35
  if (this.#rows.length < 1) {
36
36
  return;
37
37
  }
@@ -44,7 +44,7 @@ export class ExpandableList extends HTMLElement {
44
44
  <div>
45
45
  ${this.#rows.length > 1 ?
46
46
  LitHtml.html`
47
- <button @click=${(): void => this.onArrowClick()} class="arrow-icon-button">
47
+ <button @click=${(): void => this.#onArrowClick()} class="arrow-icon-button">
48
48
  <span class="arrow-icon ${this.#expanded ? 'expanded' : ''}"></span>
49
49
  </button>
50
50
  `
@@ -52,7 +52,7 @@ export class Icon extends HTMLElement {
52
52
  this.#iconPath = new URL(`../../../Images/${data.iconName}.svg`, import.meta.url).toString();
53
53
  this.#iconName = data.iconName;
54
54
  }
55
- this.render();
55
+ this.#render();
56
56
  }
57
57
 
58
58
  get data(): IconData {
@@ -73,7 +73,7 @@ export class Icon extends HTMLElement {
73
73
  };
74
74
  }
75
75
 
76
- private getStyles(): {[key: string]: string} {
76
+ #getStyles(): {[key: string]: string} {
77
77
  const iconPath = this.#iconPath;
78
78
  const width = this.#width;
79
79
  const height = this.#height;
@@ -104,11 +104,11 @@ export class Icon extends HTMLElement {
104
104
  };
105
105
  }
106
106
 
107
- private render(): void {
107
+ #render(): void {
108
108
  coordinator.write(() => {
109
109
  // clang-format off
110
110
  LitHtml.render(LitHtml.html`
111
- <div class="icon-basic" style=${LitHtml.Directives.styleMap(this.getStyles())}></div>
111
+ <div class="icon-basic" style=${LitHtml.Directives.styleMap(this.#getStyles())}></div>
112
112
  `, this.#shadow, {host: this});
113
113
  // clang-format on
114
114
  });