chrome-devtools-frontend 1.0.1541552 → 1.0.1543082

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 (66) hide show
  1. package/docs/get_the_code.md +9 -0
  2. package/front_end/Tests.js +1 -0
  3. package/front_end/core/common/Settings.ts +38 -15
  4. package/front_end/core/host/InspectorFrontendHost.ts +0 -3
  5. package/front_end/core/host/UserMetrics.ts +5 -0
  6. package/front_end/core/root/Runtime.ts +0 -10
  7. package/front_end/core/sdk/IOModel.ts +1 -4
  8. package/front_end/core/sdk/NetworkManager.ts +0 -7
  9. package/front_end/core/sdk/NetworkRequest.ts +0 -10
  10. package/front_end/core/sdk/ServerSentEventsProtocol.ts +4 -0
  11. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +5 -5
  12. package/front_end/entrypoints/main/MainImpl.ts +6 -3
  13. package/front_end/entrypoints/main/main-meta.ts +1 -5
  14. package/front_end/foundation/Universe.ts +2 -10
  15. package/front_end/generated/Deprecation.ts +0 -14
  16. package/front_end/generated/InspectorBackendCommands.ts +1 -1
  17. package/front_end/generated/SupportedCSSProperties.js +42 -42
  18. package/front_end/generated/protocol.ts +0 -1
  19. package/front_end/models/ai_assistance/BuiltInAi.ts +13 -7
  20. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +72 -31
  21. package/front_end/models/bindings/CompilerScriptMapping.ts +3 -2
  22. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +3 -1
  23. package/front_end/models/har/Importer.ts +14 -0
  24. package/front_end/models/issues_manager/IssuesManager.ts +0 -5
  25. package/front_end/models/javascript_metadata/NativeFunctions.js +0 -4
  26. package/front_end/models/trace/handlers/ScriptsHandler.ts +26 -0
  27. package/front_end/models/trace/types/TraceEvents.ts +1 -1
  28. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +117 -103
  29. package/front_end/panels/ai_assistance/components/ChatView.ts +7 -31
  30. package/front_end/panels/ai_assistance/components/chatView.css +1 -1
  31. package/front_end/panels/application/components/BackForwardCacheView.ts +12 -9
  32. package/front_end/panels/console/ConsoleInsightTeaser.ts +5 -0
  33. package/front_end/panels/console/ConsolePrompt.ts +9 -2
  34. package/front_end/panels/console/ConsoleView.ts +3 -0
  35. package/front_end/panels/network/NetworkDataGridNode.ts +0 -7
  36. package/front_end/panels/network/NetworkLogView.ts +1 -45
  37. package/front_end/panels/security/SecurityPanel.ts +0 -2
  38. package/front_end/panels/security/SecurityPanelSidebar.ts +0 -16
  39. package/front_end/panels/security/security.ts +0 -2
  40. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +17 -1
  41. package/front_end/third_party/chromium/README.chromium +1 -1
  42. package/front_end/ui/components/expandable_list/ExpandableList.docs.ts +30 -0
  43. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +0 -4
  44. package/front_end/ui/components/markdown_view/MarkdownView.docs.ts +95 -0
  45. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +246 -13
  46. package/front_end/ui/components/text_editor/config.ts +1 -1
  47. package/front_end/ui/legacy/Widget.ts +13 -4
  48. package/front_end/ui/legacy/components/utils/Linkifier.ts +45 -1
  49. package/front_end/ui/visual_logging/KnownContextValues.ts +11 -0
  50. package/package.json +1 -1
  51. package/front_end/models/issues_manager/UserReidentificationIssue.ts +0 -72
  52. package/front_end/models/issues_manager/descriptions/userReidentificationBlocked.md +0 -5
  53. package/front_end/panels/security/IPProtectionTreeElement.ts +0 -21
  54. package/front_end/panels/security/IPProtectionView.ts +0 -287
  55. package/front_end/ui/components/docs/expandable_list/basic.html +0 -24
  56. package/front_end/ui/components/docs/expandable_list/basic.ts +0 -30
  57. package/front_end/ui/components/docs/markdown_image/basic.html +0 -19
  58. package/front_end/ui/components/docs/markdown_image/basic.ts +0 -38
  59. package/front_end/ui/components/docs/markdown_link/basic.html +0 -17
  60. package/front_end/ui/components/docs/markdown_link/basic.ts +0 -19
  61. package/front_end/ui/components/docs/markdown_view/basic.html +0 -25
  62. package/front_end/ui/components/docs/markdown_view/basic.ts +0 -67
  63. package/front_end/ui/components/docs/markdown_view/code-block.html +0 -30
  64. package/front_end/ui/components/docs/markdown_view/code-block.ts +0 -71
  65. package/front_end/ui/components/docs/text_prompt/basic.html +0 -35
  66. package/front_end/ui/components/docs/text_prompt/basic.ts +0 -19
@@ -368,6 +368,15 @@ out/Default/chrome --custom-devtools-frontend=file://$(realpath out/Default/gen/
368
368
  afterwards, which can be quite a bit faster than building and linking the full
369
369
  Chromium binary.
370
370
 
371
+ Alternatively you can use `npm start` from the DevTools sub folder (`third_party/devtools-frontend/src/`) with the browser set to `chromium`.
372
+ This will tell the command that you are in a Chromium checkout and try to find the correct browser executable path to resolve.
373
+ Or alternately you can use a `.env` file, see [set up here](#using-a-env-file-for-default-script-options).
374
+
375
+ ```bash
376
+ cd third_party/devtools-frontend/src/
377
+ npm start -- --browser=chromium
378
+ ```
379
+
371
380
  ### Testing
372
381
 
373
382
  To run the test suite, use `npm test` from within the DevTools front-end folder:
@@ -955,6 +955,7 @@
955
955
  Common.Settings.Settings.instance({
956
956
  forceNew: true,
957
957
  ...Main.Main.instanceForTest.createSettingsStorage(prefs),
958
+ settingRegistrations: Common.SettingRegistration.getRegisteredSettings(),
958
959
  runSettingsMigration: false,
959
960
  });
960
961
 
@@ -10,7 +10,6 @@ import type {EventDescriptor, EventTargetEvent, GenericEvents} from './EventTarg
10
10
  import {ObjectWrapper} from './Object.js';
11
11
  import {
12
12
  getLocalizedSettingsCategory,
13
- getRegisteredSettings as getRegisteredSettingsInternal,
14
13
  type LearnMore,
15
14
  maybeRemoveSettingExtension,
16
15
  type RegExpSettingItem,
@@ -25,7 +24,21 @@ import {
25
24
 
26
25
  let settingsInstance: Settings|undefined;
27
26
 
27
+ export interface SettingsCreationOptions {
28
+ syncedStorage: SettingsStorage;
29
+ globalStorage: SettingsStorage;
30
+ localStorage: SettingsStorage;
31
+ settingRegistrations: SettingRegistration[];
32
+ logSettingAccess?: (name: string, value: number|string|boolean) => Promise<void>;
33
+ runSettingsMigration?: boolean;
34
+ }
35
+
28
36
  export class Settings {
37
+ readonly syncedStorage: SettingsStorage;
38
+ readonly globalStorage: SettingsStorage;
39
+ readonly localStorage: SettingsStorage;
40
+
41
+ readonly #settingRegistrations: SettingRegistration[];
29
42
  readonly #sessionStorage = new SettingsStorage({});
30
43
  settingNameSet = new Set<string>();
31
44
  orderValuesBySettingCategory = new Map<SettingCategory, Set<number>>();
@@ -34,16 +47,16 @@ export class Settings {
34
47
  readonly moduleSettings = new Map<string, Setting<unknown>>();
35
48
  #logSettingAccess?: (name: string, value: number|string|boolean) => Promise<void>;
36
49
 
37
- private constructor(
38
- readonly syncedStorage: SettingsStorage,
39
- readonly globalStorage: SettingsStorage,
40
- readonly localStorage: SettingsStorage,
41
- logSettingAccess?: (name: string, value: number|string|boolean) => Promise<void>,
42
- runSettingsMigration?: boolean,
43
- ) {
50
+ constructor(
51
+ {syncedStorage, globalStorage, localStorage, settingRegistrations, logSettingAccess, runSettingsMigration}:
52
+ SettingsCreationOptions) {
53
+ this.syncedStorage = syncedStorage;
54
+ this.globalStorage = globalStorage;
55
+ this.localStorage = localStorage;
56
+ this.#settingRegistrations = settingRegistrations;
44
57
  this.#logSettingAccess = logSettingAccess;
45
58
 
46
- for (const registration of this.getRegisteredSettings()) {
59
+ for (const registration of this.#settingRegistrations) {
47
60
  const {settingName, defaultValue, storageType} = registration;
48
61
  const isRegex = registration.settingType === SettingType.REGEX;
49
62
 
@@ -68,7 +81,7 @@ export class Settings {
68
81
  }
69
82
 
70
83
  getRegisteredSettings(): SettingRegistration[] {
71
- return getRegisteredSettingsInternal();
84
+ return this.#settingRegistrations;
72
85
  }
73
86
 
74
87
  static hasInstance(): boolean {
@@ -80,17 +93,27 @@ export class Settings {
80
93
  syncedStorage: SettingsStorage|null,
81
94
  globalStorage: SettingsStorage|null,
82
95
  localStorage: SettingsStorage|null,
96
+ settingRegistrations: SettingRegistration[]|null,
83
97
  logSettingAccess?: (name: string, value: number|string|boolean) => Promise<void>,
84
98
  runSettingsMigration?: boolean,
85
- } = {forceNew: null, syncedStorage: null, globalStorage: null, localStorage: null}): Settings {
86
- const {forceNew, syncedStorage, globalStorage, localStorage, logSettingAccess, runSettingsMigration} = opts;
99
+ } = {forceNew: null, syncedStorage: null, globalStorage: null, localStorage: null, settingRegistrations: null}):
100
+ Settings {
101
+ const {
102
+ forceNew,
103
+ syncedStorage,
104
+ globalStorage,
105
+ localStorage,
106
+ settingRegistrations,
107
+ logSettingAccess,
108
+ runSettingsMigration
109
+ } = opts;
87
110
  if (!settingsInstance || forceNew) {
88
- if (!syncedStorage || !globalStorage || !localStorage) {
111
+ if (!syncedStorage || !globalStorage || !localStorage || !settingRegistrations) {
89
112
  throw new Error(`Unable to create settings: global and local storage must be provided: ${new Error().stack}`);
90
113
  }
91
114
 
92
- settingsInstance =
93
- new Settings(syncedStorage, globalStorage, localStorage, logSettingAccess, runSettingsMigration);
115
+ settingsInstance = new Settings(
116
+ {syncedStorage, globalStorage, localStorage, settingRegistrations, logSettingAccess, runSettingsMigration});
94
117
  }
95
118
 
96
119
  return settingsInstance;
@@ -395,9 +395,6 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
395
395
  thirdPartyCookieHeuristicsEnabled: true,
396
396
  managedBlockThirdPartyCookies: 'Unset',
397
397
  },
398
- devToolsIpProtectionPanelInDevTools: {
399
- enabled: false,
400
- },
401
398
  devToolsFlexibleLayout: {
402
399
  verticalDrawerEnabled: true,
403
400
  },
@@ -317,6 +317,11 @@ export class UserMetrics {
317
317
  InspectorFrontendHostInstance.recordPerformanceHistogram(
318
318
  'DevTools.Insights.TeaserGenerationTime', timeInMilliseconds);
319
319
  }
320
+
321
+ consoleInsightTeaserFirstChunkGenerated(timeInMilliseconds: number): void {
322
+ InspectorFrontendHostInstance.recordPerformanceHistogram(
323
+ 'DevTools.Insights.TeaserFirstChunkGenerationTime', timeInMilliseconds);
324
+ }
320
325
  }
321
326
 
322
327
  /**
@@ -465,10 +465,6 @@ export interface HostConfigThirdPartyCookieControls {
465
465
  managedBlockThirdPartyCookies: string|boolean;
466
466
  }
467
467
 
468
- export interface HostConfigIPProtection {
469
- enabled: boolean;
470
- }
471
-
472
468
  interface AiGeneratedTimelineLabels {
473
469
  enabled: boolean;
474
470
  }
@@ -482,10 +478,6 @@ interface AiSubmenuPrompts {
482
478
  featureName?: string;
483
479
  }
484
480
 
485
- interface IpProtectionInDevTools {
486
- enabled: boolean;
487
- }
488
-
489
481
  interface AiDebugWithAi {
490
482
  enabled: boolean;
491
483
  featureName?: string;
@@ -568,7 +560,6 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
568
560
  devToolsWellKnown: HostConfigWellKnown,
569
561
  devToolsPrivacyUI: HostConfigPrivacyUI,
570
562
  devToolsIndividualRequestThrottling: DevToolsIndividualRequestThrottling,
571
- devToolsIpProtectionPanelInDevTools: HostConfigIPProtection,
572
563
  /**
573
564
  * OffTheRecord here indicates that the user's profile is either incognito,
574
565
  * or guest mode, rather than a "normal" profile.
@@ -580,7 +571,6 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
580
571
  devToolsAiGeneratedTimelineLabels: AiGeneratedTimelineLabels,
581
572
  devToolsAllowPopoverForcing: AllowPopoverForcing,
582
573
  devToolsAiSubmenuPrompts: AiSubmenuPrompts,
583
- devToolsIpProtectionInDevTools: IpProtectionInDevTools,
584
574
  devToolsGlobalAiButton: GlobalAiButton,
585
575
  devToolsGdpProfiles: GdpProfiles,
586
576
  devToolsGdpProfilesAvailability: GdpProfilesAvailability,
@@ -25,10 +25,7 @@ export class IOModel extends SDKModel<void> {
25
25
  }
26
26
 
27
27
  async close(handle: Protocol.IO.StreamHandle): Promise<void> {
28
- const result = await this.target().ioAgent().invoke_close({handle});
29
- if (result.getError()) {
30
- console.error('Could not close stream.');
31
- }
28
+ await this.target().ioAgent().invoke_close({handle});
32
29
  }
33
30
 
34
31
  async resolveBlob(objectOrObjectId: Protocol.Runtime.RemoteObjectId|RemoteObject): Promise<string> {
@@ -689,13 +689,6 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
689
689
  networkRequest.setSecurityDetails(response.securityDetails);
690
690
  }
691
691
 
692
- // TODO(crbug.com/425645896): Remove this guard once IP Protection is fully launched.
693
- if (Root.Runtime.hostConfig.devToolsIpProtectionInDevTools?.enabled) {
694
- if (response.isIpProtectionUsed) {
695
- networkRequest.setIsIpProtectionUsed(response.isIpProtectionUsed);
696
- }
697
- }
698
-
699
692
  const newResourceType = Common.ResourceType.ResourceType.fromMimeTypeOverride(networkRequest.mimeType);
700
693
  if (newResourceType) {
701
694
  networkRequest.setResourceType(newResourceType);
@@ -317,7 +317,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
317
317
  responseReceivedPromiseResolve?: () => void;
318
318
  directSocketInfo?: DirectSocketInfo;
319
319
  readonly #directSocketChunks: DirectSocketChunk[] = [];
320
- #isIpProtectionUsed: boolean;
321
320
  #isAdRelated: boolean;
322
321
  #appliedNetworkConditionsId?: string;
323
322
 
@@ -341,7 +340,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
341
340
  this.#loaderId = loaderId;
342
341
  this.#initiator = initiator;
343
342
  this.#hasUserGesture = hasUserGesture;
344
- this.#isIpProtectionUsed = false;
345
343
  this.#isAdRelated = false;
346
344
  }
347
345
 
@@ -1832,14 +1830,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
1832
1830
  return this.#isSameSite;
1833
1831
  }
1834
1832
 
1835
- setIsIpProtectionUsed(isIpProtectionUsed: boolean): void {
1836
- this.#isIpProtectionUsed = isIpProtectionUsed;
1837
- }
1838
-
1839
- isIpProtectionUsed(): boolean|null {
1840
- return this.#isIpProtectionUsed;
1841
- }
1842
-
1843
1833
  setIsAdRelated(isAdRelated: boolean): void {
1844
1834
  this.#isAdRelated = isAdRelated;
1845
1835
  }
@@ -35,6 +35,10 @@ export class ServerSentEventsParser {
35
35
  await this.#decoder.addBase64Chunk(raw);
36
36
  }
37
37
 
38
+ addTextChunk(chunk: string): void {
39
+ this.#onTextChunk(chunk);
40
+ }
41
+
38
42
  #onTextChunk(chunk: string): void {
39
43
  // A line consists of "this.#line" plus a slice of "chunk[start:<next new cr/lf>]".
40
44
  let start = 0;
@@ -66,13 +66,13 @@ const UIStrings = {
66
66
  'Highlights elements (teal) that can slow down scrolling, including touch & wheel event handlers and other main-thread scrolling situations.',
67
67
  /**
68
68
  * @description The name of a checkbox setting in the Rendering tool. This setting highlights the
69
- * rendering frames for ads that are found on the page.
69
+ * rendering elements for ads that are found on the page.
70
70
  */
71
- highlightAdFrames: 'Highlight ad frames',
71
+ highlightAds: 'Highlight ads',
72
72
  /**
73
- * @description Explanation text for the 'Highlight ad frames' setting in the Rendering tool.
73
+ * @description Explanation text for the 'Highlight ads' setting in the Rendering tool.
74
74
  */
75
- highlightsFramesRedDetectedToBe: 'Highlights frames (red) detected to be ads.',
75
+ highlightsElementsRedDetectedToBe: 'Highlights elements (red) detected to be ads.',
76
76
  /**
77
77
  * @description The name of a checkbox setting in the Rendering tool. This setting prevents the
78
78
  * webpage from loading 'local' fonts. Local fonts are fonts that are installed on the user's
@@ -207,7 +207,7 @@ export class RenderingOptionsView extends UI.Widget.VBox {
207
207
  i18nString(UIStrings.scrollingPerformanceIssues), i18nString(UIStrings.highlightsElementsTealThatCan),
208
208
  Common.Settings.Settings.instance().moduleSetting('show-scroll-bottleneck-rects'));
209
209
  this.#appendCheckbox(
210
- i18nString(UIStrings.highlightAdFrames), i18nString(UIStrings.highlightsFramesRedDetectedToBe),
210
+ i18nString(UIStrings.highlightAds), i18nString(UIStrings.highlightsElementsRedDetectedToBe),
211
211
  Common.Settings.Settings.instance().moduleSetting('show-ad-highlights'));
212
212
  this.#appendCheckbox(
213
213
  i18nString(UIStrings.disableLocalFonts), i18nString(UIStrings.disablesLocalSourcesInFontface),
@@ -168,9 +168,12 @@ export class MainImpl {
168
168
  Object.assign(Root.Runtime.hostConfig, config);
169
169
 
170
170
  const creationOptions: Foundation.Universe.CreationOptions = {
171
- ...this.createSettingsStorage(prefs),
172
- logSettingAccess: VisualLogging.logSettingAccess,
173
- runSettingsMigration: !Host.InspectorFrontendHost.isUnderTest(),
171
+ settingsCreationOptions: {
172
+ ...this.createSettingsStorage(prefs),
173
+ settingRegistrations: Common.SettingRegistration.getRegisteredSettings(),
174
+ logSettingAccess: VisualLogging.logSettingAccess,
175
+ runSettingsMigration: !Host.InspectorFrontendHost.isUnderTest(),
176
+ },
174
177
  };
175
178
  new Foundation.Universe.Universe(creationOptions);
176
179
 
@@ -910,13 +910,9 @@ UI.Toolbar.registerToolbarItem({
910
910
  condition(config) {
911
911
  const isFlagEnabled = config?.devToolsGlobalAiButton?.enabled;
912
912
 
913
- const devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance();
914
- const isLocaleRestricted = !devtoolsLocale.locale.startsWith('en-');
915
-
916
913
  const isGeoRestricted = config?.aidaAvailability?.blockedByGeo === true;
917
914
  const isPolicyRestricted = config?.aidaAvailability?.blockedByEnterprisePolicy === true;
918
- const isAgeRestricted = Boolean(config?.aidaAvailability?.blockedByAge);
919
- return Boolean(isFlagEnabled && !isLocaleRestricted && !isGeoRestricted && !isPolicyRestricted && !isAgeRestricted);
915
+ return Boolean(isFlagEnabled && !isGeoRestricted && !isPolicyRestricted);
920
916
  },
921
917
  async loadItem() {
922
918
  const Main = await loadMainModule();
@@ -6,11 +6,7 @@ import * as Common from '../core/common/common.js';
6
6
 
7
7
  export interface CreationOptions {
8
8
  // Settings things
9
- syncedStorage: Common.Settings.SettingsStorage;
10
- globalStorage: Common.Settings.SettingsStorage;
11
- localStorage: Common.Settings.SettingsStorage;
12
- logSettingAccess?: (name: string, value: number|string|boolean) => Promise<void>;
13
- runSettingsMigration?: boolean;
9
+ settingsCreationOptions: Common.Settings.SettingsCreationOptions;
14
10
  }
15
11
 
16
12
  export class Universe {
@@ -19,11 +15,7 @@ export class Universe {
19
15
  // For now the global is fine as we don't anticipate the MCP server to change settings.
20
16
  Common.Settings.Settings.instance({
21
17
  forceNew: true,
22
- syncedStorage: options.syncedStorage,
23
- globalStorage: options.globalStorage,
24
- localStorage: options.localStorage,
25
- logSettingAccess: options.logSettingAccess,
26
- runSettingsMigration: options.runSettingsMigration,
18
+ ...options.settingsCreationOptions,
27
19
  });
28
20
  }
29
21
  }
@@ -90,14 +90,6 @@ export const UIStrings = {
90
90
  * @description This warning occurs when a stylesheet loaded from a local file directive does not end in the file type `.css`.
91
91
  */
92
92
  LocalCSSFileExtensionRejected: "CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension.",
93
- /**
94
- * @description This is a deprecation warning to developers that occurs when the script attempts to use the Media Source Extensions API in a way that is no longer supported by the specification for the API. The usage that is problematic is when the script calls the `SourceBuffer.abort()` method at a time when there is still processing happening in response to a previous `SourceBuffer.remove()` call for the same SourceBuffer object. More precisely, we show this warning to developers when script calls the SourceBuffer abort() method while the asynchronous processing of a remove() call on that SourceBuffer is not yet complete. Early versions of the Media Source Extensions specification allowed such aborts, but standardization of the specification resulted in disallowing the aborts. The script should instead wait for the asynchronous remove() operation to complete, which is observable by listening for the associated 'updateend' event from the SourceBuffer. A note is also included in the warning, describing when abort() is meaningful and allowed by the specification for purposes other than interrupting a remove() operation's asynchronous steps. Those supported purposes include using abort() to interrupt processing that may still be happening in response to a previous appendBuffer() call on that SourceBuffer, or using abort() to clear the internal of any unprocessed data remaining from previous appendBuffer() calls. See https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-abort for the currently specified behavior, which would throw an exception once the deprecated removal abort is no longer supported. See https://github.com/w3c/media-source/issues/19 for the discussion that led to the specification change.
95
- */
96
- MediaSourceAbortRemove: "Using `SourceBuffer.abort()` to abort `remove()`'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should listen to the `updateend` event instead. `abort()` is intended to only abort an asynchronous media append or reset parser state.",
97
- /**
98
- * @description This is a deprecation warning to developers that occurs when the script attempts to use the Media Source Extensions API in a way that is no longer supported by the specification for the API. The usage that is problematic is when the script sets the duration attribute of a MediaSource object too low. The duration attribute of a MediaSource must be longer than the actual duration of any media (audio or video) already in the MediaSource. When set too low, the MediaSource must remove audio and video content that is beyond the time indicated by the new duration. Content removal that is caused by setting the duration attribute too low is no longer allowed by the specification. The message describes the minimum allowable duration value as the 'highest presentation timestamp of any buffered coded frames' as a more precise way of describing the duration of content already in the MediaSource: 'coded frames' are the specification's way of describing compressed audio frames or compressed video frames, and they each have a 'presentation timestamp' that describes precisely when that frame's playback occurs in the overall media presentation. Early versions of the Media Source Extensions specification allowed this to happen, but standardization of the specification resulted in disallowing this behavior. The underlying issue leading to this specification change was that setting the duration attribute should be synchronous, but setting it lower than the timestamp of something currently buffered would cause confusing removal of media between that new duration and the previous, larger, duration. The script should instead explicitly remove that range of media first, before lowering the duration. See https://www.w3.org/TR/media-source-2/#dom-mediasource-duration and https://www.w3.org/TR/media-source-2/#dom-mediasource-duration for the currently specified behavior, which would throw an exception once support is removed for deprecated implicit asynchronous range removal when duration is truncated. See both https://github.com/w3c/media-source/issues/20 and https://github.com/w3c/media-source/issues/26 for the discussion that led to the specification change.
99
- */
100
- MediaSourceDurationTruncatingBuffered: "Setting `MediaSource.duration` below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit `remove(newDuration, oldDuration)` on all `sourceBuffers`, where `newDuration < oldDuration`.",
101
93
  /**
102
94
  * @description This warning occurs when the browser requests Web MIDI access as sysex (system exclusive messages) can be allowed via prompt even if the browser did not specifically request it.
103
95
  */
@@ -283,12 +275,6 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
283
275
  "LocalCSSFileExtensionRejected": {
284
276
  "milestone": 64
285
277
  },
286
- "MediaSourceAbortRemove": {
287
- "chromeStatusFeature": 6107495151960064
288
- },
289
- "MediaSourceDurationTruncatingBuffered": {
290
- "chromeStatusFeature": 6107495151960064
291
- },
292
278
  "NoSysexWebMIDIWithoutPermission": {
293
279
  "chromeStatusFeature": 5138066234671104,
294
280
  "milestone": 82
@@ -983,7 +983,7 @@ inspectorBackend.registerEnum("Page.AdFrameExplanation", {ParentIsAd: "ParentIsA
983
983
  inspectorBackend.registerEnum("Page.SecureContextType", {Secure: "Secure", SecureLocalhost: "SecureLocalhost", InsecureScheme: "InsecureScheme", InsecureAncestor: "InsecureAncestor"});
984
984
  inspectorBackend.registerEnum("Page.CrossOriginIsolatedContextType", {Isolated: "Isolated", NotIsolated: "NotIsolated", NotIsolatedFeatureDisabled: "NotIsolatedFeatureDisabled"});
985
985
  inspectorBackend.registerEnum("Page.GatedAPIFeatures", {SharedArrayBuffers: "SharedArrayBuffers", SharedArrayBuffersTransferAllowed: "SharedArrayBuffersTransferAllowed", PerformanceMeasureMemory: "PerformanceMeasureMemory", PerformanceProfile: "PerformanceProfile"});
986
- inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", AttributionReporting: "attribution-reporting", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DirectSocketsPrivate: "direct-sockets-private", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FencedUnpartitionedStorageRead: "fenced-unpartitioned-storage-read", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", JoinAdInterestGroup: "join-ad-interest-group", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetworkAccess: "local-network-access", Magnetometer: "magnetometer", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", Popins: "popins", PrivateAggregation: "private-aggregation", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", RecordAdAuctionEvents: "record-ad-auction-events", Rewriter: "rewriter", RunAdAuction: "run-ad-auction", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedAutofill: "shared-autofill", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
986
+ inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", AttributionReporting: "attribution-reporting", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DirectSocketsPrivate: "direct-sockets-private", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FencedUnpartitionedStorageRead: "fenced-unpartitioned-storage-read", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", JoinAdInterestGroup: "join-ad-interest-group", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetworkAccess: "local-network-access", Magnetometer: "magnetometer", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateAggregation: "private-aggregation", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", RecordAdAuctionEvents: "record-ad-auction-events", Rewriter: "rewriter", RunAdAuction: "run-ad-auction", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedAutofill: "shared-autofill", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
987
987
  inspectorBackend.registerEnum("Page.PermissionsPolicyBlockReason", {Header: "Header", IframeAttribute: "IframeAttribute", InFencedFrameTree: "InFencedFrameTree", InIsolatedApp: "InIsolatedApp"});
988
988
  inspectorBackend.registerEnum("Page.OriginTrialTokenStatus", {Success: "Success", NotSupported: "NotSupported", Insecure: "Insecure", Expired: "Expired", WrongOrigin: "WrongOrigin", InvalidSignature: "InvalidSignature", Malformed: "Malformed", WrongVersion: "WrongVersion", FeatureDisabled: "FeatureDisabled", TokenDisabled: "TokenDisabled", FeatureDisabledForUser: "FeatureDisabledForUser", UnknownTrial: "UnknownTrial"});
989
989
  inspectorBackend.registerEnum("Page.OriginTrialStatus", {Enabled: "Enabled", ValidTokenNotProvided: "ValidTokenNotProvided", OSNotSupported: "OSNotSupported", TrialNotAllowed: "TrialNotAllowed"});
@@ -419,10 +419,10 @@ export const generatedProperties = [
419
419
  "column-height",
420
420
  "column-rule-break",
421
421
  "column-rule-color",
422
- "column-rule-edge-end-outset",
423
- "column-rule-edge-start-outset",
424
- "column-rule-interior-end-outset",
425
- "column-rule-interior-start-outset",
422
+ "column-rule-edge-end-inset",
423
+ "column-rule-edge-start-inset",
424
+ "column-rule-interior-end-inset",
425
+ "column-rule-interior-start-inset",
426
426
  "column-rule-style",
427
427
  "column-rule-visibility-items",
428
428
  "column-rule-width",
@@ -642,10 +642,10 @@ export const generatedProperties = [
642
642
  "row-gap",
643
643
  "row-rule-break",
644
644
  "row-rule-color",
645
- "row-rule-edge-end-outset",
646
- "row-rule-edge-start-outset",
647
- "row-rule-interior-end-outset",
648
- "row-rule-interior-start-outset",
645
+ "row-rule-edge-end-inset",
646
+ "row-rule-edge-start-inset",
647
+ "row-rule-interior-end-inset",
648
+ "row-rule-interior-start-inset",
649
649
  "row-rule-style",
650
650
  "row-rule-visibility-items",
651
651
  "row-rule-width",
@@ -1729,28 +1729,28 @@ export const generatedProperties = [
1729
1729
  },
1730
1730
  {
1731
1731
  "inherited": false,
1732
- "name": "column-rule-edge-end-outset"
1732
+ "name": "column-rule-edge-end-inset"
1733
1733
  },
1734
1734
  {
1735
1735
  "inherited": false,
1736
- "name": "column-rule-edge-start-outset"
1736
+ "name": "column-rule-edge-start-inset"
1737
1737
  },
1738
1738
  {
1739
- "inherited": false,
1740
- "name": "column-rule-interior-end-outset"
1739
+ "longhands": [
1740
+ "column-rule-edge-start-inset",
1741
+ "column-rule-edge-end-inset",
1742
+ "column-rule-interior-start-inset",
1743
+ "column-rule-interior-end-inset"
1744
+ ],
1745
+ "name": "column-rule-inset"
1741
1746
  },
1742
1747
  {
1743
1748
  "inherited": false,
1744
- "name": "column-rule-interior-start-outset"
1749
+ "name": "column-rule-interior-end-inset"
1745
1750
  },
1746
1751
  {
1747
- "longhands": [
1748
- "column-rule-edge-start-outset",
1749
- "column-rule-edge-end-outset",
1750
- "column-rule-interior-start-outset",
1751
- "column-rule-interior-end-outset"
1752
- ],
1753
- "name": "column-rule-outset"
1752
+ "inherited": false,
1753
+ "name": "column-rule-interior-start-inset"
1754
1754
  },
1755
1755
  {
1756
1756
  "keywords": [
@@ -3738,28 +3738,28 @@ export const generatedProperties = [
3738
3738
  },
3739
3739
  {
3740
3740
  "inherited": false,
3741
- "name": "row-rule-edge-end-outset"
3741
+ "name": "row-rule-edge-end-inset"
3742
3742
  },
3743
3743
  {
3744
3744
  "inherited": false,
3745
- "name": "row-rule-edge-start-outset"
3745
+ "name": "row-rule-edge-start-inset"
3746
3746
  },
3747
3747
  {
3748
- "inherited": false,
3749
- "name": "row-rule-interior-end-outset"
3748
+ "longhands": [
3749
+ "row-rule-edge-start-inset",
3750
+ "row-rule-edge-end-inset",
3751
+ "row-rule-interior-start-inset",
3752
+ "row-rule-interior-end-inset"
3753
+ ],
3754
+ "name": "row-rule-inset"
3750
3755
  },
3751
3756
  {
3752
3757
  "inherited": false,
3753
- "name": "row-rule-interior-start-outset"
3758
+ "name": "row-rule-interior-end-inset"
3754
3759
  },
3755
3760
  {
3756
- "longhands": [
3757
- "row-rule-edge-start-outset",
3758
- "row-rule-edge-end-outset",
3759
- "row-rule-interior-start-outset",
3760
- "row-rule-interior-end-outset"
3761
- ],
3762
- "name": "row-rule-outset"
3761
+ "inherited": false,
3762
+ "name": "row-rule-interior-start-inset"
3763
3763
  },
3764
3764
  {
3765
3765
  "keywords": [
@@ -3847,16 +3847,16 @@ export const generatedProperties = [
3847
3847
  },
3848
3848
  {
3849
3849
  "longhands": [
3850
- "row-rule-edge-start-outset",
3851
- "row-rule-edge-end-outset",
3852
- "row-rule-interior-start-outset",
3853
- "row-rule-interior-end-outset",
3854
- "column-rule-edge-start-outset",
3855
- "column-rule-edge-end-outset",
3856
- "column-rule-interior-start-outset",
3857
- "column-rule-interior-end-outset"
3858
- ],
3859
- "name": "rule-outset"
3850
+ "row-rule-edge-start-inset",
3851
+ "row-rule-edge-end-inset",
3852
+ "row-rule-interior-start-inset",
3853
+ "row-rule-interior-end-inset",
3854
+ "column-rule-edge-start-inset",
3855
+ "column-rule-edge-end-inset",
3856
+ "column-rule-interior-start-inset",
3857
+ "column-rule-interior-end-inset"
3858
+ ],
3859
+ "name": "rule-inset"
3860
3860
  },
3861
3861
  {
3862
3862
  "longhands": [
@@ -13705,7 +13705,6 @@ export namespace Page {
13705
13705
  OtpCredentials = 'otp-credentials',
13706
13706
  Payment = 'payment',
13707
13707
  PictureInPicture = 'picture-in-picture',
13708
- Popins = 'popins',
13709
13708
  PrivateAggregation = 'private-aggregation',
13710
13709
  PrivateStateTokenIssuance = 'private-state-token-issuance',
13711
13710
  PrivateStateTokenRedemption = 'private-state-token-redemption',
@@ -185,13 +185,19 @@ export class BuiltInAi {
185
185
  async * getConsoleInsight(prompt: string, abortController: AbortController): AsyncGenerator<string> {
186
186
  // Clone the session to start a fresh conversation for each answer. Otherwise
187
187
  // previous dialog would pollute the context resulting in worse answers.
188
- const session = await this.#consoleInsightsSession.clone();
189
- const stream = session.promptStreaming(prompt, {
190
- signal: abortController.signal,
191
- });
192
- for await (const chunk of stream) {
193
- yield chunk;
188
+ let session: LanguageModel|null = null;
189
+ try {
190
+ session = await this.#consoleInsightsSession.clone();
191
+ const stream = session.promptStreaming(prompt, {
192
+ signal: abortController.signal,
193
+ });
194
+ for await (const chunk of stream) {
195
+ yield chunk;
196
+ }
197
+ } finally {
198
+ if (session) {
199
+ session.destroy();
200
+ }
194
201
  }
195
- session.destroy();
196
202
  }
197
203
  }