chrome-devtools-frontend 1.0.1588580 → 1.0.1590494

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 (162) hide show
  1. package/docs/ui_engineering.md +2 -2
  2. package/front_end/core/common/AppProvider.ts +1 -2
  3. package/front_end/core/common/Color.ts +19 -20
  4. package/front_end/core/common/ParsedURL.ts +3 -3
  5. package/front_end/core/common/Progress.ts +5 -5
  6. package/front_end/core/common/Settings.ts +32 -3
  7. package/front_end/core/dom_extension/DOMExtension.ts +1 -1
  8. package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -1
  9. package/front_end/core/host/InspectorFrontendHostStub.ts +1 -11
  10. package/front_end/core/host/UserMetrics.ts +1 -1
  11. package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -2
  12. package/front_end/core/sdk/CSSMatchedStyles.ts +1 -1
  13. package/front_end/core/sdk/CSSProperty.ts +38 -0
  14. package/front_end/core/sdk/CSSRule.ts +4 -9
  15. package/front_end/core/sdk/ChildTargetManager.ts +1 -1
  16. package/front_end/core/sdk/CookieModel.ts +0 -1
  17. package/front_end/core/sdk/DOMModel.ts +40 -7
  18. package/front_end/core/sdk/EmulationModel.ts +3 -3
  19. package/front_end/core/sdk/NetworkRequest.ts +1 -1
  20. package/front_end/core/sdk/PageResourceLoader.ts +11 -6
  21. package/front_end/core/sdk/PerformanceMetricsModel.ts +2 -2
  22. package/front_end/core/sdk/ResourceTreeModel.ts +2 -6
  23. package/front_end/core/sdk/SourceMap.ts +2 -3
  24. package/front_end/core/sdk/SourceMapManager.ts +1 -2
  25. package/front_end/entrypoint_template.html +1 -1
  26. package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +6 -16
  27. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +4 -2
  28. package/front_end/entrypoints/main/main-meta.ts +0 -3
  29. package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +0 -2
  30. package/front_end/generated/Deprecation.ts +7 -0
  31. package/front_end/generated/InspectorBackendCommands.ts +10 -4
  32. package/front_end/generated/protocol-mapping.d.ts +9 -0
  33. package/front_end/generated/protocol-proxy-api.d.ts +7 -0
  34. package/front_end/generated/protocol.ts +99 -0
  35. package/front_end/models/ai_assistance/AiConversation.ts +20 -0
  36. package/front_end/models/ai_assistance/agents/AiAgent.ts +7 -1
  37. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
  38. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +28 -26
  39. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +3 -5
  40. package/front_end/models/emulation/DeviceModeModel.ts +0 -3
  41. package/front_end/models/emulation/EmulatedDevices.ts +0 -2
  42. package/front_end/models/extensions/ExtensionAPI.ts +2 -2
  43. package/front_end/models/har/Importer.ts +0 -1
  44. package/front_end/models/har/Log.ts +2 -11
  45. package/front_end/models/javascript_metadata/NativeFunctions.js +49 -5
  46. package/front_end/models/logs/NetworkLog.ts +0 -2
  47. package/front_end/models/network_time_calculator/NetworkTimeCalculator.ts +4 -1
  48. package/front_end/models/text_utils/TextUtils.ts +0 -9
  49. package/front_end/models/trace/LanternComputationData.ts +1 -6
  50. package/front_end/models/trace/helpers/Trace.ts +1 -4
  51. package/front_end/models/trace/lantern/types/Lantern.ts +6 -6
  52. package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -6
  53. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +140 -37
  54. package/front_end/panels/ai_assistance/README.md +71 -0
  55. package/front_end/panels/ai_assistance/aiAssistancePanel.css +5 -0
  56. package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
  57. package/front_end/panels/ai_assistance/components/ChatMessage.ts +110 -7
  58. package/front_end/panels/ai_assistance/components/ChatView.ts +10 -0
  59. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +208 -0
  60. package/front_end/panels/ai_assistance/components/chatMessage.css +2 -2
  61. package/front_end/panels/ai_assistance/components/walkthroughView.css +121 -0
  62. package/front_end/panels/application/BackgroundServiceView.ts +0 -2
  63. package/front_end/panels/application/DeviceBoundSessionsModel.ts +0 -1
  64. package/front_end/panels/application/DeviceBoundSessionsView.ts +64 -2
  65. package/front_end/panels/application/IndexedDBViews.ts +19 -23
  66. package/front_end/panels/application/OriginTrialTreeView.ts +3 -3
  67. package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
  68. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +3 -4
  69. package/front_end/panels/common/AiCodeGenerationTeaser.ts +76 -19
  70. package/front_end/panels/common/aiCodeGenerationTeaser.css +11 -0
  71. package/front_end/panels/console/ConsoleSidebar.ts +1 -1
  72. package/front_end/panels/console/ConsoleView.ts +12 -8
  73. package/front_end/panels/console/console-meta.ts +10 -6
  74. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +14 -14
  75. package/front_end/panels/elements/ComputedStyleWidget.ts +61 -42
  76. package/front_end/panels/elements/ElementsTreeElement.ts +65 -3
  77. package/front_end/panels/elements/ElementsTreeOutline.ts +2 -0
  78. package/front_end/panels/elements/ImagePreviewPopover.ts +0 -2
  79. package/front_end/panels/elements/MarkerDecorator.ts +0 -2
  80. package/front_end/panels/elements/StyleEditorWidget.ts +12 -12
  81. package/front_end/panels/elements/StylePropertiesSection.ts +96 -66
  82. package/front_end/panels/elements/StylePropertyTreeElement.ts +141 -142
  83. package/front_end/panels/elements/StylesContainer.ts +57 -0
  84. package/front_end/panels/elements/StylesSidebarPane.ts +2 -86
  85. package/front_end/panels/emulation/emulation-meta.ts +0 -2
  86. package/front_end/panels/event_listeners/EventListenersUtils.ts +0 -1
  87. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
  88. package/front_end/panels/lighthouse/LighthouseController.ts +0 -5
  89. package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -3
  90. package/front_end/panels/media/EventDisplayTable.ts +0 -2
  91. package/front_end/panels/media/PlayerMessagesView.ts +4 -6
  92. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +18 -6
  93. package/front_end/panels/network/EventSourceMessagesView.ts +0 -2
  94. package/front_end/panels/network/NetworkLogViewColumns.ts +0 -2
  95. package/front_end/panels/network/NetworkManageCustomHeadersView.ts +3 -1
  96. package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -2
  97. package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
  98. package/front_end/panels/network/RequestInitiatorView.ts +75 -69
  99. package/front_end/panels/network/RequestPayloadView.ts +6 -3
  100. package/front_end/panels/network/ResourceChunkView.ts +0 -2
  101. package/front_end/panels/network/components/ResponseHeaderSection.ts +3 -1
  102. package/front_end/panels/network/network-meta.ts +0 -2
  103. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -9
  104. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -2
  105. package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -12
  106. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +14 -1
  107. package/front_end/panels/profiler/ProfileView.ts +0 -35
  108. package/front_end/panels/profiler/profiler-meta.ts +0 -1
  109. package/front_end/panels/recorder/components/StepView.ts +0 -1
  110. package/front_end/panels/screencast/ScreencastView.ts +2 -2
  111. package/front_end/panels/search/SearchResultsPane.ts +3 -2
  112. package/front_end/panels/security/SecurityPanel.ts +0 -1
  113. package/front_end/panels/sensors/LocationsSettingsTab.ts +27 -9
  114. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
  115. package/front_end/panels/settings/SettingsScreen.ts +1 -2
  116. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +2 -2
  117. package/front_end/panels/settings/emulation/utils/UserAgentMetadata.ts +1 -1
  118. package/front_end/panels/settings/settings-meta.ts +0 -3
  119. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +6 -0
  120. package/front_end/panels/sources/DebuggerPlugin.ts +1 -5
  121. package/front_end/panels/sources/sources-meta.ts +0 -9
  122. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +1 -1
  123. package/front_end/panels/timeline/ThirdPartyTreeView.ts +5 -2
  124. package/front_end/panels/timeline/TimelinePanel.ts +0 -7
  125. package/front_end/panels/timeline/TimelineTreeView.ts +8 -10
  126. package/front_end/panels/timeline/TimelineUIUtils.ts +11 -3
  127. package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
  128. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +0 -1
  129. package/front_end/panels/timeline/timeline-meta.ts +4 -4
  130. package/front_end/panels/timeline/utils/Treemap.ts +0 -4
  131. package/front_end/panels/whats_new/ReleaseNoteText.ts +10 -16
  132. package/front_end/panels/whats_new/resources/WNDT.md +6 -6
  133. package/front_end/panels/whats_new/whats_new-meta.ts +0 -2
  134. package/front_end/third_party/chromium/README.chromium +1 -1
  135. package/front_end/ui/components/highlighting/HighlightManager.ts +1 -2
  136. package/front_end/ui/components/highlighting/MarkupHighlight.ts +1 -12
  137. package/front_end/ui/components/icon_button/IconButton.ts +2 -2
  138. package/front_end/ui/components/issue_counter/IssueCounter.ts +6 -6
  139. package/front_end/ui/components/markdown_view/MarkdownView.ts +5 -6
  140. package/front_end/ui/components/markdown_view/markdownView.css +6 -0
  141. package/front_end/ui/components/markdown_view/markdown_view.ts +0 -2
  142. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +4 -0
  143. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +11 -6
  144. package/front_end/ui/legacy/ContextMenu.ts +1 -17
  145. package/front_end/ui/legacy/EmptyWidget.ts +4 -4
  146. package/front_end/ui/legacy/Fragment.ts +2 -4
  147. package/front_end/ui/legacy/SoftContextMenu.ts +1 -15
  148. package/front_end/ui/legacy/TabbedPane.ts +2 -2
  149. package/front_end/ui/legacy/Treeoutline.ts +70 -15
  150. package/front_end/ui/legacy/UIUtils.ts +1 -4
  151. package/front_end/ui/legacy/Widget.ts +11 -1
  152. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +6 -3
  153. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +0 -2
  154. package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +0 -1
  155. package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +0 -2
  156. package/front_end/ui/legacy/components/source_frame/XMLView.ts +3 -2
  157. package/front_end/ui/legacy/components/utils/ImagePreview.ts +3 -3
  158. package/front_end/ui/legacy/inspectorCommon.css +2 -0
  159. package/front_end/ui/visual_logging/KnownContextValues.ts +12 -1
  160. package/package.json +1 -1
  161. package/front_end/ui/components/markdown_view/MarkdownLink.ts +0 -53
  162. package/front_end/ui/components/markdown_view/markdownLink.css +0 -11
@@ -278,8 +278,13 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
278
278
  throw new Error('Invalid initiator');
279
279
  }
280
280
  const key = PageResourceLoader.makeKey(url, initiator);
281
- const pageResource:
282
- PageResource = {success: null, size: null, duration: null, errorMessage: undefined, url, initiator};
281
+ const pageResource: PageResource = {
282
+ success: null,
283
+ size: null,
284
+ duration: null,
285
+ url,
286
+ initiator,
287
+ };
283
288
  this.#pageResources.set(key, pageResource);
284
289
  this.dispatchEventToListeners(Events.UPDATE);
285
290
  const startTime = performance.now();
@@ -340,8 +345,10 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
340
345
  return {
341
346
  success: false,
342
347
  content: '',
343
- errorDescription:
344
- {statusCode: 0, netError: undefined, netErrorName: undefined, message: e.message, urlValid: undefined}
348
+ errorDescription: {
349
+ statusCode: 0,
350
+ message: e.message,
351
+ }
345
352
  };
346
353
  }
347
354
  }
@@ -399,7 +406,6 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
399
406
  netError: number|undefined,
400
407
  netErrorName: string|undefined,
401
408
  message: string,
402
- urlValid: undefined,
403
409
  },
404
410
  }> {
405
411
  const networkManager = (target.model(NetworkManager) as NetworkManager);
@@ -420,7 +426,6 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
420
426
  message: Host.ResourceLoader.netErrorToMessage(
421
427
  resource.netError, resource.httpStatusCode, resource.netErrorName) ||
422
428
  '',
423
- urlValid: undefined,
424
429
  },
425
430
  };
426
431
  } finally {
@@ -19,8 +19,8 @@ export class PerformanceMetricsModel extends SDKModel<void> {
19
19
  ['RecalcStyleCount', MetricMode.CUMULATIVE_COUNT],
20
20
  ]);
21
21
  readonly #metricData = new Map<string, {
22
- lastValue: (number | undefined),
23
- lastTimestamp: (number|undefined),
22
+ lastValue?: number,
23
+ lastTimestamp?: number,
24
24
  }>();
25
25
 
26
26
  constructor(target: Target) {
@@ -646,13 +646,11 @@ export class ResourceTreeFrame {
646
646
  #childFrames = new Set<ResourceTreeFrame>();
647
647
  resourcesMap = new Map<Platform.DevToolsPath.UrlString, Resource>();
648
648
  backForwardCacheDetails: {
649
- restoredFromCache: boolean|undefined,
650
649
  explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[],
651
- explanationsTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree|undefined,
650
+ restoredFromCache?: boolean,
651
+ explanationsTree?: Protocol.Page.BackForwardCacheNotRestoredExplanationTree,
652
652
  } = {
653
- restoredFromCache: undefined,
654
653
  explanations: [],
655
- explanationsTree: undefined,
656
654
  };
657
655
 
658
656
  constructor(
@@ -725,9 +723,7 @@ export class ResourceTreeFrame {
725
723
  this.#crossOriginIsolatedContextType = framePayload.crossOriginIsolatedContextType;
726
724
  this.#gatedAPIFeatures = framePayload.gatedAPIFeatures;
727
725
  this.backForwardCacheDetails = {
728
- restoredFromCache: undefined,
729
726
  explanations: [],
730
- explanationsTree: undefined,
731
727
  };
732
728
 
733
729
  const mainResource = this.resourcesMap.get(this.#url);
@@ -89,10 +89,10 @@ export class SourceMapEntry {
89
89
  readonly lineNumber: number;
90
90
  readonly columnNumber: number;
91
91
  readonly sourceIndex?: number;
92
- readonly sourceURL: Platform.DevToolsPath.UrlString|undefined;
92
+ readonly sourceURL?: Platform.DevToolsPath.UrlString;
93
93
  readonly sourceLineNumber: number;
94
94
  readonly sourceColumnNumber: number;
95
- readonly name: string|undefined;
95
+ readonly name?: string;
96
96
 
97
97
  constructor(
98
98
  lineNumber: number, columnNumber: number, sourceIndex?: number, sourceURL?: Platform.DevToolsPath.UrlString,
@@ -248,7 +248,6 @@ export class SourceMap {
248
248
  sourceURL: this.sourceURLs()[callsite.sourceIndex],
249
249
  sourceLineNumber: callsite.line,
250
250
  sourceColumnNumber: callsite.column,
251
- name: undefined,
252
251
  };
253
252
  }
254
253
  const mappings = this.mappings();
@@ -93,7 +93,6 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
93
93
  let clientData: ClientData|null = {
94
94
  relativeSourceURL,
95
95
  relativeSourceMapURL,
96
- sourceMap: undefined,
97
96
  sourceMapPromise: Promise.resolve(undefined),
98
97
  };
99
98
  if (this.#isEnabled) {
@@ -225,7 +224,7 @@ interface ClientData {
225
224
  // Stores the raw sourceMappingURL as provided by V8. These are not guaranteed to
226
225
  // be valid URLs and will be checked and resolved once `attachSourceMap` is called.
227
226
  relativeSourceMapURL: string;
228
- sourceMap: SourceMap|undefined;
227
+ sourceMap?: SourceMap;
229
228
  sourceMapPromise: Promise<SourceMap|undefined>;
230
229
  }
231
230
 
@@ -18,7 +18,7 @@
18
18
  http-equiv="Content-Security-Policy"
19
19
  content="default-src 'self' devtools: data:; style-src 'self' 'unsafe-inline' devtools:; object-src 'none'; script-src
20
20
  'self' https://chrome-devtools-frontend.appspot.com; img-src 'self' data:; frame-src * data:; connect-src data:
21
- https://chromeuxreport.googleapis.com 'self' devtools:;">
21
+ https://chromeuxreport.googleapis.com 'self' devtools: ws://127.0.0.1:*;">
22
22
  <meta name="referrer" content="no-referrer">
23
23
  <script type="module" src="./entrypoints/%ENTRYPOINT_NAME%/%ENTRYPOINT_NAME%.js"></script>
24
24
  <link href="./application_tokens.css" rel="stylesheet">
@@ -20,32 +20,22 @@ export class CSSFormatter {
20
20
  #lineEndings!: number[];
21
21
  #lastLine: number;
22
22
  #state: {
23
- eatWhitespace: (boolean|undefined),
24
- seenProperty: (boolean|undefined),
25
- inPropertyValue: (boolean|undefined),
26
- afterClosingBrace: (boolean|undefined),
23
+ eatWhitespace?: boolean,
24
+ seenProperty?: boolean,
25
+ inPropertyValue?: boolean,
26
+ afterClosingBrace?: boolean,
27
27
  };
28
28
  constructor(builder: FormattedContentBuilder) {
29
29
  this.#builder = builder;
30
30
  this.#lastLine = -1;
31
- this.#state = {
32
- eatWhitespace: undefined,
33
- seenProperty: undefined,
34
- inPropertyValue: undefined,
35
- afterClosingBrace: undefined,
36
- };
31
+ this.#state = {};
37
32
  }
38
33
 
39
34
  format(text: string, lineEndings: number[], fromOffset: number, toOffset: number): void {
40
35
  this.#lineEndings = lineEndings;
41
36
  this.#fromOffset = fromOffset;
42
37
  this.#toOffset = toOffset;
43
- this.#state = {
44
- eatWhitespace: undefined,
45
- seenProperty: undefined,
46
- inPropertyValue: undefined,
47
- afterClosingBrace: undefined,
48
- };
38
+ this.#state = {};
49
39
  this.#lastLine = -1;
50
40
  const tokenize = createTokenizer('text/css');
51
41
  const oldEnforce = this.#builder.setEnforceSpaceBetweenWords(false);
@@ -36,8 +36,10 @@ export class HeapSnapshotWorkerDispatcher {
36
36
  async dispatchMessage({data, ports}:
37
37
  {data: HeapSnapshotModel.HeapSnapshotModel.WorkerCommand, ports: readonly MessagePort[]}):
38
38
  Promise<void> {
39
- const response: DispatcherResponse =
40
- {callId: data.callId, result: null, error: undefined, errorCallStack: undefined, errorMethodName: undefined};
39
+ const response: DispatcherResponse = {
40
+ callId: data.callId,
41
+ result: null,
42
+ };
41
43
  try {
42
44
  switch (data.disposition) {
43
45
  case 'createLoader':
@@ -867,7 +867,6 @@ UI.ContextMenu.registerProvider({
867
867
  async loadProvider() {
868
868
  return new Components.Linkifier.ContentProviderContextMenuProvider();
869
869
  },
870
- experiment: undefined,
871
870
  });
872
871
 
873
872
  UI.ContextMenu.registerProvider({
@@ -879,7 +878,6 @@ UI.ContextMenu.registerProvider({
879
878
  async loadProvider() {
880
879
  return new UI.LinkContextMenuProvider.LinkContextMenuProvider();
881
880
  },
882
- experiment: undefined,
883
881
  });
884
882
 
885
883
  UI.ContextMenu.registerProvider({
@@ -891,7 +889,6 @@ UI.ContextMenu.registerProvider({
891
889
  async loadProvider() {
892
890
  return new Components.Linkifier.LinkContextMenuProvider();
893
891
  },
894
- experiment: undefined,
895
892
  });
896
893
 
897
894
  UI.Toolbar.registerToolbarItem({
@@ -187,13 +187,11 @@ export class NodeConnectionsView extends UI.Widget.VBox implements UI.ListWidget
187
187
  if (!match) {
188
188
  return {
189
189
  valid: false,
190
- errorMessage: undefined,
191
190
  };
192
191
  }
193
192
  const port = parseInt(match[2], 10);
194
193
  return {
195
194
  valid: port <= 65535,
196
- errorMessage: undefined,
197
195
  };
198
196
  }
199
197
  }
@@ -106,6 +106,10 @@ export const UIStrings = {
106
106
  * @description Warning for using deprecated 'measureInputUsage' method.
107
107
  */
108
108
  LanguageModel_MeasureInputUsage: "LanguageModel.measureInputUsage() is deprecated. Please use LanguageModel.measureContextUsage() instead. This alias is only available in extensions.",
109
+ /**
110
+ * @description Warning for using deprecated 'onquotaoverflow' event handler.
111
+ */
112
+ LanguageModel_OnQuotaOverflow: "LanguageModel.onquotaoverflow is deprecated. Please use LanguageModel.oncontextoverflow instead. The LanguageModel.onquotaoverflow alias is only available in extensions.",
109
113
  /**
110
114
  * @description Warning message for web developers when they call the deprecated LanguageModel.params() method.
111
115
  */
@@ -334,6 +338,9 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
334
338
  "LanguageModel_MeasureInputUsage": {
335
339
  "chromeStatusFeature": 5134603979063296
336
340
  },
341
+ "LanguageModel_OnQuotaOverflow": {
342
+ "chromeStatusFeature": 5134603979063296
343
+ },
337
344
  "LocalCSSFileExtensionRejected": {
338
345
  "milestone": 64
339
346
  },
@@ -93,7 +93,7 @@ inspectorBackend.registerEnum("Audits.StyleSheetLoadingIssueReason", {LateImport
93
93
  inspectorBackend.registerEnum("Audits.PropertyRuleIssueReason", {InvalidSyntax: "InvalidSyntax", InvalidInitialValue: "InvalidInitialValue", InvalidInherits: "InvalidInherits", InvalidName: "InvalidName"});
94
94
  inspectorBackend.registerEnum("Audits.UserReidentificationIssueType", {BlockedFrameNavigation: "BlockedFrameNavigation", BlockedSubresource: "BlockedSubresource", NoisedCanvasReadback: "NoisedCanvasReadback"});
95
95
  inspectorBackend.registerEnum("Audits.PermissionElementIssueType", {InvalidType: "InvalidType", FencedFrameDisallowed: "FencedFrameDisallowed", CspFrameAncestorsMissing: "CspFrameAncestorsMissing", PermissionsPolicyBlocked: "PermissionsPolicyBlocked", PaddingRightUnsupported: "PaddingRightUnsupported", PaddingBottomUnsupported: "PaddingBottomUnsupported", InsetBoxShadowUnsupported: "InsetBoxShadowUnsupported", RequestInProgress: "RequestInProgress", UntrustedEvent: "UntrustedEvent", RegistrationFailed: "RegistrationFailed", TypeNotSupported: "TypeNotSupported", InvalidTypeActivation: "InvalidTypeActivation", SecurityChecksFailed: "SecurityChecksFailed", ActivationDisabled: "ActivationDisabled", GeolocationDeprecated: "GeolocationDeprecated", InvalidDisplayStyle: "InvalidDisplayStyle", NonOpaqueColor: "NonOpaqueColor", LowContrast: "LowContrast", FontSizeTooSmall: "FontSizeTooSmall", FontSizeTooLarge: "FontSizeTooLarge", InvalidSizeValue: "InvalidSizeValue"});
96
- inspectorBackend.registerEnum("Audits.InspectorIssueCode", {CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", LowTextContrastIssue: "LowTextContrastIssue", CorsIssue: "CorsIssue", AttributionReportingIssue: "AttributionReportingIssue", QuirksModeIssue: "QuirksModeIssue", PartitioningBlobURLIssue: "PartitioningBlobURLIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue", BounceTrackingIssue: "BounceTrackingIssue", CookieDeprecationMetadataIssue: "CookieDeprecationMetadataIssue", StylesheetLoadingIssue: "StylesheetLoadingIssue", FederatedAuthUserInfoRequestIssue: "FederatedAuthUserInfoRequestIssue", PropertyRuleIssue: "PropertyRuleIssue", SharedDictionaryIssue: "SharedDictionaryIssue", ElementAccessibilityIssue: "ElementAccessibilityIssue", SRIMessageSignatureIssue: "SRIMessageSignatureIssue", UnencodedDigestIssue: "UnencodedDigestIssue", ConnectionAllowlistIssue: "ConnectionAllowlistIssue", UserReidentificationIssue: "UserReidentificationIssue", PermissionElementIssue: "PermissionElementIssue", PerformanceIssue: "PerformanceIssue"});
96
+ inspectorBackend.registerEnum("Audits.InspectorIssueCode", {CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", LowTextContrastIssue: "LowTextContrastIssue", CorsIssue: "CorsIssue", AttributionReportingIssue: "AttributionReportingIssue", QuirksModeIssue: "QuirksModeIssue", PartitioningBlobURLIssue: "PartitioningBlobURLIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue", BounceTrackingIssue: "BounceTrackingIssue", CookieDeprecationMetadataIssue: "CookieDeprecationMetadataIssue", StylesheetLoadingIssue: "StylesheetLoadingIssue", FederatedAuthUserInfoRequestIssue: "FederatedAuthUserInfoRequestIssue", PropertyRuleIssue: "PropertyRuleIssue", SharedDictionaryIssue: "SharedDictionaryIssue", ElementAccessibilityIssue: "ElementAccessibilityIssue", SRIMessageSignatureIssue: "SRIMessageSignatureIssue", UnencodedDigestIssue: "UnencodedDigestIssue", ConnectionAllowlistIssue: "ConnectionAllowlistIssue", UserReidentificationIssue: "UserReidentificationIssue", PermissionElementIssue: "PermissionElementIssue", PerformanceIssue: "PerformanceIssue", SelectivePermissionsInterventionIssue: "SelectivePermissionsInterventionIssue"});
97
97
  inspectorBackend.registerEvent("Audits.issueAdded", ["issue"]);
98
98
  inspectorBackend.registerEnum("Audits.GetEncodedResponseRequestEncoding", {Webp: "webp", Jpeg: "jpeg", Png: "png"});
99
99
  inspectorBackend.registerCommand("Audits.getEncodedResponse", [{"name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network request to get content for.", "typeRef": "Network.RequestId"}, {"name": "encoding", "type": "string", "optional": false, "description": "The encoding to use.", "typeRef": "Audits.GetEncodedResponseRequestEncoding"}, {"name": "quality", "type": "number", "optional": true, "description": "The quality of the encoding (0-1). (defaults to 1)", "typeRef": null}, {"name": "sizeOnly", "type": "boolean", "optional": true, "description": "Whether to only return the size information (defaults to false).", "typeRef": null}], ["body", "originalSize", "encodedSize"], "Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.");
@@ -136,7 +136,10 @@ inspectorBackend.registerType("Audits.StylesheetLoadingIssueDetails", [{"name":
136
136
  inspectorBackend.registerType("Audits.PropertyRuleIssueDetails", [{"name": "sourceCodeLocation", "type": "object", "optional": false, "description": "Source code position of the property rule.", "typeRef": "Audits.SourceCodeLocation"}, {"name": "propertyRuleIssueReason", "type": "string", "optional": false, "description": "Reason why the property rule was discarded.", "typeRef": "Audits.PropertyRuleIssueReason"}, {"name": "propertyValue", "type": "string", "optional": true, "description": "The value of the property rule property that failed to parse", "typeRef": null}]);
137
137
  inspectorBackend.registerType("Audits.UserReidentificationIssueDetails", [{"name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.UserReidentificationIssueType"}, {"name": "request", "type": "object", "optional": true, "description": "Applies to BlockedFrameNavigation and BlockedSubresource issue types.", "typeRef": "Audits.AffectedRequest"}, {"name": "sourceCodeLocation", "type": "object", "optional": true, "description": "Applies to NoisedCanvasReadback issue type.", "typeRef": "Audits.SourceCodeLocation"}]);
138
138
  inspectorBackend.registerType("Audits.PermissionElementIssueDetails", [{"name": "issueType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.PermissionElementIssueType"}, {"name": "type", "type": "string", "optional": true, "description": "The value of the type attribute.", "typeRef": null}, {"name": "nodeId", "type": "number", "optional": true, "description": "The node ID of the <permission> element.", "typeRef": "DOM.BackendNodeId"}, {"name": "isWarning", "type": "boolean", "optional": true, "description": "True if the issue is a warning, false if it is an error.", "typeRef": null}, {"name": "permissionName", "type": "string", "optional": true, "description": "Fields for message construction: Used for messages that reference a specific permission name", "typeRef": null}, {"name": "occluderNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occlusion", "typeRef": null}, {"name": "occluderParentNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occluder's parent", "typeRef": null}, {"name": "disableReason", "type": "string", "optional": true, "description": "Used for messages about activation disabled reason", "typeRef": null}]);
139
- inspectorBackend.registerType("Audits.InspectorIssueDetails", [{"name": "cookieIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieIssueDetails"}, {"name": "mixedContentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.MixedContentIssueDetails"}, {"name": "blockedByResponseIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BlockedByResponseIssueDetails"}, {"name": "heavyAdIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.HeavyAdIssueDetails"}, {"name": "contentSecurityPolicyIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ContentSecurityPolicyIssueDetails"}, {"name": "sharedArrayBufferIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedArrayBufferIssueDetails"}, {"name": "lowTextContrastIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.LowTextContrastIssueDetails"}, {"name": "corsIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CorsIssueDetails"}, {"name": "attributionReportingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AttributionReportingIssueDetails"}, {"name": "quirksModeIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.QuirksModeIssueDetails"}, {"name": "partitioningBlobURLIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PartitioningBlobURLIssueDetails"}, {"name": "navigatorUserAgentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.NavigatorUserAgentIssueDetails"}, {"name": "genericIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.GenericIssueDetails"}, {"name": "deprecationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.DeprecationIssueDetails"}, {"name": "clientHintIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ClientHintIssueDetails"}, {"name": "federatedAuthRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthRequestIssueDetails"}, {"name": "bounceTrackingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BounceTrackingIssueDetails"}, {"name": "cookieDeprecationMetadataIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieDeprecationMetadataIssueDetails"}, {"name": "stylesheetLoadingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.StylesheetLoadingIssueDetails"}, {"name": "propertyRuleIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PropertyRuleIssueDetails"}, {"name": "federatedAuthUserInfoRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthUserInfoRequestIssueDetails"}, {"name": "sharedDictionaryIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedDictionaryIssueDetails"}, {"name": "elementAccessibilityIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ElementAccessibilityIssueDetails"}, {"name": "sriMessageSignatureIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SRIMessageSignatureIssueDetails"}, {"name": "unencodedDigestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UnencodedDigestIssueDetails"}, {"name": "connectionAllowlistIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ConnectionAllowlistIssueDetails"}, {"name": "userReidentificationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UserReidentificationIssueDetails"}, {"name": "permissionElementIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PermissionElementIssueDetails"}, {"name": "performanceIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PerformanceIssueDetails"}]);
139
+ inspectorBackend.registerType("Audits.AdScriptIdentifier", [{"name": "scriptId", "type": "string", "optional": false, "description": "The script's v8 identifier.", "typeRef": "Runtime.ScriptId"}, {"name": "debuggerId", "type": "string", "optional": false, "description": "v8's debugging id for the v8::Context.", "typeRef": "Runtime.UniqueDebuggerId"}, {"name": "name", "type": "string", "optional": false, "description": "The script's url (or generated name based on id if inline script).", "typeRef": null}]);
140
+ inspectorBackend.registerType("Audits.AdAncestry", [{"name": "adAncestryChain", "type": "array", "optional": false, "description": "The ad-script in the stack when the offending script was loaded. This is recursive down to the root script that was tagged due to the filterlist rule.", "typeRef": "Audits.AdScriptIdentifier"}, {"name": "rootScriptFilterlistRule", "type": "string", "optional": true, "description": "The filterlist rule that caused the root (last) script in `adAncestry` to be ad-tagged.", "typeRef": null}]);
141
+ inspectorBackend.registerType("Audits.SelectivePermissionsInterventionIssueDetails", [{"name": "apiName", "type": "string", "optional": false, "description": "Which API was intervened on.", "typeRef": null}, {"name": "adAncestry", "type": "object", "optional": false, "description": "Why the ad script using the API is considered an ad.", "typeRef": "Audits.AdAncestry"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the intervention.", "typeRef": "Runtime.StackTrace"}]);
142
+ inspectorBackend.registerType("Audits.InspectorIssueDetails", [{"name": "cookieIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieIssueDetails"}, {"name": "mixedContentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.MixedContentIssueDetails"}, {"name": "blockedByResponseIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BlockedByResponseIssueDetails"}, {"name": "heavyAdIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.HeavyAdIssueDetails"}, {"name": "contentSecurityPolicyIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ContentSecurityPolicyIssueDetails"}, {"name": "sharedArrayBufferIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedArrayBufferIssueDetails"}, {"name": "lowTextContrastIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.LowTextContrastIssueDetails"}, {"name": "corsIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CorsIssueDetails"}, {"name": "attributionReportingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AttributionReportingIssueDetails"}, {"name": "quirksModeIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.QuirksModeIssueDetails"}, {"name": "partitioningBlobURLIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PartitioningBlobURLIssueDetails"}, {"name": "navigatorUserAgentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.NavigatorUserAgentIssueDetails"}, {"name": "genericIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.GenericIssueDetails"}, {"name": "deprecationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.DeprecationIssueDetails"}, {"name": "clientHintIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ClientHintIssueDetails"}, {"name": "federatedAuthRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthRequestIssueDetails"}, {"name": "bounceTrackingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BounceTrackingIssueDetails"}, {"name": "cookieDeprecationMetadataIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieDeprecationMetadataIssueDetails"}, {"name": "stylesheetLoadingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.StylesheetLoadingIssueDetails"}, {"name": "propertyRuleIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PropertyRuleIssueDetails"}, {"name": "federatedAuthUserInfoRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthUserInfoRequestIssueDetails"}, {"name": "sharedDictionaryIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedDictionaryIssueDetails"}, {"name": "elementAccessibilityIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ElementAccessibilityIssueDetails"}, {"name": "sriMessageSignatureIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SRIMessageSignatureIssueDetails"}, {"name": "unencodedDigestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UnencodedDigestIssueDetails"}, {"name": "connectionAllowlistIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ConnectionAllowlistIssueDetails"}, {"name": "userReidentificationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UserReidentificationIssueDetails"}, {"name": "permissionElementIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PermissionElementIssueDetails"}, {"name": "performanceIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PerformanceIssueDetails"}, {"name": "selectivePermissionsInterventionIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SelectivePermissionsInterventionIssueDetails"}]);
140
143
  inspectorBackend.registerType("Audits.InspectorIssue", [{"name": "code", "type": "string", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueCode"}, {"name": "details", "type": "object", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueDetails"}, {"name": "issueId", "type": "string", "optional": true, "description": "A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.", "typeRef": "Audits.IssueId"}]);
141
144
 
142
145
  // Autofill.
@@ -503,7 +506,7 @@ inspectorBackend.registerEnum("Emulation.VirtualTimePolicy", {Advance: "advance"
503
506
  inspectorBackend.registerEnum("Emulation.SensorType", {AbsoluteOrientation: "absolute-orientation", Accelerometer: "accelerometer", AmbientLight: "ambient-light", Gravity: "gravity", Gyroscope: "gyroscope", LinearAcceleration: "linear-acceleration", Magnetometer: "magnetometer", RelativeOrientation: "relative-orientation"});
504
507
  inspectorBackend.registerEnum("Emulation.PressureSource", {Cpu: "cpu"});
505
508
  inspectorBackend.registerEnum("Emulation.PressureState", {Nominal: "nominal", Fair: "fair", Serious: "serious", Critical: "critical"});
506
- inspectorBackend.registerEnum("Emulation.DisabledImageType", {Avif: "avif", Webp: "webp"});
509
+ inspectorBackend.registerEnum("Emulation.DisabledImageType", {Avif: "avif", Jxl: "jxl", Webp: "webp"});
507
510
  inspectorBackend.registerEvent("Emulation.virtualTimeBudgetExpired", []);
508
511
  inspectorBackend.registerCommand("Emulation.canEmulate", [], ["result"], "Tells whether emulation is supported.");
509
512
  inspectorBackend.registerCommand("Emulation.clearDeviceMetricsOverride", [], [], "Clears the overridden device metrics.");
@@ -514,7 +517,8 @@ inspectorBackend.registerCommand("Emulation.setAutoDarkModeOverride", [{"name":
514
517
  inspectorBackend.registerCommand("Emulation.setCPUThrottlingRate", [{"name": "rate", "type": "number", "optional": false, "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).", "typeRef": null}], [], "Enables CPU throttling to emulate slow CPUs.");
515
518
  inspectorBackend.registerCommand("Emulation.setDefaultBackgroundColorOverride", [{"name": "color", "type": "object", "optional": true, "description": "RGBA of the default background color. If not specified, any existing override will be cleared.", "typeRef": "DOM.RGBA"}], [], "Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.");
516
519
  inspectorBackend.registerCommand("Emulation.setSafeAreaInsetsOverride", [{"name": "insets", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.SafeAreaInsets"}], [], "Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the respective variables to be undefined, even if previously overridden.");
517
- inspectorBackend.registerCommand("Emulation.setDeviceMetricsOverride", [{"name": "width", "type": "number", "optional": false, "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "height", "type": "number", "optional": false, "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "deviceScaleFactor", "type": "number", "optional": false, "description": "Overriding device scale factor value. 0 disables the override.", "typeRef": null}, {"name": "mobile", "type": "boolean", "optional": false, "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.", "typeRef": null}, {"name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image.", "typeRef": null}, {"name": "screenWidth", "type": "number", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "screenHeight", "type": "number", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionX", "type": "number", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionY", "type": "number", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "dontSetVisibleSize", "type": "boolean", "optional": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", "typeRef": null}, {"name": "screenOrientation", "type": "object", "optional": true, "description": "Screen orientation override.", "typeRef": "Emulation.ScreenOrientation"}, {"name": "viewport", "type": "object", "optional": true, "description": "If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.", "typeRef": "Page.Viewport"}, {"name": "displayFeature", "type": "object", "optional": true, "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.", "typeRef": "Emulation.DisplayFeature"}, {"name": "devicePosture", "type": "object", "optional": true, "description": "If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.", "typeRef": "Emulation.DevicePosture"}], [], "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).");
520
+ inspectorBackend.registerEnum("Emulation.SetDeviceMetricsOverrideRequestScrollbarType", {Overlay: "overlay", Default: "default"});
521
+ inspectorBackend.registerCommand("Emulation.setDeviceMetricsOverride", [{"name": "width", "type": "number", "optional": false, "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "height", "type": "number", "optional": false, "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "deviceScaleFactor", "type": "number", "optional": false, "description": "Overriding device scale factor value. 0 disables the override.", "typeRef": null}, {"name": "mobile", "type": "boolean", "optional": false, "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.", "typeRef": null}, {"name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image.", "typeRef": null}, {"name": "screenWidth", "type": "number", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "screenHeight", "type": "number", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionX", "type": "number", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionY", "type": "number", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "dontSetVisibleSize", "type": "boolean", "optional": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", "typeRef": null}, {"name": "screenOrientation", "type": "object", "optional": true, "description": "Screen orientation override.", "typeRef": "Emulation.ScreenOrientation"}, {"name": "viewport", "type": "object", "optional": true, "description": "If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.", "typeRef": "Page.Viewport"}, {"name": "displayFeature", "type": "object", "optional": true, "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.", "typeRef": "Emulation.DisplayFeature"}, {"name": "devicePosture", "type": "object", "optional": true, "description": "If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.", "typeRef": "Emulation.DevicePosture"}, {"name": "scrollbarType", "type": "string", "optional": true, "description": "Scrollbar type. Default: `default`.", "typeRef": "Emulation.SetDeviceMetricsOverrideRequestScrollbarType"}], [], "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).");
518
522
  inspectorBackend.registerCommand("Emulation.setDevicePostureOverride", [{"name": "posture", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.DevicePosture"}], [], "Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride().");
519
523
  inspectorBackend.registerCommand("Emulation.clearDevicePostureOverride", [], [], "Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set.");
520
524
  inspectorBackend.registerCommand("Emulation.setDisplayFeaturesOverride", [{"name": "features", "type": "array", "optional": false, "description": "", "typeRef": "Emulation.DisplayFeature"}], [], "Start using the given display features to pupulate the Viewport Segments API. This override can also be set in setDeviceMetricsOverride().");
@@ -578,11 +582,13 @@ inspectorBackend.registerCommand("EventBreakpoints.disable", [], [], "Removes al
578
582
  inspectorBackend.registerEnum("Extensions.StorageArea", {Session: "session", Local: "local", Sync: "sync", Managed: "managed"});
579
583
  inspectorBackend.registerCommand("Extensions.triggerAction", [{"name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null}, {"name": "targetId", "type": "string", "optional": false, "description": "A tab target ID to trigger the default extension action on.", "typeRef": null}], [], "Runs an extension default action. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
580
584
  inspectorBackend.registerCommand("Extensions.loadUnpacked", [{"name": "path", "type": "string", "optional": false, "description": "Absolute file path.", "typeRef": null}, {"name": "enableInIncognito", "type": "boolean", "optional": true, "description": "Enable the extension in incognito", "typeRef": null}], ["id"], "Installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
585
+ inspectorBackend.registerCommand("Extensions.getExtensions", [], ["extensions"], "Gets a list of all unpacked extensions. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
581
586
  inspectorBackend.registerCommand("Extensions.uninstall", [{"name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null}], [], "Uninstalls an unpacked extension (others not supported) from the profile. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging.");
582
587
  inspectorBackend.registerCommand("Extensions.getStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to retrieve data from.", "typeRef": "Extensions.StorageArea"}, {"name": "keys", "type": "array", "optional": true, "description": "Keys to retrieve.", "typeRef": "string"}], ["data"], "Gets data from extension storage in the given `storageArea`. If `keys` is specified, these are used to filter the result.");
583
588
  inspectorBackend.registerCommand("Extensions.removeStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to remove data from.", "typeRef": "Extensions.StorageArea"}, {"name": "keys", "type": "array", "optional": false, "description": "Keys to remove.", "typeRef": "string"}], [], "Removes `keys` from extension storage in the given `storageArea`.");
584
589
  inspectorBackend.registerCommand("Extensions.clearStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to remove data from.", "typeRef": "Extensions.StorageArea"}], [], "Clears extension storage in the given `storageArea`.");
585
590
  inspectorBackend.registerCommand("Extensions.setStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to set data in.", "typeRef": "Extensions.StorageArea"}, {"name": "values", "type": "object", "optional": false, "description": "Values to set.", "typeRef": null}], [], "Sets `values` in extension storage in the given `storageArea`. The provided `values` will be merged with existing values in the storage area.");
591
+ inspectorBackend.registerType("Extensions.ExtensionInfo", [{"name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null}, {"name": "name", "type": "string", "optional": false, "description": "Extension name.", "typeRef": null}, {"name": "version", "type": "string", "optional": false, "description": "Extension version.", "typeRef": null}, {"name": "path", "type": "string", "optional": false, "description": "The path from which the extension was loaded.", "typeRef": null}, {"name": "enabled", "type": "boolean", "optional": false, "description": "Extension enabled status.", "typeRef": null}]);
586
592
 
587
593
  // FedCm.
588
594
  inspectorBackend.registerEnum("FedCm.LoginState", {SignIn: "SignIn", SignUp: "SignUp"});
@@ -2823,6 +2823,15 @@ export namespace ProtocolMapping {
2823
2823
  paramsType: [Protocol.Extensions.LoadUnpackedRequest];
2824
2824
  returnType: Protocol.Extensions.LoadUnpackedResponse;
2825
2825
  };
2826
+ /**
2827
+ * Gets a list of all unpacked extensions.
2828
+ * Available if the client is connected using the --remote-debugging-pipe flag
2829
+ * and the --enable-unsafe-extension-debugging flag is set.
2830
+ */
2831
+ 'Extensions.getExtensions': {
2832
+ paramsType: [];
2833
+ returnType: Protocol.Extensions.GetExtensionsResponse;
2834
+ };
2826
2835
  /**
2827
2836
  * Uninstalls an unpacked extension (others not supported) from the profile.
2828
2837
  * Available if the client is connected using the --remote-debugging-pipe flag
@@ -1898,6 +1898,13 @@ declare namespace ProtocolProxyApi {
1898
1898
  */
1899
1899
  invoke_loadUnpacked(params: Protocol.Extensions.LoadUnpackedRequest): Promise<Protocol.Extensions.LoadUnpackedResponse>;
1900
1900
 
1901
+ /**
1902
+ * Gets a list of all unpacked extensions.
1903
+ * Available if the client is connected using the --remote-debugging-pipe flag
1904
+ * and the --enable-unsafe-extension-debugging flag is set.
1905
+ */
1906
+ invoke_getExtensions(): Promise<Protocol.Extensions.GetExtensionsResponse>;
1907
+
1901
1908
  /**
1902
1909
  * Uninstalls an unpacked extension (others not supported) from the profile.
1903
1910
  * Available if the client is connected using the --remote-debugging-pipe flag
@@ -1542,6 +1542,63 @@ export namespace Audits {
1542
1542
  disableReason?: string;
1543
1543
  }
1544
1544
 
1545
+ /**
1546
+ * Metadata about the ad script that was on the stack that caused the current
1547
+ * script in the `AdAncestry` to be considered ad related.
1548
+ */
1549
+ export interface AdScriptIdentifier {
1550
+ /**
1551
+ * The script's v8 identifier.
1552
+ */
1553
+ scriptId: Runtime.ScriptId;
1554
+ /**
1555
+ * v8's debugging id for the v8::Context.
1556
+ */
1557
+ debuggerId: Runtime.UniqueDebuggerId;
1558
+ /**
1559
+ * The script's url (or generated name based on id if inline script).
1560
+ */
1561
+ name: string;
1562
+ }
1563
+
1564
+ /**
1565
+ * Providence about how an ad script was determined to be such. It is an ad
1566
+ * because its url matched a filterlist rule, or because some other ad script
1567
+ * was on the stack when this script was loaded.
1568
+ */
1569
+ export interface AdAncestry {
1570
+ /**
1571
+ * The ad-script in the stack when the offending script was loaded. This is
1572
+ * recursive down to the root script that was tagged due to the filterlist
1573
+ * rule.
1574
+ */
1575
+ adAncestryChain: AdScriptIdentifier[];
1576
+ /**
1577
+ * The filterlist rule that caused the root (last) script in
1578
+ * `adAncestry` to be ad-tagged.
1579
+ */
1580
+ rootScriptFilterlistRule?: string;
1581
+ }
1582
+
1583
+ /**
1584
+ * The issue warns about blocked calls to privacy sensitive APIs via the
1585
+ * Selective Permissions Intervention.
1586
+ */
1587
+ export interface SelectivePermissionsInterventionIssueDetails {
1588
+ /**
1589
+ * Which API was intervened on.
1590
+ */
1591
+ apiName: string;
1592
+ /**
1593
+ * Why the ad script using the API is considered an ad.
1594
+ */
1595
+ adAncestry: AdAncestry;
1596
+ /**
1597
+ * The stack trace at the time of the intervention.
1598
+ */
1599
+ stackTrace?: Runtime.StackTrace;
1600
+ }
1601
+
1545
1602
  /**
1546
1603
  * A unique identifier for the type of issue. Each type may use one of the
1547
1604
  * optional fields in InspectorIssueDetails to convey more specific
@@ -1577,6 +1634,7 @@ export namespace Audits {
1577
1634
  UserReidentificationIssue = 'UserReidentificationIssue',
1578
1635
  PermissionElementIssue = 'PermissionElementIssue',
1579
1636
  PerformanceIssue = 'PerformanceIssue',
1637
+ SelectivePermissionsInterventionIssue = 'SelectivePermissionsInterventionIssue',
1580
1638
  }
1581
1639
 
1582
1640
  /**
@@ -1617,6 +1675,7 @@ export namespace Audits {
1617
1675
  userReidentificationIssueDetails?: UserReidentificationIssueDetails;
1618
1676
  permissionElementIssueDetails?: PermissionElementIssueDetails;
1619
1677
  performanceIssueDetails?: PerformanceIssueDetails;
1678
+ selectivePermissionsInterventionIssueDetails?: SelectivePermissionsInterventionIssueDetails;
1620
1679
  }
1621
1680
 
1622
1681
  /**
@@ -7027,6 +7086,7 @@ export namespace Emulation {
7027
7086
  */
7028
7087
  export const enum DisabledImageType {
7029
7088
  Avif = 'avif',
7089
+ Jxl = 'jxl',
7030
7090
  Webp = 'webp',
7031
7091
  }
7032
7092
 
@@ -7071,6 +7131,11 @@ export namespace Emulation {
7071
7131
  insets: SafeAreaInsets;
7072
7132
  }
7073
7133
 
7134
+ export const enum SetDeviceMetricsOverrideRequestScrollbarType {
7135
+ Overlay = 'overlay',
7136
+ Default = 'default',
7137
+ }
7138
+
7074
7139
  export interface SetDeviceMetricsOverrideRequest {
7075
7140
  /**
7076
7141
  * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
@@ -7136,6 +7201,10 @@ export namespace Emulation {
7136
7201
  * @deprecated
7137
7202
  */
7138
7203
  devicePosture?: DevicePosture;
7204
+ /**
7205
+ * Scrollbar type. Default: `default`.
7206
+ */
7207
+ scrollbarType?: SetDeviceMetricsOverrideRequestScrollbarType;
7139
7208
  }
7140
7209
 
7141
7210
  export interface SetDevicePostureOverrideRequest {
@@ -7520,6 +7589,32 @@ export namespace Extensions {
7520
7589
  Managed = 'managed',
7521
7590
  }
7522
7591
 
7592
+ /**
7593
+ * Detailed information about an extension.
7594
+ */
7595
+ export interface ExtensionInfo {
7596
+ /**
7597
+ * Extension id.
7598
+ */
7599
+ id: string;
7600
+ /**
7601
+ * Extension name.
7602
+ */
7603
+ name: string;
7604
+ /**
7605
+ * Extension version.
7606
+ */
7607
+ version: string;
7608
+ /**
7609
+ * The path from which the extension was loaded.
7610
+ */
7611
+ path: string;
7612
+ /**
7613
+ * Extension enabled status.
7614
+ */
7615
+ enabled: boolean;
7616
+ }
7617
+
7523
7618
  export interface TriggerActionRequest {
7524
7619
  /**
7525
7620
  * Extension id.
@@ -7549,6 +7644,10 @@ export namespace Extensions {
7549
7644
  id: string;
7550
7645
  }
7551
7646
 
7647
+ export interface GetExtensionsResponse extends ProtocolResponseWithError {
7648
+ extensions: ExtensionInfo[];
7649
+ }
7650
+
7552
7651
  export interface UninstallRequest {
7553
7652
  /**
7554
7653
  * Extension id.
@@ -286,6 +286,19 @@ export class AiConversation {
286
286
  }
287
287
 
288
288
  this.#type = type;
289
+
290
+ // We need to filter out the function calls
291
+ // as the LLM tries to call the existing ones.
292
+ const history =
293
+ this.#agent?.history
294
+ .map(content => {
295
+ return {
296
+ ...content,
297
+ parts: content.parts.filter(part => !('functionCall' in part) && !('functionResponse' in part)),
298
+ };
299
+ })
300
+ .filter(content => content.parts.length > 0);
301
+
289
302
  const options = {
290
303
  aidaClient: this.#aidaClient,
291
304
  serverSideLoggingEnabled: isAiAssistanceServerSideLoggingEnabled(),
@@ -294,6 +307,7 @@ export class AiConversation {
294
307
  performanceRecordAndReload: this.#performanceRecordAndReload,
295
308
  onInspectElement: this.#onInspectElement,
296
309
  networkTimeCalculator: this.#networkTimeCalculator,
310
+ history,
297
311
  };
298
312
  switch (type) {
299
313
  case ConversationType.STYLING: {
@@ -404,6 +418,12 @@ Time: ${micros(time)}`;
404
418
  multimodalInput?: MultimodalInput,
405
419
  } = {},
406
420
  ): AsyncGenerator<ResponseData, void, void> {
421
+ if (this.isBlockedByOrigin) {
422
+ // This error should not be reached. If it happens, some
423
+ // invariants do not hold anymore.
424
+ throw new Error('cross-origin context data should not be included');
425
+ }
426
+
407
427
  const userQuery: UserQuery = {
408
428
  type: ResponseType.USER_QUERY,
409
429
  query: initialQuery,