chrome-devtools-frontend 1.0.1032322 → 1.0.1033742

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 (35) hide show
  1. package/config/gni/devtools_grd_files.gni +7 -0
  2. package/front_end/core/i18n/locales/en-US.json +6 -0
  3. package/front_end/core/i18n/locales/en-XL.json +6 -0
  4. package/front_end/core/sdk/CSSMetadata.ts +1 -0
  5. package/front_end/generated/InspectorBackendCommands.js +2 -2
  6. package/front_end/generated/SupportedCSSProperties.js +6 -6
  7. package/front_end/generated/protocol.ts +8 -0
  8. package/front_end/models/extensions/RecorderPluginManager.ts +16 -1
  9. package/front_end/models/extensions/extensions.ts +2 -0
  10. package/front_end/models/issues_manager/AttributionReportingIssue.ts +30 -4
  11. package/front_end/models/issues_manager/CookieIssue.ts +14 -0
  12. package/front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
  13. package/front_end/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
  14. package/front_end/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
  15. package/front_end/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
  16. package/front_end/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
  17. package/front_end/models/javascript_metadata/NativeFunctions.js +11 -3
  18. package/front_end/models/timeline_model/TimelineModel.ts +25 -12
  19. package/front_end/panels/console/ConsoleFormat.ts +8 -2
  20. package/front_end/panels/console/ConsolePinPane.ts +2 -2
  21. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +10 -0
  22. package/front_end/panels/network/RequestHTMLView.ts +1 -1
  23. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  24. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +10 -3
  25. package/front_end/third_party/codemirror.next/package.json +1 -1
  26. package/front_end/ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts +129 -0
  27. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +16 -2
  28. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +27 -4
  29. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +11 -6
  30. package/front_end/ui/components/linear_memory_inspector/linearMemoryHighlightChipList.css +92 -0
  31. package/front_end/ui/components/linear_memory_inspector/linear_memory_inspector.ts +2 -0
  32. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +1 -0
  33. package/front_end/ui/legacy/InspectorView.ts +6 -0
  34. package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +2 -2
  35. package/package.json +1 -1
@@ -286,9 +286,14 @@ grd_files_release_sources = [
286
286
  "front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md",
287
287
  "front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md",
288
288
  "front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md",
289
+ "front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md",
290
+ "front_end/models/issues_manager/descriptions/arSourceIgnored.md",
291
+ "front_end/models/issues_manager/descriptions/arTriggerIgnored.md",
289
292
  "front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md",
290
293
  "front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md",
291
294
  "front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md",
295
+ "front_end/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md",
296
+ "front_end/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md",
292
297
  "front_end/models/issues_manager/descriptions/corsAllowCredentialsRequired.md",
293
298
  "front_end/models/issues_manager/descriptions/corsDisabledScheme.md",
294
299
  "front_end/models/issues_manager/descriptions/corsDisallowedByMode.md",
@@ -1470,6 +1475,7 @@ grd_files_debug_sources = [
1470
1475
  "front_end/ui/components/issue_counter/IssueLinkIcon.js",
1471
1476
  "front_end/ui/components/issue_counter/issueCounter.css.js",
1472
1477
  "front_end/ui/components/issue_counter/issueLinkIcon.css.js",
1478
+ "front_end/ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.js",
1473
1479
  "front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.js",
1474
1480
  "front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.js",
1475
1481
  "front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.js",
@@ -1481,6 +1487,7 @@ grd_files_debug_sources = [
1481
1487
  "front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.js",
1482
1488
  "front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplayUtils.js",
1483
1489
  "front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.js",
1490
+ "front_end/ui/components/linear_memory_inspector/linearMemoryHighlightChipList.css.js",
1484
1491
  "front_end/ui/components/linear_memory_inspector/linearMemoryInspector.css.js",
1485
1492
  "front_end/ui/components/linear_memory_inspector/linearMemoryNavigator.css.js",
1486
1493
  "front_end/ui/components/linear_memory_inspector/linearMemoryValueInterpreter.css.js",
@@ -12149,6 +12149,12 @@
12149
12149
  "ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | showMemoryInspector": {
12150
12150
  "message": "Show Memory Inspector"
12151
12151
  },
12152
+ "ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | deleteHighlight": {
12153
+ "message": "Delete memory highlight"
12154
+ },
12155
+ "ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | jumpToAddress": {
12156
+ "message": "Jump to highlighted memory"
12157
+ },
12152
12158
  "ui/components/linear_memory_inspector/LinearMemoryInspector.ts | addressHasToBeANumberBetweenSAnd": {
12153
12159
  "message": "Address has to be a number between {PH1} and {PH2}"
12154
12160
  },
@@ -12149,6 +12149,12 @@
12149
12149
  "ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | showMemoryInspector": {
12150
12150
  "message": "Ŝh́ôẃ M̂ém̂ór̂ý Îńŝṕêćt̂ór̂"
12151
12151
  },
12152
+ "ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | deleteHighlight": {
12153
+ "message": "D̂él̂ét̂é m̂ém̂ór̂ý ĥíĝh́l̂íĝh́t̂"
12154
+ },
12155
+ "ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | jumpToAddress": {
12156
+ "message": "Ĵúm̂ṕ t̂ó ĥíĝh́l̂íĝh́t̂éd̂ ḿêḿôŕŷ"
12157
+ },
12152
12158
  "ui/components/linear_memory_inspector/LinearMemoryInspector.ts | addressHasToBeANumberBetweenSAnd": {
12153
12159
  "message": "Âd́d̂ŕêśŝ h́âś t̂ó b̂é â ńûḿb̂ér̂ b́êt́ŵéêń {PH1} âńd̂ {PH2}"
12154
12160
  },
@@ -465,6 +465,7 @@ const colorAwareProperties = new Set<string>([
465
465
  'list-style-image',
466
466
  'outline',
467
467
  'outline-color',
468
+ 'stop-color',
468
469
  'stroke',
469
470
  'text-decoration-color',
470
471
  'text-shadow',
@@ -63,7 +63,7 @@ inspectorBackend.registerEnum("Audits.HeavyAdReason", {NetworkTotalLimit: "Netwo
63
63
  inspectorBackend.registerEnum("Audits.ContentSecurityPolicyViolationType", {KInlineViolation: "kInlineViolation", KEvalViolation: "kEvalViolation", KURLViolation: "kURLViolation", KTrustedTypesSinkViolation: "kTrustedTypesSinkViolation", KTrustedTypesPolicyViolation: "kTrustedTypesPolicyViolation", KWasmEvalViolation: "kWasmEvalViolation"});
64
64
  inspectorBackend.registerEnum("Audits.SharedArrayBufferIssueType", {TransferIssue: "TransferIssue", CreationIssue: "CreationIssue"});
65
65
  inspectorBackend.registerEnum("Audits.TwaQualityEnforcementViolationType", {KHttpError: "kHttpError", KUnavailableOffline: "kUnavailableOffline", KDigitalAssetLinks: "kDigitalAssetLinks"});
66
- inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader", InvalidEligibleHeader: "InvalidEligibleHeader", TooManyConcurrentRequests: "TooManyConcurrentRequests"});
66
+ inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader", InvalidEligibleHeader: "InvalidEligibleHeader", TooManyConcurrentRequests: "TooManyConcurrentRequests", SourceAndTriggerHeaders: "SourceAndTriggerHeaders", SourceIgnored: "SourceIgnored", TriggerIgnored: "TriggerIgnored"});
67
67
  inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {CrossOriginPortalPostMessageError: "CrossOriginPortalPostMessageError"});
68
68
  inspectorBackend.registerEnum("Audits.DeprecationIssueType", {AuthorizationCoveredByWildcard: "AuthorizationCoveredByWildcard", CanRequestURLHTTPContainingNewline: "CanRequestURLHTTPContainingNewline", ChromeLoadTimesConnectionInfo: "ChromeLoadTimesConnectionInfo", ChromeLoadTimesFirstPaintAfterLoadTime: "ChromeLoadTimesFirstPaintAfterLoadTime", ChromeLoadTimesWasAlternateProtocolAvailable: "ChromeLoadTimesWasAlternateProtocolAvailable", CookieWithTruncatingChar: "CookieWithTruncatingChar", CrossOriginAccessBasedOnDocumentDomain: "CrossOriginAccessBasedOnDocumentDomain", CrossOriginWindowAlert: "CrossOriginWindowAlert", CrossOriginWindowConfirm: "CrossOriginWindowConfirm", CSSSelectorInternalMediaControlsOverlayCastButton: "CSSSelectorInternalMediaControlsOverlayCastButton", DeprecationExample: "DeprecationExample", DocumentDomainSettingWithoutOriginAgentClusterHeader: "DocumentDomainSettingWithoutOriginAgentClusterHeader", EventPath: "EventPath", ExpectCTHeader: "ExpectCTHeader", GeolocationInsecureOrigin: "GeolocationInsecureOrigin", GeolocationInsecureOriginDeprecatedNotRemoved: "GeolocationInsecureOriginDeprecatedNotRemoved", GetUserMediaInsecureOrigin: "GetUserMediaInsecureOrigin", HostCandidateAttributeGetter: "HostCandidateAttributeGetter", IdentityInCanMakePaymentEvent: "IdentityInCanMakePaymentEvent", InsecurePrivateNetworkSubresourceRequest: "InsecurePrivateNetworkSubresourceRequest", LegacyConstraintGoogIPv6: "LegacyConstraintGoogIPv6", LocalCSSFileExtensionRejected: "LocalCSSFileExtensionRejected", MediaSourceAbortRemove: "MediaSourceAbortRemove", MediaSourceDurationTruncatingBuffered: "MediaSourceDurationTruncatingBuffered", NavigateEventRestoreScroll: "NavigateEventRestoreScroll", NavigateEventTransitionWhile: "NavigateEventTransitionWhile", NoSysexWebMIDIWithoutPermission: "NoSysexWebMIDIWithoutPermission", NotificationInsecureOrigin: "NotificationInsecureOrigin", NotificationPermissionRequestedIframe: "NotificationPermissionRequestedIframe", ObsoleteWebRtcCipherSuite: "ObsoleteWebRtcCipherSuite", OpenWebDatabaseInsecureContext: "OpenWebDatabaseInsecureContext", OverflowVisibleOnReplacedElement: "OverflowVisibleOnReplacedElement", PersistentQuotaType: "PersistentQuotaType", PictureSourceSrc: "PictureSourceSrc", PrefixedCancelAnimationFrame: "PrefixedCancelAnimationFrame", PrefixedRequestAnimationFrame: "PrefixedRequestAnimationFrame", PrefixedStorageInfo: "PrefixedStorageInfo", PrefixedVideoDisplayingFullscreen: "PrefixedVideoDisplayingFullscreen", PrefixedVideoEnterFullscreen: "PrefixedVideoEnterFullscreen", PrefixedVideoEnterFullScreen: "PrefixedVideoEnterFullScreen", PrefixedVideoExitFullscreen: "PrefixedVideoExitFullscreen", PrefixedVideoExitFullScreen: "PrefixedVideoExitFullScreen", PrefixedVideoSupportsFullscreen: "PrefixedVideoSupportsFullscreen", RangeExpand: "RangeExpand", RequestedSubresourceWithEmbeddedCredentials: "RequestedSubresourceWithEmbeddedCredentials", RTCConstraintEnableDtlsSrtpFalse: "RTCConstraintEnableDtlsSrtpFalse", RTCConstraintEnableDtlsSrtpTrue: "RTCConstraintEnableDtlsSrtpTrue", RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics: "RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics", RTCPeerConnectionSdpSemanticsPlanB: "RTCPeerConnectionSdpSemanticsPlanB", RtcpMuxPolicyNegotiate: "RtcpMuxPolicyNegotiate", SharedArrayBufferConstructedWithoutIsolation: "SharedArrayBufferConstructedWithoutIsolation", TextToSpeech_DisallowedByAutoplay: "TextToSpeech_DisallowedByAutoplay", V8SharedArrayBufferConstructedInExtensionWithoutIsolation: "V8SharedArrayBufferConstructedInExtensionWithoutIsolation", XHRJSONEncodingDetection: "XHRJSONEncodingDetection", XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: "XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload", XRSupportsSession: "XRSupportsSession"});
69
69
  inspectorBackend.registerEnum("Audits.ClientHintIssueReason", {MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML"});
@@ -591,7 +591,7 @@ inspectorBackend.registerEvent("Page.javascriptDialogClosed", ["result", "userIn
591
591
  inspectorBackend.registerEvent("Page.javascriptDialogOpening", ["url", "message", "type", "hasBrowserHandler", "defaultPrompt"]);
592
592
  inspectorBackend.registerEvent("Page.lifecycleEvent", ["frameId", "loaderId", "name", "timestamp"]);
593
593
  inspectorBackend.registerEvent("Page.backForwardCacheNotUsed", ["loaderId", "frameId", "notRestoredExplanations", "notRestoredExplanationsTree"]);
594
- inspectorBackend.registerEvent("Page.prerenderAttemptCompleted", ["initiatingFrameId", "prerenderingUrl", "finalStatus"]);
594
+ inspectorBackend.registerEvent("Page.prerenderAttemptCompleted", ["initiatingFrameId", "prerenderingUrl", "finalStatus", "reasonDetails"]);
595
595
  inspectorBackend.registerEvent("Page.loadEventFired", ["timestamp"]);
596
596
  inspectorBackend.registerEvent("Page.navigatedWithinDocument", ["frameId", "url"]);
597
597
  inspectorBackend.registerEvent("Page.screencastFrame", ["data", "metadata", "sessionId"]);
@@ -1912,12 +1912,6 @@ export const generatedProperties = [
1912
1912
  ],
1913
1913
  "name": "height"
1914
1914
  },
1915
- {
1916
- "name": "hover-pop-up-delay"
1917
- },
1918
- {
1919
- "name": "hover-pop-up-hide-delay"
1920
- },
1921
1915
  {
1922
1916
  "inherited": true,
1923
1917
  "keywords": [
@@ -2634,6 +2628,12 @@ export const generatedProperties = [
2634
2628
  ],
2635
2629
  "name": "pointer-events"
2636
2630
  },
2631
+ {
2632
+ "name": "pop-up-hide-delay"
2633
+ },
2634
+ {
2635
+ "name": "pop-up-show-delay"
2636
+ },
2637
2637
  {
2638
2638
  "keywords": [
2639
2639
  "static",
@@ -971,6 +971,9 @@ export namespace Audits {
971
971
  InvalidRegisterTriggerHeader = 'InvalidRegisterTriggerHeader',
972
972
  InvalidEligibleHeader = 'InvalidEligibleHeader',
973
973
  TooManyConcurrentRequests = 'TooManyConcurrentRequests',
974
+ SourceAndTriggerHeaders = 'SourceAndTriggerHeaders',
975
+ SourceIgnored = 'SourceIgnored',
976
+ TriggerIgnored = 'TriggerIgnored',
974
977
  }
975
978
 
976
979
  /**
@@ -12172,6 +12175,11 @@ export namespace Page {
12172
12175
  initiatingFrameId: FrameId;
12173
12176
  prerenderingUrl: string;
12174
12177
  finalStatus: PrerenderFinalStatus;
12178
+ /**
12179
+ * This is used to give users more information about the cancellation details,
12180
+ * and this will be formatted for display.
12181
+ */
12182
+ reasonDetails?: string;
12175
12183
  }
12176
12184
 
12177
12185
  export interface LoadEventFiredEvent {
@@ -3,10 +3,11 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import {type RecorderExtensionEndpoint} from './RecorderExtensionEndpoint.js';
6
+ import * as Common from '../../core/common/common.js';
6
7
 
7
8
  let instance: RecorderPluginManager|null = null;
8
9
 
9
- export class RecorderPluginManager {
10
+ export class RecorderPluginManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
10
11
  #plugins: Set<RecorderExtensionEndpoint> = new Set();
11
12
 
12
13
  static instance(): RecorderPluginManager {
@@ -18,13 +19,27 @@ export class RecorderPluginManager {
18
19
 
19
20
  addPlugin(plugin: RecorderExtensionEndpoint): void {
20
21
  this.#plugins.add(plugin);
22
+ this.dispatchEventToListeners(Events.PluginAdded, plugin);
21
23
  }
22
24
 
23
25
  removePlugin(plugin: RecorderExtensionEndpoint): void {
24
26
  this.#plugins.delete(plugin);
27
+ this.dispatchEventToListeners(Events.PluginRemoved, plugin);
25
28
  }
26
29
 
27
30
  plugins(): RecorderExtensionEndpoint[] {
28
31
  return Array.from(this.#plugins.values());
29
32
  }
30
33
  }
34
+
35
+ // TODO(crbug.com/1167717): Make this a const enum again
36
+ // eslint-disable-next-line rulesdir/const_enum
37
+ export enum Events {
38
+ PluginAdded = 'pluginAdded',
39
+ PluginRemoved = 'pluginRemoved',
40
+ }
41
+
42
+ export type EventTypes = {
43
+ [Events.PluginAdded]: RecorderExtensionEndpoint,
44
+ [Events.PluginRemoved]: RecorderExtensionEndpoint,
45
+ };
@@ -7,6 +7,7 @@ import * as ExtensionPanel from './ExtensionPanel.js';
7
7
  import * as ExtensionServer from './ExtensionServer.js';
8
8
  import * as ExtensionTraceProvider from './ExtensionTraceProvider.js';
9
9
  import * as ExtensionView from './ExtensionView.js';
10
+ import * as RecorderExtensionEndpoint from './RecorderExtensionEndpoint.js';
10
11
  import * as RecorderPluginManager from './RecorderPluginManager.js';
11
12
 
12
13
  export {
@@ -15,5 +16,6 @@ export {
15
16
  ExtensionServer,
16
17
  ExtensionTraceProvider,
17
18
  ExtensionView,
19
+ RecorderExtensionEndpoint,
18
20
  RecorderPluginManager,
19
21
  };
@@ -16,6 +16,9 @@ export const enum IssueCode {
16
16
  InvalidRegisterTriggerHeader = 'AttributionReportingIssue::InvalidRegisterTriggerHeader',
17
17
  InvalidEligibleHeader = 'AttributionReportingIssue::InvalidEligibleHeader',
18
18
  TooManyConcurrentRequests = 'AttributionReportingIssue::TooManyConcurrentRequests',
19
+ SourceAndTriggerHeaders = 'AttributionReportingIssue::SourceAndTriggerHeaders',
20
+ SourceIgnored = 'AttributionReportingIssue::SourceIgnored',
21
+ TriggerIgnored = 'AttributionReportingIssue::TriggerIgnored',
19
22
  // TODO(apaseltiner): Remove this once old issue types are removed from
20
23
  // protocol.
21
24
  Unknown = 'AttributionReportingIssue::Unknown',
@@ -37,11 +40,22 @@ function getIssueCode(details: Protocol.Audits.AttributionReportingIssueDetails)
37
40
  return IssueCode.InvalidEligibleHeader;
38
41
  case Protocol.Audits.AttributionReportingIssueType.TooManyConcurrentRequests:
39
42
  return IssueCode.TooManyConcurrentRequests;
43
+ case Protocol.Audits.AttributionReportingIssueType.SourceAndTriggerHeaders:
44
+ return IssueCode.SourceAndTriggerHeaders;
45
+ case Protocol.Audits.AttributionReportingIssueType.SourceIgnored:
46
+ return IssueCode.SourceIgnored;
47
+ case Protocol.Audits.AttributionReportingIssueType.TriggerIgnored:
48
+ return IssueCode.TriggerIgnored;
40
49
  default:
41
50
  return IssueCode.Unknown;
42
51
  }
43
52
  }
44
53
 
54
+ const structuredHeaderLink = {
55
+ link: 'https://tools.ietf.org/id/draft-ietf-httpbis-header-structure-15.html#rfc.section.4.2.2',
56
+ linkTitle: 'Structured Headers RFC',
57
+ };
58
+
45
59
  export class AttributionReportingIssue extends Issue<IssueCode> {
46
60
  issueDetails: Readonly<Protocol.Audits.AttributionReportingIssueDetails>;
47
61
 
@@ -85,16 +99,28 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
85
99
  case IssueCode.InvalidEligibleHeader:
86
100
  return {
87
101
  file: 'arInvalidEligibleHeader.md',
88
- links: [{
89
- link: 'https://tools.ietf.org/id/draft-ietf-httpbis-header-structure-15.html#rfc.section.4.2.2',
90
- linkTitle: 'Structured Headers RFC',
91
- }],
102
+ links: [structuredHeaderLink],
92
103
  };
93
104
  case IssueCode.TooManyConcurrentRequests:
94
105
  return {
95
106
  file: 'arTooManyConcurrentRequests.md',
96
107
  links: [],
97
108
  };
109
+ case IssueCode.SourceAndTriggerHeaders:
110
+ return {
111
+ file: 'arSourceAndTriggerHeaders.md',
112
+ links: [],
113
+ };
114
+ case IssueCode.SourceIgnored:
115
+ return {
116
+ file: 'arSourceIgnored.md',
117
+ links: [structuredHeaderLink],
118
+ };
119
+ case IssueCode.TriggerIgnored:
120
+ return {
121
+ file: 'arTriggerIgnored.md',
122
+ links: [structuredHeaderLink],
123
+ };
98
124
  case IssueCode.Unknown:
99
125
  return null;
100
126
  }
@@ -435,6 +435,16 @@ const attributeValueExceedsMaxSize: LazyMarkdownIssueDescription = {
435
435
  links: [],
436
436
  };
437
437
 
438
+ const warnDomainNonAscii: LazyMarkdownIssueDescription = {
439
+ file: 'cookieWarnDomainNonAscii.md',
440
+ links: [],
441
+ };
442
+
443
+ const excludeDomainNonAscii: LazyMarkdownIssueDescription = {
444
+ file: 'cookieExcludeDomainNonAscii.md',
445
+ links: [],
446
+ };
447
+
438
448
  const issueDescriptions: Map<string, LazyMarkdownIssueDescription> = new Map([
439
449
  ['CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie', sameSiteUnspecifiedErrorRead],
440
450
  ['CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie', sameSiteUnspecifiedErrorSet],
@@ -466,4 +476,8 @@ const issueDescriptions: Map<string, LazyMarkdownIssueDescription> = new Map([
466
476
  ['CookieIssue::ExcludeSamePartyCrossPartyContext::SetCookie', samePartyCrossPartyContextSet],
467
477
  ['CookieIssue::WarnAttributeValueExceedsMaxSize::ReadCookie', attributeValueExceedsMaxSize],
468
478
  ['CookieIssue::WarnAttributeValueExceedsMaxSize::SetCookie', attributeValueExceedsMaxSize],
479
+ ['CookieIssue::WarnDomainNonASCII::ReadCookie', warnDomainNonAscii],
480
+ ['CookieIssue::WarnDomainNonASCII::SetCookie', warnDomainNonAscii],
481
+ ['CookieIssue::ExcludeDomainNonASCII::ReadCookie', excludeDomainNonAscii],
482
+ ['CookieIssue::ExcludeDomainNonASCII::SetCookie', excludeDomainNonAscii],
469
483
  ]);
@@ -0,0 +1,9 @@
1
+ # Ensure that attribution responses contain either source or trigger, not both
2
+
3
+ This page tried to register a source and a trigger in the same HTTP response
4
+ using the Attribution Reporting API, which is prohibited.
5
+
6
+ The corresponding request was eligible to register either a source or a
7
+ trigger, but the response may only set either the
8
+ `Attribution-Reporting-Register-Source` header or the
9
+ `Attribution-Reporting-Register-Trigger` header, not both.
@@ -0,0 +1,13 @@
1
+ # An attribution source registration was ignored because the request was ineligible
2
+
3
+ This page tried to register a source using the Attribution Reporting API, but
4
+ the request was ineligible to do so, so the source registration was ignored.
5
+
6
+ A request is eligible for source registration if it has an
7
+ `Attribution-Reporting-Eligible` header whose value is a structured dictionary
8
+ that contains the key `navigation-source` or `event-source`. If the header is
9
+ absent or does not contain one of those keys, any
10
+ `Attribution-Reporting-Register-Source` response header will be ignored.
11
+
12
+ Additionally, a single HTTP redirect chain may register only all sources or all
13
+ triggers, not a combination of both.
@@ -0,0 +1,12 @@
1
+ # An attribution trigger registration was ignored because the request was ineligible
2
+
3
+ This page tried to register a trigger using the Attribution Reporting API, but
4
+ the request was ineligible to do so, so the trigger registration was ignored.
5
+
6
+ A request is eligible for trigger registration if it has an
7
+ `Attribution-Reporting-Eligible` header whose value is a structured dictionary
8
+ that contains the key `trigger`, or if the header is absent. Otherwise, any
9
+ `Attribution-Reporting-Register-Trigger` response header will be ignored.
10
+
11
+ Additionally, a single HTTP redirect chain may register only all sources or all
12
+ triggers, not a combination of both.
@@ -0,0 +1,11 @@
1
+ # Ensure cookie `Domain` attribute values only contain ASCII characters
2
+
3
+ `Domain` attributes in cookies are restricted to the ASCII character set. Any
4
+ cookies that contain characters outside of the ASCII range in their `Domain`
5
+ attribute will be ignored.
6
+
7
+ To resolve this issue, you need to remove all non-ASCII characters from the
8
+ `Domain` attribute of the affected cookies.
9
+
10
+ If your site has an internationalized domain name (IDN), you should use
11
+ [punycode](punycodeReference) representation for the `Domain` attribute instead.
@@ -0,0 +1,11 @@
1
+ # Ensure cookie `Domain` attribute values only contain ASCII characters
2
+
3
+ `Domain` attributes in cookies are restricted to the ASCII character set. Any
4
+ cookies that contain characters outside of the ASCII range in their `Domain`
5
+ attribute will be ignored in the future.
6
+
7
+ To resolve this issue, you need to remove all non-ASCII characters from the
8
+ `Domain` attribute of the affected cookies.
9
+
10
+ If your site has an internationalized domain name (IDN), you should use
11
+ [punycode](punycodeReference) representation for the `Domain` attribute instead.
@@ -2029,7 +2029,7 @@ export const NativeFunctions = [
2029
2029
  {
2030
2030
  name: 'setData',
2031
2031
  signatures: [['data']],
2032
- receivers: ['PendingBeacon']
2032
+ receivers: ['PendingPostBeacon']
2033
2033
  },
2034
2034
  {
2035
2035
  name: 'setData',
@@ -6165,7 +6165,15 @@ export const NativeFunctions = [
6165
6165
  signatures: [['hints']]
6166
6166
  },
6167
6167
  {
6168
- name: 'PendingBeacon',
6168
+ name: 'PendingGetBeacon',
6169
+ signatures: [['url','?options']]
6170
+ },
6171
+ {
6172
+ name: 'setURL',
6173
+ signatures: [['url']]
6174
+ },
6175
+ {
6176
+ name: 'PendingPostBeacon',
6169
6177
  signatures: [['url','?options']]
6170
6178
  },
6171
6179
  {
@@ -6855,7 +6863,7 @@ export const NativeFunctions = [
6855
6863
  },
6856
6864
  {
6857
6865
  name: 'UDPSocket',
6858
- signatures: [['address','port','?options']]
6866
+ signatures: [['options']]
6859
6867
  },
6860
6868
  {
6861
6869
  name: 'TextDecoderStream',
@@ -394,24 +394,37 @@ export class TimelineModelImpl {
394
394
  }
395
395
 
396
396
  private collectInteractionEvents(tracingModel: SDK.TracingModel.TracingModel): void {
397
- const mainRendererThread = tracingModel.getThreadByName('Renderer', 'CrRendererMain');
398
- if (!mainRendererThread) {
397
+ const interactionEvents: SDK.TracingModel.AsyncEvent[] = [];
398
+ for (const process of tracingModel.sortedProcesses()) {
399
+ // Interactions will only appear on the Renderer processes.
400
+ if (process.name() !== 'Renderer') {
401
+ continue;
402
+ }
403
+
404
+ // And also only on CrRendererMain threads.
405
+ const rendererThread = process.threadByName('CrRendererMain');
406
+ if (!rendererThread) {
407
+ continue;
408
+ }
409
+
410
+ // EventTiming events are async, so we only have to check asyncEvents,
411
+ // and not worry about sync events.
412
+ for (const event of rendererThread.asyncEvents()) {
413
+ if (!this.isEventTimingInteractionEvent(event)) {
414
+ continue;
415
+ }
416
+ interactionEvents.push(event);
417
+ }
418
+ }
419
+ if (interactionEvents.length === 0) {
420
+ // No events found, so bail early and don't bother creating the track
421
+ // because it will be empty.
399
422
  return;
400
423
  }
401
424
 
402
- const interactionEvents: SDK.TracingModel.AsyncEvent[] = [];
403
-
404
425
  const track = this.ensureNamedTrack(TrackType.UserInteractions);
405
- track.thread = mainRendererThread;
406
426
  track.name = UIStrings.userInteractions;
407
427
  track.forMainFrame = true;
408
-
409
- for (const event of mainRendererThread.asyncEvents()) {
410
- if (!this.isEventTimingInteractionEvent(event)) {
411
- continue;
412
- }
413
- interactionEvents.push(event);
414
- }
415
428
  track.asyncEvents = interactionEvents;
416
429
  }
417
430
 
@@ -199,7 +199,9 @@ export const format = (fmt: string, args: SDK.RemoteObject.RemoteObject[]): {
199
199
 
200
200
  export const updateStyle = (currentStyle: Map<string, {value: string, priority: string}>, styleToAdd: string): void => {
201
201
  const ALLOWED_PROPERTY_PREFIXES = ['background', 'border', 'color', 'font', 'line', 'margin', 'padding', 'text'];
202
- const BLOCKED_URL_SCHEMES = ['chrome', 'resource', 'about', 'app', 'http', 'https', 'ftp', 'file'];
202
+ // We only allow data URLs with the `url()` CSS function.
203
+ // The capture group is not intended to grab the whole URL exactly, just enough so we can check the scheme.
204
+ const URL_REGEX = /url\([\'\"]?([^\)]*)/g;
203
205
 
204
206
  currentStyle.clear();
205
207
  const buffer = document.createElement('span');
@@ -209,8 +211,12 @@ export const updateStyle = (currentStyle: Map<string, {value: string, priority:
209
211
  prefix => property.startsWith(prefix) || property.startsWith(`-webkit-${prefix}`))) {
210
212
  continue;
211
213
  }
214
+
215
+ // There could be multiple `url()` functions, so we check them all.
216
+ // If any of them is not a `data` URL, we skip the whole property.
212
217
  const value = buffer.style.getPropertyValue(property);
213
- if (BLOCKED_URL_SCHEMES.some(scheme => value.includes(scheme + ':'))) {
218
+ const potentialUrls = [...value.matchAll(URL_REGEX)].map(match => match[1]);
219
+ if (potentialUrls.some(potentialUrl => !potentialUrl.startsWith('data:'))) {
214
220
  continue;
215
221
  }
216
222
  currentStyle.set(property, {
@@ -329,8 +329,8 @@ export class ConsolePin {
329
329
  const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
330
330
  const preprocessedExpression = ObjectUI.JavaScriptREPL.JavaScriptREPL.preprocessExpression(text);
331
331
  const {preview, result} = await ObjectUI.JavaScriptREPL.JavaScriptREPL.evaluateAndBuildPreview(
332
- preprocessedExpression, throwOnSideEffect, false /* replMode */, timeout, !isEditing /* allowErrors */,
333
- 'console', true /* awaitPromise */);
332
+ preprocessedExpression, throwOnSideEffect, true /* replMode */, timeout, !isEditing /* allowErrors */,
333
+ 'console', true /* awaitPromise */, true /* silent */);
334
334
  if (this.lastResult && this.lastExecutionContext) {
335
335
  this.lastExecutionContext.runtimeModel.releaseEvaluationResult(this.lastResult);
336
336
  }
@@ -62,6 +62,8 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
62
62
  case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterSourceHeader:
63
63
  case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterTriggerHeader:
64
64
  case IssuesManager.AttributionReportingIssue.IssueCode.InvalidEligibleHeader:
65
+ case IssuesManager.AttributionReportingIssue.IssueCode.SourceIgnored:
66
+ case IssuesManager.AttributionReportingIssue.IssueCode.TriggerIgnored:
65
67
  this.appendColumnTitle(header, i18nString(UIStrings.request));
66
68
  this.appendColumnTitle(header, i18nString(UIStrings.invalidHeaderValue));
67
69
  break;
@@ -79,6 +81,9 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
79
81
  this.appendColumnTitle(header, i18nString(UIStrings.element));
80
82
  this.appendColumnTitle(header, i18nString(UIStrings.maximumConcurrentRegistrations));
81
83
  break;
84
+ case IssuesManager.AttributionReportingIssue.IssueCode.SourceAndTriggerHeaders:
85
+ this.appendColumnTitle(header, i18nString(UIStrings.request));
86
+ break;
82
87
  }
83
88
 
84
89
  this.affectedResources.appendChild(header);
@@ -102,6 +107,8 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
102
107
  case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterSourceHeader:
103
108
  case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterTriggerHeader:
104
109
  case IssuesManager.AttributionReportingIssue.IssueCode.InvalidEligibleHeader:
110
+ case IssuesManager.AttributionReportingIssue.IssueCode.SourceIgnored:
111
+ case IssuesManager.AttributionReportingIssue.IssueCode.TriggerIgnored:
105
112
  this.#appendRequestOrEmptyCell(element, details.request);
106
113
  this.appendIssueDetailCell(element, details.invalidParameter || '');
107
114
  break;
@@ -119,6 +126,9 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
119
126
  await this.#appendElementOrEmptyCell(element, issue);
120
127
  this.appendIssueDetailCell(element, details.invalidParameter || '');
121
128
  break;
129
+ case IssuesManager.AttributionReportingIssue.IssueCode.SourceAndTriggerHeaders:
130
+ this.#appendRequestOrEmptyCell(element, details.request);
131
+ break;
122
132
  }
123
133
 
124
134
  this.affectedResources.appendChild(element);
@@ -57,7 +57,7 @@ export class RequestHTMLView extends UI.Widget.VBox {
57
57
  const iframe = document.createElement('iframe');
58
58
  iframe.className = 'html-preview-frame';
59
59
  iframe.setAttribute('sandbox', ''); // Forbid to run JavaScript and set unique origin.
60
- iframe.setAttribute('csp', 'default-src \'none\'');
60
+ iframe.setAttribute('csp', 'default-src \'none\';style-src \'unsafe-inline\'');
61
61
  iframe.setAttribute('src', this.dataURL);
62
62
  iframe.tabIndex = -1;
63
63
  UI.ARIAUtils.markAsPresentation(iframe);