chrome-devtools-frontend 1.0.976172 → 1.0.977567

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 (120) hide show
  1. package/config/gni/devtools_grd_files.gni +6 -1
  2. package/config/gni/devtools_image_files.gni +2 -0
  3. package/front_end/Images/src/minus_icon.svg +3 -0
  4. package/front_end/Images/src/plus_icon.svg +3 -0
  5. package/front_end/core/host/UserMetrics.ts +23 -23
  6. package/front_end/core/i18n/locales/af.json +5 -5
  7. package/front_end/core/i18n/locales/am.json +5 -5
  8. package/front_end/core/i18n/locales/ar.json +5 -5
  9. package/front_end/core/i18n/locales/as.json +5 -5
  10. package/front_end/core/i18n/locales/az.json +5 -5
  11. package/front_end/core/i18n/locales/be.json +5 -5
  12. package/front_end/core/i18n/locales/bg.json +5 -5
  13. package/front_end/core/i18n/locales/bn.json +5 -5
  14. package/front_end/core/i18n/locales/bs.json +5 -5
  15. package/front_end/core/i18n/locales/ca.json +5 -5
  16. package/front_end/core/i18n/locales/cs.json +5 -5
  17. package/front_end/core/i18n/locales/cy.json +5 -5
  18. package/front_end/core/i18n/locales/da.json +5 -5
  19. package/front_end/core/i18n/locales/de.json +5 -5
  20. package/front_end/core/i18n/locales/el.json +5 -5
  21. package/front_end/core/i18n/locales/en-GB.json +5 -5
  22. package/front_end/core/i18n/locales/en-US.json +24 -15
  23. package/front_end/core/i18n/locales/en-XL.json +24 -15
  24. package/front_end/core/i18n/locales/es-419.json +5 -5
  25. package/front_end/core/i18n/locales/es.json +5 -5
  26. package/front_end/core/i18n/locales/et.json +5 -5
  27. package/front_end/core/i18n/locales/eu.json +5 -5
  28. package/front_end/core/i18n/locales/fa.json +5 -5
  29. package/front_end/core/i18n/locales/fi.json +5 -5
  30. package/front_end/core/i18n/locales/fil.json +5 -5
  31. package/front_end/core/i18n/locales/fr-CA.json +5 -5
  32. package/front_end/core/i18n/locales/fr.json +5 -5
  33. package/front_end/core/i18n/locales/gl.json +5 -5
  34. package/front_end/core/i18n/locales/gu.json +5 -5
  35. package/front_end/core/i18n/locales/he.json +5 -5
  36. package/front_end/core/i18n/locales/hi.json +5 -5
  37. package/front_end/core/i18n/locales/hr.json +5 -5
  38. package/front_end/core/i18n/locales/hu.json +5 -5
  39. package/front_end/core/i18n/locales/hy.json +5 -5
  40. package/front_end/core/i18n/locales/id.json +5 -5
  41. package/front_end/core/i18n/locales/is.json +5 -5
  42. package/front_end/core/i18n/locales/it.json +5 -5
  43. package/front_end/core/i18n/locales/ja.json +5 -5
  44. package/front_end/core/i18n/locales/ka.json +5 -5
  45. package/front_end/core/i18n/locales/kk.json +5 -5
  46. package/front_end/core/i18n/locales/km.json +5 -5
  47. package/front_end/core/i18n/locales/kn.json +5 -5
  48. package/front_end/core/i18n/locales/ko.json +5 -5
  49. package/front_end/core/i18n/locales/ky.json +5 -5
  50. package/front_end/core/i18n/locales/lo.json +5 -5
  51. package/front_end/core/i18n/locales/lt.json +5 -5
  52. package/front_end/core/i18n/locales/lv.json +5 -5
  53. package/front_end/core/i18n/locales/mk.json +5 -5
  54. package/front_end/core/i18n/locales/ml.json +5 -5
  55. package/front_end/core/i18n/locales/mn.json +5 -5
  56. package/front_end/core/i18n/locales/mr.json +5 -5
  57. package/front_end/core/i18n/locales/ms.json +5 -5
  58. package/front_end/core/i18n/locales/my.json +5 -5
  59. package/front_end/core/i18n/locales/ne.json +5 -5
  60. package/front_end/core/i18n/locales/nl.json +5 -5
  61. package/front_end/core/i18n/locales/no.json +5 -5
  62. package/front_end/core/i18n/locales/or.json +5 -5
  63. package/front_end/core/i18n/locales/pa.json +5 -5
  64. package/front_end/core/i18n/locales/pl.json +5 -5
  65. package/front_end/core/i18n/locales/pt-PT.json +5 -5
  66. package/front_end/core/i18n/locales/pt.json +5 -5
  67. package/front_end/core/i18n/locales/ro.json +5 -5
  68. package/front_end/core/i18n/locales/ru.json +5 -5
  69. package/front_end/core/i18n/locales/si.json +5 -5
  70. package/front_end/core/i18n/locales/sk.json +5 -5
  71. package/front_end/core/i18n/locales/sl.json +5 -5
  72. package/front_end/core/i18n/locales/sq.json +5 -5
  73. package/front_end/core/i18n/locales/sr-Latn.json +5 -5
  74. package/front_end/core/i18n/locales/sr.json +5 -5
  75. package/front_end/core/i18n/locales/sv.json +5 -5
  76. package/front_end/core/i18n/locales/sw.json +5 -5
  77. package/front_end/core/i18n/locales/ta.json +5 -5
  78. package/front_end/core/i18n/locales/te.json +5 -5
  79. package/front_end/core/i18n/locales/th.json +5 -5
  80. package/front_end/core/i18n/locales/tr.json +5 -5
  81. package/front_end/core/i18n/locales/uk.json +5 -5
  82. package/front_end/core/i18n/locales/ur.json +5 -5
  83. package/front_end/core/i18n/locales/uz.json +5 -5
  84. package/front_end/core/i18n/locales/vi.json +5 -5
  85. package/front_end/core/i18n/locales/zh-HK.json +5 -5
  86. package/front_end/core/i18n/locales/zh-TW.json +5 -5
  87. package/front_end/core/i18n/locales/zh.json +5 -5
  88. package/front_end/core/i18n/locales/zu.json +5 -5
  89. package/front_end/core/sdk/CSSContainerQuery.ts +1 -1
  90. package/front_end/core/sdk/CSSModel.ts +13 -9
  91. package/front_end/generated/InspectorBackendCommands.js +6 -5
  92. package/front_end/generated/protocol.ts +10 -9
  93. package/front_end/models/issues_manager/{SameSiteCookieIssue.ts → CookieIssue.ts} +75 -79
  94. package/front_end/models/issues_manager/Issue.ts +1 -1
  95. package/front_end/models/issues_manager/IssuesManager.ts +3 -9
  96. package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +1 -1
  97. package/front_end/models/issues_manager/issues_manager.ts +2 -2
  98. package/front_end/models/persistence/NetworkPersistenceManager.ts +1 -1
  99. package/front_end/panels/application/components/BackForwardCacheView.ts +23 -1
  100. package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
  101. package/front_end/panels/elements/ComputedStyleModel.ts +1 -1
  102. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  103. package/front_end/panels/elements/LayersWidget.ts +4 -3
  104. package/front_end/panels/elements/MetricsSidebarPane.ts +2 -2
  105. package/front_end/panels/elements/PlatformFontsWidget.ts +1 -1
  106. package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
  107. package/front_end/panels/elements/StylesSidebarPane.ts +10 -8
  108. package/front_end/panels/emulation/MediaQueryInspector.ts +1 -1
  109. package/front_end/panels/issues/IssueView.ts +1 -1
  110. package/front_end/panels/issues/IssuesPane.ts +1 -1
  111. package/front_end/panels/network/NetworkLogView.ts +1 -1
  112. package/front_end/panels/sources/CSSPlugin.ts +77 -22
  113. package/front_end/panels/sources/SourcesView.ts +23 -10
  114. package/front_end/panels/sources/components/HeadersView.css +32 -0
  115. package/front_end/panels/sources/components/HeadersView.ts +89 -0
  116. package/front_end/panels/sources/components/components.ts +9 -0
  117. package/front_end/panels/timeline/TimelineController.ts +17 -5
  118. package/front_end/ui/components/expandable_list/expandableList.css +10 -0
  119. package/front_end/ui/components/text_editor/javascript.ts +46 -1
  120. package/package.json +1 -1
@@ -150,6 +150,10 @@ export class CSSModel extends SDKModel<EventTypes> {
150
150
  return this.#sourceMapManager;
151
151
  }
152
152
 
153
+ static readableLayerName(text: string): string {
154
+ return text || '<anonymous>';
155
+ }
156
+
153
157
  static trimSourceURL(text: string): string {
154
158
  let sourceURLIndex = text.lastIndexOf('/*# sourceURL=');
155
159
  if (sourceURLIndex === -1) {
@@ -261,12 +265,12 @@ export class CSSModel extends SDKModel<EventTypes> {
261
265
  await this.agent.invoke_stopRuleUsageTracking();
262
266
  }
263
267
 
264
- async mediaQueriesPromise(): Promise<CSSMedia[]> {
268
+ async getMediaQueries(): Promise<CSSMedia[]> {
265
269
  const {medias} = await this.agent.invoke_getMediaQueries();
266
270
  return medias ? CSSMedia.parseMediaArrayPayload(this, medias) : [];
267
271
  }
268
272
 
269
- async rootLayerPromise(nodeId: Protocol.DOM.NodeId): Promise<Protocol.CSS.CSSLayerData> {
273
+ async getRootLayer(nodeId: Protocol.DOM.NodeId): Promise<Protocol.CSS.CSSLayerData> {
270
274
  const {rootLayer} = await this.agent.invoke_getLayersForNode({nodeId});
271
275
  return rootLayer;
272
276
  }
@@ -284,7 +288,7 @@ export class CSSModel extends SDKModel<EventTypes> {
284
288
  this.dispatchEventToListeners(Events.ModelWasEnabled);
285
289
  }
286
290
 
287
- async matchedStylesPromise(nodeId: Protocol.DOM.NodeId): Promise<CSSMatchedStyles|null> {
291
+ async getMatchedStyles(nodeId: Protocol.DOM.NodeId): Promise<CSSMatchedStyles|null> {
288
292
  const response = await this.agent.invoke_getMatchedStylesForNode({nodeId});
289
293
 
290
294
  if (response.getError()) {
@@ -302,16 +306,16 @@ export class CSSModel extends SDKModel<EventTypes> {
302
306
  response.cssKeyframesRules || []);
303
307
  }
304
308
 
305
- async classNamesPromise(styleSheetId: Protocol.CSS.StyleSheetId): Promise<string[]> {
309
+ async getClassNames(styleSheetId: Protocol.CSS.StyleSheetId): Promise<string[]> {
306
310
  const {classNames} = await this.agent.invoke_collectClassNames({styleSheetId});
307
311
  return classNames || [];
308
312
  }
309
313
 
310
- computedStylePromise(nodeId: Protocol.DOM.NodeId): Promise<Map<string, string>|null> {
314
+ getComputedStyle(nodeId: Protocol.DOM.NodeId): Promise<Map<string, string>|null> {
311
315
  return this.#styleLoader.computedStylePromise(nodeId);
312
316
  }
313
317
 
314
- async backgroundColorsPromise(nodeId: Protocol.DOM.NodeId): Promise<ContrastInfo|null> {
318
+ async getBackgroundColors(nodeId: Protocol.DOM.NodeId): Promise<ContrastInfo|null> {
315
319
  const response = await this.agent.invoke_getBackgroundColors({nodeId});
316
320
  if (response.getError()) {
317
321
  return null;
@@ -324,7 +328,7 @@ export class CSSModel extends SDKModel<EventTypes> {
324
328
  };
325
329
  }
326
330
 
327
- async platformFontsPromise(nodeId: Protocol.DOM.NodeId): Promise<Protocol.CSS.PlatformFontUsage[]|null> {
331
+ async getPlatformFonts(nodeId: Protocol.DOM.NodeId): Promise<Protocol.CSS.PlatformFontUsage[]|null> {
328
332
  const {fonts} = await this.agent.invoke_getPlatformFontsForNode({nodeId});
329
333
  return fonts;
330
334
  }
@@ -345,7 +349,7 @@ export class CSSModel extends SDKModel<EventTypes> {
345
349
  return values;
346
350
  }
347
351
 
348
- async inlineStylesPromise(nodeId: Protocol.DOM.NodeId): Promise<InlineStyleResult|null> {
352
+ async getInlineStyles(nodeId: Protocol.DOM.NodeId): Promise<InlineStyleResult|null> {
349
353
  const response = await this.agent.invoke_getInlineStylesForNode({nodeId});
350
354
 
351
355
  if (response.getError() || !response.inlineStyle) {
@@ -698,7 +702,7 @@ export class CSSModel extends SDKModel<EventTypes> {
698
702
  this.#cachedMatchedCascadeNode = node;
699
703
  if (!this.#cachedMatchedCascadePromise) {
700
704
  if (node.id) {
701
- this.#cachedMatchedCascadePromise = this.matchedStylesPromise(node.id);
705
+ this.#cachedMatchedCascadePromise = this.getMatchedStyles(node.id);
702
706
  } else {
703
707
  return Promise.resolve(null);
704
708
  }
@@ -182,7 +182,7 @@ export function registerCommands(inspectorBackend) {
182
182
  []);
183
183
 
184
184
  // Audits.
185
- inspectorBackend.registerEnum('Audits.SameSiteCookieExclusionReason', {
185
+ inspectorBackend.registerEnum('Audits.CookieExclusionReason', {
186
186
  ExcludeSameSiteUnspecifiedTreatedAsLax: 'ExcludeSameSiteUnspecifiedTreatedAsLax',
187
187
  ExcludeSameSiteNoneInsecure: 'ExcludeSameSiteNoneInsecure',
188
188
  ExcludeSameSiteLax: 'ExcludeSameSiteLax',
@@ -190,7 +190,7 @@ export function registerCommands(inspectorBackend) {
190
190
  ExcludeInvalidSameParty: 'ExcludeInvalidSameParty',
191
191
  ExcludeSamePartyCrossPartyContext: 'ExcludeSamePartyCrossPartyContext'
192
192
  });
193
- inspectorBackend.registerEnum('Audits.SameSiteCookieWarningReason', {
193
+ inspectorBackend.registerEnum('Audits.CookieWarningReason', {
194
194
  WarnSameSiteUnspecifiedCrossSiteContext: 'WarnSameSiteUnspecifiedCrossSiteContext',
195
195
  WarnSameSiteNoneInsecure: 'WarnSameSiteNoneInsecure',
196
196
  WarnSameSiteUnspecifiedLaxAllowUnsafe: 'WarnSameSiteUnspecifiedLaxAllowUnsafe',
@@ -198,9 +198,10 @@ export function registerCommands(inspectorBackend) {
198
198
  WarnSameSiteStrictCrossDowngradeStrict: 'WarnSameSiteStrictCrossDowngradeStrict',
199
199
  WarnSameSiteStrictCrossDowngradeLax: 'WarnSameSiteStrictCrossDowngradeLax',
200
200
  WarnSameSiteLaxCrossDowngradeStrict: 'WarnSameSiteLaxCrossDowngradeStrict',
201
- WarnSameSiteLaxCrossDowngradeLax: 'WarnSameSiteLaxCrossDowngradeLax'
201
+ WarnSameSiteLaxCrossDowngradeLax: 'WarnSameSiteLaxCrossDowngradeLax',
202
+ WarnAttributeValueExceedsMaxSize: 'WarnAttributeValueExceedsMaxSize'
202
203
  });
203
- inspectorBackend.registerEnum('Audits.SameSiteCookieOperation', {SetCookie: 'SetCookie', ReadCookie: 'ReadCookie'});
204
+ inspectorBackend.registerEnum('Audits.CookieOperation', {SetCookie: 'SetCookie', ReadCookie: 'ReadCookie'});
204
205
  inspectorBackend.registerEnum('Audits.MixedContentResolutionStatus', {
205
206
  MixedContentBlocked: 'MixedContentBlocked',
206
207
  MixedContentAutomaticallyUpgraded: 'MixedContentAutomaticallyUpgraded',
@@ -301,7 +302,7 @@ export function registerCommands(inspectorBackend) {
301
302
  Canceled: 'Canceled'
302
303
  });
303
304
  inspectorBackend.registerEnum('Audits.InspectorIssueCode', {
304
- SameSiteCookieIssue: 'SameSiteCookieIssue',
305
+ CookieIssue: 'CookieIssue',
305
306
  MixedContentIssue: 'MixedContentIssue',
306
307
  BlockedByResponseIssue: 'BlockedByResponseIssue',
307
308
  HeavyAdIssue: 'HeavyAdIssue',
@@ -696,7 +696,7 @@ export namespace Audits {
696
696
  frameId: Page.FrameId;
697
697
  }
698
698
 
699
- export const enum SameSiteCookieExclusionReason {
699
+ export const enum CookieExclusionReason {
700
700
  ExcludeSameSiteUnspecifiedTreatedAsLax = 'ExcludeSameSiteUnspecifiedTreatedAsLax',
701
701
  ExcludeSameSiteNoneInsecure = 'ExcludeSameSiteNoneInsecure',
702
702
  ExcludeSameSiteLax = 'ExcludeSameSiteLax',
@@ -705,7 +705,7 @@ export namespace Audits {
705
705
  ExcludeSamePartyCrossPartyContext = 'ExcludeSamePartyCrossPartyContext',
706
706
  }
707
707
 
708
- export const enum SameSiteCookieWarningReason {
708
+ export const enum CookieWarningReason {
709
709
  WarnSameSiteUnspecifiedCrossSiteContext = 'WarnSameSiteUnspecifiedCrossSiteContext',
710
710
  WarnSameSiteNoneInsecure = 'WarnSameSiteNoneInsecure',
711
711
  WarnSameSiteUnspecifiedLaxAllowUnsafe = 'WarnSameSiteUnspecifiedLaxAllowUnsafe',
@@ -714,9 +714,10 @@ export namespace Audits {
714
714
  WarnSameSiteStrictCrossDowngradeLax = 'WarnSameSiteStrictCrossDowngradeLax',
715
715
  WarnSameSiteLaxCrossDowngradeStrict = 'WarnSameSiteLaxCrossDowngradeStrict',
716
716
  WarnSameSiteLaxCrossDowngradeLax = 'WarnSameSiteLaxCrossDowngradeLax',
717
+ WarnAttributeValueExceedsMaxSize = 'WarnAttributeValueExceedsMaxSize',
717
718
  }
718
719
 
719
- export const enum SameSiteCookieOperation {
720
+ export const enum CookieOperation {
720
721
  SetCookie = 'SetCookie',
721
722
  ReadCookie = 'ReadCookie',
722
723
  }
@@ -726,7 +727,7 @@ export namespace Audits {
726
727
  * time finding a specific cookie. With this, we can convey specific error
727
728
  * information without the cookie.
728
729
  */
729
- export interface SameSiteCookieIssueDetails {
730
+ export interface CookieIssueDetails {
730
731
  /**
731
732
  * If AffectedCookie is not set then rawCookieLine contains the raw
732
733
  * Set-Cookie header string. This hints at a problem where the
@@ -735,13 +736,13 @@ export namespace Audits {
735
736
  */
736
737
  cookie?: AffectedCookie;
737
738
  rawCookieLine?: string;
738
- cookieWarningReasons: SameSiteCookieWarningReason[];
739
- cookieExclusionReasons: SameSiteCookieExclusionReason[];
739
+ cookieWarningReasons: CookieWarningReason[];
740
+ cookieExclusionReasons: CookieExclusionReason[];
740
741
  /**
741
742
  * Optionally identifies the site-for-cookies and the cookie url, which
742
743
  * may be used by the front-end as additional context.
743
744
  */
744
- operation: SameSiteCookieOperation;
745
+ operation: CookieOperation;
745
746
  siteForCookies?: string;
746
747
  cookieUrl?: string;
747
748
  request?: AffectedRequest;
@@ -1096,7 +1097,7 @@ export namespace Audits {
1096
1097
  * information about the kind of issue.
1097
1098
  */
1098
1099
  export const enum InspectorIssueCode {
1099
- SameSiteCookieIssue = 'SameSiteCookieIssue',
1100
+ CookieIssue = 'CookieIssue',
1100
1101
  MixedContentIssue = 'MixedContentIssue',
1101
1102
  BlockedByResponseIssue = 'BlockedByResponseIssue',
1102
1103
  HeavyAdIssue = 'HeavyAdIssue',
@@ -1120,7 +1121,7 @@ export namespace Audits {
1120
1121
  * add a new optional field to this type.
1121
1122
  */
1122
1123
  export interface InspectorIssueDetails {
1123
- sameSiteCookieIssueDetails?: SameSiteCookieIssueDetails;
1124
+ cookieIssueDetails?: CookieIssueDetails;
1124
1125
  mixedContentIssueDetails?: MixedContentIssueDetails;
1125
1126
  blockedByResponseIssueDetails?: BlockedByResponseIssueDetails;
1126
1127
  heavyAdIssueDetails?: HeavyAdIssueDetails;
@@ -34,15 +34,14 @@ const UIStrings = {
34
34
  */
35
35
  firstPartySetsExplained: '`First-Party Sets` and the `SameParty` attribute',
36
36
  };
37
- const str_ = i18n.i18n.registerUIStrings('models/issues_manager/SameSiteCookieIssue.ts', UIStrings);
37
+ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieIssue.ts', UIStrings);
38
38
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
39
39
 
40
- export class SameSiteCookieIssue extends Issue {
41
- #issueDetails: Protocol.Audits.SameSiteCookieIssueDetails;
40
+ export class CookieIssue extends Issue {
41
+ #issueDetails: Protocol.Audits.CookieIssueDetails;
42
42
 
43
43
  constructor(
44
- code: string, issueDetails: Protocol.Audits.SameSiteCookieIssueDetails,
45
- issuesModel: SDK.IssuesModel.IssuesModel) {
44
+ code: string, issueDetails: Protocol.Audits.CookieIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
46
45
  super(code, issuesModel);
47
46
  this.#issueDetails = issueDetails;
48
47
  }
@@ -62,35 +61,34 @@ export class SameSiteCookieIssue extends Issue {
62
61
  }
63
62
 
64
63
  /**
65
- * Returns an array of issues from a given SameSiteCookieIssueDetails.
64
+ * Returns an array of issues from a given CookieIssueDetails.
66
65
  */
67
- static createIssuesFromSameSiteDetails(
68
- sameSiteDetails: Protocol.Audits.SameSiteCookieIssueDetails,
69
- issuesModel: SDK.IssuesModel.IssuesModel): SameSiteCookieIssue[] {
70
- const issues: SameSiteCookieIssue[] = [];
66
+ static createIssuesFromCookieIssueDetails(
67
+ cookieIssueDetails: Protocol.Audits.CookieIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel): CookieIssue[] {
68
+ const issues: CookieIssue[] = [];
71
69
 
72
70
  // Exclusion reasons have priority. It means a cookie was blocked. Create an issue
73
71
  // for every exclusion reason but ignore warning reasons if the cookie was blocked.
74
72
  // Some exclusion reasons are dependent on warning reasons existing in order to produce an issue.
75
- if (sameSiteDetails.cookieExclusionReasons && sameSiteDetails.cookieExclusionReasons.length > 0) {
76
- for (const exclusionReason of sameSiteDetails.cookieExclusionReasons) {
77
- const code = SameSiteCookieIssue.codeForSameSiteDetails(
78
- exclusionReason, sameSiteDetails.cookieWarningReasons, sameSiteDetails.operation,
79
- sameSiteDetails.cookieUrl);
73
+ if (cookieIssueDetails.cookieExclusionReasons && cookieIssueDetails.cookieExclusionReasons.length > 0) {
74
+ for (const exclusionReason of cookieIssueDetails.cookieExclusionReasons) {
75
+ const code = CookieIssue.codeForCookieIssueDetails(
76
+ exclusionReason, cookieIssueDetails.cookieWarningReasons, cookieIssueDetails.operation,
77
+ cookieIssueDetails.cookieUrl);
80
78
  if (code) {
81
- issues.push(new SameSiteCookieIssue(code, sameSiteDetails, issuesModel));
79
+ issues.push(new CookieIssue(code, cookieIssueDetails, issuesModel));
82
80
  }
83
81
  }
84
82
  return issues;
85
83
  }
86
84
 
87
- if (sameSiteDetails.cookieWarningReasons) {
88
- for (const warningReason of sameSiteDetails.cookieWarningReasons) {
85
+ if (cookieIssueDetails.cookieWarningReasons) {
86
+ for (const warningReason of cookieIssueDetails.cookieWarningReasons) {
89
87
  // warningReasons should be an empty array here.
90
- const code = SameSiteCookieIssue.codeForSameSiteDetails(
91
- warningReason, [], sameSiteDetails.operation, sameSiteDetails.cookieUrl);
88
+ const code = CookieIssue.codeForCookieIssueDetails(
89
+ warningReason, [], cookieIssueDetails.operation, cookieIssueDetails.cookieUrl);
92
90
  if (code) {
93
- issues.push(new SameSiteCookieIssue(code, sameSiteDetails, issuesModel));
91
+ issues.push(new CookieIssue(code, cookieIssueDetails, issuesModel));
94
92
  }
95
93
  }
96
94
  }
@@ -99,36 +97,35 @@ export class SameSiteCookieIssue extends Issue {
99
97
 
100
98
  /**
101
99
  * Calculates an issue code from a reason, an operation, and an array of warningReasons. All these together
102
- * can uniquely identify a specific SameSite cookie issue.
103
- * warningReasons is only needed for some SameSiteCookieExclusionReason in order to determine if an issue should be raised.
104
- * It is not required if reason is a SameSiteCookieWarningReason.
100
+ * can uniquely identify a specific cookie issue.
101
+ * warningReasons is only needed for some CookieExclusionReason in order to determine if an issue should be raised.
102
+ * It is not required if reason is a CookieWarningReason.
105
103
  */
106
- static codeForSameSiteDetails(
107
- reason: Protocol.Audits.SameSiteCookieExclusionReason|Protocol.Audits.SameSiteCookieWarningReason,
108
- warningReasons: Protocol.Audits.SameSiteCookieWarningReason[], operation: Protocol.Audits.SameSiteCookieOperation,
104
+ static codeForCookieIssueDetails(
105
+ reason: Protocol.Audits.CookieExclusionReason|Protocol.Audits.CookieWarningReason,
106
+ warningReasons: Protocol.Audits.CookieWarningReason[], operation: Protocol.Audits.CookieOperation,
109
107
  cookieUrl?: string): string|null {
110
108
  const isURLSecure = cookieUrl && (cookieUrl.startsWith('https://') || cookieUrl.startsWith('wss://'));
111
109
  const secure = isURLSecure ? 'Secure' : 'Insecure';
112
110
 
113
- if (reason === Protocol.Audits.SameSiteCookieExclusionReason.ExcludeSameSiteStrict ||
114
- reason === Protocol.Audits.SameSiteCookieExclusionReason.ExcludeSameSiteLax ||
115
- reason === Protocol.Audits.SameSiteCookieExclusionReason.ExcludeSameSiteUnspecifiedTreatedAsLax) {
111
+ if (reason === Protocol.Audits.CookieExclusionReason.ExcludeSameSiteStrict ||
112
+ reason === Protocol.Audits.CookieExclusionReason.ExcludeSameSiteLax ||
113
+ reason === Protocol.Audits.CookieExclusionReason.ExcludeSameSiteUnspecifiedTreatedAsLax) {
116
114
  if (warningReasons && warningReasons.length > 0) {
117
- if (warningReasons.includes(Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictLaxDowngradeStrict)) {
115
+ if (warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteStrictLaxDowngradeStrict)) {
118
116
  return [
119
- Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue,
117
+ Protocol.Audits.InspectorIssueCode.CookieIssue,
120
118
  'ExcludeNavigationContextDowngrade',
121
119
  secure,
122
120
  ].join('::');
123
121
  }
124
122
 
125
- if (warningReasons.includes(
126
- Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictCrossDowngradeStrict) ||
127
- warningReasons.includes(Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictCrossDowngradeLax) ||
128
- warningReasons.includes(Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteLaxCrossDowngradeStrict) ||
129
- warningReasons.includes(Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteLaxCrossDowngradeLax)) {
123
+ if (warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteStrictCrossDowngradeStrict) ||
124
+ warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteStrictCrossDowngradeLax) ||
125
+ warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteLaxCrossDowngradeStrict) ||
126
+ warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteLaxCrossDowngradeLax)) {
130
127
  return [
131
- Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue,
128
+ Protocol.Audits.InspectorIssueCode.CookieIssue,
132
129
  'ExcludeContextDowngrade',
133
130
  operation,
134
131
  secure,
@@ -138,8 +135,8 @@ export class SameSiteCookieIssue extends Issue {
138
135
 
139
136
  // If we have ExcludeSameSiteUnspecifiedTreatedAsLax but no corresponding warnings, then add just
140
137
  // the Issue code for ExcludeSameSiteUnspecifiedTreatedAsLax.
141
- if (reason === Protocol.Audits.SameSiteCookieExclusionReason.ExcludeSameSiteUnspecifiedTreatedAsLax) {
142
- return [Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue, reason, operation].join('::');
138
+ if (reason === Protocol.Audits.CookieExclusionReason.ExcludeSameSiteUnspecifiedTreatedAsLax) {
139
+ return [Protocol.Audits.InspectorIssueCode.CookieIssue, reason, operation].join('::');
143
140
  }
144
141
 
145
142
  // ExcludeSameSiteStrict and ExcludeSameSiteLax require being paired with an appropriate warning. We didn't
@@ -147,18 +144,17 @@ export class SameSiteCookieIssue extends Issue {
147
144
  return null;
148
145
  }
149
146
 
150
- if (reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictLaxDowngradeStrict) {
151
- return [Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue, reason, secure].join('::');
147
+ if (reason === Protocol.Audits.CookieWarningReason.WarnSameSiteStrictLaxDowngradeStrict) {
148
+ return [Protocol.Audits.InspectorIssueCode.CookieIssue, reason, secure].join('::');
152
149
  }
153
150
  // These have the same message.
154
- if (reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictCrossDowngradeStrict ||
155
- reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictCrossDowngradeLax ||
156
- reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteLaxCrossDowngradeLax ||
157
- reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteLaxCrossDowngradeStrict) {
158
- return [Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue, 'WarnCrossDowngrade', operation, secure].join(
159
- '::');
151
+ if (reason === Protocol.Audits.CookieWarningReason.WarnSameSiteStrictCrossDowngradeStrict ||
152
+ reason === Protocol.Audits.CookieWarningReason.WarnSameSiteStrictCrossDowngradeLax ||
153
+ reason === Protocol.Audits.CookieWarningReason.WarnSameSiteLaxCrossDowngradeLax ||
154
+ reason === Protocol.Audits.CookieWarningReason.WarnSameSiteLaxCrossDowngradeStrict) {
155
+ return [Protocol.Audits.InspectorIssueCode.CookieIssue, 'WarnCrossDowngrade', operation, secure].join('::');
160
156
  }
161
- return [Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue, reason, operation].join('::');
157
+ return [Protocol.Audits.InspectorIssueCode.CookieIssue, reason, operation].join('::');
162
158
  }
163
159
 
164
160
  cookies(): Iterable<Protocol.Audits.AffectedCookie> {
@@ -183,7 +179,7 @@ export class SameSiteCookieIssue extends Issue {
183
179
  }
184
180
 
185
181
  getCategory(): IssueCategory {
186
- return IssueCategory.SameSiteCookie;
182
+ return IssueCategory.Cookie;
187
183
  }
188
184
 
189
185
  getDescription(): MarkdownIssueDescription|null {
@@ -207,14 +203,14 @@ export class SameSiteCookieIssue extends Issue {
207
203
  }
208
204
 
209
205
  static fromInspectorIssue(issuesModel: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue):
210
- SameSiteCookieIssue[] {
211
- const sameSiteDetails = inspectorIssue.details.sameSiteCookieIssueDetails;
212
- if (!sameSiteDetails) {
213
- console.warn('SameSite issue without details received.');
206
+ CookieIssue[] {
207
+ const cookieIssueDetails = inspectorIssue.details.cookieIssueDetails;
208
+ if (!cookieIssueDetails) {
209
+ console.warn('Cookie issue without details received.');
214
210
  return [];
215
211
  }
216
212
 
217
- return SameSiteCookieIssue.createIssuesFromSameSiteDetails(sameSiteDetails, issuesModel);
213
+ return CookieIssue.createIssuesFromCookieIssueDetails(cookieIssueDetails, issuesModel);
218
214
  }
219
215
  }
220
216
 
@@ -431,32 +427,32 @@ const samePartyCrossPartyContextSet: LazyMarkdownIssueDescription = {
431
427
  };
432
428
 
433
429
  const issueDescriptions: Map<string, LazyMarkdownIssueDescription> = new Map([
434
- ['SameSiteCookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie', sameSiteUnspecifiedErrorRead],
435
- ['SameSiteCookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie', sameSiteUnspecifiedErrorSet],
430
+ ['CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie', sameSiteUnspecifiedErrorRead],
431
+ ['CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie', sameSiteUnspecifiedErrorSet],
436
432
  // These two don't have a deprecation date yet, but they need to be fixed eventually.
437
- ['SameSiteCookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie', sameSiteUnspecifiedWarnRead],
438
- ['SameSiteCookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie', sameSiteUnspecifiedWarnSet],
439
- ['SameSiteCookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie', sameSiteUnspecifiedWarnRead],
440
- ['SameSiteCookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie', sameSiteUnspecifiedWarnSet],
441
- ['SameSiteCookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie', sameSiteNoneInsecureErrorRead],
442
- ['SameSiteCookieIssue::ExcludeSameSiteNoneInsecure::SetCookie', sameSiteNoneInsecureErrorSet],
443
- ['SameSiteCookieIssue::WarnSameSiteNoneInsecure::ReadCookie', sameSiteNoneInsecureWarnRead],
444
- ['SameSiteCookieIssue::WarnSameSiteNoneInsecure::SetCookie', sameSiteNoneInsecureWarnSet],
445
- ['SameSiteCookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure', sameSiteWarnStrictLaxDowngradeStrict(true)],
446
- ['SameSiteCookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure', sameSiteWarnStrictLaxDowngradeStrict(false)],
447
- ['SameSiteCookieIssue::WarnCrossDowngrade::ReadCookie::Secure', sameSiteWarnCrossDowngradeRead(true)],
448
- ['SameSiteCookieIssue::WarnCrossDowngrade::ReadCookie::Insecure', sameSiteWarnCrossDowngradeRead(false)],
449
- ['SameSiteCookieIssue::WarnCrossDowngrade::SetCookie::Secure', sameSiteWarnCrossDowngradeSet(true)],
450
- ['SameSiteCookieIssue::WarnCrossDowngrade::SetCookie::Insecure', sameSiteWarnCrossDowngradeSet(false)],
451
- ['SameSiteCookieIssue::ExcludeNavigationContextDowngrade::Secure', sameSiteExcludeNavigationContextDowngrade(true)],
433
+ ['CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie', sameSiteUnspecifiedWarnRead],
434
+ ['CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie', sameSiteUnspecifiedWarnSet],
435
+ ['CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie', sameSiteUnspecifiedWarnRead],
436
+ ['CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie', sameSiteUnspecifiedWarnSet],
437
+ ['CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie', sameSiteNoneInsecureErrorRead],
438
+ ['CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie', sameSiteNoneInsecureErrorSet],
439
+ ['CookieIssue::WarnSameSiteNoneInsecure::ReadCookie', sameSiteNoneInsecureWarnRead],
440
+ ['CookieIssue::WarnSameSiteNoneInsecure::SetCookie', sameSiteNoneInsecureWarnSet],
441
+ ['CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure', sameSiteWarnStrictLaxDowngradeStrict(true)],
442
+ ['CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure', sameSiteWarnStrictLaxDowngradeStrict(false)],
443
+ ['CookieIssue::WarnCrossDowngrade::ReadCookie::Secure', sameSiteWarnCrossDowngradeRead(true)],
444
+ ['CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure', sameSiteWarnCrossDowngradeRead(false)],
445
+ ['CookieIssue::WarnCrossDowngrade::SetCookie::Secure', sameSiteWarnCrossDowngradeSet(true)],
446
+ ['CookieIssue::WarnCrossDowngrade::SetCookie::Insecure', sameSiteWarnCrossDowngradeSet(false)],
447
+ ['CookieIssue::ExcludeNavigationContextDowngrade::Secure', sameSiteExcludeNavigationContextDowngrade(true)],
452
448
  [
453
- 'SameSiteCookieIssue::ExcludeNavigationContextDowngrade::Insecure',
449
+ 'CookieIssue::ExcludeNavigationContextDowngrade::Insecure',
454
450
  sameSiteExcludeNavigationContextDowngrade(false),
455
451
  ],
456
- ['SameSiteCookieIssue::ExcludeContextDowngrade::ReadCookie::Secure', sameSiteExcludeContextDowngradeRead(true)],
457
- ['SameSiteCookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure', sameSiteExcludeContextDowngradeRead(false)],
458
- ['SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Secure', sameSiteExcludeContextDowngradeSet(true)],
459
- ['SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Insecure', sameSiteExcludeContextDowngradeSet(false)],
460
- ['SameSiteCookieIssue::ExcludeInvalidSameParty::SetCookie', sameSiteInvalidSameParty],
461
- ['SameSiteCookieIssue::ExcludeSamePartyCrossPartyContext::SetCookie', samePartyCrossPartyContextSet],
452
+ ['CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure', sameSiteExcludeContextDowngradeRead(true)],
453
+ ['CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure', sameSiteExcludeContextDowngradeRead(false)],
454
+ ['CookieIssue::ExcludeContextDowngrade::SetCookie::Secure', sameSiteExcludeContextDowngradeSet(true)],
455
+ ['CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure', sameSiteExcludeContextDowngradeSet(false)],
456
+ ['CookieIssue::ExcludeInvalidSameParty::SetCookie', sameSiteInvalidSameParty],
457
+ ['CookieIssue::ExcludeSamePartyCrossPartyContext::SetCookie', samePartyCrossPartyContextSet],
462
458
  ]);
@@ -44,7 +44,7 @@ export enum IssueCategory {
44
44
  CrossOriginEmbedderPolicy = 'CrossOriginEmbedderPolicy',
45
45
  Generic = 'Generic',
46
46
  MixedContent = 'MixedContent',
47
- SameSiteCookie = 'SameSiteCookie',
47
+ Cookie = 'Cookie',
48
48
  HeavyAd = 'HeavyAd',
49
49
  ContentSecurityPolicy = 'ContentSecurityPolicy',
50
50
  TrustedWebActivity = 'TrustedWebActivity',
@@ -22,7 +22,7 @@ import {LowTextContrastIssue} from './LowTextContrastIssue.js';
22
22
  import {MixedContentIssue} from './MixedContentIssue.js';
23
23
  import {NavigatorUserAgentIssue} from './NavigatorUserAgentIssue.js';
24
24
  import {QuirksModeIssue} from './QuirksModeIssue.js';
25
- import {SameSiteCookieIssue} from './SameSiteCookieIssue.js';
25
+ import {CookieIssue} from './CookieIssue.js';
26
26
  import {SharedArrayBufferIssue} from './SharedArrayBufferIssue.js';
27
27
  import {SourceFrameIssuesManager} from './SourceFrameIssuesManager.js';
28
28
  import {TrustedWebActivityIssue} from './TrustedWebActivityIssue.js';
@@ -49,8 +49,8 @@ const issueCodeHandlers = new Map<
49
49
  Protocol.Audits.InspectorIssueCode,
50
50
  (model: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue) => Issue[]>([
51
51
  [
52
- Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue,
53
- SameSiteCookieIssue.fromInspectorIssue,
52
+ Protocol.Audits.InspectorIssueCode.CookieIssue,
53
+ CookieIssue.fromInspectorIssue,
54
54
  ],
55
55
  [
56
56
  Protocol.Audits.InspectorIssueCode.MixedContentIssue,
@@ -117,12 +117,6 @@ const issueCodeHandlers = new Map<
117
117
  */
118
118
  function createIssuesFromProtocolIssue(
119
119
  issuesModel: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue): Issue[] {
120
- if (inspectorIssue.code.toString() === 'CookieIssue') {
121
- // TODO: backward compatibility for the next chromium roll
122
- const details = inspectorIssue.details as {cookieIssueDetails: Protocol.Audits.SameSiteCookieIssueDetails};
123
- inspectorIssue.code = Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue;
124
- inspectorIssue.details.sameSiteCookieIssueDetails = details.cookieIssueDetails;
125
- }
126
120
  const handler = issueCodeHandlers.get(inspectorIssue.code);
127
121
  if (handler) {
128
122
  return handler(issuesModel, inspectorIssue);
@@ -8,7 +8,7 @@ import type * as Protocol from '../../generated/protocol.js';
8
8
 
9
9
  import {Issue, IssueCategory, IssueKind} from './Issue.js';
10
10
  import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
- import {isCausedByThirdParty} from './SameSiteCookieIssue.js';
11
+ import {isCausedByThirdParty} from './CookieIssue.js';
12
12
 
13
13
  const UIStrings = {
14
14
  /**
@@ -6,6 +6,7 @@ import * as AttributionReportingIssue from './AttributionReportingIssue.js';
6
6
  import * as ClientHintIssue from './ClientHintIssue.js';
7
7
  import * as ContentSecurityPolicyIssue from './ContentSecurityPolicyIssue.js';
8
8
  import * as ContrastCheckTrigger from './ContrastCheckTrigger.js';
9
+ import * as CookieIssue from './CookieIssue.js';
9
10
  import * as CorsIssue from './CorsIssue.js';
10
11
  import * as CrossOriginEmbedderPolicyIssue from './CrossOriginEmbedderPolicyIssue.js';
11
12
  import * as DeprecationIssue from './DeprecationIssue.js';
@@ -20,7 +21,6 @@ import * as MixedContentIssue from './MixedContentIssue.js';
20
21
  import * as NavigatorUserAgentIssue from './NavigatorUserAgentIssue.js';
21
22
  import * as QuirksModeIssue from './QuirksModeIssue.js';
22
23
  import * as RelatedIssue from './RelatedIssue.js';
23
- import * as SameSiteCookieIssue from './SameSiteCookieIssue.js';
24
24
  import * as SharedArrayBufferIssue from './SharedArrayBufferIssue.js';
25
25
  import * as SourceFrameIssuesManager from './SourceFrameIssuesManager.js';
26
26
  import * as TrustedWebActivityIssue from './TrustedWebActivityIssue.js';
@@ -30,6 +30,7 @@ export {
30
30
  ClientHintIssue,
31
31
  ContentSecurityPolicyIssue,
32
32
  ContrastCheckTrigger,
33
+ CookieIssue,
33
34
  CorsIssue,
34
35
  CrossOriginEmbedderPolicyIssue,
35
36
  DeprecationIssue,
@@ -44,7 +45,6 @@ export {
44
45
  NavigatorUserAgentIssue,
45
46
  QuirksModeIssue,
46
47
  RelatedIssue,
47
- SameSiteCookieIssue,
48
48
  SharedArrayBufferIssue,
49
49
  SourceFrameIssuesManager,
50
50
  TrustedWebActivityIssue,
@@ -421,7 +421,7 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
421
421
  await this.#innerUpdateInterceptionPatterns();
422
422
  }
423
423
 
424
- private updateInterceptionPatterns(): void {
424
+ updateInterceptionPatterns(): void {
425
425
  void this.updateInterceptionThrottler.schedule(this.#innerUpdateInterceptionPatterns.bind(this));
426
426
  }
427
427
 
@@ -13,6 +13,7 @@ import * as Protocol from '../../../generated/protocol.js';
13
13
  import * as IconButton from '../../../ui/components/icon_button/icon_button.js';
14
14
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
15
15
  import * as Coordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
16
+ import * as ChromeLink from '../../../ui/components/chrome_link/chrome_link.js';
16
17
 
17
18
  import {NotRestoredReasonDescription} from './BackForwardCacheStrings.js';
18
19
  import backForwardCacheViewStyles from './backForwardCacheView.css.js';
@@ -97,6 +98,10 @@ const UIStrings = {
97
98
  */
98
99
  supportPendingExplanation:
99
100
  'Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for back/forward cache in a future version of Chrome.',
101
+ /**
102
+ * @description Text that precedes displaying a link to the extension which blocked the page from being eligible for back/forward cache.
103
+ */
104
+ blockingExtensionId: 'Extension id: ',
100
105
  };
101
106
  const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheView.ts', UIStrings);
102
107
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -370,6 +375,20 @@ export class BackForwardCacheView extends HTMLElement {
370
375
  // clang-format on
371
376
  }
372
377
 
378
+ #maybeRenderReasonContext(explanation: Protocol.Page.BackForwardCacheNotRestoredExplanation): LitHtml.TemplateResult|
379
+ {} {
380
+ if (explanation.reason ===
381
+ Protocol.Page.BackForwardCacheNotRestoredReason.EmbedderExtensionSentMessageToCachedFrame &&
382
+ explanation.context) {
383
+ const link = 'chrome://extensions/?id=' + explanation.context;
384
+ // clang-format off
385
+ return LitHtml.html`${i18nString(UIStrings.blockingExtensionId)}
386
+ <${ChromeLink.ChromeLink.ChromeLink.litTagName} .href=${link}>${explanation.context}</${ChromeLink.ChromeLink.ChromeLink.litTagName}>`;
387
+ // clang-format on
388
+ }
389
+ return LitHtml.nothing;
390
+ }
391
+
373
392
  #renderReason(explanation: Protocol.Page.BackForwardCacheNotRestoredExplanation): LitHtml.TemplateResult {
374
393
  // clang-format off
375
394
  return LitHtml.html`
@@ -385,7 +404,10 @@ export class BackForwardCacheView extends HTMLElement {
385
404
  } as IconButton.Icon.IconData}>
386
405
  </${IconButton.Icon.Icon.litTagName}>
387
406
  </div>
388
- ${NotRestoredReasonDescription[explanation.reason].name()}` :
407
+ <div>
408
+ ${NotRestoredReasonDescription[explanation.reason].name()}
409
+ ${this.#maybeRenderReasonContext(explanation)}
410
+ </div>` :
389
411
  LitHtml.nothing}
390
412
  </${ReportView.ReportView.ReportSection.litTagName}>
391
413
  <div class='gray-text'>
@@ -313,7 +313,7 @@ export class ClassNamePrompt extends UI.TextPrompt.TextPrompt {
313
313
  if (stylesheet.frameId !== this.selectedFrameId) {
314
314
  continue;
315
315
  }
316
- const cssPromise = cssModel.classNamesPromise(stylesheet.id).then(classes => {
316
+ const cssPromise = cssModel.getClassNames(stylesheet.id).then(classes => {
317
317
  for (const className of classes) {
318
318
  completions.add(className);
319
319
  }
@@ -106,7 +106,7 @@ export class ComputedStyleModel extends Common.ObjectWrapper.ObjectWrapper<Event
106
106
  }
107
107
 
108
108
  if (!this.computedStylePromise) {
109
- this.computedStylePromise = cssModel.computedStylePromise(nodeId).then(verifyOutdated.bind(this, elementNode));
109
+ this.computedStylePromise = cssModel.getComputedStyle(nodeId).then(verifyOutdated.bind(this, elementNode));
110
110
  }
111
111
 
112
112
  return this.computedStylePromise;
@@ -1996,7 +1996,7 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
1996
1996
  return;
1997
1997
  }
1998
1998
 
1999
- const styles = await node.domModel().cssModel().computedStylePromise(nodeId);
1999
+ const styles = await node.domModel().cssModel().getComputedStyle(nodeId);
2000
2000
  for (const styleAdorner of this.styleAdorners) {
2001
2001
  this.removeAdorner(styleAdorner);
2002
2002
  }