chrome-devtools-frontend 1.0.1032471 → 1.0.1034366
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.
- package/config/gni/devtools_grd_files.gni +7 -0
- package/front_end/core/i18n/locales/en-US.json +6 -0
- package/front_end/core/i18n/locales/en-XL.json +6 -0
- package/front_end/core/root/Runtime.ts +11 -1
- package/front_end/core/sdk/CSSMetadata.ts +1 -0
- package/front_end/core/sdk/NetworkManager.ts +19 -5
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +5 -1
- package/front_end/generated/InspectorBackendCommands.js +2 -2
- package/front_end/generated/SupportedCSSProperties.js +6 -6
- package/front_end/generated/protocol.ts +8 -0
- package/front_end/models/extensions/RecorderPluginManager.ts +16 -1
- package/front_end/models/extensions/extensions.ts +2 -0
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +30 -4
- package/front_end/models/issues_manager/CookieIssue.ts +14 -0
- package/front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
- package/front_end/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
- package/front_end/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
- package/front_end/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
- package/front_end/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +11 -3
- package/front_end/models/persistence/NetworkPersistenceManager.ts +6 -2
- package/front_end/models/timeline_model/TimelineModel.ts +25 -12
- package/front_end/panels/console/ConsoleFormat.ts +8 -2
- package/front_end/panels/console/ConsolePinPane.ts +2 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +10 -0
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +4 -1
- package/front_end/panels/network/RequestHTMLView.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +10 -3
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts +129 -0
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +16 -2
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +27 -4
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +11 -6
- package/front_end/ui/components/linear_memory_inspector/linearMemoryHighlightChipList.css +92 -0
- package/front_end/ui/components/linear_memory_inspector/linear_memory_inspector.ts +2 -0
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +1 -0
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +2 -2
- 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
|
},
|
@@ -120,18 +120,21 @@ export class ExperimentsSupport {
|
|
120
120
|
#enabledTransiently: Set<string>;
|
121
121
|
readonly #enabledByDefault: Set<string>;
|
122
122
|
readonly #serverEnabled: Set<string>;
|
123
|
+
// Experiments in this set won't be shown to the user
|
124
|
+
readonly #nonConfigurable: Set<string>;
|
123
125
|
constructor() {
|
124
126
|
this.#experiments = [];
|
125
127
|
this.#experimentNames = new Set();
|
126
128
|
this.#enabledTransiently = new Set();
|
127
129
|
this.#enabledByDefault = new Set();
|
128
130
|
this.#serverEnabled = new Set();
|
131
|
+
this.#nonConfigurable = new Set();
|
129
132
|
}
|
130
133
|
|
131
134
|
allConfigurableExperiments(): Experiment[] {
|
132
135
|
const result = [];
|
133
136
|
for (const experiment of this.#experiments) {
|
134
|
-
if (!this.#enabledTransiently.has(experiment.name)) {
|
137
|
+
if (!this.#enabledTransiently.has(experiment.name) && !this.#nonConfigurable.has(experiment.name)) {
|
135
138
|
result.push(experiment);
|
136
139
|
}
|
137
140
|
}
|
@@ -203,6 +206,13 @@ export class ExperimentsSupport {
|
|
203
206
|
}
|
204
207
|
}
|
205
208
|
|
209
|
+
setNonConfigurableExperiments(experimentNames: string[]): void {
|
210
|
+
for (const experiment of experimentNames) {
|
211
|
+
this.checkExperiment(experiment);
|
212
|
+
this.#nonConfigurable.add(experiment);
|
213
|
+
}
|
214
|
+
}
|
215
|
+
|
206
216
|
enableForTest(experimentName: string): void {
|
207
217
|
this.checkExperiment(experimentName);
|
208
218
|
this.#enabledTransiently.add(experimentName);
|
@@ -465,10 +465,10 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
|
|
465
465
|
networkRequest.setUrl(response.url as Platform.DevToolsPath.UrlString);
|
466
466
|
}
|
467
467
|
networkRequest.mimeType = (response.mimeType as MIME_TYPE);
|
468
|
-
if (!networkRequest.statusCode) {
|
468
|
+
if (!networkRequest.statusCode || networkRequest.wasIntercepted()) {
|
469
469
|
networkRequest.statusCode = response.status;
|
470
470
|
}
|
471
|
-
if (!networkRequest.statusText) {
|
471
|
+
if (!networkRequest.statusText || networkRequest.wasIntercepted()) {
|
472
472
|
networkRequest.statusText = response.statusText;
|
473
473
|
}
|
474
474
|
if (!networkRequest.hasExtraResponseInfo() || networkRequest.wasIntercepted()) {
|
@@ -1170,6 +1170,10 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe
|
|
1170
1170
|
return multiTargetNetworkManagerInstance;
|
1171
1171
|
}
|
1172
1172
|
|
1173
|
+
static dispose(): void {
|
1174
|
+
multiTargetNetworkManagerInstance = null;
|
1175
|
+
}
|
1176
|
+
|
1173
1177
|
static getChromeVersion(): string {
|
1174
1178
|
const chromeRegex = /(?:^|\W)(?:Chrome|HeadlessChrome)\/(\S+)/;
|
1175
1179
|
const chromeMatch = navigator.userAgent.match(chromeRegex);
|
@@ -1523,6 +1527,7 @@ export namespace MultitargetNetworkManager {
|
|
1523
1527
|
InterceptorsChanged = 'InterceptorsChanged',
|
1524
1528
|
AcceptedEncodingsChanged = 'AcceptedEncodingsChanged',
|
1525
1529
|
RequestIntercepted = 'RequestIntercepted',
|
1530
|
+
RequestFulfilled = 'RequestFulfilled',
|
1526
1531
|
}
|
1527
1532
|
|
1528
1533
|
export type EventTypes = {
|
@@ -1532,6 +1537,7 @@ export namespace MultitargetNetworkManager {
|
|
1532
1537
|
[Events.InterceptorsChanged]: void,
|
1533
1538
|
[Events.AcceptedEncodingsChanged]: void,
|
1534
1539
|
[Events.RequestIntercepted]: Platform.DevToolsPath.UrlString,
|
1540
|
+
[Events.RequestFulfilled]: Platform.DevToolsPath.UrlString,
|
1535
1541
|
};
|
1536
1542
|
}
|
1537
1543
|
|
@@ -1565,11 +1571,15 @@ export class InterceptedRequest {
|
|
1565
1571
|
return this.#hasRespondedInternal;
|
1566
1572
|
}
|
1567
1573
|
|
1568
|
-
async continueRequestWithContent(
|
1569
|
-
|
1574
|
+
async continueRequestWithContent(
|
1575
|
+
contentBlob: Blob, encoded: boolean, responseHeaders: Protocol.Fetch.HeaderEntry[],
|
1576
|
+
isBodyOverridden: boolean): Promise<void> {
|
1570
1577
|
this.#hasRespondedInternal = true;
|
1571
1578
|
const body = encoded ? await contentBlob.text() : await blobToBase64(contentBlob);
|
1572
|
-
|
1579
|
+
const responseCode = isBodyOverridden ? 200 : (this.responseStatusCode || 200);
|
1580
|
+
void this.#fetchAgent.invoke_fulfillRequest({requestId: this.requestId, responseCode, body, responseHeaders});
|
1581
|
+
MultitargetNetworkManager.instance().dispatchEventToListeners(
|
1582
|
+
MultitargetNetworkManager.Events.RequestFulfilled, this.request.url as Platform.DevToolsPath.UrlString);
|
1573
1583
|
|
1574
1584
|
async function blobToBase64(blob: Blob): Promise<string> {
|
1575
1585
|
const reader = new FileReader();
|
@@ -1608,6 +1618,10 @@ export class InterceptedRequest {
|
|
1608
1618
|
const error = response.getError() || null;
|
1609
1619
|
return {error: error, content: error ? null : response.body, encoded: response.base64Encoded};
|
1610
1620
|
}
|
1621
|
+
|
1622
|
+
isRedirect(): boolean {
|
1623
|
+
return this.responseStatusCode !== undefined && this.responseStatusCode >= 300 && this.responseStatusCode < 400;
|
1624
|
+
}
|
1611
1625
|
}
|
1612
1626
|
|
1613
1627
|
/**
|
@@ -125,7 +125,7 @@ async function invokeLH(action: string, args: any): Promise<unknown> {
|
|
125
125
|
}
|
126
126
|
|
127
127
|
// @ts-expect-error https://github.com/GoogleChrome/lighthouse/issues/11628
|
128
|
-
const config = self.createConfig(args.categoryIDs, flags.emulatedFormFactor);
|
128
|
+
const config = args.config || self.createConfig(args.categoryIDs, flags.emulatedFormFactor);
|
129
129
|
const url = args.url;
|
130
130
|
|
131
131
|
// Handle legacy Lighthouse runner path.
|
@@ -426,10 +426,14 @@ export class MainImpl {
|
|
426
426
|
'reportingApiDebugging',
|
427
427
|
Root.Runtime.ExperimentName.SYNC_SETTINGS,
|
428
428
|
Root.Runtime.ExperimentName.CSS_LAYERS,
|
429
|
-
Root.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER,
|
429
|
+
...('EyeDropper' in window ? [Root.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER] : []),
|
430
430
|
'lighthousePanelFR',
|
431
431
|
]);
|
432
432
|
|
433
|
+
Root.Runtime.experiments.setNonConfigurableExperiments([
|
434
|
+
...(!('EyeDropper' in window) ? [Root.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER] : []),
|
435
|
+
]);
|
436
|
+
|
433
437
|
Root.Runtime.experiments.cleanUpStaleExperiments();
|
434
438
|
const enabledExperiments = Root.Runtime.Runtime.queryParam('enabledExperiments');
|
435
439
|
if (enabledExperiments) {
|
@@ -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: ['
|
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: '
|
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: [['
|
6866
|
+
signatures: [['options']]
|
6859
6867
|
},
|
6860
6868
|
{
|
6861
6869
|
name: 'TextDecoderStream',
|
@@ -731,13 +731,17 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
731
731
|
const blob = await project.requestFileBlob(fileSystemUISourceCode);
|
732
732
|
if (blob) {
|
733
733
|
void interceptedRequest.continueRequestWithContent(
|
734
|
-
new Blob([blob], {type: mimeType}), /* encoded */ false, responseHeaders);
|
734
|
+
new Blob([blob], {type: mimeType}), /* encoded */ false, responseHeaders, /* isBodyOverridden */ true);
|
735
735
|
}
|
736
|
+
} else if (interceptedRequest.isRedirect()) {
|
737
|
+
void interceptedRequest.continueRequestWithContent(
|
738
|
+
new Blob([], {type: mimeType}), /* encoded */ true, responseHeaders, /* isBodyOverridden */ false);
|
736
739
|
} else {
|
737
740
|
const responseBody = await interceptedRequest.responseBody();
|
738
741
|
if (!responseBody.error && responseBody.content) {
|
739
742
|
void interceptedRequest.continueRequestWithContent(
|
740
|
-
new Blob([responseBody.content], {type: mimeType}), /* encoded */ true, responseHeaders
|
743
|
+
new Blob([responseBody.content], {type: mimeType}), /* encoded */ true, responseHeaders,
|
744
|
+
/* isBodyOverridden */ false);
|
741
745
|
}
|
742
746
|
}
|
743
747
|
}
|
@@ -394,24 +394,37 @@ export class TimelineModelImpl {
|
|
394
394
|
}
|
395
395
|
|
396
396
|
private collectInteractionEvents(tracingModel: SDK.TracingModel.TracingModel): void {
|
397
|
-
const
|
398
|
-
|
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
|
-
|
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
|
-
|
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,
|
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
|
}
|