chrome-devtools-frontend 1.0.1028626 → 1.0.1029149
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 +5 -5
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/clear-warning_icon.svg +99 -0
- package/front_end/core/common/WasmDisassembly.ts +6 -1
- package/front_end/core/host/ResourceLoader.ts +17 -3
- package/front_end/core/i18n/locales/en-US.json +3 -3
- package/front_end/core/i18n/locales/en-XL.json +3 -3
- package/front_end/core/sdk/NetworkManager.ts +3 -1
- package/front_end/core/sdk/Script.ts +39 -13
- package/front_end/generated/InspectorBackendCommands.js +3 -3
- package/front_end/generated/protocol.ts +16 -2
- package/front_end/models/bindings/ContentProviderBasedProject.ts +7 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +16 -41
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -2
- package/front_end/models/issues_manager/descriptions/arInsecureContext.md +7 -0
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +5 -0
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +5 -0
- package/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +7 -4
- package/front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +10 -0
- package/front_end/models/text_utils/ContentProvider.ts +9 -1
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +11 -42
- package/front_end/panels/network/components/RequestHeadersView.ts +14 -12
- package/front_end/panels/network/network-meta.ts +16 -0
- package/front_end/panels/timeline/TimelineLoader.ts +2 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +9 -51
- package/package.json +1 -1
- package/front_end/models/issues_manager/descriptions/arAttributionSourceUntrustworthyFrameOrigin.md +0 -4
- package/front_end/models/issues_manager/descriptions/arAttributionSourceUntrustworthyOrigin.md +0 -5
- package/front_end/models/issues_manager/descriptions/arAttributionUntrustworthyFrameOrigin.md +0 -4
- package/front_end/models/issues_manager/descriptions/arAttributionUntrustworthyOrigin.md +0 -4
- package/front_end/models/issues_manager/descriptions/arInvalidHeader.md +0 -3
@@ -47,6 +47,7 @@ grd_files_release_sources = [
|
|
47
47
|
"front_end/Images/chromeSelectDark.svg",
|
48
48
|
"front_end/Images/circled_backslash_icon.svg",
|
49
49
|
"front_end/Images/circled_exclamation_icon.svg",
|
50
|
+
"front_end/Images/clear-warning_icon.svg",
|
50
51
|
"front_end/Images/close-icon.svg",
|
51
52
|
"front_end/Images/copy_icon.svg",
|
52
53
|
"front_end/Images/cssoverview_icons_2x.avif",
|
@@ -278,12 +279,11 @@ grd_files_release_sources = [
|
|
278
279
|
"front_end/models/issues_manager/descriptions/TwaDigitalAssetLinksFailed.md",
|
279
280
|
"front_end/models/issues_manager/descriptions/TwaHttpError.md",
|
280
281
|
"front_end/models/issues_manager/descriptions/TwaPageUnavailableOffline.md",
|
281
|
-
"front_end/models/issues_manager/descriptions/
|
282
|
-
"front_end/models/issues_manager/descriptions/
|
283
|
-
"front_end/models/issues_manager/descriptions/
|
284
|
-
"front_end/models/issues_manager/descriptions/arAttributionUntrustworthyOrigin.md",
|
285
|
-
"front_end/models/issues_manager/descriptions/arInvalidHeader.md",
|
282
|
+
"front_end/models/issues_manager/descriptions/arInsecureContext.md",
|
283
|
+
"front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md",
|
284
|
+
"front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md",
|
286
285
|
"front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md",
|
286
|
+
"front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md",
|
287
287
|
"front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md",
|
288
288
|
"front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md",
|
289
289
|
"front_end/models/issues_manager/descriptions/corsAllowCredentialsRequired.md",
|
@@ -0,0 +1,99 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
width="10"
|
6
|
+
height="10"
|
7
|
+
viewBox="0 0 2.6458333 2.6458334"
|
8
|
+
version="1.1"
|
9
|
+
id="svg278"
|
10
|
+
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
|
11
|
+
sodipodi:docname="clear-warning_icon.svg"
|
12
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
13
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
15
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
16
|
+
<sodipodi:namedview
|
17
|
+
id="namedview280"
|
18
|
+
pagecolor="#ffffff"
|
19
|
+
bordercolor="#666666"
|
20
|
+
borderopacity="1.0"
|
21
|
+
inkscape:pageshadow="2"
|
22
|
+
inkscape:pageopacity="0.0"
|
23
|
+
inkscape:pagecheckerboard="0"
|
24
|
+
inkscape:document-units="mm"
|
25
|
+
showgrid="false"
|
26
|
+
units="px"
|
27
|
+
inkscape:zoom="5.1337949"
|
28
|
+
inkscape:cx="-96.712084"
|
29
|
+
inkscape:cy="68.760051"
|
30
|
+
inkscape:window-width="2028"
|
31
|
+
inkscape:window-height="1445"
|
32
|
+
inkscape:window-x="0"
|
33
|
+
inkscape:window-y="0"
|
34
|
+
inkscape:window-maximized="1"
|
35
|
+
inkscape:current-layer="layer1" />
|
36
|
+
<defs
|
37
|
+
id="defs275">
|
38
|
+
<mask
|
39
|
+
id="path4453-6-mask">
|
40
|
+
<rect
|
41
|
+
id="rect8990"
|
42
|
+
style="fill:#ffffff"
|
43
|
+
height="10"
|
44
|
+
width="10"
|
45
|
+
x="0"
|
46
|
+
y="0" />
|
47
|
+
<path
|
48
|
+
style="fill:#000000"
|
49
|
+
inkscape:connector-curvature="0"
|
50
|
+
id="path4453-6"
|
51
|
+
d="m 64,3 h 2 V 5.25 L 65.5,7 h -1 L 64,5.25 V 3 m 0,5 h 2 v 1 h -2"
|
52
|
+
transform="translate(-60)" />
|
53
|
+
</mask>
|
54
|
+
</defs>
|
55
|
+
<g
|
56
|
+
inkscape:label="Layer 1"
|
57
|
+
inkscape:groupmode="layer"
|
58
|
+
id="layer1">
|
59
|
+
<g
|
60
|
+
mask="url(#path4453-6-mask)"
|
61
|
+
transform="matrix(0.26458333,0,0,0.26458333,1.6666664e-8,-1.6329569e-5)"
|
62
|
+
id="g4443-7">
|
63
|
+
<path
|
64
|
+
style="stroke:#c19600;stroke-width:2;stroke-linejoin:round"
|
65
|
+
inkscape:connector-curvature="0"
|
66
|
+
id="path4447-5"
|
67
|
+
d="m 61,9 4,-8 4,8 z"
|
68
|
+
transform="translate(-60)" />
|
69
|
+
<path
|
70
|
+
style="fill:#f4bd00;stroke:#f5bd00;stroke-width:1.5;stroke-linejoin:round"
|
71
|
+
inkscape:connector-curvature="0"
|
72
|
+
id="path4449-3"
|
73
|
+
d="m 61,9 4,-8 4,8 z"
|
74
|
+
transform="translate(-60)" />
|
75
|
+
<path
|
76
|
+
style="fill:#ad8601"
|
77
|
+
inkscape:connector-curvature="0"
|
78
|
+
id="path4451-5"
|
79
|
+
d="m 63.75,2.75 h 2.5 v 2.5 L 65.75,7 h -1.5 l -0.5,-1.75 v -2.5 m 0,5.25 h 2.5 v 1.25 h -2.5"
|
80
|
+
transform="translate(-60)" />
|
81
|
+
<mask
|
82
|
+
id="mask258">
|
83
|
+
<rect
|
84
|
+
id="rect254"
|
85
|
+
style="fill:#ffffff"
|
86
|
+
height="10"
|
87
|
+
width="10"
|
88
|
+
x="0"
|
89
|
+
y="0" />
|
90
|
+
<path
|
91
|
+
style="fill:#000000"
|
92
|
+
inkscape:connector-curvature="0"
|
93
|
+
id="path256"
|
94
|
+
d="m 64,3 h 2 V 5.25 L 65.5,7 h -1 L 64,5.25 V 3 m 0,5 h 2 v 1 h -2"
|
95
|
+
transform="translate(-60)" />
|
96
|
+
</mask>
|
97
|
+
</g>
|
98
|
+
</g>
|
99
|
+
</svg>
|
@@ -14,10 +14,15 @@ interface FunctionBodyOffset {
|
|
14
14
|
end: number;
|
15
15
|
}
|
16
16
|
export class WasmDisassembly {
|
17
|
+
readonly lines: string[];
|
17
18
|
readonly #offsets: number[];
|
18
19
|
#functionBodyOffsets: FunctionBodyOffset[];
|
19
20
|
|
20
|
-
constructor(offsets: number[], functionBodyOffsets: FunctionBodyOffset[]) {
|
21
|
+
constructor(lines: string[], offsets: number[], functionBodyOffsets: FunctionBodyOffset[]) {
|
22
|
+
if (lines.length !== offsets.length) {
|
23
|
+
throw new Error('Lines and offsets don\'t match');
|
24
|
+
}
|
25
|
+
this.lines = lines;
|
21
26
|
this.#offsets = offsets;
|
22
27
|
this.#functionBodyOffsets = functionBodyOffsets;
|
23
28
|
}
|
@@ -105,9 +105,10 @@ export let load = function(
|
|
105
105
|
arg0: boolean, arg1: {
|
106
106
|
[x: string]: string,
|
107
107
|
},
|
108
|
-
arg2: string, arg3: LoadErrorDescription) => void
|
108
|
+
arg2: string, arg3: LoadErrorDescription) => void,
|
109
|
+
allowFileUNCPaths: boolean): void {
|
109
110
|
const stream = new Common.StringOutputStream.StringOutputStream();
|
110
|
-
loadAsStream(url, headers, stream, mycallback);
|
111
|
+
loadAsStream(url, headers, stream, mycallback, allowFileUNCPaths);
|
111
112
|
|
112
113
|
function mycallback(
|
113
114
|
success: boolean, headers: {
|
@@ -242,7 +243,8 @@ export const loadAsStream = function(
|
|
242
243
|
((arg0: boolean, arg1: {
|
243
244
|
[x: string]: string,
|
244
245
|
},
|
245
|
-
arg2: LoadErrorDescription) => void)
|
246
|
+
arg2: LoadErrorDescription) => void),
|
247
|
+
allowFileUNCPaths?: boolean): void {
|
246
248
|
const streamId = _bindOutputStream(stream);
|
247
249
|
const parsedURL = new Common.ParsedURL.ParsedURL(url);
|
248
250
|
if (parsedURL.isDataURL()) {
|
@@ -250,6 +252,18 @@ export const loadAsStream = function(
|
|
250
252
|
return;
|
251
253
|
}
|
252
254
|
|
255
|
+
if (!allowFileUNCPaths && url.startsWith('file:////')) {
|
256
|
+
if (callback) {
|
257
|
+
callback(/* success */ false, /* headers */ {}, {
|
258
|
+
statusCode: 400, // BAD_REQUEST
|
259
|
+
netError: -20, // BLOCKED_BY_CLIENT
|
260
|
+
netErrorName: 'net::BLOCKED_BY_CLIENT',
|
261
|
+
message: 'Loading from a Windows Share via UNC path is prohibited for security reasons.',
|
262
|
+
});
|
263
|
+
}
|
264
|
+
return;
|
265
|
+
}
|
266
|
+
|
253
267
|
const rawHeaders = [];
|
254
268
|
if (headers) {
|
255
269
|
for (const key in headers) {
|
@@ -5708,9 +5708,6 @@
|
|
5708
5708
|
"panels/issues/AttributionReportingIssueDetailsView.ts | element": {
|
5709
5709
|
"message": "Element"
|
5710
5710
|
},
|
5711
|
-
"panels/issues/AttributionReportingIssueDetailsView.ts | frame": {
|
5712
|
-
"message": "Frame"
|
5713
|
-
},
|
5714
5711
|
"panels/issues/AttributionReportingIssueDetailsView.ts | invalidHeaderValue": {
|
5715
5712
|
"message": "Invalid Header Value"
|
5716
5713
|
},
|
@@ -7007,6 +7004,9 @@
|
|
7007
7004
|
"panels/network/network-meta.ts | dontGroupNetworkLogItemsByFrame": {
|
7008
7005
|
"message": "Don't group network log items by frame"
|
7009
7006
|
},
|
7007
|
+
"panels/network/network-meta.ts | enableUNCLoading": {
|
7008
|
+
"message": "Allow DevTools to load resources, such as source maps, from Windows Shares via UNC paths. Disabled by default for security reasons."
|
7009
|
+
},
|
7010
7010
|
"panels/network/network-meta.ts | frame": {
|
7011
7011
|
"message": "frame"
|
7012
7012
|
},
|
@@ -5708,9 +5708,6 @@
|
|
5708
5708
|
"panels/issues/AttributionReportingIssueDetailsView.ts | element": {
|
5709
5709
|
"message": "Êĺêḿêńt̂"
|
5710
5710
|
},
|
5711
|
-
"panels/issues/AttributionReportingIssueDetailsView.ts | frame": {
|
5712
|
-
"message": "F̂ŕâḿê"
|
5713
|
-
},
|
5714
5711
|
"panels/issues/AttributionReportingIssueDetailsView.ts | invalidHeaderValue": {
|
5715
5712
|
"message": "Îńv̂ál̂íd̂ H́êád̂ér̂ V́âĺûé"
|
5716
5713
|
},
|
@@ -7007,6 +7004,9 @@
|
|
7007
7004
|
"panels/network/network-meta.ts | dontGroupNetworkLogItemsByFrame": {
|
7008
7005
|
"message": "D̂ón̂'t́ ĝŕôúp̂ ńêt́ŵór̂ḱ l̂óĝ ít̂ém̂ś b̂ý f̂ŕâḿê"
|
7009
7006
|
},
|
7007
|
+
"panels/network/network-meta.ts | enableUNCLoading": {
|
7008
|
+
"message": "Âĺl̂óŵ DevTools t́ô ĺôád̂ ŕêśôúr̂ćêś, ŝúĉh́ âś ŝóûŕĉé m̂áp̂ś, f̂ŕôḿ Ŵín̂d́ôẃŝ Śĥár̂éŝ v́îá UNC p̂át̂h́ŝ. D́îśâb́l̂éd̂ b́ŷ d́êf́âúl̂t́ f̂ór̂ śêćûŕît́ŷ ŕêáŝón̂ś."
|
7009
|
+
},
|
7010
7010
|
"panels/network/network-meta.ts | frame": {
|
7011
7011
|
"message": "f̂ŕâḿê"
|
7012
7012
|
},
|
@@ -1504,10 +1504,12 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe
|
|
1504
1504
|
headers['Cache-Control'] = 'no-cache';
|
1505
1505
|
}
|
1506
1506
|
|
1507
|
+
const allowFileUNCPaths = Common.Settings.Settings.instance().moduleSetting('network.enable-unc-loading').get();
|
1508
|
+
|
1507
1509
|
return new Promise(
|
1508
1510
|
resolve => Host.ResourceLoader.load(url, headers, (success, _responseHeaders, content, errorDescription) => {
|
1509
1511
|
resolve({success, content, errorDescription});
|
1510
|
-
}));
|
1512
|
+
}, allowFileUNCPaths));
|
1511
1513
|
}
|
1512
1514
|
}
|
1513
1515
|
|
@@ -194,28 +194,54 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
|
|
194
194
|
this.#originalContentProviderInternal =
|
195
195
|
new TextUtils.StaticContentProvider.StaticContentProvider(this.contentURL(), this.contentType(), () => {
|
196
196
|
if (!lazyContentPromise) {
|
197
|
-
lazyContentPromise = (async(): Promise<{
|
198
|
-
content: null,
|
199
|
-
error: Common.UIString.LocalizedString,
|
200
|
-
isEncoded: boolean,
|
201
|
-
}|{
|
202
|
-
content: string,
|
203
|
-
isEncoded: boolean,
|
204
|
-
error?: undefined,
|
205
|
-
}> => {
|
197
|
+
lazyContentPromise = (async(): Promise<TextUtils.ContentProvider.DeferredContent> => {
|
206
198
|
if (!this.scriptId) {
|
207
199
|
return {content: null, error: i18nString(UIStrings.scriptRemovedOrDeleted), isEncoded: false};
|
208
200
|
}
|
201
|
+
if (this.isWasm()) {
|
202
|
+
const result = await this.debuggerModel.target().debuggerAgent().invoke_disassembleWasmModule(
|
203
|
+
{scriptId: this.scriptId});
|
204
|
+
|
205
|
+
if (result.getError()) {
|
206
|
+
throw new Error(result.getError());
|
207
|
+
}
|
208
|
+
|
209
|
+
const {streamId, functionBodyOffsets, chunk: {lines, bytecodeOffsets}} = result;
|
210
|
+
const lineChunks = [];
|
211
|
+
const bytecodeOffsetChunks = [];
|
212
|
+
if (streamId) {
|
213
|
+
while (true) {
|
214
|
+
const result =
|
215
|
+
await this.debuggerModel.target().debuggerAgent().invoke_nextWasmDisassemblyChunk({streamId});
|
216
|
+
|
217
|
+
if (result.getError()) {
|
218
|
+
throw new Error(result.getError());
|
219
|
+
}
|
220
|
+
|
221
|
+
const {chunk: {lines: linesChunk, bytecodeOffsets: bytecodeOffsetsChunk}} = result;
|
222
|
+
if (linesChunk.length === 0) {
|
223
|
+
break;
|
224
|
+
}
|
225
|
+
lineChunks.push(linesChunk);
|
226
|
+
bytecodeOffsetChunks.push(bytecodeOffsetsChunk);
|
227
|
+
}
|
228
|
+
}
|
229
|
+
const functionBodyRanges: Array<{start: number, end: number}> = [];
|
230
|
+
// functionBodyOffsets contains a sequence of pairs of start and end offsets
|
231
|
+
for (let i = 0; i < functionBodyOffsets.length; i += 2) {
|
232
|
+
functionBodyRanges.push({start: functionBodyOffsets[i], end: functionBodyOffsets[i + 1]});
|
233
|
+
}
|
234
|
+
const wasmDisassemblyInfo = new Common.WasmDisassembly.WasmDisassembly(
|
235
|
+
lines.concat(...lineChunks), bytecodeOffsets.concat(...bytecodeOffsetChunks), functionBodyRanges);
|
236
|
+
return {content: '', isEncoded: false, wasmDisassemblyInfo};
|
237
|
+
}
|
209
238
|
try {
|
210
239
|
const result = await this.debuggerModel.target().debuggerAgent().invoke_getScriptSource(
|
211
240
|
{scriptId: this.scriptId});
|
212
241
|
if (result.getError()) {
|
213
242
|
throw new Error(result.getError());
|
214
243
|
}
|
215
|
-
const {scriptSource
|
216
|
-
if (bytecode) {
|
217
|
-
return {content: bytecode, isEncoded: true};
|
218
|
-
}
|
244
|
+
const {scriptSource} = result;
|
219
245
|
let content: string = scriptSource || '';
|
220
246
|
if (this.hasSourceURL && this.sourceURL.startsWith('snippet://')) {
|
221
247
|
// TODO(crbug.com/1330846): Find a better way to establish the snippet automapping binding then adding
|
@@ -65,7 +65,7 @@ inspectorBackend.registerEnum("Audits.SharedArrayBufferIssueType", {TransferIssu
|
|
65
65
|
inspectorBackend.registerEnum("Audits.TwaQualityEnforcementViolationType", {KHttpError: "kHttpError", KUnavailableOffline: "kUnavailableOffline", KDigitalAssetLinks: "kDigitalAssetLinks"});
|
66
66
|
inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", AttributionSourceUntrustworthyOrigin: "AttributionSourceUntrustworthyOrigin", AttributionUntrustworthyOrigin: "AttributionUntrustworthyOrigin", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader"});
|
67
67
|
inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {CrossOriginPortalPostMessageError: "CrossOriginPortalPostMessageError"});
|
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", 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"});
|
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"});
|
70
70
|
inspectorBackend.registerEnum("Audits.FederatedAuthRequestIssueReason", {ApprovalDeclined: "ApprovalDeclined", TooManyRequests: "TooManyRequests", ManifestListHttpNotFound: "ManifestListHttpNotFound", ManifestListNoResponse: "ManifestListNoResponse", ManifestListInvalidResponse: "ManifestListInvalidResponse", ManifestNotInManifestList: "ManifestNotInManifestList", ManifestListTooBig: "ManifestListTooBig", ManifestHttpNotFound: "ManifestHttpNotFound", ManifestNoResponse: "ManifestNoResponse", ManifestInvalidResponse: "ManifestInvalidResponse", ClientMetadataHttpNotFound: "ClientMetadataHttpNotFound", ClientMetadataNoResponse: "ClientMetadataNoResponse", ClientMetadataInvalidResponse: "ClientMetadataInvalidResponse", ClientMetadataMissingPrivacyPolicyUrl: "ClientMetadataMissingPrivacyPolicyUrl", DisabledInSettings: "DisabledInSettings", ErrorFetchingSignin: "ErrorFetchingSignin", InvalidSigninResponse: "InvalidSigninResponse", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", IdTokenHttpNotFound: "IdTokenHttpNotFound", IdTokenNoResponse: "IdTokenNoResponse", IdTokenInvalidResponse: "IdTokenInvalidResponse", IdTokenInvalidRequest: "IdTokenInvalidRequest", ErrorIdToken: "ErrorIdToken", Canceled: "Canceled"});
|
71
71
|
inspectorBackend.registerEnum("Audits.InspectorIssueCode", {CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", TrustedWebActivityIssue: "TrustedWebActivityIssue", LowTextContrastIssue: "LowTextContrastIssue", CorsIssue: "CorsIssue", AttributionReportingIssue: "AttributionReportingIssue", QuirksModeIssue: "QuirksModeIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue"});
|
@@ -340,11 +340,11 @@ inspectorBackend.registerEnum("IndexedDB.KeyType", {Number: "number", String: "s
|
|
340
340
|
inspectorBackend.registerEnum("IndexedDB.KeyPathType", {Null: "null", String: "string", Array: "array"});
|
341
341
|
inspectorBackend.registerCommand("IndexedDB.clearObjectStore", [{"name": "securityOrigin", "type": "string", "optional": true}, {"name": "storageKey", "type": "string", "optional": true}, {"name": "databaseName", "type": "string", "optional": false}, {"name": "objectStoreName", "type": "string", "optional": false}], []);
|
342
342
|
inspectorBackend.registerCommand("IndexedDB.deleteDatabase", [{"name": "securityOrigin", "type": "string", "optional": true}, {"name": "storageKey", "type": "string", "optional": true}, {"name": "databaseName", "type": "string", "optional": false}], []);
|
343
|
-
inspectorBackend.registerCommand("IndexedDB.deleteObjectStoreEntries", [{"name": "securityOrigin", "type": "string", "optional":
|
343
|
+
inspectorBackend.registerCommand("IndexedDB.deleteObjectStoreEntries", [{"name": "securityOrigin", "type": "string", "optional": true}, {"name": "storageKey", "type": "string", "optional": true}, {"name": "databaseName", "type": "string", "optional": false}, {"name": "objectStoreName", "type": "string", "optional": false}, {"name": "keyRange", "type": "object", "optional": false}], []);
|
344
344
|
inspectorBackend.registerCommand("IndexedDB.disable", [], []);
|
345
345
|
inspectorBackend.registerCommand("IndexedDB.enable", [], []);
|
346
346
|
inspectorBackend.registerCommand("IndexedDB.requestData", [{"name": "securityOrigin", "type": "string", "optional": false}, {"name": "databaseName", "type": "string", "optional": false}, {"name": "objectStoreName", "type": "string", "optional": false}, {"name": "indexName", "type": "string", "optional": false}, {"name": "skipCount", "type": "number", "optional": false}, {"name": "pageSize", "type": "number", "optional": false}, {"name": "keyRange", "type": "object", "optional": true}], ["objectStoreDataEntries", "hasMore"]);
|
347
|
-
inspectorBackend.registerCommand("IndexedDB.getMetadata", [{"name": "securityOrigin", "type": "string", "optional":
|
347
|
+
inspectorBackend.registerCommand("IndexedDB.getMetadata", [{"name": "securityOrigin", "type": "string", "optional": true}, {"name": "storageKey", "type": "string", "optional": true}, {"name": "databaseName", "type": "string", "optional": false}, {"name": "objectStoreName", "type": "string", "optional": false}], ["entriesCount", "keyGeneratorValue"]);
|
348
348
|
inspectorBackend.registerCommand("IndexedDB.requestDatabase", [{"name": "securityOrigin", "type": "string", "optional": false}, {"name": "databaseName", "type": "string", "optional": false}], ["databaseWithObjectStores"]);
|
349
349
|
inspectorBackend.registerCommand("IndexedDB.requestDatabaseNames", [{"name": "securityOrigin", "type": "string", "optional": false}], ["databaseNames"]);
|
350
350
|
|
@@ -1055,6 +1055,7 @@ export namespace Audits {
|
|
1055
1055
|
ObsoleteWebRtcCipherSuite = 'ObsoleteWebRtcCipherSuite',
|
1056
1056
|
OpenWebDatabaseInsecureContext = 'OpenWebDatabaseInsecureContext',
|
1057
1057
|
OverflowVisibleOnReplacedElement = 'OverflowVisibleOnReplacedElement',
|
1058
|
+
PersistentQuotaType = 'PersistentQuotaType',
|
1058
1059
|
PictureSourceSrc = 'PictureSourceSrc',
|
1059
1060
|
PrefixedCancelAnimationFrame = 'PrefixedCancelAnimationFrame',
|
1060
1061
|
PrefixedRequestAnimationFrame = 'PrefixedRequestAnimationFrame',
|
@@ -5899,7 +5900,15 @@ export namespace IndexedDB {
|
|
5899
5900
|
}
|
5900
5901
|
|
5901
5902
|
export interface DeleteObjectStoreEntriesRequest {
|
5902
|
-
|
5903
|
+
/**
|
5904
|
+
* At least and at most one of securityOrigin, storageKey must be specified.
|
5905
|
+
* Security origin.
|
5906
|
+
*/
|
5907
|
+
securityOrigin?: string;
|
5908
|
+
/**
|
5909
|
+
* Storage key.
|
5910
|
+
*/
|
5911
|
+
storageKey?: string;
|
5903
5912
|
databaseName: string;
|
5904
5913
|
objectStoreName: string;
|
5905
5914
|
/**
|
@@ -5952,9 +5961,14 @@ export namespace IndexedDB {
|
|
5952
5961
|
|
5953
5962
|
export interface GetMetadataRequest {
|
5954
5963
|
/**
|
5964
|
+
* At least and at most one of securityOrigin, storageKey must be specified.
|
5955
5965
|
* Security origin.
|
5956
5966
|
*/
|
5957
|
-
securityOrigin
|
5967
|
+
securityOrigin?: string;
|
5968
|
+
/**
|
5969
|
+
* Storage key.
|
5970
|
+
*/
|
5971
|
+
storageKey?: string;
|
5958
5972
|
/**
|
5959
5973
|
* Database name.
|
5960
5974
|
*/
|
@@ -68,7 +68,13 @@ export class ContentProviderBasedProject extends Workspace.Workspace.ProjectStor
|
|
68
68
|
try {
|
69
69
|
const [content, isEncoded] =
|
70
70
|
await Promise.all([contentProvider.requestContent(), contentProvider.contentEncoded()]);
|
71
|
-
|
71
|
+
const wasmDisassemblyInfo = 'wasmDisassemblyInfo' in content ? content.wasmDisassemblyInfo : undefined;
|
72
|
+
return {
|
73
|
+
content: content.content,
|
74
|
+
wasmDisassemblyInfo,
|
75
|
+
isEncoded,
|
76
|
+
error: 'error' in content && content.error || '',
|
77
|
+
};
|
72
78
|
} catch (err) {
|
73
79
|
// TODO(rob.paveza): CRBug 1013683 - Consider propagating exceptions full-stack
|
74
80
|
return {
|
@@ -10,34 +10,29 @@ import {type MarkdownIssueDescription} from './MarkdownIssueDescription.js';
|
|
10
10
|
|
11
11
|
export const enum IssueCode {
|
12
12
|
PermissionPolicyDisabled = 'AttributionReportingIssue::PermissionPolicyDisabled',
|
13
|
-
AttributionSourceUntrustworthyFrameOrigin = 'AttributionReportingIssue::AttributionSourceUntrustworthyFrameOrigin',
|
14
|
-
AttributionSourceUntrustworthyOrigin = 'AttributionReportingIssue::AttributionSourceUntrustworthyOrigin',
|
15
|
-
AttributionUntrustworthyFrameOrigin = 'AttributionReportingIssue::AttributionUntrustworthyFrameOrigin',
|
16
|
-
AttributionUntrustworthyOrigin = 'AttributionReportingIssue::AttributionUntrustworthyOrigin',
|
17
13
|
UntrustworthyReportingOrigin = 'AttributionReportingIssue::UntrustworthyReportingOrigin',
|
18
14
|
InsecureContext = 'AttributionReportingIssue::InsecureContext',
|
19
|
-
|
15
|
+
InvalidRegisterSourceHeader = 'AttributionReportingIssue::InvalidRegisterSourceHeader',
|
20
16
|
InvalidRegisterTriggerHeader = 'AttributionReportingIssue::InvalidRegisterTriggerHeader',
|
17
|
+
// TODO(apaseltiner): Remove this once old issue types are removed from
|
18
|
+
// protocol.
|
19
|
+
Unknown = 'AttributionReportingIssue::Unknown',
|
21
20
|
}
|
22
21
|
|
23
22
|
function getIssueCode(details: Protocol.Audits.AttributionReportingIssueDetails): IssueCode {
|
24
23
|
switch (details.violationType) {
|
25
24
|
case Protocol.Audits.AttributionReportingIssueType.PermissionPolicyDisabled:
|
26
25
|
return IssueCode.PermissionPolicyDisabled;
|
27
|
-
case Protocol.Audits.AttributionReportingIssueType.AttributionSourceUntrustworthyOrigin:
|
28
|
-
return details.frame !== undefined ? IssueCode.AttributionSourceUntrustworthyFrameOrigin :
|
29
|
-
IssueCode.AttributionSourceUntrustworthyOrigin;
|
30
|
-
case Protocol.Audits.AttributionReportingIssueType.AttributionUntrustworthyOrigin:
|
31
|
-
return details.frame !== undefined ? IssueCode.AttributionUntrustworthyFrameOrigin :
|
32
|
-
IssueCode.AttributionUntrustworthyOrigin;
|
33
26
|
case Protocol.Audits.AttributionReportingIssueType.UntrustworthyReportingOrigin:
|
34
27
|
return IssueCode.UntrustworthyReportingOrigin;
|
35
28
|
case Protocol.Audits.AttributionReportingIssueType.InsecureContext:
|
36
29
|
return IssueCode.InsecureContext;
|
37
30
|
case Protocol.Audits.AttributionReportingIssueType.InvalidHeader:
|
38
|
-
return IssueCode.
|
31
|
+
return IssueCode.InvalidRegisterSourceHeader;
|
39
32
|
case Protocol.Audits.AttributionReportingIssueType.InvalidRegisterTriggerHeader:
|
40
33
|
return IssueCode.InvalidRegisterTriggerHeader;
|
34
|
+
default:
|
35
|
+
return IssueCode.Unknown;
|
41
36
|
}
|
42
37
|
}
|
43
38
|
|
@@ -61,47 +56,27 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
|
|
61
56
|
file: 'arPermissionPolicyDisabled.md',
|
62
57
|
links: [],
|
63
58
|
};
|
64
|
-
case IssueCode.
|
59
|
+
case IssueCode.UntrustworthyReportingOrigin:
|
65
60
|
return {
|
66
|
-
file: '
|
61
|
+
file: 'arUntrustworthyReportingOrigin.md',
|
67
62
|
links: [],
|
68
63
|
};
|
69
|
-
case IssueCode.
|
70
|
-
return {
|
71
|
-
file: 'arAttributionSourceUntrustworthyOrigin.md',
|
72
|
-
links: [
|
73
|
-
{
|
74
|
-
link:
|
75
|
-
'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributiondestination-required',
|
76
|
-
linkTitle: 'attributiondestination attribute',
|
77
|
-
},
|
78
|
-
{
|
79
|
-
link:
|
80
|
-
'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionreportto',
|
81
|
-
linkTitle: 'attributionreportto attribute',
|
82
|
-
},
|
83
|
-
],
|
84
|
-
};
|
85
|
-
case IssueCode.AttributionUntrustworthyFrameOrigin:
|
64
|
+
case IssueCode.InsecureContext:
|
86
65
|
return {
|
87
|
-
file: '
|
66
|
+
file: 'arInsecureContext.md',
|
88
67
|
links: [],
|
89
68
|
};
|
90
|
-
case IssueCode.
|
69
|
+
case IssueCode.InvalidRegisterSourceHeader:
|
91
70
|
return {
|
92
|
-
file: '
|
71
|
+
file: 'arInvalidRegisterSourceHeader.md',
|
93
72
|
links: [],
|
94
73
|
};
|
95
|
-
case IssueCode.
|
96
|
-
return null;
|
97
|
-
case IssueCode.InsecureContext:
|
98
|
-
return null;
|
99
|
-
case IssueCode.InvalidHeader:
|
74
|
+
case IssueCode.InvalidRegisterTriggerHeader:
|
100
75
|
return {
|
101
|
-
file: '
|
76
|
+
file: 'arInvalidRegisterTriggerHeader.md',
|
102
77
|
links: [],
|
103
78
|
};
|
104
|
-
case IssueCode.
|
79
|
+
case IssueCode.Unknown:
|
105
80
|
return null;
|
106
81
|
}
|
107
82
|
}
|
@@ -27,9 +27,14 @@ const UIStrings = {
|
|
27
27
|
*/
|
28
28
|
title: 'Deprecated Feature Used',
|
29
29
|
|
30
|
-
// Store alphabetized messages per DeprecationIssueType in this block.
|
31
30
|
/**
|
32
|
-
* @description
|
31
|
+
* @description We show this warning when 1) an "authorization" header is
|
32
|
+
* attached to the request by scripts, 2) there is no "authorization" in
|
33
|
+
* the "access-control-allow-headers" header in the response, and 3) there
|
34
|
+
* is a wildcard symbol ("*") in the "access-control-allow-header" header
|
35
|
+
* in the response. This is allowed now, but we're planning to reject such
|
36
|
+
* responses and require responses to have an "access-control-allow-headers"
|
37
|
+
* containing "authorization".
|
33
38
|
*/
|
34
39
|
authorizationCoveredByWildcard:
|
35
40
|
'Authorization will not be covered by the wildcard symbol (*) in CORS `Access-Control-Allow-Headers` handling.',
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Ensure that the attribution registration context is secure
|
2
|
+
|
3
|
+
This page tried to register a source or trigger using the Attribution Reporting
|
4
|
+
API but failed because the page that initiated the registration was not secure.
|
5
|
+
|
6
|
+
The registration context must use HTTPS unless it is `localhost` or
|
7
|
+
`127.0.0.1`.
|
@@ -1,6 +1,9 @@
|
|
1
|
-
# Ensure the
|
1
|
+
# Ensure that the `attribution-reporting` permission policy is enabled
|
2
2
|
|
3
|
-
This page
|
3
|
+
This page tried to use the Attribution Reporting API but failed because the
|
4
|
+
`attribution-reporting` permission policy is not enabled.
|
4
5
|
|
5
|
-
This API is enabled by default in the top-level context and in same-origin
|
6
|
-
be explicitly opted-in for cross-origin frames. Add the
|
6
|
+
This API is enabled by default in the top-level context and in same-origin
|
7
|
+
child frames, but must be explicitly opted-in for cross-origin frames. Add the
|
8
|
+
permission policy as follows:
|
9
|
+
`<iframe src="..." allow="attribution-reporting">`.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Ensure that attribution reporting origins are trustworthy
|
2
|
+
|
3
|
+
This page tried to register a source or trigger using the Attribution Reporting
|
4
|
+
API but failed because the reporting origin was not potentially trustworthy.
|
5
|
+
|
6
|
+
The reporting origin is typically the server that sets the
|
7
|
+
`Attribution-Reporting-Register-Source` or
|
8
|
+
`Attribution-Reporting-Register-Trigger` header.
|
9
|
+
|
10
|
+
The reporting origin must use HTTPS unless it is `localhost` or `127.0.0.1`.
|
@@ -59,4 +59,12 @@ export const contentAsDataURL = function(
|
|
59
59
|
export type DeferredContent = {
|
60
60
|
content: string,
|
61
61
|
isEncoded: boolean,
|
62
|
-
}|{
|
62
|
+
}|{
|
63
|
+
content: '',
|
64
|
+
isEncoded: false,
|
65
|
+
wasmDisassemblyInfo: Common.WasmDisassembly.WasmDisassembly,
|
66
|
+
}|{
|
67
|
+
content: null,
|
68
|
+
error: string,
|
69
|
+
isEncoded: boolean,
|
70
|
+
};
|
@@ -14,11 +14,6 @@ const UIStrings = {
|
|
14
14
|
* @description Label for number of rows in the issue details table.
|
15
15
|
*/
|
16
16
|
nViolations: '{n, plural, =1 {# violation} other {# violations}}',
|
17
|
-
/**
|
18
|
-
* @description Noun, label for the column showing the associated frame in the issue details table.
|
19
|
-
* The associated frame can either be the "main frame" (or main window), or an HTML iframe.
|
20
|
-
*/
|
21
|
-
frame: 'Frame',
|
22
17
|
/**
|
23
18
|
* @description Noun, label for the column showing the associated HTML element in the issue details table.
|
24
19
|
*/
|
@@ -60,31 +55,18 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
|
|
60
55
|
issues: Iterable<IssuesManager.AttributionReportingIssue.AttributionReportingIssue>): void {
|
61
56
|
const header = document.createElement('tr');
|
62
57
|
switch (issueCode) {
|
63
|
-
case IssuesManager.AttributionReportingIssue.IssueCode.
|
64
|
-
|
65
|
-
this.appendColumnTitle(header, i18nString(UIStrings.request));
|
66
|
-
this.appendColumnTitle(header, i18nString(UIStrings.untrustworthyOrigin));
|
67
|
-
break;
|
68
|
-
case IssuesManager.AttributionReportingIssue.IssueCode.AttributionUntrustworthyOrigin:
|
58
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterSourceHeader:
|
59
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterTriggerHeader:
|
69
60
|
this.appendColumnTitle(header, i18nString(UIStrings.request));
|
70
|
-
this.appendColumnTitle(header, i18nString(UIStrings.
|
71
|
-
break;
|
72
|
-
case IssuesManager.AttributionReportingIssue.IssueCode.AttributionSourceUntrustworthyFrameOrigin:
|
73
|
-
this.appendColumnTitle(header, i18nString(UIStrings.frame));
|
74
|
-
this.appendColumnTitle(header, i18nString(UIStrings.element));
|
75
|
-
this.appendColumnTitle(header, i18nString(UIStrings.untrustworthyOrigin));
|
61
|
+
this.appendColumnTitle(header, i18nString(UIStrings.invalidHeaderValue));
|
76
62
|
break;
|
77
|
-
case IssuesManager.AttributionReportingIssue.IssueCode.
|
63
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.InsecureContext:
|
64
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.UntrustworthyReportingOrigin:
|
78
65
|
this.appendColumnTitle(header, i18nString(UIStrings.element));
|
79
|
-
this.appendColumnTitle(header, i18nString(UIStrings.untrustworthyOrigin));
|
80
|
-
break;
|
81
|
-
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidHeader:
|
82
|
-
this.appendColumnTitle(header, i18nString(UIStrings.frame));
|
83
66
|
this.appendColumnTitle(header, i18nString(UIStrings.request));
|
84
|
-
this.appendColumnTitle(header, i18nString(UIStrings.
|
67
|
+
this.appendColumnTitle(header, i18nString(UIStrings.untrustworthyOrigin));
|
85
68
|
break;
|
86
69
|
case IssuesManager.AttributionReportingIssue.IssueCode.PermissionPolicyDisabled:
|
87
|
-
this.appendColumnTitle(header, i18nString(UIStrings.frame));
|
88
70
|
this.appendColumnTitle(header, i18nString(UIStrings.element));
|
89
71
|
this.appendColumnTitle(header, i18nString(UIStrings.request));
|
90
72
|
break;
|
@@ -108,21 +90,18 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
|
|
108
90
|
const details = issue.issueDetails;
|
109
91
|
|
110
92
|
switch (issueCode) {
|
111
|
-
case IssuesManager.AttributionReportingIssue.IssueCode.
|
112
|
-
|
113
|
-
this.appendIssueDetailCell(element, details.invalidParameter || '');
|
114
|
-
break;
|
115
|
-
case IssuesManager.AttributionReportingIssue.IssueCode.AttributionUntrustworthyOrigin:
|
93
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterSourceHeader:
|
94
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterTriggerHeader:
|
116
95
|
this.#appendRequestOrEmptyCell(element, details.request);
|
117
96
|
this.appendIssueDetailCell(element, details.invalidParameter || '');
|
118
97
|
break;
|
119
|
-
case IssuesManager.AttributionReportingIssue.IssueCode.
|
120
|
-
|
98
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.InsecureContext:
|
99
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.UntrustworthyReportingOrigin:
|
100
|
+
await this.#appendElementOrEmptyCell(element, issue);
|
121
101
|
this.#appendRequestOrEmptyCell(element, details.request);
|
122
102
|
this.appendIssueDetailCell(element, details.invalidParameter || '');
|
123
103
|
break;
|
124
104
|
case IssuesManager.AttributionReportingIssue.IssueCode.PermissionPolicyDisabled:
|
125
|
-
this.#appendFrameOrEmptyCell(element, issue);
|
126
105
|
await this.#appendElementOrEmptyCell(element, issue);
|
127
106
|
this.#appendRequestOrEmptyCell(element, details.request);
|
128
107
|
break;
|
@@ -131,16 +110,6 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
|
|
131
110
|
this.affectedResources.appendChild(element);
|
132
111
|
}
|
133
112
|
|
134
|
-
#appendFrameOrEmptyCell(
|
135
|
-
parent: HTMLElement, issue: IssuesManager.AttributionReportingIssue.AttributionReportingIssue): void {
|
136
|
-
const details = issue.issueDetails;
|
137
|
-
if (details.frame) {
|
138
|
-
parent.appendChild(this.createFrameCell(details.frame.frameId, issue.getCategory()));
|
139
|
-
} else {
|
140
|
-
this.appendIssueDetailCell(parent, '');
|
141
|
-
}
|
142
|
-
}
|
143
|
-
|
144
113
|
async #appendElementOrEmptyCell(
|
145
114
|
parent: HTMLElement, issue: IssuesManager.AttributionReportingIssue.AttributionReportingIssue): Promise<void> {
|
146
115
|
const details = issue.issueDetails;
|
@@ -350,14 +350,16 @@ export class RequestHeadersComponent extends HTMLElement {
|
|
350
350
|
} else {
|
351
351
|
cautionText = i18nString(UIStrings.provisionalHeadersAreShown);
|
352
352
|
}
|
353
|
+
// Disabled until https://crbug.com/1079231 is fixed.
|
354
|
+
// clang-format off
|
353
355
|
return html`
|
354
356
|
<div class="call-to-action">
|
355
357
|
<div class="call-to-action-body">
|
356
358
|
<div class="explanation" title=${cautionTitle}>
|
357
359
|
<${IconButton.Icon.Icon.litTagName} class="inline-icon" .data=${{
|
358
|
-
|
359
|
-
|
360
|
-
|
360
|
+
iconName: 'clear-warning_icon',
|
361
|
+
width: '12px',
|
362
|
+
height: '12px',
|
361
363
|
} as IconButton.Icon.IconData}>
|
362
364
|
</${IconButton.Icon.Icon.litTagName}>
|
363
365
|
${cautionText} <x-link href="https://developer.chrome.com/docs/devtools/network/reference/#provisional-headers" class="link">${i18nString(UIStrings.learnMore)}</x-link>
|
@@ -365,6 +367,7 @@ export class RequestHeadersComponent extends HTMLElement {
|
|
365
367
|
</div>
|
366
368
|
</div>
|
367
369
|
`;
|
370
|
+
// clang-format on
|
368
371
|
}
|
369
372
|
|
370
373
|
#renderHeader(header: HeaderDescriptor): LitHtml.TemplateResult {
|
@@ -373,11 +376,10 @@ export class RequestHeadersComponent extends HTMLElement {
|
|
373
376
|
return html`
|
374
377
|
<div class="row">
|
375
378
|
<div class="header-name">
|
376
|
-
${header.headerNotSet ?
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
` : ''}${header.name}:
|
379
|
+
${header.headerNotSet ?
|
380
|
+
html`<div class="header-badge header-badge-text">${i18n.i18n.lockedString('not-set')}</div>` :
|
381
|
+
LitHtml.nothing
|
382
|
+
}${header.name}:
|
381
383
|
</div>
|
382
384
|
<div class="header-value ${header.headerValueIncorrect ? 'header-warning' : ''}">
|
383
385
|
${header.value?.toString() || ''}
|
@@ -399,10 +401,10 @@ export class RequestHeadersComponent extends HTMLElement {
|
|
399
401
|
// clang-format off
|
400
402
|
return html`
|
401
403
|
<${IconButton.Icon.Icon.litTagName} class="inline-icon" title=${titleText} .data=${{
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
404
|
+
iconName: 'clear-warning_icon',
|
405
|
+
width: '12px',
|
406
|
+
height: '12px',
|
407
|
+
} as IconButton.Icon.IconData}>
|
406
408
|
</${IconButton.Icon.Icon.litTagName}>
|
407
409
|
`;
|
408
410
|
// clang-format on
|
@@ -108,6 +108,11 @@ const UIStrings = {
|
|
108
108
|
*@description Title of a setting under the Network category that can be invoked through the Command Menu
|
109
109
|
*/
|
110
110
|
dontGroupNetworkLogItemsByFrame: 'Don\'t group network log items by frame',
|
111
|
+
/**
|
112
|
+
* @description Label of a checkbox in the DevTools settings UI.
|
113
|
+
*/
|
114
|
+
enableUNCLoading:
|
115
|
+
'Allow `DevTools` to load resources, such as source maps, from Windows Shares via `UNC` paths. Disabled by default for security reasons.',
|
111
116
|
};
|
112
117
|
const str_ = i18n.i18n.registerUIStrings('panels/network/network-meta.ts', UIStrings);
|
113
118
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
@@ -316,6 +321,17 @@ Common.Settings.registerSettingExtension({
|
|
316
321
|
],
|
317
322
|
});
|
318
323
|
|
324
|
+
// While this setting is used by the Network module, we place it under the
|
325
|
+
// "sources" category as source map loading is the dominant use case.
|
326
|
+
Common.Settings.registerSettingExtension({
|
327
|
+
category: Common.Settings.SettingCategory.SOURCES,
|
328
|
+
storageType: Common.Settings.SettingStorageType.Synced,
|
329
|
+
title: i18nLazyString(UIStrings.enableUNCLoading),
|
330
|
+
settingName: 'network.enable-unc-loading',
|
331
|
+
settingType: Common.Settings.SettingType.BOOLEAN,
|
332
|
+
defaultValue: false,
|
333
|
+
});
|
334
|
+
|
319
335
|
UI.ViewManager.registerLocationResolver({
|
320
336
|
name: UI.ViewManager.ViewLocationValues.NETWORK_SIDEBAR,
|
321
337
|
category: UI.ViewManager.ViewLocationCategoryValues.NETWORK,
|
@@ -98,7 +98,8 @@ export class TimelineLoader implements Common.StringOutputStream.OutputStream {
|
|
98
98
|
|
99
99
|
static loadFromURL(url: Platform.DevToolsPath.UrlString, client: Client): TimelineLoader {
|
100
100
|
const loader = new TimelineLoader(client);
|
101
|
-
|
101
|
+
const allowFileUNCPaths = Common.Settings.Settings.instance().moduleSetting('network.enable-unc-loading').get();
|
102
|
+
Host.ResourceLoader.loadAsStream(url, null, loader, undefined, allowFileUNCPaths);
|
102
103
|
return loader;
|
103
104
|
}
|
104
105
|
|
@@ -437,6 +437,8 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
437
437
|
progressIndicator.setTotalWork(100);
|
438
438
|
this.progressToolbarItem.element.appendChild(progressIndicator.element);
|
439
439
|
|
440
|
+
progressIndicator.setWorked(1);
|
441
|
+
|
440
442
|
const deferredContent = await this.lazyContent();
|
441
443
|
let error, content;
|
442
444
|
if (deferredContent.content === null) {
|
@@ -448,57 +450,13 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
448
450
|
const view = new DataView(Common.Base64.decode(deferredContent.content));
|
449
451
|
const decoder = new TextDecoder();
|
450
452
|
this.rawContent = decoder.decode(view, {stream: true});
|
453
|
+
} else if ('wasmDisassemblyInfo' in deferredContent && deferredContent.wasmDisassemblyInfo) {
|
454
|
+
const {wasmDisassemblyInfo} = deferredContent;
|
455
|
+
this.rawContent = CodeMirror.Text.of(wasmDisassemblyInfo.lines);
|
456
|
+
this.wasmDisassemblyInternal = wasmDisassemblyInfo;
|
451
457
|
} else {
|
452
|
-
this.rawContent =
|
453
|
-
|
454
|
-
}
|
455
|
-
|
456
|
-
progressIndicator.setWorked(1);
|
457
|
-
|
458
|
-
if (!error && this.contentType === 'application/wasm') {
|
459
|
-
const worker = Common.Worker.WorkerWrapper.fromURL(
|
460
|
-
new URL('../../../../entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js', import.meta.url));
|
461
|
-
const promise = new Promise<{
|
462
|
-
lines: string[],
|
463
|
-
offsets: number[],
|
464
|
-
functionBodyOffsets: {
|
465
|
-
start: number,
|
466
|
-
end: number,
|
467
|
-
}[],
|
468
|
-
}>((resolve, reject) => {
|
469
|
-
worker.onmessage =
|
470
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
471
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
472
|
-
({data}: MessageEvent<any>): void => {
|
473
|
-
if ('event' in data) {
|
474
|
-
switch (data.event) {
|
475
|
-
case 'progress':
|
476
|
-
progressIndicator.setWorked(data.params.percentage);
|
477
|
-
break;
|
478
|
-
}
|
479
|
-
} else if ('method' in data) {
|
480
|
-
switch (data.method) {
|
481
|
-
case 'disassemble':
|
482
|
-
if ('error' in data) {
|
483
|
-
reject(data.error);
|
484
|
-
} else if ('result' in data) {
|
485
|
-
resolve(data.result);
|
486
|
-
}
|
487
|
-
break;
|
488
|
-
}
|
489
|
-
}
|
490
|
-
};
|
491
|
-
worker.onerror = reject;
|
492
|
-
});
|
493
|
-
worker.postMessage({method: 'disassemble', params: {content}});
|
494
|
-
try {
|
495
|
-
const {lines, offsets, functionBodyOffsets} = await promise;
|
496
|
-
this.rawContent = content = CodeMirror.Text.of(lines);
|
497
|
-
this.wasmDisassemblyInternal = new Common.WasmDisassembly.WasmDisassembly(offsets, functionBodyOffsets);
|
498
|
-
} catch (e) {
|
499
|
-
this.rawContent = content = error = e.message;
|
500
|
-
} finally {
|
501
|
-
worker.terminate();
|
458
|
+
this.rawContent = content;
|
459
|
+
this.wasmDisassemblyInternal = null;
|
502
460
|
}
|
503
461
|
}
|
504
462
|
|
@@ -514,7 +472,7 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
514
472
|
this.textEditor.editor.setState(this.placeholderEditorState(error));
|
515
473
|
this.prettyToggle.setEnabled(false);
|
516
474
|
} else {
|
517
|
-
if (this.shouldAutoPrettyPrint && TextUtils.TextUtils.isMinified(content)) {
|
475
|
+
if (this.shouldAutoPrettyPrint && TextUtils.TextUtils.isMinified(content || '')) {
|
518
476
|
await this.setPretty(true);
|
519
477
|
} else {
|
520
478
|
await this.setContent(this.rawContent || '');
|
package/package.json
CHANGED