chrome-devtools-frontend 1.0.961109 → 1.0.961797
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 +0 -3
- package/front_end/core/i18n/locales/en-US.json +6 -24
- package/front_end/core/i18n/locales/en-XL.json +6 -24
- package/front_end/models/issues_manager/IssuesManager.ts +0 -5
- package/front_end/models/issues_manager/issues_manager.ts +0 -2
- package/front_end/panels/application/components/FrameDetailsView.ts +5 -1
- package/front_end/panels/application/components/PermissionsPolicySection.ts +16 -4
- package/front_end/panels/issues/IssueAggregator.ts +0 -10
- package/front_end/panels/issues/IssueView.ts +0 -2
- package/front_end/third_party/additional_readme_paths.json +1 -0
- package/front_end/ui/components/docs/icon_button/basic.ts +2 -7
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/package.json +1 -1
- package/scripts/build/assert_third_party_readmes.py +2 -1
- package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +0 -67
- package/front_end/models/issues_manager/descriptions/wasmCrossOriginModuleSharing.md +0 -5
- package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +0 -90
@@ -308,7 +308,6 @@ grd_files_release_sources = [
|
|
308
308
|
"front_end/models/issues_manager/descriptions/heavyAd.md",
|
309
309
|
"front_end/models/issues_manager/descriptions/mixedContent.md",
|
310
310
|
"front_end/models/issues_manager/descriptions/sharedArrayBuffer.md",
|
311
|
-
"front_end/models/issues_manager/descriptions/wasmCrossOriginModuleSharing.md",
|
312
311
|
"front_end/models/issues_manager/issues_manager.js",
|
313
312
|
"front_end/models/javascript_metadata/javascript_metadata.js",
|
314
313
|
"front_end/models/logs/logs-meta.js",
|
@@ -718,7 +717,6 @@ grd_files_debug_sources = [
|
|
718
717
|
"front_end/models/issues_manager/SharedArrayBufferIssue.js",
|
719
718
|
"front_end/models/issues_manager/SourceFrameIssuesManager.js",
|
720
719
|
"front_end/models/issues_manager/TrustedWebActivityIssue.js",
|
721
|
-
"front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.js",
|
722
720
|
"front_end/models/javascript_metadata/JavaScriptMetadata.js",
|
723
721
|
"front_end/models/javascript_metadata/NativeFunctions.js",
|
724
722
|
"front_end/models/logs/LogManager.js",
|
@@ -992,7 +990,6 @@ grd_files_debug_sources = [
|
|
992
990
|
"front_end/panels/issues/IssueRevealer.js",
|
993
991
|
"front_end/panels/issues/IssueView.js",
|
994
992
|
"front_end/panels/issues/IssuesPane.js",
|
995
|
-
"front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.js",
|
996
993
|
"front_end/panels/issues/components/HideIssuesMenu.js",
|
997
994
|
"front_end/panels/issues/components/hideIssuesMenu.css.js",
|
998
995
|
"front_end/panels/issues/cspViolationsListView.css.js",
|
@@ -1394,9 +1394,6 @@
|
|
1394
1394
|
"models/issues_manager/TrustedWebActivityIssue.ts | changesToQualityCriteriaForPwas": {
|
1395
1395
|
"message": "Changes to quality criteria for PWAs using Trusted Web Activity"
|
1396
1396
|
},
|
1397
|
-
"models/issues_manager/WasmCrossOriginModuleSharingIssue.ts | linkTitle": {
|
1398
|
-
"message": "Restricting Wasm module sharing to same-origin"
|
1399
|
-
},
|
1400
1397
|
"models/logs/logs-meta.ts | clear": {
|
1401
1398
|
"message": "clear"
|
1402
1399
|
},
|
@@ -2897,6 +2894,9 @@
|
|
2897
2894
|
"panels/application/components/FrameDetailsView.ts | parentIsAdExplanation": {
|
2898
2895
|
"message": "This frame is considered an ad frame because its parent frame is an ad frame."
|
2899
2896
|
},
|
2897
|
+
"panels/application/components/FrameDetailsView.ts | refresh": {
|
2898
|
+
"message": "Refresh"
|
2899
|
+
},
|
2900
2900
|
"panels/application/components/FrameDetailsView.ts | reportingTo": {
|
2901
2901
|
"message": "reporting to"
|
2902
2902
|
},
|
@@ -2990,6 +2990,9 @@
|
|
2990
2990
|
"panels/application/components/PermissionsPolicySection.ts | clickToShowIframe": {
|
2991
2991
|
"message": "Click to reveal the top-most iframe which does not allow this feature in the elements panel."
|
2992
2992
|
},
|
2993
|
+
"panels/application/components/PermissionsPolicySection.ts | disabledByFencedFrame": {
|
2994
|
+
"message": "disabled inside a fencedframe"
|
2995
|
+
},
|
2993
2996
|
"panels/application/components/PermissionsPolicySection.ts | disabledByHeader": {
|
2994
2997
|
"message": "disabled by \"Permissions-Policy\" header"
|
2995
2998
|
},
|
@@ -5495,27 +5498,6 @@
|
|
5495
5498
|
"panels/issues/IssueView.ts | warned": {
|
5496
5499
|
"message": "Warned"
|
5497
5500
|
},
|
5498
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | blocked": {
|
5499
|
-
"message": "blocked"
|
5500
|
-
},
|
5501
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | nModuleTransfers": {
|
5502
|
-
"message": "{n, plural, =1 {# module} other {# modules}}"
|
5503
|
-
},
|
5504
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | sourceOrigin": {
|
5505
|
-
"message": "Source Origin"
|
5506
|
-
},
|
5507
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | status": {
|
5508
|
-
"message": "Status"
|
5509
|
-
},
|
5510
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | targetOrigin": {
|
5511
|
-
"message": "Target Origin"
|
5512
|
-
},
|
5513
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | warned": {
|
5514
|
-
"message": "warning"
|
5515
|
-
},
|
5516
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | wasmModuleUrl": {
|
5517
|
-
"message": "Wasm Module URL"
|
5518
|
-
},
|
5519
5501
|
"panels/js_profiler/js_profiler-meta.ts | profiler": {
|
5520
5502
|
"message": "Profiler"
|
5521
5503
|
},
|
@@ -1394,9 +1394,6 @@
|
|
1394
1394
|
"models/issues_manager/TrustedWebActivityIssue.ts | changesToQualityCriteriaForPwas": {
|
1395
1395
|
"message": "Ĉh́âńĝéŝ t́ô q́ûál̂ít̂ý ĉŕît́êŕîá f̂ór̂ ṔŴÁŝ úŝín̂ǵ T̂ŕûśt̂éd̂ Ẃêb́ Âćt̂ív̂ít̂ý"
|
1396
1396
|
},
|
1397
|
-
"models/issues_manager/WasmCrossOriginModuleSharingIssue.ts | linkTitle": {
|
1398
|
-
"message": "R̂éŝt́r̂íĉt́îńĝ Ẃâśm̂ ḿôd́ûĺê śĥár̂ín̂ǵ t̂ó ŝám̂é-ôŕîǵîń"
|
1399
|
-
},
|
1400
1397
|
"models/logs/logs-meta.ts | clear": {
|
1401
1398
|
"message": "ĉĺêár̂"
|
1402
1399
|
},
|
@@ -2897,6 +2894,9 @@
|
|
2897
2894
|
"panels/application/components/FrameDetailsView.ts | parentIsAdExplanation": {
|
2898
2895
|
"message": "T̂h́îś f̂ŕâḿê íŝ ćôńŝíd̂ér̂éd̂ án̂ ád̂ f́r̂ám̂é b̂éĉáûśê ít̂ś p̂ár̂én̂t́ f̂ŕâḿê íŝ án̂ ád̂ f́r̂ám̂é."
|
2899
2896
|
},
|
2897
|
+
"panels/application/components/FrameDetailsView.ts | refresh": {
|
2898
|
+
"message": "R̂éf̂ŕêśĥ"
|
2899
|
+
},
|
2900
2900
|
"panels/application/components/FrameDetailsView.ts | reportingTo": {
|
2901
2901
|
"message": "r̂ép̂ór̂t́îńĝ t́ô"
|
2902
2902
|
},
|
@@ -2990,6 +2990,9 @@
|
|
2990
2990
|
"panels/application/components/PermissionsPolicySection.ts | clickToShowIframe": {
|
2991
2991
|
"message": "Ĉĺîćk̂ t́ô ŕêv́êál̂ t́ĥé t̂óp̂-ḿôśt̂ íf̂ŕâḿê ẃĥíĉh́ d̂óêś n̂ót̂ ál̂ĺôẃ t̂h́îś f̂éât́ûŕê ín̂ t́ĥé êĺêḿêńt̂ś p̂án̂él̂."
|
2992
2992
|
},
|
2993
|
+
"panels/application/components/PermissionsPolicySection.ts | disabledByFencedFrame": {
|
2994
|
+
"message": "d̂íŝáb̂ĺêd́ îńŝíd̂é â fencedframe"
|
2995
|
+
},
|
2993
2996
|
"panels/application/components/PermissionsPolicySection.ts | disabledByHeader": {
|
2994
2997
|
"message": "d̂íŝáb̂ĺêd́ b̂ý \"Permissions-Policy\" ĥéâd́êŕ"
|
2995
2998
|
},
|
@@ -5495,27 +5498,6 @@
|
|
5495
5498
|
"panels/issues/IssueView.ts | warned": {
|
5496
5499
|
"message": "Ŵár̂ńêd́"
|
5497
5500
|
},
|
5498
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | blocked": {
|
5499
|
-
"message": "b̂ĺôćk̂éd̂"
|
5500
|
-
},
|
5501
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | nModuleTransfers": {
|
5502
|
-
"message": "{n, plural, =1 {# m̂ód̂úl̂é} other {# m̂ód̂úl̂éŝ}}"
|
5503
|
-
},
|
5504
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | sourceOrigin": {
|
5505
|
-
"message": "Ŝóûŕĉé Ôŕîǵîń"
|
5506
|
-
},
|
5507
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | status": {
|
5508
|
-
"message": "Ŝt́ât́ûś"
|
5509
|
-
},
|
5510
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | targetOrigin": {
|
5511
|
-
"message": "T̂ár̂ǵêt́ Ôŕîǵîń"
|
5512
|
-
},
|
5513
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | warned": {
|
5514
|
-
"message": "ŵár̂ńîńĝ"
|
5515
|
-
},
|
5516
|
-
"panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts | wasmModuleUrl": {
|
5517
|
-
"message": "Ŵáŝḿ M̂ód̂úl̂é ÛŔL̂"
|
5518
|
-
},
|
5519
5501
|
"panels/js_profiler/js_profiler-meta.ts | profiler": {
|
5520
5502
|
"message": "P̂ŕôf́îĺêŕ"
|
5521
5503
|
},
|
@@ -25,7 +25,6 @@ import {SameSiteCookieIssue} from './SameSiteCookieIssue.js';
|
|
25
25
|
import {SharedArrayBufferIssue} from './SharedArrayBufferIssue.js';
|
26
26
|
import {SourceFrameIssuesManager} from './SourceFrameIssuesManager.js';
|
27
27
|
import {TrustedWebActivityIssue} from './TrustedWebActivityIssue.js';
|
28
|
-
import {WasmCrossOriginModuleSharingIssue} from './WasmCrossOriginModuleSharingIssue.js';
|
29
28
|
|
30
29
|
export {Events} from './IssuesManagerEvents.js';
|
31
30
|
|
@@ -93,10 +92,6 @@ const issueCodeHandlers = new Map<
|
|
93
92
|
Protocol.Audits.InspectorIssueCode.AttributionReportingIssue,
|
94
93
|
AttributionReportingIssue.fromInspectorIssue,
|
95
94
|
],
|
96
|
-
[
|
97
|
-
Protocol.Audits.InspectorIssueCode.WasmCrossOriginModuleSharingIssue,
|
98
|
-
WasmCrossOriginModuleSharingIssue.fromInspectorIssue,
|
99
|
-
],
|
100
95
|
[
|
101
96
|
Protocol.Audits.InspectorIssueCode.GenericIssue,
|
102
97
|
GenericIssue.fromInspectorIssue,
|
@@ -24,7 +24,6 @@ import * as SameSiteCookieIssue from './SameSiteCookieIssue.js';
|
|
24
24
|
import * as SharedArrayBufferIssue from './SharedArrayBufferIssue.js';
|
25
25
|
import * as SourceFrameIssuesManager from './SourceFrameIssuesManager.js';
|
26
26
|
import * as TrustedWebActivityIssue from './TrustedWebActivityIssue.js';
|
27
|
-
import * as WasmCrossOriginModuleSharingIssue from './WasmCrossOriginModuleSharingIssue.js';
|
28
27
|
|
29
28
|
export {
|
30
29
|
AttributionReportingIssue,
|
@@ -49,5 +48,4 @@ export {
|
|
49
48
|
SharedArrayBufferIssue,
|
50
49
|
SourceFrameIssuesManager,
|
51
50
|
TrustedWebActivityIssue,
|
52
|
-
WasmCrossOriginModuleSharingIssue,
|
53
51
|
};
|
@@ -236,6 +236,10 @@ const UIStrings = {
|
|
236
236
|
*/
|
237
237
|
createdByAdScriptExplanation:
|
238
238
|
'There was an ad script in the `(async) stack` when this frame was created. Examining the creation `stack trace` of this frame might provide more insight.',
|
239
|
+
/**
|
240
|
+
*@description Label for a button which when clicked causes some information to be refreshed/updated.
|
241
|
+
*/
|
242
|
+
refresh: 'Refresh',
|
239
243
|
};
|
240
244
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/FrameDetailsView.ts', UIStrings);
|
241
245
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
@@ -337,7 +341,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
337
341
|
groups: [
|
338
342
|
{
|
339
343
|
iconName: 'refresh_12x12_icon',
|
340
|
-
text:
|
344
|
+
text: i18nString(UIStrings.refresh),
|
341
345
|
} as IconButton.IconButton.IconWithTextData,
|
342
346
|
],
|
343
347
|
} as IconButton.IconButton.IconButtonData}>
|
@@ -52,6 +52,10 @@ const UIStrings = {
|
|
52
52
|
*@description Text describing that a specific feature is blocked by a Permissions Policy specified in a request header.
|
53
53
|
*/
|
54
54
|
disabledByHeader: 'disabled by "`Permissions-Policy`" header',
|
55
|
+
/**
|
56
|
+
*@description Text describing that a specific feature is blocked by virtue of being inside a fenced frame tree.
|
57
|
+
*/
|
58
|
+
disabledByFencedFrame: 'disabled inside a `fencedframe`',
|
55
59
|
};
|
56
60
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/PermissionsPolicySection.ts', UIStrings);
|
57
61
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
@@ -144,10 +148,18 @@ export class PermissionsPolicySection extends HTMLElement {
|
|
144
148
|
const resource = frame && frame.resourceForURL(frame.url);
|
145
149
|
const linkTargetRequest =
|
146
150
|
blockReason === Protocol.Page.PermissionsPolicyBlockReason.Header && resource && resource.request;
|
147
|
-
const blockReasonText =
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
+
const blockReasonText = ((): String => {
|
152
|
+
switch (blockReason) {
|
153
|
+
case Protocol.Page.PermissionsPolicyBlockReason.IframeAttribute:
|
154
|
+
return i18nString(UIStrings.disabledByIframe);
|
155
|
+
case Protocol.Page.PermissionsPolicyBlockReason.Header:
|
156
|
+
return i18nString(UIStrings.disabledByHeader);
|
157
|
+
case Protocol.Page.PermissionsPolicyBlockReason.InFencedFrameTree:
|
158
|
+
return i18nString(UIStrings.disabledByFencedFrame);
|
159
|
+
default:
|
160
|
+
return '';
|
161
|
+
}
|
162
|
+
})();
|
151
163
|
const revealHeader = async(): Promise<void> => {
|
152
164
|
if (!linkTargetRequest) {
|
153
165
|
return;
|
@@ -43,8 +43,6 @@ export class AggregatedIssue extends IssuesManager.Issue.Issue {
|
|
43
43
|
#trustedWebActivityIssues = new Set<IssuesManager.TrustedWebActivityIssue.TrustedWebActivityIssue>();
|
44
44
|
#quirksModeIssues = new Set<IssuesManager.QuirksModeIssue.QuirksModeIssue>();
|
45
45
|
#attributionReportingIssues = new Set<IssuesManager.AttributionReportingIssue.AttributionReportingIssue>();
|
46
|
-
#wasmCrossOriginModuleSharingIssues =
|
47
|
-
new Set<IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue>();
|
48
46
|
#genericIssues = new Set<IssuesManager.GenericIssue.GenericIssue>();
|
49
47
|
#representative?: IssuesManager.Issue.Issue;
|
50
48
|
#aggregatedIssuesCount = 0;
|
@@ -126,11 +124,6 @@ export class AggregatedIssue extends IssuesManager.Issue.Issue {
|
|
126
124
|
return this.#attributionReportingIssues;
|
127
125
|
}
|
128
126
|
|
129
|
-
getWasmCrossOriginModuleSharingIssue():
|
130
|
-
ReadonlySet<IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue> {
|
131
|
-
return this.#wasmCrossOriginModuleSharingIssues;
|
132
|
-
}
|
133
|
-
|
134
127
|
getGenericIssues(): ReadonlySet<IssuesManager.GenericIssue.GenericIssue> {
|
135
128
|
return this.#genericIssues;
|
136
129
|
}
|
@@ -223,9 +216,6 @@ export class AggregatedIssue extends IssuesManager.Issue.Issue {
|
|
223
216
|
if (issue instanceof IssuesManager.AttributionReportingIssue.AttributionReportingIssue) {
|
224
217
|
this.#attributionReportingIssues.add(issue);
|
225
218
|
}
|
226
|
-
if (issue instanceof IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue) {
|
227
|
-
this.#wasmCrossOriginModuleSharingIssues.add(issue);
|
228
|
-
}
|
229
219
|
if (issue instanceof IssuesManager.GenericIssue.GenericIssue) {
|
230
220
|
this.#genericIssues.add(issue);
|
231
221
|
}
|
@@ -30,7 +30,6 @@ import {AffectedSourcesView} from './AffectedSourcesView.js';
|
|
30
30
|
import {AffectedTrustedWebActivityIssueDetailsView} from './AffectedTrustedWebActivityIssueDetailsView.js';
|
31
31
|
import {CorsIssueDetailsView} from './CorsIssueDetailsView.js';
|
32
32
|
import {GenericIssueDetailsView} from './GenericIssueDetailsView.js';
|
33
|
-
import {WasmCrossOriginModuleSharingAffectedResourcesView} from './WasmCrossOriginModuleSharingAffectedResourcesView.js';
|
34
33
|
import {AttributionReportingIssueDetailsView} from './AttributionReportingIssueDetailsView.js';
|
35
34
|
|
36
35
|
import type {AggregatedIssue} from './IssueAggregator.js';
|
@@ -253,7 +252,6 @@ export class IssueView extends UI.TreeOutline.TreeElement {
|
|
253
252
|
new GenericIssueDetailsView(this, this.#issue),
|
254
253
|
new AffectedDocumentsInQuirksModeView(this, this.#issue),
|
255
254
|
new AttributionReportingIssueDetailsView(this, this.#issue),
|
256
|
-
new WasmCrossOriginModuleSharingAffectedResourcesView(this, this.#issue),
|
257
255
|
new AffectedRawCookieLinesView(this, this.#issue),
|
258
256
|
];
|
259
257
|
if (Root.Runtime.experiments.isEnabled('hideIssuesFeature')) {
|
@@ -12,18 +12,13 @@ function appendComponent(data: IconButton.IconButton.IconButtonData) {
|
|
12
12
|
|
13
13
|
appendComponent({
|
14
14
|
clickHandler: (): void => {},
|
15
|
-
groups: [{iconName: 'survey_feedback_icon',
|
16
|
-
});
|
17
|
-
|
18
|
-
appendComponent({
|
19
|
-
clickHandler: (): void => {},
|
20
|
-
groups: [{iconName: 'survey_feedback_icon', iconColor: 'black', text: '1 item'}],
|
15
|
+
groups: [{iconName: 'survey_feedback_icon', text: '1 item'}],
|
21
16
|
});
|
22
17
|
|
23
18
|
appendComponent({
|
24
19
|
clickHandler: (): void => {},
|
25
20
|
groups: [
|
26
|
-
{iconName: 'survey_feedback_icon', iconColor: '
|
21
|
+
{iconName: 'survey_feedback_icon', iconColor: 'var(--color-primary)', text: 'Test'},
|
27
22
|
{iconName: 'warning_icon', iconColor: '', text: '1'},
|
28
23
|
],
|
29
24
|
});
|
@@ -85,7 +85,7 @@ export class IconButton extends HTMLElement {
|
|
85
85
|
${filteredGroups.map(counter =>
|
86
86
|
LitHtml.html`
|
87
87
|
<${Icon.litTagName} class="status-icon"
|
88
|
-
.data=${{iconName: counter.iconName, color: counter.iconColor || '', width: counter.iconWidth || '1.5ex', height: counter.iconHeight || '1.5ex'} as IconData}>
|
88
|
+
.data=${{iconName: counter.iconName, color: counter.iconColor || 'var(--color-text-primary)', width: counter.iconWidth || '1.5ex', height: counter.iconHeight || '1.5ex'} as IconData}>
|
89
89
|
</${Icon.litTagName}>
|
90
90
|
${this.#compact ? LitHtml.html`<!-- Force line-height for this element --><span>​</span>` : LitHtml.nothing}
|
91
91
|
<span class="icon-button-title">${counter.text}</span>
|
package/package.json
CHANGED
@@ -49,7 +49,8 @@ def main(argv):
|
|
49
49
|
for listed_directory in listed_third_party_directories_json:
|
50
50
|
if (listed_directory not in found_directories
|
51
51
|
# TODO(crbug.com/1287519): Remove exception for codemirror 5
|
52
|
-
and not listed_directory == "codemirror"
|
52
|
+
and not listed_directory == "codemirror"
|
53
|
+
and not listed_directory == "puppeteer"):
|
53
54
|
print(
|
54
55
|
"Directory `" + listed_directory + "`" +
|
55
56
|
" is not included in `config/gni/devtools_grd_files.gni`." +
|
@@ -1,67 +0,0 @@
|
|
1
|
-
// Copyright 2021 The Chromium Authors. All rights reserved.
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
3
|
-
// found in the LICENSE file.
|
4
|
-
|
5
|
-
import * as i18n from '../../core/i18n/i18n.js';
|
6
|
-
import * as Protocol from '../../generated/protocol.js';
|
7
|
-
import type * as SDK from '../../core/sdk/sdk.js';
|
8
|
-
import {Issue, IssueCategory, IssueKind} from './Issue.js';
|
9
|
-
import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
|
10
|
-
|
11
|
-
const UIStrings = {
|
12
|
-
/**
|
13
|
-
* @description Label for the link in the description of Wasm cross-origin module sharing issues, that is, issues
|
14
|
-
* that are related to the upcoming deprecation of cross-origin sharing of Wasm modules.
|
15
|
-
*/
|
16
|
-
linkTitle: 'Restricting Wasm module sharing to same-origin',
|
17
|
-
};
|
18
|
-
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/WasmCrossOriginModuleSharingIssue.ts', UIStrings);
|
19
|
-
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
20
|
-
|
21
|
-
export class WasmCrossOriginModuleSharingIssue extends
|
22
|
-
Issue<Protocol.Audits.InspectorIssueCode.WasmCrossOriginModuleSharingIssue> {
|
23
|
-
#issueDetails: Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails;
|
24
|
-
|
25
|
-
constructor(
|
26
|
-
issueDetails: Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails,
|
27
|
-
issuesModel: SDK.IssuesModel.IssuesModel) {
|
28
|
-
super(Protocol.Audits.InspectorIssueCode.WasmCrossOriginModuleSharingIssue, issuesModel);
|
29
|
-
this.#issueDetails = issueDetails;
|
30
|
-
}
|
31
|
-
|
32
|
-
getCategory(): IssueCategory {
|
33
|
-
return IssueCategory.Other;
|
34
|
-
}
|
35
|
-
|
36
|
-
details(): Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails {
|
37
|
-
return this.#issueDetails;
|
38
|
-
}
|
39
|
-
|
40
|
-
getDescription(): MarkdownIssueDescription|null {
|
41
|
-
return {
|
42
|
-
file: 'wasmCrossOriginModuleSharing.md',
|
43
|
-
links: [{
|
44
|
-
link: 'https://developer.chrome.com/blog/wasm-module-sharing-restricted-to-same-origin/',
|
45
|
-
linkTitle: i18nString(UIStrings.linkTitle),
|
46
|
-
}],
|
47
|
-
};
|
48
|
-
}
|
49
|
-
|
50
|
-
primaryKey(): string {
|
51
|
-
return JSON.stringify(this.#issueDetails);
|
52
|
-
}
|
53
|
-
|
54
|
-
getKind(): IssueKind {
|
55
|
-
return this.#issueDetails.isWarning ? IssueKind.BreakingChange : IssueKind.PageError;
|
56
|
-
}
|
57
|
-
|
58
|
-
static fromInspectorIssue(issuesModel: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue):
|
59
|
-
WasmCrossOriginModuleSharingIssue[] {
|
60
|
-
const details = inspectorIssue.details.wasmCrossOriginModuleSharingIssue;
|
61
|
-
if (!details) {
|
62
|
-
console.warn('WasmCrossOriginModuleSharing issue without details received.');
|
63
|
-
return [];
|
64
|
-
}
|
65
|
-
return [new WasmCrossOriginModuleSharingIssue(details, issuesModel)];
|
66
|
-
}
|
67
|
-
}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
# Share WebAssembly modules only between same-origin environments
|
2
|
-
|
3
|
-
Starting in Chrome M95, WebAssembly modules may only be shared between same-origin environments. This means that [same-site but cross-origin](sameSiteAndSameOrigin) environments won't be able to share WebAssembly modules via `postMessage` anymore.
|
4
|
-
|
5
|
-
To fix this, ensure that WebAssembly modules are only transferred between environments of the same origin. If this is not possible, serve the WebAssembly module from the same origin.
|
@@ -1,90 +0,0 @@
|
|
1
|
-
// Copyright 2021 The Chromium Authors. All rights reserved.
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
3
|
-
// found in the LICENSE file.
|
4
|
-
|
5
|
-
import * as i18n from '../../core/i18n/i18n.js';
|
6
|
-
import type * as Platform from '../../core/platform/platform.js';
|
7
|
-
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
8
|
-
import type * as Protocol from '../../generated/protocol.js';
|
9
|
-
|
10
|
-
import {AffectedResourcesView} from './AffectedResourcesView.js';
|
11
|
-
|
12
|
-
const UIStrings = {
|
13
|
-
/**
|
14
|
-
* @description Label for number of affected resources indication in issue view. The number designates the number of attempts to transfer a module to cross-origin context.
|
15
|
-
*
|
16
|
-
*/
|
17
|
-
nModuleTransfers: '{n, plural, =1 {# module} other {# modules}}',
|
18
|
-
/**
|
19
|
-
*@description Title for a column in an Wasm cross-origin module sharing affected resource view
|
20
|
-
*/
|
21
|
-
wasmModuleUrl: 'Wasm Module URL',
|
22
|
-
/**
|
23
|
-
* @description Title for a column in an Wasm cross-origin module sharing affected resource view.
|
24
|
-
* The issue is about a transfer of a module between different origins (see https://developer.mozilla.org/en-US/docs/Glossary/Origin).
|
25
|
-
* The transfer occurs from a source origin to a target origin.
|
26
|
-
*/
|
27
|
-
sourceOrigin: 'Source Origin',
|
28
|
-
/**
|
29
|
-
* @description Title for a column in an Wasm cross-origin module sharing affected resource view.
|
30
|
-
* The issue is about a transfer of a module between different origins (see https://developer.mozilla.org/en-US/docs/Glossary/Origin).
|
31
|
-
* The transfer occurs from a source origin to a target origin.
|
32
|
-
*/
|
33
|
-
targetOrigin: 'Target Origin',
|
34
|
-
/**
|
35
|
-
*@description Title for a column in an Wasm cross-origin module sharing affected resource view
|
36
|
-
*/
|
37
|
-
status: 'Status',
|
38
|
-
/**
|
39
|
-
* @description Indicates that the Wasm module transfer was blocked.
|
40
|
-
*/
|
41
|
-
blocked: 'blocked',
|
42
|
-
/**
|
43
|
-
* @description Indicated that the Wasm module transfer was not blocked, but only warned about.
|
44
|
-
*/
|
45
|
-
warned: 'warning',
|
46
|
-
};
|
47
|
-
const str_ =
|
48
|
-
i18n.i18n.registerUIStrings('panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts', UIStrings);
|
49
|
-
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
50
|
-
|
51
|
-
export class WasmCrossOriginModuleSharingAffectedResourcesView extends AffectedResourcesView {
|
52
|
-
#appendIssues(issues: Iterable<IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue>):
|
53
|
-
void {
|
54
|
-
const header = document.createElement('tr');
|
55
|
-
this.appendColumnTitle(header, i18nString(UIStrings.wasmModuleUrl));
|
56
|
-
this.appendColumnTitle(header, i18nString(UIStrings.sourceOrigin));
|
57
|
-
this.appendColumnTitle(header, i18nString(UIStrings.targetOrigin));
|
58
|
-
this.appendColumnTitle(header, i18nString(UIStrings.status));
|
59
|
-
|
60
|
-
this.affectedResources.appendChild(header);
|
61
|
-
|
62
|
-
let count = 0;
|
63
|
-
for (const issue of issues) {
|
64
|
-
this.#appendDetails(issue.details());
|
65
|
-
count++;
|
66
|
-
}
|
67
|
-
this.updateAffectedResourceCount(count);
|
68
|
-
}
|
69
|
-
|
70
|
-
protected getResourceNameWithCount(count: number): Platform.UIString.LocalizedString {
|
71
|
-
return i18nString(UIStrings.nModuleTransfers, {n: count});
|
72
|
-
}
|
73
|
-
|
74
|
-
#appendDetails(details: Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails): void {
|
75
|
-
const element = document.createElement('tr');
|
76
|
-
|
77
|
-
element.appendChild(this.createIssueDetailCell(details.wasmModuleUrl));
|
78
|
-
element.appendChild(this.createIssueDetailCell(details.sourceOrigin));
|
79
|
-
element.appendChild(this.createIssueDetailCell(details.targetOrigin));
|
80
|
-
element.appendChild(
|
81
|
-
this.createIssueDetailCell(details.isWarning ? i18nString(UIStrings.warned) : i18nString(UIStrings.blocked)));
|
82
|
-
|
83
|
-
this.affectedResources.appendChild(element);
|
84
|
-
}
|
85
|
-
|
86
|
-
update(): void {
|
87
|
-
this.clear();
|
88
|
-
this.#appendIssues(this.issue.getWasmCrossOriginModuleSharingIssue());
|
89
|
-
}
|
90
|
-
}
|