chrome-devtools-frontend 1.0.1578729 → 1.0.1579812

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 (72) hide show
  1. package/docs/cookbook/devtools_on_devtools.md +2 -2
  2. package/docs/feature-specs/elements-gutter-decorators.md +40 -0
  3. package/docs/feature-specs/elements-tree-selection-and-hover.md +31 -0
  4. package/docs/feature-specs/images/elements-gutter-decorators-multiple.png +0 -0
  5. package/docs/get_the_code.md +3 -3
  6. package/front_end/generated/ARIAProperties.js +0 -6
  7. package/front_end/generated/InspectorBackendCommands.ts +1 -1
  8. package/front_end/generated/protocol.ts +1 -0
  9. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +30 -0
  10. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +79 -0
  11. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
  12. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +5 -3
  13. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +18 -4
  14. package/front_end/panels/ai_assistance/components/ChatInput.ts +38 -18
  15. package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -4
  16. package/front_end/panels/ai_assistance/components/ChatView.ts +2 -0
  17. package/front_end/panels/ai_assistance/components/chatInput.css +10 -3
  18. package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
  19. package/front_end/panels/application/DeviceBoundSessionsView.ts +51 -76
  20. package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -0
  21. package/front_end/panels/application/components/BackForwardCacheView.ts +4 -2
  22. package/front_end/panels/autofill/AutofillView.ts +1 -1
  23. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +1 -0
  24. package/front_end/panels/common/AiCodeGenerationTeaser.ts +2 -2
  25. package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +4 -4
  26. package/front_end/panels/console/ConsoleViewMessage.ts +1 -0
  27. package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +78 -0
  28. package/front_end/panels/elements/ElementsTreeElement.ts +93 -121
  29. package/front_end/panels/elements/ElementsTreeOutline.ts +1 -0
  30. package/front_end/panels/elements/LayoutPane.ts +8 -7
  31. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
  32. package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -1
  33. package/front_end/panels/elements/elements.ts +3 -0
  34. package/front_end/panels/elements/elementsTreeOutline.css +16 -5
  35. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
  36. package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -1
  37. package/front_end/panels/lighthouse/lighthouseStartView.css +6 -0
  38. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
  39. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
  40. package/front_end/panels/media/PlayerListView.ts +1 -1
  41. package/front_end/panels/network/NetworkLogView.ts +2 -5
  42. package/front_end/panels/network/NetworkLogViewColumns.ts +2 -1
  43. package/front_end/panels/network/components/RequestHeaderSection.ts +1 -1
  44. package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
  45. package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
  46. package/front_end/panels/recorder/components/StepEditor.ts +3 -3
  47. package/front_end/panels/settings/EditFileSystemView.ts +8 -8
  48. package/front_end/panels/settings/KeybindsSettingsTab.ts +2 -1
  49. package/front_end/panels/settings/SettingsScreen.ts +4 -4
  50. package/front_end/panels/sources/components/HeadersView.ts +2 -2
  51. package/front_end/panels/timeline/components/BreadcrumbsUI.ts +1 -1
  52. package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +1 -1
  53. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +47 -26
  54. package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +121 -39
  55. package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +106 -101
  56. package/front_end/third_party/chromium/README.chromium +1 -1
  57. package/front_end/ui/components/suggestion_input/SuggestionInput.ts +7 -12
  58. package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -1
  59. package/front_end/ui/legacy/InplaceEditor.ts +1 -1
  60. package/front_end/ui/legacy/ListControl.ts +2 -1
  61. package/front_end/ui/legacy/ListWidget.ts +1 -1
  62. package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
  63. package/front_end/ui/legacy/Treeoutline.ts +1 -0
  64. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +4 -2
  65. package/front_end/ui/legacy/components/data_grid/SortableDataGrid.ts +59 -9
  66. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +28 -15
  67. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +2 -2
  68. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
  69. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +3 -3
  70. package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -3
  71. package/front_end/ui/visual_logging/Debugging.ts +1 -1
  72. package/package.json +1 -1
@@ -4,130 +4,135 @@
4
4
  * found in the LICENSE file.
5
5
  */
6
6
 
7
- .timespan-breakdown-overlay-section {
8
- border: solid;
9
- border-color: var(--sys-color-on-surface);
10
- border-width: 4px 1px 0;
11
- align-content: flex-start;
12
- text-align: center;
13
- overflow: hidden;
14
- text-overflow: ellipsis;
15
- background-image: linear-gradient(180deg, var(--sys-color-on-primary), transparent);
16
- height: 90%;
17
- box-sizing: border-box;
18
- padding-top: var(--sys-size-2);
19
-
20
- :host(.is-below) & {
21
- border-top-width: 0;
22
- border-bottom-width: 4px;
23
- align-content: flex-end; /* anchor the text at the bottom */
24
- padding-bottom: var(--sys-size-2);
25
- padding-top: 0;
26
-
27
- /* re-order so the timestamp is below label */
28
- .timespan-breakdown-overlay-label {
29
- display: flex;
30
- flex-direction: column-reverse;
7
+ @scope to (devtools-widget > *) {
8
+ .timespan-breakdown-overlay-section {
9
+ border: solid;
10
+ border-color: var(--sys-color-on-surface);
11
+ border-width: 4px 1px 0;
12
+ align-content: flex-start;
13
+ text-align: center;
14
+ overflow: hidden;
15
+ text-overflow: ellipsis;
16
+ background-image: linear-gradient(180deg, var(--sys-color-on-primary), transparent);
17
+ height: 90%;
18
+ box-sizing: border-box;
19
+ padding-top: var(--sys-size-2);
20
+
21
+ .is-below & {
22
+ border-top-width: 0;
23
+ border-bottom-width: 4px;
24
+ align-content: flex-end;
25
+ /* anchor the text at the bottom */
26
+ padding-bottom: var(--sys-size-2);
27
+ padding-top: 0;
28
+
29
+ /* re-order so the timestamp is below label */
30
+ .timespan-breakdown-overlay-label {
31
+ display: flex;
32
+ flex-direction: column-reverse;
33
+ }
31
34
  }
32
35
  }
33
- }
34
36
 
35
- :host {
36
- display: flex;
37
- overflow: hidden;
38
- flex-direction: row;
39
- justify-content: flex-end;
40
- align-items: flex-end;
41
- width: 100%;
42
- box-sizing: border-box;
43
- height: 100%;
44
- max-height: 100px;
45
-
46
- /* Ensure that the first & last sections always have the left/right border */
47
- /* (disable stylelint because we need the !important to override border
37
+ .timeline-segment-container {
38
+ display: flex;
39
+ overflow: hidden;
40
+ flex-direction: row;
41
+ justify-content: flex-end;
42
+ align-items: flex-end;
43
+ width: 100%;
44
+ box-sizing: border-box;
45
+ height: 100%;
46
+ max-height: 100px;
47
+
48
+ /* Ensure that the first & last sections always have the left/right border */
49
+ /* (disable stylelint because we need the !important to override border
48
50
  * styles below + keeping them here is clearer to read) */
49
- .timespan-breakdown-overlay-section:first-child {
50
- border-left-width: 1px !important; /* stylelint-disable-line declaration-no-important */
51
- }
51
+ .timespan-breakdown-overlay-section:first-child {
52
+ /* stylelint-disable-next-line declaration-no-important */
53
+ border-left-width: 1px !important;
54
+ }
52
55
 
53
- .timespan-breakdown-overlay-section:last-child {
54
- border-right-width: 1px !important; /* stylelint-disable-line declaration-no-important */
56
+ .timespan-breakdown-overlay-section:last-child {
57
+ /* stylelint-disable-next-line declaration-no-important */
58
+ border-right-width: 1px !important;
59
+ }
55
60
  }
56
- }
57
61
 
58
- :host(.is-below) {
59
- align-items: flex-start;
60
- }
62
+ .timeline-segment-container.is-below {
63
+ align-items: flex-start;
64
+ }
61
65
 
62
- /* Depending on if the number of sections is odd or even, we alternate the
66
+ /* Depending on if the number of sections is odd or even, we alternate the
63
67
  * heights of the even/odd sections. We do this to ensure that the first item
64
68
  * is never a "high" item, because that looks a bit clunky. */
65
- :host(.odd-number-of-sections) {
66
- .timespan-breakdown-overlay-section:nth-child(even) {
67
- height: 100%;
68
- }
69
+ .timeline-segment-container.even-number-of-sections {
70
+ .timespan-breakdown-overlay-section:nth-child(even) {
71
+ height: 100%;
72
+ }
69
73
 
70
- .timespan-breakdown-overlay-section:nth-child(odd) {
71
- border-left-width: 0;
72
- border-right-width: 0;
74
+ .timespan-breakdown-overlay-section:nth-child(odd) {
75
+ border-left-width: 0;
76
+ border-right-width: 0;
77
+ }
73
78
  }
74
- }
75
79
 
76
- :host(.even-number-of-sections) {
77
- .timespan-breakdown-overlay-section:nth-child(odd) {
78
- height: 100%;
79
- }
80
+ .timeline-segment-container.odd-number-of-sections {
81
+ .timespan-breakdown-overlay-section:nth-child(odd) {
82
+ height: 100%;
83
+ }
80
84
 
81
- .timespan-breakdown-overlay-section:nth-child(even) {
82
- border-left-width: 0;
83
- border-right-width: 0;
85
+ .timespan-breakdown-overlay-section:nth-child(even) {
86
+ border-left-width: 0;
87
+ border-right-width: 0;
88
+ }
84
89
  }
85
- }
86
90
 
87
- .timespan-breakdown-overlay-label {
88
- font-family: var(--default-font-family);
89
- font-size: var(--sys-typescale-body2-size);
90
- line-height: var(--sys-typescale-body4-line-height);
91
- font-weight: var(--ref-typeface-weight-medium);
92
- color: var(--sys-color-on-surface);
93
- text-align: center;
94
- box-sizing: border-box;
95
- width: max-content;
96
- padding: 0 3px;
97
- overflow: hidden;
98
- text-overflow: ellipsis;
99
- text-wrap: nowrap;
100
-
101
- .duration-text {
102
- font-size: var(--sys-typescale-body4-size);
103
- text-overflow: ellipsis;
91
+ .timespan-breakdown-overlay-label {
92
+ font-family: var(--default-font-family);
93
+ font-size: var(--sys-typescale-body2-size);
94
+ line-height: var(--sys-typescale-body4-line-height);
95
+ font-weight: var(--ref-typeface-weight-medium);
96
+ color: var(--sys-color-on-surface);
97
+ text-align: center;
98
+ box-sizing: border-box;
99
+ width: max-content;
100
+ padding: 0 3px;
104
101
  overflow: hidden;
102
+ text-overflow: ellipsis;
105
103
  text-wrap: nowrap;
106
- display: block;
107
- }
108
104
 
109
- .discovery-time-ms {
110
- font-weight: var(--ref-typeface-weight-bold);
111
- }
105
+ .duration-text {
106
+ font-size: var(--sys-typescale-body4-size);
107
+ text-overflow: ellipsis;
108
+ overflow: hidden;
109
+ text-wrap: nowrap;
110
+ display: block;
111
+ }
112
112
 
113
- &.labelHidden {
114
- /* Have to use this not display: none so it maintains its width */
115
- user-select: none;
116
- pointer-events: none;
117
- visibility: hidden;
118
- }
113
+ .discovery-time-ms {
114
+ font-weight: var(--ref-typeface-weight-bold);
115
+ }
119
116
 
120
- &.labelTruncated {
121
- /* This means the label will show the text that fits with an ellipsis for
117
+ &.labelHidden {
118
+ /* Have to use this not display: none so it maintains its width */
119
+ user-select: none;
120
+ pointer-events: none;
121
+ visibility: hidden;
122
+ }
123
+
124
+ &.labelTruncated {
125
+ /* This means the label will show the text that fits with an ellipsis for
122
126
  * the overflow */
123
- max-width: 100%;
124
- }
127
+ max-width: 100%;
128
+ }
125
129
 
126
- &.offScreenLeft {
127
- text-align: left;
128
- }
130
+ &.offScreenLeft {
131
+ text-align: left;
132
+ }
129
133
 
130
- &.offScreenRight {
131
- text-align: right;
134
+ &.offScreenRight {
135
+ text-align: right;
136
+ }
132
137
  }
133
138
  }
@@ -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: 646502f8c6f04517f8d3605c4a5a5fa20d0af6f5
4
+ Revision: 894232ec55c07f1499cfd86b67d62de0b1366c1c
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -217,21 +217,16 @@ class SuggestionBox extends LitElement {
217
217
  return;
218
218
  }
219
219
 
220
+ // clang-format off
220
221
  return html`<style>${contentEditableStyles}</style><ul class="suggestions">
221
- ${this.#suggestions.map((suggestion, index) => {
222
- return html`<li
223
- class=${classMap({
224
- selected: index === this.cursor,
225
- })}
226
- @mousedown=${this.#dispatchSuggestEvent.bind(this, suggestion)}
227
- jslog=${VisualLogging.item('suggestion').track({
228
- click: true,
229
- })}
230
- >
222
+ ${this.#suggestions.map((suggestion, index) => html`
223
+ <li class=${classMap({selected: index === this.cursor})}
224
+ @mousedown=${this.#dispatchSuggestEvent.bind(this, suggestion)}
225
+ jslog=${VisualLogging.item('suggestion').track({ click: true, resize: true })}>
231
226
  ${suggestion}
232
- </li>`;
233
- })}
227
+ </li>`)}
234
228
  </ul>`;
229
+ // clang-format on
235
230
  }
236
231
  }
237
232
 
@@ -475,7 +475,7 @@ export class TreeOutline<TreeNodeDataType> extends HTMLElement {
475
475
  aria-level=${depth + 1}
476
476
  aria-posinset=${positionInSet + 1}
477
477
  class=${listItemClasses}
478
- jslog=${VisualLogging.treeItem(node.jslogContext).track({click: true, keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter|Space|Home|End'})}
478
+ jslog=${VisualLogging.treeItem(node.jslogContext).track({click: true, resize: true, keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter|Space|Home|End'})}
479
479
  @click=${this.#onNodeClick}
480
480
  track-dom-node-to-tree-node=${trackDOMNodeToTreeNode(this.#domNodeToTreeNodeMap, node)}
481
481
  ${Lit.Directives.ref(domNode => {
@@ -129,7 +129,7 @@ export class InplaceEditor<T> {
129
129
  }
130
130
 
131
131
  function defaultFinishHandler(event: KeyboardEvent): string {
132
- if (event.key === 'Enter') {
132
+ if (event.key === 'Enter' && !event.shiftKey) {
133
133
  return 'commit';
134
134
  }
135
135
  if (event.keyCode === Keys.Esc.code || event.key === Platform.KeyboardUtilities.ESCAPE_KEY) {
@@ -364,7 +364,8 @@ export class ListControl<T> {
364
364
  element = this.delegate.createElementForItem(item);
365
365
  if (!element.hasAttribute('jslog')) {
366
366
  element.setAttribute(
367
- 'jslog', `${VisualLogging.item().track({click: true, keydown: 'ArrowUp|ArrowDown|PageUp|PageDown'})}`);
367
+ 'jslog',
368
+ `${VisualLogging.item().track({click: true, resize: true, keydown: 'ArrowUp|ArrowDown|PageUp|PageDown'})}`);
368
369
  }
369
370
  this.itemToElement.set(item, element);
370
371
  this.updateElementARIA(element, index);
@@ -150,7 +150,7 @@ export class ListWidget<T> extends VBox {
150
150
  }
151
151
  const content = this.delegate.renderItem(item, editable, this.#items.length - 1);
152
152
  if (!content.hasAttribute('jslog')) {
153
- element.setAttribute('jslog', `${VisualLogging.item()}`);
153
+ element.setAttribute('jslog', `${VisualLogging.item().track({resize: true})}`);
154
154
  }
155
155
  element.appendChild(content);
156
156
  if (editable) {
@@ -335,7 +335,8 @@ export class SoftContextMenu {
335
335
  menuItemElement.addEventListener('mouseleave', (this.menuItemMouseLeave.bind(this) as EventListener), false);
336
336
 
337
337
  if (item.jslogContext) {
338
- menuItemElement.setAttribute('jslog', `${VisualLogging.item().context(item.jslogContext)}`);
338
+ menuItemElement.setAttribute(
339
+ 'jslog', `${VisualLogging.item(item.jslogContext).track({click: true, resize: true})}`);
339
340
  }
340
341
  return menuItemElement;
341
342
  }
@@ -499,6 +499,7 @@ export class TreeElement {
499
499
  this.listItemNode.setAttribute(
500
500
  'jslog', `${VisualLogging.treeItem().parent('parentTreeItem').context(jslogContext).track({
501
501
  click: true,
502
+ resize: true,
502
503
  keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Backspace|Delete|Enter|Space|Home|End',
503
504
  })}`);
504
505
  ARIAUtils.markAsTreeitem(this.listItemNode);
@@ -1762,8 +1762,10 @@ export class DataGridNode<T> {
1762
1762
 
1763
1763
  protected createElement(): HTMLElement {
1764
1764
  this.elementInternal = document.createElement('tr');
1765
- this.elementInternal.setAttribute(
1766
- 'jslog', `${VisualLogging.tableRow().track({keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter|Space'})}`);
1765
+ this.elementInternal.setAttribute('jslog', `${VisualLogging.tableRow().track({
1766
+ resize: true,
1767
+ keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter|Space'
1768
+ })}`);
1767
1769
  this.elementInternal.classList.add('data-grid-data-grid-node');
1768
1770
  if (this.dataGrid) {
1769
1771
  this.dataGrid.elementToDataGridNode.set(this.elementInternal, this);
@@ -22,10 +22,8 @@ export class SortableDataGrid<T> extends ViewportDataGrid<SortableDataGridNode<T
22
22
  }
23
23
 
24
24
  static NumericComparator<T>(columnId: string, a: SortableDataGridNode<T>, b: SortableDataGridNode<T>): number {
25
- const aValue = a.data[columnId];
26
- const bValue = b.data[columnId];
27
- const aNumber = Number(aValue instanceof Node ? aValue.textContent : aValue);
28
- const bNumber = Number(bValue instanceof Node ? bValue.textContent : bValue);
25
+ const aNumber = a.getNumericValue(columnId);
26
+ const bNumber = b.getNumericValue(columnId);
29
27
  return aNumber < bNumber ? -1 : (aNumber > bNumber ? 1 : 0);
30
28
  }
31
29
 
@@ -127,6 +125,54 @@ export class SortableDataGrid<T> extends ViewportDataGrid<SortableDataGridNode<T
127
125
  }
128
126
 
129
127
  export class SortableDataGridNode<T> extends ViewportDataGridNode<SortableDataGridNode<T>> {
128
+ #numericData = new Map<string, number>();
129
+ #childrenDirty = true;
130
+ #lastSortingFunction: (<T>(a: SortableDataGridNode<T>, b: SortableDataGridNode<T>) => number)|null = null;
131
+
132
+ override get data(): DataGridData {
133
+ return super.data;
134
+ }
135
+
136
+ override set data(x: DataGridData) {
137
+ this.#numericData.clear();
138
+ super.data = x;
139
+ }
140
+
141
+ getNumericValue(columnId: string): number {
142
+ let value = this.#numericData.get(columnId);
143
+ if (value === undefined) {
144
+ const rawValue = this.data[columnId];
145
+ value = Number(rawValue instanceof Node ? rawValue.textContent : rawValue);
146
+ this.#numericData.set(columnId, value);
147
+ }
148
+ return value;
149
+ }
150
+
151
+ override insertChild(child: SortableDataGridNode<T>, index: number): void {
152
+ super.insertChild(child, index);
153
+ this.#childrenDirty = true;
154
+ }
155
+
156
+ override removeChild(child: SortableDataGridNode<T>): void {
157
+ super.removeChild(child);
158
+ this.#childrenDirty = true;
159
+ }
160
+
161
+ override refresh(): void {
162
+ this.#numericData.clear();
163
+ super.refresh();
164
+ (this.parent as SortableDataGridNode<T>| null)?.markChildrenDirty();
165
+ }
166
+
167
+ override expand(): void {
168
+ super.expand();
169
+ this.sortChildren();
170
+ }
171
+
172
+ markChildrenDirty(): void {
173
+ this.#childrenDirty = true;
174
+ }
175
+
130
176
  insertChildOrdered(node: SortableDataGridNode<T>): void {
131
177
  const dataGrid = (this.dataGrid as SortableDataGrid<T>| null);
132
178
  if (dataGrid) {
@@ -139,13 +185,17 @@ export class SortableDataGridNode<T> extends ViewportDataGridNode<SortableDataGr
139
185
 
140
186
  sortChildren(): void {
141
187
  const dataGrid = (this.dataGrid as SortableDataGrid<T>| null);
142
- if (!dataGrid) {
188
+ if (!dataGrid || !this.expanded) {
143
189
  return;
144
190
  }
145
- (this.children as Array<SortableDataGridNode<T>>).sort(dataGrid.sortingFunction);
146
- for (let i = 0; i < this.children.length; ++i) {
147
- const child = (this.children[i] as SortableDataGridNode<T>);
148
- child.recalculateSiblings(i);
191
+ if (this.#childrenDirty || this.#lastSortingFunction !== dataGrid.sortingFunction) {
192
+ (this.children as Array<SortableDataGridNode<T>>).sort(dataGrid.sortingFunction);
193
+ this.#childrenDirty = false;
194
+ this.#lastSortingFunction = dataGrid.sortingFunction;
195
+ for (let i = 0; i < this.children.length; ++i) {
196
+ const child = (this.children[i] as SortableDataGridNode<T>);
197
+ child.recalculateSiblings(i);
198
+ }
149
199
  }
150
200
  for (let i = 0; i < this.children.length; ++i) {
151
201
  const child = (this.children[i] as SortableDataGridNode<T>);
@@ -496,16 +496,16 @@ export const getObjectPropertiesSectionFrom = (element: Element): ObjectProperti
496
496
 
497
497
  export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow {
498
498
  private readonly root: ObjectTree;
499
- editable: boolean;
499
+ readonly editable: boolean;
500
500
  readonly #objectTreeElement: RootElement;
501
501
  titleElement: Element;
502
502
  skipProtoInternal?: boolean;
503
503
  constructor(
504
504
  object: SDK.RemoteObject.RemoteObject, title?: string|Element|null, linkifier?: Components.Linkifier.Linkifier,
505
- showOverflow?: boolean) {
505
+ showOverflow?: boolean, editable = true) {
506
506
  super();
507
507
  this.root = new ObjectTree(object);
508
- this.editable = true;
508
+ this.editable = editable;
509
509
  if (!showOverflow) {
510
510
  this.setHideOverflow(true);
511
511
  }
@@ -549,14 +549,10 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
549
549
  const propertyValue =
550
550
  ObjectPropertiesSection.createPropertyValue(object, /* wasThrown */ false, /* showPreview */ true);
551
551
  shadowRoot.appendChild(propertyValue);
552
- const objectPropertiesSection = new ObjectPropertiesSection(object, titleElement, linkifier);
553
- objectPropertiesSection.editable = false;
552
+ const objectPropertiesSection = new ObjectPropertiesSection(object, titleElement, linkifier, undefined, !readOnly);
554
553
  if (skipProto) {
555
554
  objectPropertiesSection.skipProto();
556
555
  }
557
- if (readOnly) {
558
- objectPropertiesSection.setEditable(false);
559
- }
560
556
 
561
557
  return objectPropertiesSection;
562
558
  }
@@ -863,10 +859,6 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
863
859
  this.#objectTreeElement.expand();
864
860
  }
865
861
 
866
- setEditable(value: boolean): void {
867
- this.editable = value;
868
- }
869
-
870
862
  objectTreeElement(): UI.TreeOutline.TreeElement {
871
863
  return this.#objectTreeElement;
872
864
  }
@@ -998,6 +990,7 @@ export class RootElement extends UI.TreeOutline.TreeElement {
998
990
  export const InitialVisibleChildrenLimit = 200;
999
991
 
1000
992
  export interface ObjectPropertyViewInput {
993
+ editable: boolean;
1001
994
  startEditing(): unknown;
1002
995
  invokeGetter(getter: SDK.RemoteObject.RemoteObject): unknown;
1003
996
  onAutoComplete(expression: string, filter: string, force: boolean): unknown;
@@ -1075,7 +1068,7 @@ export const OBJECT_PROPERTY_DEFAULT_VIEW: ObjectPropertyView = (input, output,
1075
1068
  return;
1076
1069
  }
1077
1070
  event.consume(true);
1078
- if (property.value && !property.value.customPreview() && (property.writable || property.setter)) {
1071
+ if (input.editable && property.value && !property.value.customPreview() && (property.writable || property.setter)) {
1079
1072
  input.startEditing();
1080
1073
  }
1081
1074
  };
@@ -1125,6 +1118,7 @@ export class ObjectPropertyWidget extends UI.Widget.Widget {
1125
1118
  readonly #view: ObjectPropertyView;
1126
1119
  #expanded = false;
1127
1120
  #linkifier: Components.Linkifier.Linkifier|undefined;
1121
+ #editable = false;
1128
1122
 
1129
1123
  constructor(target?: HTMLElement, view = OBJECT_PROPERTY_DEFAULT_VIEW) {
1130
1124
  super(target);
@@ -1161,11 +1155,20 @@ export class ObjectPropertyWidget extends UI.Widget.Widget {
1161
1155
  this.requestUpdate();
1162
1156
  }
1163
1157
 
1158
+ get editable(): boolean {
1159
+ return this.#editable;
1160
+ }
1161
+ set editable(val: boolean) {
1162
+ this.#editable = val;
1163
+ this.requestUpdate();
1164
+ }
1165
+
1164
1166
  override performUpdate(): void {
1165
1167
  if (!this.#property) {
1166
1168
  return;
1167
1169
  }
1168
1170
  const input: ObjectPropertyViewInput = {
1171
+ editable: this.#editable,
1169
1172
  expanded: this.#expanded,
1170
1173
  editing: this.#editing,
1171
1174
  editingEnded: this.#editingEnded.bind(this),
@@ -1366,6 +1369,13 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
1366
1369
  return this.#widget.editing;
1367
1370
  }
1368
1371
 
1372
+ get editable(): boolean {
1373
+ return this.#widget.editable;
1374
+ }
1375
+ set editable(val: boolean) {
1376
+ this.#widget.editable = val;
1377
+ }
1378
+
1369
1379
  // This is called by layout tests
1370
1380
  async applyExpression(expression: string): Promise<void> {
1371
1381
  await this.property.setValue(expression);
@@ -1424,6 +1434,10 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
1424
1434
  this.#widget.show(this.listItemElement);
1425
1435
  this.#widget.property = this.property;
1426
1436
  this.#widget.linkifier = this.linkifier;
1437
+ this.#widget.editable = this.treeOutline instanceof ObjectPropertiesSectionsTreeOutline ||
1438
+ this.treeOutline instanceof ObjectPropertiesSection ?
1439
+ this.treeOutline.editable :
1440
+ false;
1427
1441
  }
1428
1442
 
1429
1443
  override onexpand(): void {
@@ -1775,11 +1789,10 @@ export class Renderer implements UI.UIUtils.Renderer {
1775
1789
  throw new Error('Can\'t render ' + object);
1776
1790
  }
1777
1791
  const title = options?.title;
1778
- const section = new ObjectPropertiesSection(object, title);
1792
+ const section = new ObjectPropertiesSection(object, title, undefined, undefined, Boolean(options?.editable));
1779
1793
  if (!title) {
1780
1794
  section.titleLessMode();
1781
1795
  }
1782
- section.editable = Boolean(options?.editable);
1783
1796
  if (options?.expand) {
1784
1797
  section.firstChild()?.expand();
1785
1798
  }
@@ -20,7 +20,7 @@ const UIStrings = {
20
20
  /**
21
21
  * @description Message to display if a setting change requires a reload of DevTools
22
22
  */
23
- oneOrMoreSettingsHaveChanged: 'One or more settings have changed which requires a reload to take effect',
23
+ settingsChangedReloadDevTools: 'Settings changed. To apply, reload DevTools.',
24
24
  /**
25
25
  * @description Text in Command Menu of the Command Menu
26
26
  */
@@ -122,7 +122,7 @@ export class CommandMenu {
122
122
 
123
123
  if (reloadRequired) {
124
124
  UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(
125
- i18nString(UIStrings.oneOrMoreSettingsHaveChanged));
125
+ i18nString(UIStrings.settingsChangedReloadDevTools));
126
126
  }
127
127
  },
128
128
  availableHandler,
@@ -280,7 +280,7 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
280
280
  if (this.provider) {
281
281
  render(this.provider.renderItem(item, this.cleanValue()), wrapperElement);
282
282
  wrapperElement.setAttribute(
283
- 'jslog', `${VisualLogging.item(this.provider.jslogContextAt(item)).track({click: true})}`);
283
+ 'jslog', `${VisualLogging.item(this.provider.jslogContextAt(item)).track({click: true, resize: true})}`);
284
284
  }
285
285
  UI.ARIAUtils.markAsOption(wrapperElement);
286
286
  return wrapperElement;
@@ -19,7 +19,7 @@ const UIStrings = {
19
19
  /**
20
20
  * @description Message to display if a setting change requires a reload of DevTools
21
21
  */
22
- oneOrMoreSettingsHaveChanged: 'One or more settings have changed which requires a reload to take effect',
22
+ settingsChangedReloadDevTools: 'Settings changed. To apply, reload DevTools.',
23
23
  } as const;
24
24
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/settings_ui/SettingsUI.ts', UIStrings);
25
25
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -94,7 +94,7 @@ const createSettingSelect = function(
94
94
  if (reloadWarning) {
95
95
  reloadWarning.classList.remove('hidden');
96
96
  UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(
97
- i18nString(UIStrings.oneOrMoreSettingsHaveChanged));
97
+ i18nString(UIStrings.settingsChangedReloadDevTools));
98
98
  }
99
99
  }
100
100
  };
@@ -111,7 +111,7 @@ export const createControlForSetting = function(
111
111
  component.onchange = () => {
112
112
  if (setting.reloadRequired()) {
113
113
  UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(
114
- i18nString(UIStrings.oneOrMoreSettingsHaveChanged));
114
+ i18nString(UIStrings.settingsChangedReloadDevTools));
115
115
  }
116
116
  };
117
117
  return component;
@@ -147,10 +147,9 @@ export class JSONView extends UI.Widget.VBox implements UI.SearchableView.Search
147
147
 
148
148
  const obj = SDK.RemoteObject.RemoteObject.fromLocalObject(this.parsedJSON.data);
149
149
  const title = this.parsedJSON.prefix + obj.description + this.parsedJSON.suffix;
150
- this.treeOutline =
151
- new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection(obj, title, undefined, true /* showOverflow */);
150
+ this.treeOutline = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection(
151
+ obj, title, undefined, true /* showOverflow */, false /* editable */);
152
152
  this.treeOutline.enableContextMenu();
153
- this.treeOutline.setEditable(false);
154
153
  if (!this.startCollapsed) {
155
154
  this.treeOutline.expand();
156
155
  }
@@ -793,7 +793,7 @@ export async function expectVeEvents(expectedEvents: TestLogEntry[]): Promise<vo
793
793
  checkPendingEventExpectation();
794
794
 
795
795
  const timeout = setTimeout(() => {
796
- if (pendingEventExpectation?.missingEvents) {
796
+ if (pendingEventExpectation?.missingEvents?.length) {
797
797
  const allLogs = veDebugEventsLog.filter(ve => {
798
798
  if ('interaction' in ve) {
799
799
  // Very noisy in the error and not providing context
package/package.json CHANGED
@@ -105,5 +105,5 @@
105
105
  "flat-cache": "6.1.12"
106
106
  }
107
107
  },
108
- "version": "1.0.1578729"
108
+ "version": "1.0.1579812"
109
109
  }