chrome-devtools-frontend 1.0.1698733 → 1.0.1700561

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 (164) hide show
  1. package/.agents/skills/devtools-verification/SKILL.md +19 -0
  2. package/.agents/skills/{repro-flaky-tests → fix-tests}/SKILL.md +2 -2
  3. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +2 -2
  4. package/front_end/core/sdk/DOMModel.ts +3 -5
  5. package/front_end/core/sdk/NetworkManager.ts +2 -2
  6. package/front_end/core/sdk/OverlayModel.ts +11 -12
  7. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +3 -0
  8. package/front_end/core/sdk/SourceMapScopeChainEntry.ts +84 -32
  9. package/front_end/core/sdk/StorageBucketsModel.ts +2 -0
  10. package/front_end/entrypoints/main/GlobalAiButton.ts +2 -6
  11. package/front_end/entrypoints/main/MainImpl.ts +8 -1
  12. package/front_end/generated/InspectorBackendCommands.ts +12 -2
  13. package/front_end/generated/SupportedCSSProperties.ts +14 -0
  14. package/front_end/generated/protocol-mapping.d.ts +48 -1
  15. package/front_end/generated/protocol-proxy-api.d.ts +37 -1
  16. package/front_end/generated/protocol.ts +131 -0
  17. package/front_end/models/bindings/NetworkProject.ts +30 -0
  18. package/front_end/models/bindings/ResourceScriptMapping.ts +62 -0
  19. package/front_end/models/change_tracker/ChangeTracker.ts +1 -1
  20. package/front_end/models/comment_manager/CD4ABridge.ts +2 -2
  21. package/front_end/models/comment_manager/CommentManager.ts +18 -0
  22. package/front_end/models/emulation/DeviceModeModel.ts +1 -1
  23. package/front_end/models/extensions/ExtensionAPI.ts +4 -2
  24. package/front_end/models/issues_manager/CookieIssue.ts +0 -15
  25. package/front_end/models/persistence/NetworkPersistenceManager.ts +29 -4
  26. package/front_end/models/source_map_scopes/NamesResolver.ts +34 -4
  27. package/front_end/models/source_map_scopes/ScopeChainModel.ts +31 -7
  28. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +281 -3
  29. package/front_end/panels/accessibility/accessibilityAnnouncementRecordingView.css +85 -0
  30. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -2
  31. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +5 -8
  32. package/front_end/panels/animation/AnimationTimeline.ts +1 -1
  33. package/front_end/panels/application/AppManifestView.ts +128 -134
  34. package/front_end/panels/application/CrashReportContextView.ts +6 -6
  35. package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +17 -17
  36. package/front_end/panels/application/DeviceBoundSessionsView.ts +136 -137
  37. package/front_end/panels/application/IndexedDBModel.ts +3 -0
  38. package/front_end/panels/application/IndexedDBViews.ts +1 -1
  39. package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
  40. package/front_end/panels/application/OriginTrialTreeView.ts +18 -23
  41. package/front_end/panels/application/ReportingApiTreeElement.ts +3 -3
  42. package/front_end/panels/application/ReportingApiView.ts +6 -14
  43. package/front_end/panels/application/application-meta.ts +7 -7
  44. package/front_end/panels/application/components/AdsView.ts +63 -1
  45. package/front_end/panels/application/components/adsView.css +11 -1
  46. package/front_end/panels/common/CommentThreadWidget.ts +20 -22
  47. package/front_end/panels/common/CommentsOverlayWidget.ts +115 -9
  48. package/front_end/panels/common/CommentsStatusBarPill.ts +13 -1
  49. package/front_end/panels/common/ExtensionServer.ts +43 -34
  50. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
  51. package/front_end/panels/common/commentThreadWidget.css +6 -0
  52. package/front_end/panels/common/common-meta.ts +4 -1
  53. package/front_end/panels/elements/CSSRuleValidator.ts +1 -1
  54. package/front_end/panels/elements/ElementsPanel.ts +4 -4
  55. package/front_end/panels/elements/ElementsTreeElement.ts +9 -2
  56. package/front_end/panels/elements/ElementsTreeOutline.ts +25 -33
  57. package/front_end/panels/elements/elementsTreeOutline.css +8 -4
  58. package/front_end/panels/event_listeners/EventListenersView.ts +9 -4
  59. package/front_end/panels/issues/IssuesPane.ts +34 -22
  60. package/front_end/panels/lighthouse/LighthouseController.ts +1 -1
  61. package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +1 -1
  62. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
  63. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +1 -1
  64. package/front_end/panels/network/RequestPayloadView.ts +17 -15
  65. package/front_end/panels/recorder/RecordingView.ts +32 -53
  66. package/front_end/panels/recorder/StepView.ts +19 -4
  67. package/front_end/panels/recorder/TimelineSection.ts +1 -1
  68. package/front_end/panels/recorder/controlButton.css +6 -0
  69. package/front_end/panels/recorder/recordingView.css +11 -2
  70. package/front_end/panels/settings/BackendLinkingSettingsTab.ts +2 -1
  71. package/front_end/panels/settings/EditFileSystemView.ts +1 -1
  72. package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
  73. package/front_end/panels/sources/DebuggerPlugin.ts +137 -56
  74. package/front_end/panels/sources/ScopeChainSidebarPane.ts +17 -15
  75. package/front_end/panels/timeline/components/DetailsView.ts +3 -3
  76. package/front_end/panels/timeline/components/IgnoreListSetting.ts +0 -2
  77. package/front_end/panels/timeline/components/LiveMetricsView.ts +59 -64
  78. package/front_end/panels/timeline/components/OriginMap.ts +1 -1
  79. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +2 -3
  80. package/front_end/panels/timeline/components/liveMetricsView.css +1 -0
  81. package/front_end/third_party/chromium/README.chromium +1 -1
  82. package/front_end/third_party/lighthouse/README.chromium +2 -2
  83. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1580 -1524
  84. package/front_end/third_party/lighthouse/locales/ar-XB.json +111 -72
  85. package/front_end/third_party/lighthouse/locales/ar.json +113 -74
  86. package/front_end/third_party/lighthouse/locales/bg.json +112 -73
  87. package/front_end/third_party/lighthouse/locales/ca.json +112 -73
  88. package/front_end/third_party/lighthouse/locales/cs.json +112 -73
  89. package/front_end/third_party/lighthouse/locales/da.json +112 -73
  90. package/front_end/third_party/lighthouse/locales/de.json +112 -73
  91. package/front_end/third_party/lighthouse/locales/el.json +112 -73
  92. package/front_end/third_party/lighthouse/locales/en-GB.json +111 -72
  93. package/front_end/third_party/lighthouse/locales/en-US.json +102 -66
  94. package/front_end/third_party/lighthouse/locales/en-XA.json +111 -72
  95. package/front_end/third_party/lighthouse/locales/en-XL.json +102 -66
  96. package/front_end/third_party/lighthouse/locales/es-419.json +112 -73
  97. package/front_end/third_party/lighthouse/locales/es.json +112 -73
  98. package/front_end/third_party/lighthouse/locales/fi.json +112 -73
  99. package/front_end/third_party/lighthouse/locales/fil.json +112 -73
  100. package/front_end/third_party/lighthouse/locales/fr.json +112 -73
  101. package/front_end/third_party/lighthouse/locales/he.json +112 -73
  102. package/front_end/third_party/lighthouse/locales/hi.json +112 -73
  103. package/front_end/third_party/lighthouse/locales/hr.json +112 -73
  104. package/front_end/third_party/lighthouse/locales/hu.json +112 -73
  105. package/front_end/third_party/lighthouse/locales/id.json +112 -73
  106. package/front_end/third_party/lighthouse/locales/it.json +113 -74
  107. package/front_end/third_party/lighthouse/locales/ja.json +112 -73
  108. package/front_end/third_party/lighthouse/locales/ko.json +112 -73
  109. package/front_end/third_party/lighthouse/locales/lt.json +112 -73
  110. package/front_end/third_party/lighthouse/locales/lv.json +112 -73
  111. package/front_end/third_party/lighthouse/locales/nl.json +112 -73
  112. package/front_end/third_party/lighthouse/locales/no.json +112 -73
  113. package/front_end/third_party/lighthouse/locales/pl.json +112 -73
  114. package/front_end/third_party/lighthouse/locales/pt-PT.json +112 -73
  115. package/front_end/third_party/lighthouse/locales/pt.json +112 -73
  116. package/front_end/third_party/lighthouse/locales/ro.json +112 -73
  117. package/front_end/third_party/lighthouse/locales/ru.json +112 -73
  118. package/front_end/third_party/lighthouse/locales/sk.json +112 -73
  119. package/front_end/third_party/lighthouse/locales/sl.json +112 -73
  120. package/front_end/third_party/lighthouse/locales/sr-Latn.json +112 -73
  121. package/front_end/third_party/lighthouse/locales/sr.json +112 -73
  122. package/front_end/third_party/lighthouse/locales/sv.json +124 -85
  123. package/front_end/third_party/lighthouse/locales/ta.json +112 -73
  124. package/front_end/third_party/lighthouse/locales/te.json +112 -73
  125. package/front_end/third_party/lighthouse/locales/th.json +112 -73
  126. package/front_end/third_party/lighthouse/locales/tr.json +113 -74
  127. package/front_end/third_party/lighthouse/locales/uk.json +112 -73
  128. package/front_end/third_party/lighthouse/locales/vi.json +112 -73
  129. package/front_end/third_party/lighthouse/locales/zh-HK.json +112 -73
  130. package/front_end/third_party/lighthouse/locales/zh-TW.json +113 -74
  131. package/front_end/third_party/lighthouse/locales/zh.json +113 -74
  132. package/front_end/third_party/lighthouse/report/bundle.d.ts +4 -4
  133. package/front_end/third_party/lighthouse/report/bundle.js +10 -3
  134. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -2
  135. package/front_end/third_party/lit/lit.ts +3 -0
  136. package/front_end/third_party/lit/package.json +3 -0
  137. package/front_end/third_party/lit/rebuild.sh +3 -2
  138. package/front_end/ui/comments/CommentAnchorResolver.ts +8 -2
  139. package/front_end/ui/comments/CommentOverlayManager.ts +2 -1
  140. package/front_end/ui/components/buttons/Button.ts +19 -1
  141. package/front_end/ui/legacy/ContextMenu.ts +16 -1
  142. package/front_end/ui/legacy/InspectorView.ts +4 -3
  143. package/front_end/ui/legacy/PlusButton.ts +5 -6
  144. package/front_end/ui/legacy/TabbedPane.ts +121 -80
  145. package/front_end/ui/legacy/Treeoutline.ts +37 -6
  146. package/front_end/ui/legacy/UIUtils.ts +7 -0
  147. package/front_end/ui/legacy/Widget.ts +33 -0
  148. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +3 -0
  149. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +14 -4
  150. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +157 -171
  151. package/front_end/ui/lit/lit.ts +1 -1
  152. package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
  153. package/inspector_overlay/highlight_anchor.ts +197 -0
  154. package/inspector_overlay/tool_highlight.ts +8 -0
  155. package/package.json +1 -1
  156. package/.agents/skills/devtools-ci/SKILL.md +0 -65
  157. package/.agents/skills/evaluate-ai-css-completion/SKILL.md +0 -143
  158. package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +0 -104
  159. package/.agents/skills/fixing-skipped-tests/SKILL.md +0 -32
  160. package/.agents/skills/gerrit-cli/SKILL.md +0 -74
  161. package/.agents/skills/gerrit-cli/references/commands.md +0 -169
  162. package/.agents/skills/gerrit-cli/references/workflows.md +0 -63
  163. package/.agents/skills/gerrit-cli/scripts/import_upstream.py +0 -85
  164. package/front_end/models/issues_manager/descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +0 -4
@@ -54,6 +54,7 @@ export interface ViewInput {
54
54
  data: CookieData[];
55
55
  selectedKey?: string;
56
56
  editable?: boolean;
57
+ deletable?: boolean;
57
58
  renderInline?: boolean;
58
59
  portBindingEnabled?: boolean;
59
60
  schemeBindingEnabled?: boolean;
@@ -233,6 +234,7 @@ export class CookiesTable extends UI.Widget.VBox {
233
234
  id="cookies-table"
234
235
  striped
235
236
  ?inline=${input.renderInline}
237
+ ?deletable=${input.deletable}
236
238
  @create=${(e: CustomEvent<CookieData>) => input.onCreate(e.detail)}
237
239
  @refresh=${input.onRefresh}
238
240
  @deselect=${() => input.onSelect(undefined)}
@@ -448,6 +450,7 @@ export class CookiesTable extends UI.Widget.VBox {
448
450
  data: this.data,
449
451
  selectedKey: this.selectedKey,
450
452
  editable: this.#editable,
453
+ deletable: Boolean(this.#deleteCallback),
451
454
  renderInline: this.renderInline,
452
455
  schemeBindingEnabled: this.schemeBindingEnabled,
453
456
  portBindingEnabled: this.portBindingEnabled,
@@ -48,6 +48,8 @@ const DUMMY_COLUMN_ID = 'dummy'; // SortableDataGrid.create requires at least o
48
48
  * visible rows are layed out and sorting is provided out of the box.
49
49
  *
50
50
  * @property filters Set of text filters to be applied to the data grid.
51
+ * @attribute deletable If true, rows can be deleted through the context menu or the Delete
52
+ * key, which dispatches a `delete` event on the corresponding <tr> element.
51
53
  * @attribute inline If true, the data grid will render inline instead of taking a full container height.
52
54
  * @attribute resize Column resize method, one of 'nearest' (default), 'first' or 'last'.
53
55
  * @attribute striped If true, the data grid will have striped rows.
@@ -58,7 +60,7 @@ type DataGridElementNode = SortableNode|DynamicHeightNode;
58
60
  const elementToNode = new WeakMap<Element, DataGridElementNode>();
59
61
 
60
62
  export class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
61
- static readonly observedAttributes: string[] = ['striped', 'name', 'inline', 'resize', 'highlight'];
63
+ static readonly observedAttributes: string[] = ['striped', 'name', 'inline', 'resize', 'highlight', 'deletable'];
62
64
 
63
65
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
64
66
  #dataGrid!: DataGridImpl<any>;
@@ -220,6 +222,9 @@ export class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate
220
222
  this.#revealHighlightedNode(Number(newValue));
221
223
  });
222
224
  break;
225
+ case 'deletable':
226
+ this.#dataGrid.deleteCallback = this.deletable ? this.#deleteCallback.bind(this) : undefined;
227
+ break;
223
228
  }
224
229
  }
225
230
 
@@ -231,6 +236,14 @@ export class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate
231
236
  return hasBooleanAttribute(this, 'striped');
232
237
  }
233
238
 
239
+ set deletable(deletable: boolean) {
240
+ this.toggleAttribute('deletable', deletable);
241
+ }
242
+
243
+ get deletable(): boolean {
244
+ return hasBooleanAttribute(this, 'deletable');
245
+ }
246
+
234
247
  set inline(striped: boolean) {
235
248
  this.toggleAttribute('inline', striped);
236
249
  }
@@ -584,9 +597,6 @@ export class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate
584
597
  if (args[0] === 'refresh') {
585
598
  this.#dataGrid.refreshCallback = this.#refreshCallback.bind(this);
586
599
  }
587
- if (args[0] === 'delete') {
588
- this.#dataGrid.deleteCallback = this.#deleteCallback.bind(this);
589
- }
590
600
  }
591
601
 
592
602
  #refreshCallback(): void {
@@ -388,6 +388,10 @@ export class ObjectTreeExpansionTracker {
388
388
  }
389
389
  }
390
390
 
391
+ const ARRAY_LOAD_THRESHOLD = 100;
392
+ const ARRAY_BUCKET_THRESHOLD = 100;
393
+ const ARRAY_SPARSE_ITERATION_THRESHOLD = 250000;
394
+
391
395
  export abstract class ObjectTreeNodeBase extends Common.ObjectWrapper.ObjectWrapper<ObjectTreeNodeBase.EventTypes> {
392
396
  #children?: NodeChildren;
393
397
  protected readonly options: ObjectTreeOptions;
@@ -715,7 +719,7 @@ class ArrayGroupTreeNode extends ObjectTreeNodeBase {
715
719
  }
716
720
 
717
721
  override async populateChildrenIfNeededImpl(): Promise<NodeChildren> {
718
- if (this.#range.count > ArrayGroupingTreeElement.bucketThreshold) {
722
+ if (this.#range.count > ARRAY_BUCKET_THRESHOLD) {
719
723
  const ranges = await arrayRangeGroups(this.object, this.#range.fromIndex, this.#range.toIndex);
720
724
  const arrayRanges = ranges?.ranges.map(
721
725
  ([fromIndex, toIndex, count]) => new ArrayGroupTreeNode(this.object, {fromIndex, toIndex, count}, this, {
@@ -729,7 +733,7 @@ class ArrayGroupTreeNode extends ObjectTreeNodeBase {
729
733
  const result = await this.#object.callFunction(buildArrayFragment, [
730
734
  {value: this.#range.fromIndex},
731
735
  {value: this.#range.toIndex},
732
- {value: ArrayGroupingTreeElement.sparseIterationThreshold},
736
+ {value: ARRAY_SPARSE_ITERATION_THRESHOLD},
733
737
  ]);
734
738
  if (!result.object || result.wasThrown) {
735
739
  return {};
@@ -766,7 +770,7 @@ export class ObjectTreeNode extends ObjectTreeNodeBase {
766
770
  readonly property: SDK.RemoteObject.RemoteObjectProperty,
767
771
  parent: ObjectTreeNodeBase|undefined,
768
772
  options: ObjectTreeOptions,
769
- readonly nonSyntheticParent?: SDK.RemoteObject.RemoteObject,
773
+ readonly nonSyntheticParent?: SDK.RemoteObject.RemoteObject|undefined,
770
774
  ) {
771
775
  super(parent, options);
772
776
  }
@@ -1228,21 +1232,20 @@ export class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
1228
1232
  populateObjectTreeContextMenu(
1229
1233
  contextMenu,
1230
1234
  root,
1231
- root.expandRecursively.bind(root, EXPANDABLE_MAX_DEPTH),
1232
- root.collapseRecursively.bind(root),
1233
- () => {
1234
- root.sortPropertiesAlphabetically = !root.sortPropertiesAlphabetically;
1235
- },
1236
- () => {
1237
- root.includeNullOrUndefinedValues = !root.includeNullOrUndefinedValues;
1235
+ {
1236
+ expandRecursively: root.expandRecursively.bind(root, EXPANDABLE_MAX_DEPTH),
1237
+ collapseChildren: root.collapseRecursively.bind(root),
1238
+ sortPropertiesAlphabetically: root => {
1239
+ root.sortPropertiesAlphabetically = !root.sortPropertiesAlphabetically;
1240
+ },
1241
+ onShowAllToggled: root => {
1242
+ root.includeNullOrUndefinedValues = !root.includeNullOrUndefinedValues;
1243
+ },
1238
1244
  },
1239
1245
  );
1240
1246
  };
1241
1247
  }
1242
1248
 
1243
- /** @constant */
1244
- const ARRAY_LOAD_THRESHOLD = 100;
1245
-
1246
1249
  const maxRenderableStringLength = 10000;
1247
1250
 
1248
1251
  export const enum ObjectPropertiesMode {
@@ -1250,18 +1253,24 @@ export const enum ObjectPropertiesMode {
1250
1253
  OWN_AND_INTERNAL_AND_INHERITED = 1, // Own, internal, and inherited properties
1251
1254
  }
1252
1255
 
1253
- export function populateObjectTreeContextMenu(
1254
- contextMenu: UI.ContextMenu.ContextMenu,
1255
- object: ObjectTree,
1256
- expandRecursively: () => void,
1257
- collapseChildren: () => void,
1258
- sortPropertiesAlphabetically: () => void,
1259
- onShowAllToggled: () => void,
1260
- ): void {
1261
- contextMenu.appendApplicableItems(object.object);
1262
-
1263
- if (object.object instanceof SDK.RemoteObject.LocalJSONObject) {
1264
- const {value} = object.object;
1256
+ export function populateObjectTreeContextMenu(contextMenu: UI.ContextMenu.ContextMenu,
1257
+ objectOrProperty: ObjectTree|ObjectTreeNode, handlers: {
1258
+ expandRecursively: (node: ObjectTreeNodeBase) => void,
1259
+ collapseChildren: (node: ObjectTreeNodeBase) => void,
1260
+ sortPropertiesAlphabetically: (node: ObjectTreeNodeBase) => void,
1261
+ onShowAllToggled: (node: ObjectTreeNodeBase) => void,
1262
+ }): void {
1263
+ contextMenu.appendApplicableItems(objectOrProperty);
1264
+ if (objectOrProperty instanceof ObjectTreeNode && objectOrProperty.property.symbol) {
1265
+ contextMenu.appendApplicableItems(objectOrProperty.property.symbol);
1266
+ }
1267
+ if (objectOrProperty.object) {
1268
+ contextMenu.appendApplicableItems(objectOrProperty.object);
1269
+ }
1270
+
1271
+ const object = objectOrProperty instanceof ObjectTree ? objectOrProperty.object : objectOrProperty.parent?.object;
1272
+ if (objectOrProperty.object && object instanceof SDK.RemoteObject.LocalJSONObject) {
1273
+ const {value} = objectOrProperty.object;
1265
1274
  const propertyValue = typeof value === 'object' ?
1266
1275
  Platform.StringUtilities.escapeUnicodeAsText(JSON.stringify(value, null, 2)) :
1267
1276
  value;
@@ -1273,23 +1282,39 @@ export function populateObjectTreeContextMenu(
1273
1282
  {jslogContext: 'copy-value'});
1274
1283
  }
1275
1284
 
1276
- contextMenu.viewSection().appendItem(i18nString(UIStrings.expandRecursively), expandRecursively,
1277
- {jslogContext: 'expand-recursively'});
1278
- contextMenu.viewSection().appendItem(i18nString(UIStrings.collapseChildren), collapseChildren,
1279
- {jslogContext: 'collapse-children'});
1280
- if (!object.isWasm) {
1285
+ if (objectOrProperty instanceof ObjectTreeNode && !objectOrProperty.property.synthetic && objectOrProperty.path) {
1286
+ const copyPathHandler = Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText.bind(
1287
+ Host.InspectorFrontendHost.InspectorFrontendHostInstance, objectOrProperty.path);
1288
+ contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copyPropertyPath), copyPathHandler,
1289
+ {jslogContext: 'copy-property-path'});
1290
+ }
1291
+
1292
+ if (objectOrProperty instanceof ObjectTree || object instanceof SDK.RemoteObject.LocalJSONObject) {
1293
+ contextMenu.viewSection().appendItem(i18nString(UIStrings.expandRecursively),
1294
+ () => handlers.expandRecursively(objectOrProperty),
1295
+ {jslogContext: 'expand-recursively'});
1296
+ contextMenu.viewSection().appendItem(i18nString(UIStrings.collapseChildren),
1297
+ () => handlers.collapseChildren(objectOrProperty),
1298
+ {jslogContext: 'collapse-children'});
1299
+ }
1300
+
1301
+ let root: ObjectTreeNodeBase = objectOrProperty;
1302
+ while (root.parent) {
1303
+ root = root.parent;
1304
+ }
1305
+ if (!root.isWasm) {
1281
1306
  contextMenu.viewSection().appendCheckboxItem(i18nString(UIStrings.sortPropertiesAlphabetically),
1282
- sortPropertiesAlphabetically, {
1283
- checked: object.sortPropertiesAlphabetically,
1307
+ () => handlers.sortPropertiesAlphabetically(root), {
1308
+ checked: objectOrProperty.sortPropertiesAlphabetically,
1284
1309
  jslogContext: 'sort-properties-alphabetically',
1285
1310
  });
1286
1311
  }
1287
1312
  contextMenu.viewSection().appendCheckboxItem(
1288
- i18nString(UIStrings.showAll), onShowAllToggled,
1289
- {checked: object.includeNullOrUndefinedValues, jslogContext: 'show-all'});
1313
+ i18nString(UIStrings.showAll), () => handlers.onShowAllToggled(root),
1314
+ {checked: objectOrProperty.includeNullOrUndefinedValues, jslogContext: 'show-all'});
1290
1315
  }
1291
1316
 
1292
- export interface ObjectTreeViewInput {
1317
+ interface ObjectTreeViewInput {
1293
1318
  renderAsSubtree: boolean;
1294
1319
  objectTree?: ObjectTree;
1295
1320
  linkifier?: Components.Linkifier.Linkifier;
@@ -1298,8 +1323,8 @@ export interface ObjectTreeViewInput {
1298
1323
  skipGettersAndSetters: boolean;
1299
1324
  onExpand: (expanded: boolean) => void;
1300
1325
  }
1301
- export type ObjectTreeView = (input: ObjectTreeViewInput, output: object, target: HTMLElement) => void;
1302
- export const OBJECT_TREE_DEFAULT_VIEW: ObjectTreeView = (input, output, target) => {
1326
+ type ObjectTreeView = (input: ObjectTreeViewInput, output: object, target: HTMLElement) => void;
1327
+ const OBJECT_TREE_DEFAULT_VIEW: ObjectTreeView = (input, output, target) => {
1303
1328
  const objectTree = input.objectTree;
1304
1329
  if (!objectTree) {
1305
1330
  render(nothing, target);
@@ -1332,6 +1357,19 @@ export const OBJECT_TREE_DEFAULT_VIEW: ObjectTreeView = (input, output, target)
1332
1357
  });
1333
1358
  };
1334
1359
 
1360
+ async function populateChildrenIfNeeded(node: ObjectTreeNodeBase): Promise<void> {
1361
+ const children = await node.populateChildrenIfNeeded();
1362
+ if (!children.arrayRanges) {
1363
+ return;
1364
+ }
1365
+ if (children.arrayRanges.length === 1) {
1366
+ await populateChildrenIfNeeded(children.arrayRanges[0]);
1367
+ } else {
1368
+ await Promise.all(
1369
+ children.arrayRanges.filter(child => child.singular).map(child => populateChildrenIfNeeded(child)));
1370
+ }
1371
+ }
1372
+
1335
1373
  export class ObjectTreeWidget extends UI.Widget.Widget {
1336
1374
  #objectTree: ObjectTree|undefined = undefined;
1337
1375
  #linkifier: Components.Linkifier.Linkifier|undefined = undefined;
@@ -1424,7 +1462,7 @@ export class ObjectTreeWidget extends UI.Widget.Widget {
1424
1462
 
1425
1463
  override async performUpdate(): Promise<void> {
1426
1464
  if (this.#objectTree?.expanded) {
1427
- await ObjectPropertyTreeElement.populateChildrenIfNeeded(this.#objectTree);
1465
+ await populateChildrenIfNeeded(this.#objectTree);
1428
1466
  }
1429
1467
  this.#view(this, {}, this.contentElement);
1430
1468
  }
@@ -1454,7 +1492,7 @@ export function renderObjectTree(
1454
1492
  widgetRef(ObjectTreeWidget, () => {})}></ul>`;
1455
1493
  }
1456
1494
 
1457
- export interface ObjectPropertiesSectionViewInput {
1495
+ interface ObjectPropertiesSectionViewInput {
1458
1496
  objectTree: ObjectTree;
1459
1497
  title?: Element|TemplateResult;
1460
1498
  linkifier?: Components.Linkifier.Linkifier;
@@ -1464,11 +1502,10 @@ export interface ObjectPropertiesSectionViewInput {
1464
1502
  onExpand: (expanded: boolean) => void;
1465
1503
  }
1466
1504
 
1467
- export type ObjectPropertiesSectionView =
1468
- (input: ObjectPropertiesSectionViewInput, output: object, target: HTMLElement) => void;
1505
+ type ObjectPropertiesSectionView = (input: ObjectPropertiesSectionViewInput, output: object, target: HTMLElement) =>
1506
+ void;
1469
1507
 
1470
1508
  export const OBJECT_PROPERTIES_SECTION_DEFAULT_VIEW: ObjectPropertiesSectionView = (input, _output, target) => {
1471
-
1472
1509
  const onRootItemContextMenuHandler = (event: Event): void => {
1473
1510
  event.consume(true);
1474
1511
  const contextMenu = new UI.ContextMenu.ContextMenu(event);
@@ -1674,9 +1711,9 @@ export interface ObjectPropertyViewInput {
1674
1711
  node: ObjectTreeNode;
1675
1712
  search?: UI.TreeOutline.TreeSearch<ObjectTreeNodeBase>;
1676
1713
  }
1677
- export type ObjectPropertyViewOutput = undefined;
1678
- export type ObjectPropertyView =
1679
- (input: ObjectPropertyViewInput, output: ObjectPropertyViewOutput, target: HTMLElement) => void;
1714
+ type ObjectPropertyViewOutput = undefined;
1715
+ type ObjectPropertyView = (input: ObjectPropertyViewInput, output: ObjectPropertyViewOutput, target: HTMLElement) =>
1716
+ void;
1680
1717
  export const OBJECT_PROPERTY_DEFAULT_VIEW: ObjectPropertyView = (input, _output, target) => {
1681
1718
  const {property} = input.node;
1682
1719
  const isInternalEntries = property.synthetic && input.node.name === '[[Entries]]';
@@ -1897,7 +1934,7 @@ export class ObjectPropertyWidget extends UI.Widget.Widget {
1897
1934
  }
1898
1935
  }
1899
1936
 
1900
- export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
1937
+ class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
1901
1938
  property: ObjectTreeNode;
1902
1939
  override toggleOnClick: boolean;
1903
1940
  private linkifier: Components.Linkifier.Linkifier|undefined;
@@ -1935,16 +1972,11 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
1935
1972
  linkifier?: Components.Linkifier.Linkifier,
1936
1973
  emptyPlaceholder?: string|null,
1937
1974
  ): Promise<void> {
1938
- await ObjectPropertyTreeElement.populateChildrenIfNeeded(value);
1975
+ await populateChildrenIfNeeded(value);
1939
1976
  ObjectPropertyTreeElement.populateImpl(treeElement, value, skipProto, skipGettersAndSetters, linkifier,
1940
1977
  emptyPlaceholder);
1941
1978
  }
1942
1979
 
1943
- static async populateChildrenIfNeeded(value: ObjectTreeNodeBase): Promise<void> {
1944
- const children = await value.populateChildrenIfNeeded();
1945
- await ArrayGroupingTreeElement.populateChildrenIfNeeded(children);
1946
- }
1947
-
1948
1980
  static populateImpl(
1949
1981
  treeElement: UI.TreeOutline.TreeElement,
1950
1982
  value: ObjectTreeNodeBase,
@@ -1984,10 +2016,11 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
1984
2016
  }
1985
2017
 
1986
2018
  static *
1987
- createPropertyNodes(
1988
- {properties, internalProperties, accessors, arrayRanges}: NodeChildren, skipProto: boolean,
1989
- skipGettersAndSetters: boolean, linkifier?: Components.Linkifier.Linkifier, emptyPlaceholder?: string|null,
1990
- isNotDisplayablePropertyCallback?: (property: SDK.RemoteObject.RemoteObjectProperty) => boolean):
2019
+ createPropertyNodes({properties, internalProperties, accessors, arrayRanges}: NodeChildren, skipProto: boolean,
2020
+ skipGettersAndSetters: boolean, linkifier?: Components.Linkifier.Linkifier,
2021
+ emptyPlaceholder?: string|null,
2022
+ isNotDisplayablePropertyCallback?:
2023
+ (property: SDK.RemoteObject.RemoteObjectProperty) => boolean):
1991
2024
  Generator<UI.TreeOutline.TreeElement> {
1992
2025
  let empty = true;
1993
2026
  // Arrays with large numbers of elements are paginated into arrayRanges.
@@ -2051,9 +2084,9 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
2051
2084
  }
2052
2085
  }
2053
2086
 
2054
- static populateWithProperties(
2055
- treeNode: UI.TreeOutline.TreeElement, children: NodeChildren, skipProto: boolean, skipGettersAndSetters: boolean,
2056
- linkifier?: Components.Linkifier.Linkifier, emptyPlaceholder?: string|null): void {
2087
+ static populateWithProperties(treeNode: UI.TreeOutline.TreeElement, children: NodeChildren, skipProto: boolean,
2088
+ skipGettersAndSetters: boolean, linkifier?: Components.Linkifier.Linkifier,
2089
+ emptyPlaceholder?: string|null): void {
2057
2090
  for (const childNode of this.createPropertyNodes(
2058
2091
  children, skipProto, skipGettersAndSetters, linkifier, emptyPlaceholder,
2059
2092
  property => treeNode instanceof ObjectPropertyTreeElement &&
@@ -2158,91 +2191,47 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
2158
2191
  }
2159
2192
  }
2160
2193
 
2161
- getContextMenu(event: Event): UI.ContextMenu.ContextMenu {
2194
+ private contextMenuFired(event: Event): void {
2162
2195
  const contextMenu = new UI.ContextMenu.ContextMenu(event);
2163
- contextMenu.appendApplicableItems(this.property);
2164
- if (this.property.property.symbol) {
2165
- contextMenu.appendApplicableItems(this.property.property.symbol);
2166
- }
2167
- if (this.property.object) {
2168
- contextMenu.appendApplicableItems(this.property.object);
2169
- if (this.property.parent?.object instanceof SDK.RemoteObject.LocalJSONObject) {
2170
- const {object: {value}} = this.property;
2171
- const propertyValue = typeof value === 'object' ?
2172
- Platform.StringUtilities.escapeUnicodeAsText(JSON.stringify(value, null, 2)) :
2173
- value;
2174
- const copyValueHandler = (): void => {
2175
- Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue);
2176
- Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText((propertyValue as string | undefined));
2177
- };
2178
- contextMenu.clipboardSection().appendItem(
2179
- i18nString(UIStrings.copyValue), copyValueHandler, {jslogContext: 'copy-value'});
2180
- }
2181
- }
2182
- if (!this.property.property.synthetic && this.property.path) {
2183
- const copyPathHandler = Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText.bind(
2184
- Host.InspectorFrontendHost.InspectorFrontendHostInstance, this.property.path);
2185
- contextMenu.clipboardSection().appendItem(
2186
- i18nString(UIStrings.copyPropertyPath), copyPathHandler, {jslogContext: 'copy-property-path'});
2187
- }
2188
- if (this.property.parent?.object instanceof SDK.RemoteObject.LocalJSONObject) {
2189
- contextMenu.viewSection().appendItem(
2190
- i18nString(UIStrings.expandRecursively), this.expandRecursively.bind(this, EXPANDABLE_MAX_DEPTH),
2191
- {jslogContext: 'expand-recursively'});
2192
- contextMenu.viewSection().appendItem(
2193
- i18nString(UIStrings.collapseChildren), this.collapseChildren.bind(this),
2194
- {jslogContext: 'collapse-children'});
2195
- }
2196
- let root: ObjectTreeNodeBase = this.property;
2197
- while (root.parent) {
2198
- root = root.parent;
2199
- }
2200
- if (!root.isWasm) {
2201
- contextMenu.viewSection().appendCheckboxItem(i18nString(UIStrings.sortPropertiesAlphabetically), () => {
2202
- root.sortPropertiesAlphabetically = !root.sortPropertiesAlphabetically;
2203
- }, {
2204
- checked: root.sortPropertiesAlphabetically,
2205
- jslogContext: 'sort-properties-alphabetically',
2206
- });
2207
- }
2208
- contextMenu.viewSection().appendCheckboxItem(i18nString(UIStrings.showAll), () => {
2209
- root.includeNullOrUndefinedValues = !root.includeNullOrUndefinedValues;
2210
- }, {checked: root.includeNullOrUndefinedValues, jslogContext: 'show-all'});
2211
- return contextMenu;
2212
- }
2196
+ populateObjectTreeContextMenu(contextMenu, this.property, {
2197
+ expandRecursively: () => this.expandRecursively(EXPANDABLE_MAX_DEPTH),
2198
+ collapseChildren: () => this.collapseChildren(),
2199
+ sortPropertiesAlphabetically: node => {
2200
+ node.sortPropertiesAlphabetically = !node.sortPropertiesAlphabetically;
2201
+ },
2202
+ onShowAllToggled: node => {
2203
+ node.includeNullOrUndefinedValues = !node.includeNullOrUndefinedValues;
2204
+ },
2205
+ });
2213
2206
 
2214
- private contextMenuFired(event: Event): void {
2215
- const contextMenu = this.getContextMenu(event);
2216
2207
  void contextMenu.show();
2217
2208
  }
2218
2209
 
2219
2210
  private updateExpandable(): void {
2220
2211
  if (this.property.object) {
2221
- this.setExpandable(
2222
- !this.property.object.customPreview() && this.property.object.hasChildren &&
2223
- !this.property.property.wasThrown);
2212
+ this.setExpandable(!this.property.object.customPreview() && this.property.object.hasChildren &&
2213
+ !this.property.property.wasThrown);
2224
2214
  } else {
2225
2215
  this.setExpandable(false);
2226
2216
  }
2227
2217
  }
2228
2218
  }
2229
2219
 
2230
- async function arrayRangeGroups(object: SDK.RemoteObject.RemoteObject, fromIndex: number, toIndex: number):
2231
- Promise<{ranges: number[][]}|null|undefined> {
2220
+ async function arrayRangeGroups(object: SDK.RemoteObject.RemoteObject, fromIndex: number,
2221
+ toIndex: number): Promise<{ranges: number[][]}|null|undefined> {
2232
2222
  return await object.callFunctionJSON(packArrayRanges, [
2233
2223
  {value: fromIndex},
2234
2224
  {value: toIndex},
2235
- {value: ArrayGroupingTreeElement.bucketThreshold},
2236
- {value: ArrayGroupingTreeElement.sparseIterationThreshold},
2225
+ {value: ARRAY_BUCKET_THRESHOLD},
2226
+ {value: ARRAY_SPARSE_ITERATION_THRESHOLD},
2237
2227
  ]);
2238
2228
 
2239
2229
  /**
2240
2230
  * This function is called on the RemoteObject.
2241
2231
  * Note: must declare params as optional.
2242
2232
  */
2243
- function packArrayRanges(
2244
- this: Object, fromIndex?: number, toIndex?: number, bucketThreshold?: number,
2245
- sparseIterationThreshold?: number): {
2233
+ function packArrayRanges(this: Object, fromIndex?: number, toIndex?: number, bucketThreshold?: number,
2234
+ sparseIterationThreshold?: number): {
2246
2235
  ranges: number[][],
2247
2236
  }|undefined {
2248
2237
  if (fromIndex === undefined || toIndex === undefined || sparseIterationThreshold === undefined ||
@@ -2361,7 +2350,7 @@ function buildArrayFragment(
2361
2350
  return result;
2362
2351
  }
2363
2352
 
2364
- export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
2353
+ class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
2365
2354
  override toggleOnClick: boolean;
2366
2355
  private readonly linkifier: Components.Linkifier.Linkifier|undefined;
2367
2356
  readonly #child: ArrayGroupTreeNode;
@@ -2414,18 +2403,6 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
2414
2403
  isNotDisplayablePropertyCallback);
2415
2404
  }
2416
2405
 
2417
- static async populateChildrenIfNeeded(children: NodeChildren): Promise<void> {
2418
- if (!children.arrayRanges) {
2419
- return;
2420
- }
2421
- if (children.arrayRanges.length === 1) {
2422
- await ObjectPropertyTreeElement.populateChildrenIfNeeded(children.arrayRanges[0]);
2423
- } else {
2424
- await Promise.all(children.arrayRanges.filter(child => child.singular)
2425
- .map(child => ObjectPropertyTreeElement.populateChildrenIfNeeded(child)));
2426
- }
2427
- }
2428
-
2429
2406
  override onexpand(): void {
2430
2407
  this.#child.expanded = true;
2431
2408
  }
@@ -2442,13 +2419,9 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
2442
2419
  override onattach(): void {
2443
2420
  this.listItemElement.classList.add('object-properties-section-name');
2444
2421
  }
2445
-
2446
- // These should be module constants but they are modified by layout tests.
2447
- static bucketThreshold = 100;
2448
- static sparseIterationThreshold = 250000;
2449
2422
  }
2450
2423
 
2451
- export interface ExpandableTextViewInput {
2424
+ interface ExpandableTextViewInput {
2452
2425
  copyText: () => void;
2453
2426
  expandText: () => void;
2454
2427
  expanded: boolean;
@@ -2456,35 +2429,15 @@ export interface ExpandableTextViewInput {
2456
2429
  byteCount: number;
2457
2430
  text: string;
2458
2431
  }
2459
- export type ExpandableTextView = (input: ExpandableTextViewInput, output: object, target: HTMLElement) => void;
2460
- export const EXPANDABLE_TEXT_DEFAULT_VIEW: ExpandableTextView = (input, output, target) => {
2432
+ type ExpandableTextView = (input: ExpandableTextViewInput, output: object, target: HTMLElement) => void;
2433
+ const EXPANDABLE_TEXT_DEFAULT_VIEW: ExpandableTextView = (input, output, target) => {
2461
2434
  const totalBytesText = i18n.ByteUtilities.bytesToString(input.byteCount);
2462
2435
  const canExpand = input.text.length < ExpandableTextPropertyValue.MAX_DISPLAYABLE_TEXT_LENGTH;
2463
- const onContextMenu = (e: Event): void => {
2464
- const {target} = e;
2465
- if (!(target instanceof Element)) {
2466
- return;
2467
- }
2468
- const listItem = target.closest('li');
2469
- const element = listItem && UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem);
2470
- if (!(element instanceof ObjectPropertyTreeElement)) {
2471
- return;
2472
- }
2473
- const contextMenu = element.getContextMenu(e);
2474
- if (canExpand && !input.expanded) {
2475
- contextMenu.clipboardSection().appendItem(
2476
- i18nString(UIStrings.showMoreS, {PH1: totalBytesText}), input.expandText, {jslogContext: 'show-more'});
2477
- }
2478
- contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copy), input.copyText, {jslogContext: 'copy'});
2479
- void contextMenu.show();
2480
- e.consume(true);
2481
- };
2482
-
2483
2436
  const croppedText = input.text.slice(0, input.maxLength);
2484
2437
 
2485
2438
  render(
2486
2439
  // clang-format off
2487
- html`<span title=${croppedText + '…'} @contextmenu=${onContextMenu}>
2440
+ html`<span title=${croppedText + '…'}>
2488
2441
  ${input.expanded ? input.text : croppedText}
2489
2442
  <button
2490
2443
  ?hidden=${input.expanded}
@@ -2502,7 +2455,7 @@ export const EXPANDABLE_TEXT_DEFAULT_VIEW: ExpandableTextView = (input, output,
2502
2455
  ></button>
2503
2456
  </span>`,
2504
2457
  // clang-format on
2505
- target);
2458
+ target, {container: {classes: ['expandable-text-property-value']}});
2506
2459
  };
2507
2460
 
2508
2461
  export class ExpandableTextPropertyValue extends UI.Widget.Widget {
@@ -2530,15 +2483,31 @@ export class ExpandableTextPropertyValue extends UI.Widget.Widget {
2530
2483
  this.requestUpdate();
2531
2484
  }
2532
2485
 
2486
+ #copyText = (): void => {
2487
+ Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#text);
2488
+ };
2489
+
2490
+ #expandText = (): void => {
2491
+ if (!this.#expanded) {
2492
+ this.#expanded = true;
2493
+ this.requestUpdate();
2494
+ }
2495
+ };
2496
+
2497
+ appendApplicableItems(contextMenu: UI.ContextMenu.ContextMenu): void {
2498
+ const totalBytesText = i18n.ByteUtilities.bytesToString(this.#byteCount);
2499
+ const canExpand = this.#text.length < ExpandableTextPropertyValue.MAX_DISPLAYABLE_TEXT_LENGTH;
2500
+ if (canExpand && !this.#expanded) {
2501
+ contextMenu.clipboardSection().appendItem(i18nString(UIStrings.showMoreS, {PH1: totalBytesText}),
2502
+ this.#expandText, {jslogContext: 'show-more'});
2503
+ }
2504
+ contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copy), this.#copyText, {jslogContext: 'copy'});
2505
+ }
2506
+
2533
2507
  override performUpdate(): void {
2534
2508
  const input: ExpandableTextViewInput = {
2535
- copyText: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#text),
2536
- expandText: () => {
2537
- if (!this.#expanded) {
2538
- this.#expanded = true;
2539
- this.requestUpdate();
2540
- }
2541
- },
2509
+ copyText: this.#copyText,
2510
+ expandText: this.#expandText,
2542
2511
  expanded: this.#expanded,
2543
2512
  byteCount: this.#byteCount,
2544
2513
  maxLength: this.#maxLength,
@@ -2547,3 +2516,20 @@ export class ExpandableTextPropertyValue extends UI.Widget.Widget {
2547
2516
  this.#view(input, {}, this.contentElement);
2548
2517
  }
2549
2518
  }
2519
+
2520
+ UI.ContextMenu.registerProvider({
2521
+ contextTypes() {
2522
+ return [ObjectTreeNodeBase];
2523
+ },
2524
+ async loadProvider() {
2525
+ return {
2526
+ appendApplicableItems(event: Event, contextMenu: UI.ContextMenu.ContextMenu): void {
2527
+ const widgetElement = (event.target as Element | null)?.closest('.expandable-text-property-value');
2528
+ const widget = widgetElement && UI.Widget.Widget.get(widgetElement);
2529
+ if (widget instanceof ExpandableTextPropertyValue) {
2530
+ widget.appendApplicableItems(contextMenu);
2531
+ }
2532
+ },
2533
+ };
2534
+ },
2535
+ });
@@ -4,7 +4,7 @@
4
4
 
5
5
  import type * as Lit from '../../third_party/lit/lit.js';
6
6
 
7
- export type {DirectiveResult} from '../../third_party/lit/lib/directive.js';
7
+ export type {DirectiveResult} from '../../third_party/lit/lit.js';
8
8
  export {
9
9
  AsyncDirective,
10
10
  Decorators,
@@ -283,8 +283,11 @@ export const knownContextValues: Set<string> = new Set([
283
283
  'accept',
284
284
  'accept-execute-code',
285
285
  'access-control-allow-origin',
286
+ 'accessibility-announcements.filter-by-type',
286
287
  'accessibility-default',
287
288
  'accessibility-tree',
289
+ 'accessibility.clear-announcements',
290
+ 'accessibility.toggle-recording',
288
291
  'accessibility.view',
289
292
  'accuracy',
290
293
  'achromatopsia',
@@ -1422,6 +1425,7 @@ export const knownContextValues: Set<string> = new Set([
1422
1425
  'device-pixel-ratio-enable',
1423
1426
  'device-posture',
1424
1427
  'device-scale-factor',
1428
+ 'device-scope',
1425
1429
  'device-type',
1426
1430
  'device-type-enable',
1427
1431
  'devicemotion',
@@ -2677,6 +2681,7 @@ export const knownContextValues: Set<string> = new Set([
2677
2681
  'linear-memory-row',
2678
2682
  'link',
2679
2683
  'link-in-explanation',
2684
+ 'link-parameters',
2680
2685
  'linux',
2681
2686
  'list-style',
2682
2687
  'list-style-image',
@@ -3132,6 +3137,7 @@ export const knownContextValues: Set<string> = new Set([
3132
3137
  'page-error',
3133
3138
  'page-margin-safety',
3134
3139
  'page-orientation',
3140
+ 'page-scope',
3135
3141
  'paint-order',
3136
3142
  'painting',
3137
3143
  'palatino',
@@ -3190,6 +3196,7 @@ export const knownContextValues: Set<string> = new Set([
3190
3196
  'persistence-network-overrides-enabled-true',
3191
3197
  'perspective',
3192
3198
  'perspective-origin',
3199
+ 'phone',
3193
3200
  'picture-in-picture',
3194
3201
  'pill',
3195
3202
  'ping',