chrome-devtools-frontend 1.0.1549484 → 1.0.1550444
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/docs/styleguide/ux/components.md +53 -12
- package/docs/styleguide/ux/images/cards.png +0 -0
- package/docs/ui_engineering.md +2 -2
- package/front_end/core/sdk/NetworkManager.ts +12 -10
- package/front_end/core/sdk/PageResourceLoader.ts +8 -1
- package/front_end/core/sdk/SourceMapManager.ts +12 -6
- package/front_end/entrypoints/main/MainImpl.ts +0 -9
- package/front_end/foundation/Universe.ts +7 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -2
- package/front_end/generated/protocol-mapping.d.ts +8 -0
- package/front_end/generated/protocol-proxy-api.d.ts +6 -0
- package/front_end/generated/protocol.ts +76 -0
- package/front_end/models/ai_assistance/BuiltInAi.ts +79 -5
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +6 -8
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +4 -14
- package/front_end/models/issues_manager/ClientHintIssue.ts +5 -12
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -12
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +7 -14
- package/front_end/models/issues_manager/CookieIssue.ts +27 -30
- package/front_end/models/issues_manager/CorsIssue.ts +8 -17
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -8
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -14
- package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +7 -14
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/GenericIssue.ts +11 -16
- package/front_end/models/issues_manager/HeavyAdIssue.ts +4 -11
- package/front_end/models/issues_manager/Issue.ts +12 -4
- package/front_end/models/issues_manager/IssueAggregator.ts +8 -2
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +3 -10
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -13
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +4 -11
- package/front_end/models/issues_manager/PropertyRuleIssue.ts +6 -12
- package/front_end/models/issues_manager/QuirksModeIssue.ts +3 -10
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +7 -13
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +4 -11
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +6 -13
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +8 -13
- package/front_end/models/issues_manager/UnencodedDigestIssue.ts +2 -9
- package/front_end/models/javascript_metadata/NativeFunctions.js +0 -13
- package/front_end/panels/application/AppManifestView.ts +4 -4
- package/front_end/panels/application/ApplicationPanelSidebar.ts +21 -21
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
- package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
- package/front_end/panels/application/OpenedWindowDetailsView.ts +2 -2
- package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
- package/front_end/panels/application/PreloadingTreeElement.ts +3 -3
- package/front_end/panels/application/ReportingApiTreeElement.ts +2 -2
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +3 -3
- package/front_end/panels/application/SharedStorageListTreeElement.ts +2 -2
- package/front_end/panels/application/StorageBucketsTreeElement.ts +3 -3
- package/front_end/panels/application/StorageView.ts +2 -2
- package/front_end/panels/application/TrustTokensTreeElement.ts +2 -2
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +2 -0
- package/front_end/panels/changes/CombinedDiffView.ts +2 -0
- package/front_end/panels/common/AnnotationManager.ts +71 -0
- package/front_end/panels/common/PersistenceUtils.ts +6 -7
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/console/ConsolePrompt.ts +4 -4
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +10 -11
- package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +3 -3
- package/front_end/panels/elements/ElementsPanel.ts +49 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +156 -108
- package/front_end/panels/elements/ElementsTreeOutline.ts +9 -2
- package/front_end/panels/elements/ShortcutTreeElement.ts +2 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -5
- package/front_end/panels/elements/TopLayerContainer.ts +2 -2
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/components/QueryContainer.ts +1 -1
- package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -1
- package/front_end/panels/emulation/DeviceModeWrapper.ts +48 -3
- package/front_end/panels/explain/components/ConsoleInsight.ts +6 -4
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +2 -2
- package/front_end/panels/issues/IssueKindView.ts +2 -2
- package/front_end/panels/issues/IssueView.ts +4 -4
- package/front_end/panels/js_timeline/js_timeline-meta.ts +4 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +2 -3
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -3
- package/front_end/panels/network/NetworkFrameGrouper.ts +2 -2
- package/front_end/panels/network/NetworkItemView.ts +4 -4
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
- package/front_end/panels/network/components/RequestTrustTokensView.ts +5 -6
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -3
- package/front_end/panels/profiler/ProfileDataGrid.ts +2 -2
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/recorder/components/CreateRecordingView.ts +1 -1
- package/front_end/panels/recorder/components/ExtensionView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingView.ts +1 -1
- package/front_end/panels/recorder/components/StepView.ts +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +8 -8
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/CookieControlsTreeElement.ts +2 -2
- package/front_end/panels/security/CookieReportTreeElement.ts +2 -2
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/security/SecurityPanelSidebar.ts +3 -4
- package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -4
- package/front_end/panels/settings/SettingsScreen.ts +2 -3
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +16 -8
- package/front_end/panels/sources/BreakpointEditDialog.ts +3 -3
- package/front_end/panels/sources/BreakpointsView.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +3 -3
- package/front_end/panels/sources/CallStackSidebarPane.ts +4 -4
- package/front_end/panels/sources/DebuggerPausedMessage.ts +3 -3
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +39 -30
- package/front_end/panels/sources/GoToLineQuickOpen.ts +11 -7
- package/front_end/panels/sources/NavigatorView.ts +2 -2
- package/front_end/panels/sources/OpenFileQuickOpen.ts +11 -15
- package/front_end/panels/sources/OutlineQuickOpen.ts +23 -26
- package/front_end/panels/sources/SourcesView.ts +2 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +4 -5
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
- package/front_end/panels/sources/UISourceCodeFrame.ts +5 -5
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
- package/front_end/panels/timeline/TimelinePanel.ts +14 -9
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +1 -1
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/insights/Checklist.ts +1 -1
- package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -1
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -1
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -1
- package/front_end/panels/timeline/timeline-meta.ts +3 -2
- package/front_end/panels/utils/utils.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/adorners/Adorner.ts +20 -0
- package/front_end/ui/components/annotations/AnnotationRepository.ts +1 -1
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/components/buttons/FloatingButton.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightElement.ts +15 -2
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/icon_button/icon_button.ts +0 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +3 -3
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/text_editor/config.ts +2 -2
- package/front_end/ui/kit/cards/Card.docs.ts +43 -0
- package/front_end/ui/{components/icon_button → kit/icons}/Icon.docs.ts +3 -4
- package/front_end/ui/{components/icon_button → kit/icons}/Icon.ts +4 -4
- package/front_end/ui/kit/kit.ts +1 -0
- package/front_end/ui/legacy/Infobar.ts +3 -3
- package/front_end/ui/legacy/InspectorView.ts +3 -3
- package/front_end/ui/legacy/SearchableView.ts +2 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +5 -5
- package/front_end/ui/legacy/SoftDropDown.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +9 -9
- package/front_end/ui/legacy/Toolbar.ts +3 -3
- package/front_end/ui/legacy/Treeoutline.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +4 -4
- package/front_end/ui/legacy/ViewManager.ts +4 -4
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +8 -8
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +4 -4
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +4 -4
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +5 -5
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +22 -29
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -15
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +11 -14
- package/front_end/ui/legacy/components/utils/Linkifier.ts +3 -3
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- /package/front_end/ui/{components/icon_button → kit/icons}/icon.css +0 -0
|
@@ -12,9 +12,7 @@ import {
|
|
|
12
12
|
resolveLazyDescription
|
|
13
13
|
} from './MarkdownIssueDescription.js';
|
|
14
14
|
|
|
15
|
-
export class ElementAccessibilityIssue extends Issue {
|
|
16
|
-
private issueDetails: Protocol.Audits.ElementAccessibilityIssueDetails;
|
|
17
|
-
|
|
15
|
+
export class ElementAccessibilityIssue extends Issue<Protocol.Audits.ElementAccessibilityIssueDetails> {
|
|
18
16
|
constructor(
|
|
19
17
|
issueDetails: Protocol.Audits.ElementAccessibilityIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null,
|
|
20
18
|
issueId?: Protocol.Audits.IssueId) {
|
|
@@ -22,12 +20,11 @@ export class ElementAccessibilityIssue extends Issue {
|
|
|
22
20
|
Protocol.Audits.InspectorIssueCode.ElementAccessibilityIssue,
|
|
23
21
|
issueDetails.elementAccessibilityIssueReason,
|
|
24
22
|
].join('::');
|
|
25
|
-
super(issueCode, issuesModel, issueId);
|
|
26
|
-
this.issueDetails = issueDetails;
|
|
23
|
+
super(issueCode, issueDetails, issuesModel, issueId);
|
|
27
24
|
}
|
|
28
25
|
|
|
29
26
|
primaryKey(): string {
|
|
30
|
-
return JSON.stringify(this.
|
|
27
|
+
return JSON.stringify(this.details());
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
getDescription(): MarkdownIssueDescription|null {
|
|
@@ -37,7 +34,7 @@ export class ElementAccessibilityIssue extends Issue {
|
|
|
37
34
|
links: [],
|
|
38
35
|
};
|
|
39
36
|
}
|
|
40
|
-
const description = issueDescriptions.get(this.
|
|
37
|
+
const description = issueDescriptions.get(this.details().elementAccessibilityIssueReason);
|
|
41
38
|
if (!description) {
|
|
42
39
|
return null;
|
|
43
40
|
}
|
|
@@ -52,15 +49,11 @@ export class ElementAccessibilityIssue extends Issue {
|
|
|
52
49
|
return IssueCategory.OTHER;
|
|
53
50
|
}
|
|
54
51
|
|
|
55
|
-
details(): Protocol.Audits.ElementAccessibilityIssueDetails {
|
|
56
|
-
return this.issueDetails;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
52
|
isInteractiveContentAttributesSelectDescendantIssue(): boolean {
|
|
60
|
-
return this.
|
|
61
|
-
(this.
|
|
53
|
+
return this.details().hasDisallowedAttributes &&
|
|
54
|
+
(this.details().elementAccessibilityIssueReason !==
|
|
62
55
|
Protocol.Audits.ElementAccessibilityIssueReason.InteractiveContentOptionChild &&
|
|
63
|
-
this.
|
|
56
|
+
this.details().elementAccessibilityIssueReason !==
|
|
64
57
|
Protocol.Audits.ElementAccessibilityIssueReason.InteractiveContentSummaryDescendant);
|
|
65
58
|
}
|
|
66
59
|
|
|
@@ -22,9 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/FederatedAuthRequestIssue.ts', UIStrings);
|
|
23
23
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
24
24
|
|
|
25
|
-
export class FederatedAuthRequestIssue extends Issue {
|
|
26
|
-
readonly #issueDetails: Protocol.Audits.FederatedAuthRequestIssueDetails;
|
|
27
|
-
|
|
25
|
+
export class FederatedAuthRequestIssue extends Issue<Protocol.Audits.FederatedAuthRequestIssueDetails> {
|
|
28
26
|
constructor(
|
|
29
27
|
issueDetails: Protocol.Audits.FederatedAuthRequestIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
30
28
|
super(
|
|
@@ -35,20 +33,15 @@ export class FederatedAuthRequestIssue extends Issue {
|
|
|
35
33
|
issueDetails.federatedAuthRequestIssueReason,
|
|
36
34
|
].join('::'),
|
|
37
35
|
},
|
|
38
|
-
issuesModel);
|
|
39
|
-
this.#issueDetails = issueDetails;
|
|
36
|
+
issueDetails, issuesModel);
|
|
40
37
|
}
|
|
41
38
|
|
|
42
39
|
getCategory(): IssueCategory {
|
|
43
40
|
return IssueCategory.OTHER;
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
details(): Protocol.Audits.FederatedAuthRequestIssueDetails {
|
|
47
|
-
return this.#issueDetails;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
43
|
getDescription(): MarkdownIssueDescription|null {
|
|
51
|
-
const description = issueDescriptions.get(this
|
|
44
|
+
const description = issueDescriptions.get(this.details().federatedAuthRequestIssueReason);
|
|
52
45
|
if (!description) {
|
|
53
46
|
return null;
|
|
54
47
|
}
|
|
@@ -56,7 +49,7 @@ export class FederatedAuthRequestIssue extends Issue {
|
|
|
56
49
|
}
|
|
57
50
|
|
|
58
51
|
primaryKey(): string {
|
|
59
|
-
return JSON.stringify(this
|
|
52
|
+
return JSON.stringify(this.details());
|
|
60
53
|
}
|
|
61
54
|
|
|
62
55
|
getKind(): IssueKind {
|
|
@@ -22,9 +22,7 @@ const UIStrings = {
|
|
|
22
22
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/FederatedAuthUserInfoRequestIssue.ts', UIStrings);
|
|
23
23
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
24
24
|
|
|
25
|
-
export class FederatedAuthUserInfoRequestIssue extends Issue {
|
|
26
|
-
readonly #issueDetails: Protocol.Audits.FederatedAuthUserInfoRequestIssueDetails;
|
|
27
|
-
|
|
25
|
+
export class FederatedAuthUserInfoRequestIssue extends Issue<Protocol.Audits.FederatedAuthUserInfoRequestIssueDetails> {
|
|
28
26
|
constructor(
|
|
29
27
|
issueDetails: Protocol.Audits.FederatedAuthUserInfoRequestIssueDetails,
|
|
30
28
|
issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
@@ -36,20 +34,15 @@ export class FederatedAuthUserInfoRequestIssue extends Issue {
|
|
|
36
34
|
issueDetails.federatedAuthUserInfoRequestIssueReason,
|
|
37
35
|
].join('::'),
|
|
38
36
|
},
|
|
39
|
-
issuesModel);
|
|
40
|
-
this.#issueDetails = issueDetails;
|
|
37
|
+
issueDetails, issuesModel);
|
|
41
38
|
}
|
|
42
39
|
|
|
43
40
|
getCategory(): IssueCategory {
|
|
44
41
|
return IssueCategory.OTHER;
|
|
45
42
|
}
|
|
46
43
|
|
|
47
|
-
details(): Protocol.Audits.FederatedAuthUserInfoRequestIssueDetails {
|
|
48
|
-
return this.#issueDetails;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
44
|
getDescription(): MarkdownIssueDescription|null {
|
|
52
|
-
const description = issueDescriptions.get(this
|
|
45
|
+
const description = issueDescriptions.get(this.details().federatedAuthUserInfoRequestIssueReason);
|
|
53
46
|
if (!description) {
|
|
54
47
|
return null;
|
|
55
48
|
}
|
|
@@ -57,7 +50,7 @@ export class FederatedAuthUserInfoRequestIssue extends Issue {
|
|
|
57
50
|
}
|
|
58
51
|
|
|
59
52
|
primaryKey(): string {
|
|
60
|
-
return JSON.stringify(this
|
|
53
|
+
return JSON.stringify(this.details());
|
|
61
54
|
}
|
|
62
55
|
|
|
63
56
|
getKind(): IssueKind {
|
|
@@ -48,9 +48,7 @@ const UIStrings = {
|
|
|
48
48
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/GenericIssue.ts', UIStrings);
|
|
49
49
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
50
50
|
|
|
51
|
-
export class GenericIssue extends Issue {
|
|
52
|
-
#issueDetails: Protocol.Audits.GenericIssueDetails;
|
|
53
|
-
|
|
51
|
+
export class GenericIssue extends Issue<Protocol.Audits.GenericIssueDetails> {
|
|
54
52
|
constructor(
|
|
55
53
|
issueDetails: Protocol.Audits.GenericIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null,
|
|
56
54
|
issueId?: Protocol.Audits.IssueId) {
|
|
@@ -58,13 +56,13 @@ export class GenericIssue extends Issue {
|
|
|
58
56
|
Protocol.Audits.InspectorIssueCode.GenericIssue,
|
|
59
57
|
issueDetails.errorType,
|
|
60
58
|
].join('::');
|
|
61
|
-
super(issueCode, issuesModel, issueId);
|
|
62
|
-
this.#issueDetails = issueDetails;
|
|
59
|
+
super(issueCode, issueDetails, issuesModel, issueId);
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
override requests(): Iterable<Protocol.Audits.AffectedRequest> {
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
const details = this.details();
|
|
64
|
+
if (details.request) {
|
|
65
|
+
return [details.request];
|
|
68
66
|
}
|
|
69
67
|
return [];
|
|
70
68
|
}
|
|
@@ -74,25 +72,22 @@ export class GenericIssue extends Issue {
|
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
primaryKey(): string {
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
const details = this.details();
|
|
76
|
+
const requestId = details.request ? details.request.requestId : 'no-request';
|
|
77
|
+
return `${this.code()}-(${details.frameId})-(${details.violatingNodeId})-(${details.violatingNodeAttribute})-(${
|
|
78
|
+
requestId})`;
|
|
80
79
|
}
|
|
81
80
|
|
|
82
81
|
getDescription(): MarkdownIssueDescription|null {
|
|
83
|
-
const description = issueDescriptions.get(this
|
|
82
|
+
const description = issueDescriptions.get(this.details().errorType);
|
|
84
83
|
if (!description) {
|
|
85
84
|
return null;
|
|
86
85
|
}
|
|
87
86
|
return resolveLazyDescription(description);
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
details(): Protocol.Audits.GenericIssueDetails {
|
|
91
|
-
return this.#issueDetails;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
89
|
getKind(): IssueKind {
|
|
95
|
-
return issueTypes.get(this
|
|
90
|
+
return issueTypes.get(this.details().errorType) || IssueKind.IMPROVEMENT;
|
|
96
91
|
}
|
|
97
92
|
|
|
98
93
|
static fromInspectorIssue(
|
|
@@ -18,21 +18,14 @@ const UIStrings = {
|
|
|
18
18
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/HeavyAdIssue.ts', UIStrings);
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
|
-
export class HeavyAdIssue extends Issue {
|
|
22
|
-
#issueDetails: Protocol.Audits.HeavyAdIssueDetails;
|
|
23
|
-
|
|
21
|
+
export class HeavyAdIssue extends Issue<Protocol.Audits.HeavyAdIssueDetails> {
|
|
24
22
|
constructor(issueDetails: Protocol.Audits.HeavyAdIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
25
23
|
const umaCode = [Protocol.Audits.InspectorIssueCode.HeavyAdIssue, issueDetails.reason].join('::');
|
|
26
|
-
super({code: Protocol.Audits.InspectorIssueCode.HeavyAdIssue, umaCode}, issuesModel);
|
|
27
|
-
this.#issueDetails = issueDetails;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
details(): Protocol.Audits.HeavyAdIssueDetails {
|
|
31
|
-
return this.#issueDetails;
|
|
24
|
+
super({code: Protocol.Audits.InspectorIssueCode.HeavyAdIssue, umaCode}, issueDetails, issuesModel);
|
|
32
25
|
}
|
|
33
26
|
|
|
34
27
|
primaryKey(): string {
|
|
35
|
-
return `${Protocol.Audits.InspectorIssueCode.HeavyAdIssue}-${JSON.stringify(this
|
|
28
|
+
return `${Protocol.Audits.InspectorIssueCode.HeavyAdIssue}-${JSON.stringify(this.details())}`;
|
|
36
29
|
}
|
|
37
30
|
|
|
38
31
|
getDescription(): MarkdownIssueDescription {
|
|
@@ -52,7 +45,7 @@ export class HeavyAdIssue extends Issue {
|
|
|
52
45
|
}
|
|
53
46
|
|
|
54
47
|
getKind(): IssueKind {
|
|
55
|
-
switch (this
|
|
48
|
+
switch (this.details().resolution) {
|
|
56
49
|
case Protocol.Audits.HeavyAdResolutionStatus.HeavyAdBlocked:
|
|
57
50
|
return IssueKind.PAGE_ERROR;
|
|
58
51
|
case Protocol.Audits.HeavyAdResolutionStatus.HeavyAdWarning:
|
|
@@ -119,17 +119,21 @@ export interface AffectedElement {
|
|
|
119
119
|
nodeName: string;
|
|
120
120
|
target: SDK.Target.Target|null;
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
export type ValidIssueDetails =
|
|
123
|
+
NonNullable<Protocol.Audits.InspectorIssueDetails[keyof Protocol.Audits.InspectorIssueDetails]>;
|
|
124
|
+
export abstract class Issue<IssueDetails extends ValidIssueDetails|null = ValidIssueDetails | null,
|
|
125
|
+
IssueCode extends string = string> {
|
|
124
126
|
#issueCode: IssueCode;
|
|
125
127
|
#issuesModel: SDK.IssuesModel.IssuesModel|null;
|
|
126
128
|
protected issueId: Protocol.Audits.IssueId|undefined = undefined;
|
|
129
|
+
#issueDetails: IssueDetails;
|
|
127
130
|
#hidden: boolean;
|
|
128
131
|
|
|
129
132
|
constructor(
|
|
130
|
-
code: IssueCode|{code: IssueCode, umaCode: string},
|
|
131
|
-
issueId?: Protocol.Audits.IssueId) {
|
|
133
|
+
code: IssueCode|{code: IssueCode, umaCode: string}, issueDetails: IssueDetails,
|
|
134
|
+
issuesModel: SDK.IssuesModel.IssuesModel|null = null, issueId?: Protocol.Audits.IssueId) {
|
|
132
135
|
this.#issueCode = typeof code === 'object' ? code.code : code;
|
|
136
|
+
this.#issueDetails = issueDetails;
|
|
133
137
|
this.#issuesModel = issuesModel;
|
|
134
138
|
this.issueId = issueId;
|
|
135
139
|
Host.userMetrics.issueCreated(typeof code === 'string' ? code : code.umaCode);
|
|
@@ -145,6 +149,10 @@ export abstract class Issue<IssueCode extends string = string> {
|
|
|
145
149
|
abstract getCategory(): IssueCategory;
|
|
146
150
|
abstract getKind(): IssueKind;
|
|
147
151
|
|
|
152
|
+
details(): IssueDetails {
|
|
153
|
+
return this.#issueDetails;
|
|
154
|
+
}
|
|
155
|
+
|
|
148
156
|
getBlockedByResponseDetails(): Iterable<Protocol.Audits.BlockedByResponseIssueDetails> {
|
|
149
157
|
return [];
|
|
150
158
|
}
|
|
@@ -47,6 +47,7 @@ export type AggregationKey = {
|
|
|
47
47
|
* of all resources that are affected by the aggregated issues.
|
|
48
48
|
*/
|
|
49
49
|
export class AggregatedIssue extends Issue {
|
|
50
|
+
#allIssues = new Set<Issue>();
|
|
50
51
|
#affectedCookies = new Map<string, {
|
|
51
52
|
cookie: Protocol.Audits.AffectedCookie,
|
|
52
53
|
hasRequest: boolean,
|
|
@@ -76,7 +77,7 @@ export class AggregatedIssue extends Issue {
|
|
|
76
77
|
#key: AggregationKey;
|
|
77
78
|
|
|
78
79
|
constructor(code: string, aggregationKey: AggregationKey) {
|
|
79
|
-
super(code);
|
|
80
|
+
super(code, null);
|
|
80
81
|
this.#key = aggregationKey;
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -203,6 +204,7 @@ export class AggregatedIssue extends Issue {
|
|
|
203
204
|
if (!this.#representative) {
|
|
204
205
|
this.#representative = issue;
|
|
205
206
|
}
|
|
207
|
+
this.#allIssues.add(issue);
|
|
206
208
|
this.#issueKind = unionIssueKind(this.#issueKind, issue.getKind());
|
|
207
209
|
let hasRequest = false;
|
|
208
210
|
for (const request of issue.requests()) {
|
|
@@ -286,6 +288,10 @@ export class AggregatedIssue extends Issue {
|
|
|
286
288
|
return this.#issueKind;
|
|
287
289
|
}
|
|
288
290
|
|
|
291
|
+
getAllIssues(): Issue[] {
|
|
292
|
+
return Array.from(this.#allIssues);
|
|
293
|
+
}
|
|
294
|
+
|
|
289
295
|
override isHidden(): boolean {
|
|
290
296
|
return this.#representative?.isHidden() || false;
|
|
291
297
|
}
|
|
@@ -374,7 +380,7 @@ export class IssueAggregator extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
374
380
|
return this.#hiddenAggregatedIssuesByKey.size;
|
|
375
381
|
}
|
|
376
382
|
|
|
377
|
-
keyForIssue(issue: Issue
|
|
383
|
+
keyForIssue(issue: Issue): AggregationKey {
|
|
378
384
|
return issue.code() as unknown as AggregationKey;
|
|
379
385
|
}
|
|
380
386
|
}
|
|
@@ -18,29 +18,22 @@ const UIStrings = {
|
|
|
18
18
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/LowTextContrastIssue.ts', UIStrings);
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
|
-
export class LowTextContrastIssue extends Issue {
|
|
22
|
-
#issueDetails: Protocol.Audits.LowTextContrastIssueDetails;
|
|
23
|
-
|
|
21
|
+
export class LowTextContrastIssue extends Issue<Protocol.Audits.LowTextContrastIssueDetails> {
|
|
24
22
|
constructor(
|
|
25
23
|
issueDetails: Protocol.Audits.LowTextContrastIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
26
|
-
super('LowTextContrastIssue', issuesModel);
|
|
27
|
-
this.#issueDetails = issueDetails;
|
|
24
|
+
super('LowTextContrastIssue', issueDetails, issuesModel);
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
primaryKey(): string {
|
|
31
28
|
// We intend to keep only one issue per element so other issues for the element will be discarded even
|
|
32
29
|
// if the issue content is slightly different.
|
|
33
|
-
return `${this.code()}-(${this
|
|
30
|
+
return `${this.code()}-(${this.details().violatingNodeId})`;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
getCategory(): IssueCategory {
|
|
37
34
|
return IssueCategory.LOW_TEXT_CONTRAST;
|
|
38
35
|
}
|
|
39
36
|
|
|
40
|
-
details(): Protocol.Audits.LowTextContrastIssueDetails {
|
|
41
|
-
return this.#issueDetails;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
37
|
getDescription(): MarkdownIssueDescription {
|
|
45
38
|
return {
|
|
46
39
|
file: 'LowTextContrast.md',
|
|
@@ -18,25 +18,19 @@ const UIStrings = {
|
|
|
18
18
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/MixedContentIssue.ts', UIStrings);
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
|
-
export class MixedContentIssue extends Issue {
|
|
22
|
-
#issueDetails: Protocol.Audits.MixedContentIssueDetails;
|
|
23
|
-
|
|
21
|
+
export class MixedContentIssue extends Issue<Protocol.Audits.MixedContentIssueDetails> {
|
|
24
22
|
constructor(issueDetails: Protocol.Audits.MixedContentIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
25
|
-
super(Protocol.Audits.InspectorIssueCode.MixedContentIssue, issuesModel);
|
|
26
|
-
this.#issueDetails = issueDetails;
|
|
23
|
+
super(Protocol.Audits.InspectorIssueCode.MixedContentIssue, issueDetails, issuesModel);
|
|
27
24
|
}
|
|
28
25
|
|
|
29
26
|
override requests(): Iterable<Protocol.Audits.AffectedRequest> {
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
const details = this.details();
|
|
28
|
+
if (details.request) {
|
|
29
|
+
return [details.request];
|
|
32
30
|
}
|
|
33
31
|
return [];
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
getDetails(): Protocol.Audits.MixedContentIssueDetails {
|
|
37
|
-
return this.#issueDetails;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
34
|
getCategory(): IssueCategory {
|
|
41
35
|
return IssueCategory.MIXED_CONTENT;
|
|
42
36
|
}
|
|
@@ -50,11 +44,11 @@ export class MixedContentIssue extends Issue {
|
|
|
50
44
|
}
|
|
51
45
|
|
|
52
46
|
primaryKey(): string {
|
|
53
|
-
return JSON.stringify(this
|
|
47
|
+
return JSON.stringify(this.details());
|
|
54
48
|
}
|
|
55
49
|
|
|
56
50
|
getKind(): IssueKind {
|
|
57
|
-
switch (this
|
|
51
|
+
switch (this.details().resolutionStatus) {
|
|
58
52
|
case Protocol.Audits.MixedContentResolutionStatus.MixedContentAutomaticallyUpgraded:
|
|
59
53
|
return IssueKind.IMPROVEMENT;
|
|
60
54
|
case Protocol.Audits.MixedContentResolutionStatus.MixedContentBlocked:
|
|
@@ -23,13 +23,10 @@ const UIStrings = {
|
|
|
23
23
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/PartitioningBlobURLIssue.ts', UIStrings);
|
|
24
24
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
25
25
|
|
|
26
|
-
export class PartitioningBlobURLIssue extends Issue {
|
|
27
|
-
readonly #issueDetails: Protocol.Audits.PartitioningBlobURLIssueDetails;
|
|
28
|
-
|
|
26
|
+
export class PartitioningBlobURLIssue extends Issue<Protocol.Audits.PartitioningBlobURLIssueDetails> {
|
|
29
27
|
constructor(
|
|
30
28
|
issueDetails: Protocol.Audits.PartitioningBlobURLIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
31
|
-
super(Protocol.Audits.InspectorIssueCode.PartitioningBlobURLIssue, issuesModel);
|
|
32
|
-
this.#issueDetails = issueDetails;
|
|
29
|
+
super(Protocol.Audits.InspectorIssueCode.PartitioningBlobURLIssue, issueDetails, issuesModel);
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
getCategory(): IssueCategory {
|
|
@@ -37,7 +34,7 @@ export class PartitioningBlobURLIssue extends Issue {
|
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
getDescription(): MarkdownIssueDescription {
|
|
40
|
-
const fileName = this
|
|
37
|
+
const fileName = this.details().partitioningBlobURLInfo ===
|
|
41
38
|
Protocol.Audits.PartitioningBlobURLInfo.BlockedCrossPartitionFetching ?
|
|
42
39
|
'fetchingPartitionedBlobURL.md' :
|
|
43
40
|
'navigatingPartitionedBlobURL.md';
|
|
@@ -56,16 +53,12 @@ export class PartitioningBlobURLIssue extends Issue {
|
|
|
56
53
|
};
|
|
57
54
|
}
|
|
58
55
|
|
|
59
|
-
details(): Protocol.Audits.PartitioningBlobURLIssueDetails {
|
|
60
|
-
return this.#issueDetails;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
56
|
getKind(): IssueKind {
|
|
64
57
|
return IssueKind.BREAKING_CHANGE;
|
|
65
58
|
}
|
|
66
59
|
|
|
67
60
|
primaryKey(): string {
|
|
68
|
-
return JSON.stringify(this
|
|
61
|
+
return JSON.stringify(this.details());
|
|
69
62
|
}
|
|
70
63
|
|
|
71
64
|
static fromInspectorIssue(
|
|
@@ -8,22 +8,16 @@ import * as Protocol from '../../generated/protocol.js';
|
|
|
8
8
|
import {Issue, IssueCategory, IssueKind} from './Issue.js';
|
|
9
9
|
import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
|
|
10
10
|
|
|
11
|
-
export class PropertyRuleIssue extends Issue {
|
|
12
|
-
readonly #issueDetails: Protocol.Audits.PropertyRuleIssueDetails;
|
|
11
|
+
export class PropertyRuleIssue extends Issue<Protocol.Audits.PropertyRuleIssueDetails> {
|
|
13
12
|
readonly #primaryKey: string;
|
|
14
13
|
constructor(issueDetails: Protocol.Audits.PropertyRuleIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
15
14
|
const code = JSON.stringify(issueDetails);
|
|
16
|
-
super(code, issuesModel);
|
|
15
|
+
super(code, issueDetails, issuesModel);
|
|
17
16
|
this.#primaryKey = code;
|
|
18
|
-
this.#issueDetails = issueDetails;
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
override sources(): Protocol.Audits.SourceCodeLocation[] {
|
|
22
|
-
return [this
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
details(): Protocol.Audits.PropertyRuleIssueDetails {
|
|
26
|
-
return this.#issueDetails;
|
|
20
|
+
return [this.details().sourceCodeLocation];
|
|
27
21
|
}
|
|
28
22
|
|
|
29
23
|
primaryKey(): string {
|
|
@@ -31,7 +25,7 @@ export class PropertyRuleIssue extends Issue {
|
|
|
31
25
|
}
|
|
32
26
|
|
|
33
27
|
getPropertyName(): string {
|
|
34
|
-
switch (this
|
|
28
|
+
switch (this.details().propertyRuleIssueReason) {
|
|
35
29
|
case Protocol.Audits.PropertyRuleIssueReason.InvalidInherits:
|
|
36
30
|
return 'inherits';
|
|
37
31
|
case Protocol.Audits.PropertyRuleIssueReason.InvalidInitialValue:
|
|
@@ -43,13 +37,13 @@ export class PropertyRuleIssue extends Issue {
|
|
|
43
37
|
}
|
|
44
38
|
|
|
45
39
|
getDescription(): MarkdownIssueDescription {
|
|
46
|
-
if (this
|
|
40
|
+
if (this.details().propertyRuleIssueReason === Protocol.Audits.PropertyRuleIssueReason.InvalidName) {
|
|
47
41
|
return {
|
|
48
42
|
file: 'propertyRuleInvalidNameIssue.md',
|
|
49
43
|
links: [],
|
|
50
44
|
};
|
|
51
45
|
}
|
|
52
|
-
const value = this
|
|
46
|
+
const value = this.details().propertyValue ? `: ${this.details().propertyValue}` : '';
|
|
53
47
|
const property = `${this.getPropertyName()}${value}`;
|
|
54
48
|
return {
|
|
55
49
|
file: 'propertyRuleIssue.md',
|
|
@@ -18,28 +18,21 @@ const UIStrings = {
|
|
|
18
18
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/QuirksModeIssue.ts', UIStrings);
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
|
-
export class QuirksModeIssue extends Issue {
|
|
22
|
-
#issueDetails: Protocol.Audits.QuirksModeIssueDetails;
|
|
23
|
-
|
|
21
|
+
export class QuirksModeIssue extends Issue<Protocol.Audits.QuirksModeIssueDetails> {
|
|
24
22
|
constructor(issueDetails: Protocol.Audits.QuirksModeIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
25
23
|
const mode = issueDetails.isLimitedQuirksMode ? 'LimitedQuirksMode' : 'QuirksMode';
|
|
26
24
|
const umaCode = [Protocol.Audits.InspectorIssueCode.QuirksModeIssue, mode].join('::');
|
|
27
|
-
super({code: Protocol.Audits.InspectorIssueCode.QuirksModeIssue, umaCode}, issuesModel);
|
|
28
|
-
this.#issueDetails = issueDetails;
|
|
25
|
+
super({code: Protocol.Audits.InspectorIssueCode.QuirksModeIssue, umaCode}, issueDetails, issuesModel);
|
|
29
26
|
}
|
|
30
27
|
|
|
31
28
|
primaryKey(): string {
|
|
32
|
-
return `${this.code()}-(${this
|
|
29
|
+
return `${this.code()}-(${this.details().documentNodeId})-(${this.details().url})`;
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
getCategory(): IssueCategory {
|
|
36
33
|
return IssueCategory.QUIRKS_MODE;
|
|
37
34
|
}
|
|
38
35
|
|
|
39
|
-
details(): Protocol.Audits.QuirksModeIssueDetails {
|
|
40
|
-
return this.#issueDetails;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
36
|
getDescription(): MarkdownIssueDescription {
|
|
44
37
|
return {
|
|
45
38
|
file: 'CompatibilityModeQuirks.md',
|
|
@@ -41,9 +41,7 @@ function generateGroupingIssueCode(details: Protocol.Audits.SRIMessageSignatureI
|
|
|
41
41
|
return issueCode;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
export class SRIMessageSignatureIssue extends Issue<string> {
|
|
45
|
-
readonly #issueDetails: Protocol.Audits.SRIMessageSignatureIssueDetails;
|
|
46
|
-
|
|
44
|
+
export class SRIMessageSignatureIssue extends Issue<Protocol.Audits.SRIMessageSignatureIssueDetails, string> {
|
|
47
45
|
constructor(
|
|
48
46
|
issueDetails: Protocol.Audits.SRIMessageSignatureIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
49
47
|
super(
|
|
@@ -51,12 +49,7 @@ export class SRIMessageSignatureIssue extends Issue<string> {
|
|
|
51
49
|
code: generateGroupingIssueCode(issueDetails),
|
|
52
50
|
umaCode: `${Protocol.Audits.InspectorIssueCode.SRIMessageSignatureIssue}::${issueDetails.error}`,
|
|
53
51
|
},
|
|
54
|
-
issuesModel);
|
|
55
|
-
this.#issueDetails = issueDetails;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
details(): Protocol.Audits.SRIMessageSignatureIssueDetails {
|
|
59
|
-
return this.#issueDetails;
|
|
52
|
+
issueDetails, issuesModel);
|
|
60
53
|
}
|
|
61
54
|
|
|
62
55
|
// Overriding `Issue<String>`:
|
|
@@ -65,8 +58,9 @@ export class SRIMessageSignatureIssue extends Issue<string> {
|
|
|
65
58
|
}
|
|
66
59
|
|
|
67
60
|
override getDescription(): MarkdownIssueDescription|null {
|
|
61
|
+
const details = this.details();
|
|
68
62
|
const description: LazyMarkdownIssueDescription = {
|
|
69
|
-
file: `sri${
|
|
63
|
+
file: `sri${details.error}.md`,
|
|
70
64
|
links: [
|
|
71
65
|
{
|
|
72
66
|
link: 'https://www.rfc-editor.org/rfc/rfc9421.html',
|
|
@@ -79,10 +73,10 @@ export class SRIMessageSignatureIssue extends Issue<string> {
|
|
|
79
73
|
],
|
|
80
74
|
substitutions: new Map()
|
|
81
75
|
};
|
|
82
|
-
if (
|
|
83
|
-
description.substitutions?.set('PLACEHOLDER_signatureBase', () =>
|
|
76
|
+
if (details.error === Protocol.Audits.SRIMessageSignatureError.ValidationFailedSignatureMismatch) {
|
|
77
|
+
description.substitutions?.set('PLACEHOLDER_signatureBase', () => details.signatureBase);
|
|
84
78
|
}
|
|
85
|
-
if (
|
|
79
|
+
if (details.error === Protocol.Audits.SRIMessageSignatureError.ValidationFailedIntegrityMismatch) {
|
|
86
80
|
description.substitutions?.set('PLACEHOLDER_integrityAssertions', () => {
|
|
87
81
|
const prefix = '\n* ';
|
|
88
82
|
return prefix + this.details().integrityAssertions.join(prefix);
|
|
@@ -19,24 +19,17 @@ const UIStrings = {
|
|
|
19
19
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/SharedArrayBufferIssue.ts', UIStrings);
|
|
20
20
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
21
21
|
|
|
22
|
-
export class SharedArrayBufferIssue extends Issue {
|
|
23
|
-
#issueDetails: Protocol.Audits.SharedArrayBufferIssueDetails;
|
|
24
|
-
|
|
22
|
+
export class SharedArrayBufferIssue extends Issue<Protocol.Audits.SharedArrayBufferIssueDetails> {
|
|
25
23
|
constructor(
|
|
26
24
|
issueDetails: Protocol.Audits.SharedArrayBufferIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
27
25
|
const umaCode = [Protocol.Audits.InspectorIssueCode.SharedArrayBufferIssue, issueDetails.type].join('::');
|
|
28
|
-
super({code: Protocol.Audits.InspectorIssueCode.SharedArrayBufferIssue, umaCode}, issuesModel);
|
|
29
|
-
this.#issueDetails = issueDetails;
|
|
26
|
+
super({code: Protocol.Audits.InspectorIssueCode.SharedArrayBufferIssue, umaCode}, issueDetails, issuesModel);
|
|
30
27
|
}
|
|
31
28
|
|
|
32
29
|
getCategory(): IssueCategory {
|
|
33
30
|
return IssueCategory.OTHER;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
details(): Protocol.Audits.SharedArrayBufferIssueDetails {
|
|
37
|
-
return this.#issueDetails;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
33
|
getDescription(): MarkdownIssueDescription {
|
|
41
34
|
return {
|
|
42
35
|
file: 'sharedArrayBuffer.md',
|
|
@@ -48,11 +41,11 @@ export class SharedArrayBufferIssue extends Issue {
|
|
|
48
41
|
}
|
|
49
42
|
|
|
50
43
|
primaryKey(): string {
|
|
51
|
-
return JSON.stringify(this
|
|
44
|
+
return JSON.stringify(this.details());
|
|
52
45
|
}
|
|
53
46
|
|
|
54
47
|
getKind(): IssueKind {
|
|
55
|
-
if (this
|
|
48
|
+
if (this.details().isWarning) {
|
|
56
49
|
return IssueKind.BREAKING_CHANGE;
|
|
57
50
|
}
|
|
58
51
|
return IssueKind.PAGE_ERROR;
|
|
@@ -108,9 +108,7 @@ function getIssueCode(details: Protocol.Audits.SharedDictionaryIssueDetails): Is
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
export class SharedDictionaryIssue extends Issue {
|
|
112
|
-
readonly #issueDetails: Protocol.Audits.SharedDictionaryIssueDetails;
|
|
113
|
-
|
|
111
|
+
export class SharedDictionaryIssue extends Issue<Protocol.Audits.SharedDictionaryIssueDetails, IssueCode> {
|
|
114
112
|
constructor(
|
|
115
113
|
issueDetails: Protocol.Audits.SharedDictionaryIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
|
|
116
114
|
super(
|
|
@@ -121,13 +119,12 @@ export class SharedDictionaryIssue extends Issue {
|
|
|
121
119
|
issueDetails.sharedDictionaryError,
|
|
122
120
|
].join('::'),
|
|
123
121
|
},
|
|
124
|
-
issuesModel);
|
|
125
|
-
this.#issueDetails = issueDetails;
|
|
122
|
+
issueDetails, issuesModel);
|
|
126
123
|
}
|
|
127
124
|
|
|
128
125
|
override requests(): Iterable<Protocol.Audits.AffectedRequest> {
|
|
129
|
-
if (this
|
|
130
|
-
return [this
|
|
126
|
+
if (this.details().request) {
|
|
127
|
+
return [this.details().request];
|
|
131
128
|
}
|
|
132
129
|
return [];
|
|
133
130
|
}
|
|
@@ -136,12 +133,8 @@ export class SharedDictionaryIssue extends Issue {
|
|
|
136
133
|
return IssueCategory.OTHER;
|
|
137
134
|
}
|
|
138
135
|
|
|
139
|
-
details(): Protocol.Audits.SharedDictionaryIssueDetails {
|
|
140
|
-
return this.#issueDetails;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
136
|
getDescription(): MarkdownIssueDescription|null {
|
|
144
|
-
const description = issueDescriptions.get(this
|
|
137
|
+
const description = issueDescriptions.get(this.details().sharedDictionaryError);
|
|
145
138
|
if (!description) {
|
|
146
139
|
return null;
|
|
147
140
|
}
|
|
@@ -149,7 +142,7 @@ export class SharedDictionaryIssue extends Issue {
|
|
|
149
142
|
}
|
|
150
143
|
|
|
151
144
|
primaryKey(): string {
|
|
152
|
-
return JSON.stringify(this
|
|
145
|
+
return JSON.stringify(this.details());
|
|
153
146
|
}
|
|
154
147
|
|
|
155
148
|
getKind(): IssueKind {
|