chrome-devtools-frontend 1.0.951410 → 1.0.952713
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 +3 -0
- package/extension-api/ExtensionAPI.d.ts +1 -1
- package/front_end/.eslintrc.js +6 -0
- package/front_end/Tests.js +10 -0
- package/front_end/core/common/App.ts +0 -3
- package/front_end/core/common/AppProvider.ts +0 -3
- package/front_end/core/common/JavaScriptMetaData.ts +0 -3
- package/front_end/core/common/QueryParamHandler.ts +0 -3
- package/front_end/core/common/Runnable.ts +0 -3
- package/front_end/core/common/SimpleHistoryManager.ts +0 -3
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +3 -0
- package/front_end/core/i18n/locales/en-XL.json +3 -0
- package/front_end/core/root/Runtime.ts +4 -12
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -12
- package/front_end/core/sdk/PageResourceLoader.ts +2 -1
- package/front_end/core/sdk/TracingManager.ts +0 -3
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +39 -39
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +54 -54
- package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +20 -20
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +54 -54
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +145 -144
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +40 -40
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +64 -69
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +203 -203
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +109 -108
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +17 -17
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +30 -30
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +25 -25
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +52 -55
- package/front_end/entrypoints/main/MainImpl.ts +49 -49
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +43 -43
- package/front_end/entrypoints/node_app/NodeMain.ts +38 -38
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +16 -0
- package/front_end/legacy/legacy-defs.d.ts +0 -21
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -3
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -3
- package/front_end/models/bindings/FileUtils.ts +0 -3
- package/front_end/models/extensions/ExtensionAPI.ts +2 -1
- package/front_end/models/extensions/ExtensionTraceProvider.ts +0 -3
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +1 -1
- package/front_end/models/issues_manager/ClientHintIssue.ts +95 -0
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +6 -6
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +15 -15
- package/front_end/models/issues_manager/CorsIssue.ts +9 -9
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -5
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -7
- package/front_end/models/issues_manager/GenericIssue.ts +5 -5
- package/front_end/models/issues_manager/HeavyAdIssue.ts +5 -5
- package/front_end/models/issues_manager/Issue.ts +10 -10
- package/front_end/models/issues_manager/IssueResolver.ts +11 -10
- package/front_end/models/issues_manager/IssuesManager.ts +61 -56
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +4 -4
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -7
- package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +7 -7
- package/front_end/models/issues_manager/QuirksModeIssue.ts +4 -4
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +16 -16
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +5 -5
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +32 -31
- package/front_end/models/issues_manager/TrustedWebActivityIssue.ts +5 -5
- package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +5 -5
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/timeline_model/TimelineModel.ts +1 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +33 -33
- package/front_end/panels/application/components/EndpointsGrid.ts +12 -12
- package/front_end/panels/application/components/FrameDetailsView.ts +108 -110
- package/front_end/panels/application/components/OriginTrialTreeView.ts +45 -45
- package/front_end/panels/application/components/PermissionsPolicySection.ts +19 -19
- package/front_end/panels/application/components/ReportsGrid.ts +30 -30
- package/front_end/panels/application/components/StackTrace.ts +48 -47
- package/front_end/panels/application/components/TrustTokensView.ts +31 -31
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -25
- package/front_end/panels/console/consoleView.css +5 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +41 -52
- package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +18 -27
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +6 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +4 -4
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -6
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +17 -17
- package/front_end/panels/elements/components/AdornerManager.ts +21 -21
- package/front_end/panels/elements/components/AdornerSettingsPane.ts +14 -14
- package/front_end/panels/elements/components/CSSQuery.ts +16 -16
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +14 -14
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +15 -15
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +78 -78
- package/front_end/panels/elements/components/ElementsPanelLink.ts +16 -16
- package/front_end/panels/elements/components/LayoutPane.ts +47 -47
- package/front_end/panels/elements/components/NodeText.ts +18 -18
- package/front_end/panels/elements/components/QueryContainer.ts +40 -40
- package/front_end/panels/elements/components/StylePropertyEditor.ts +18 -18
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +4 -4
- package/front_end/panels/event_listeners/EventListenersUtils.ts +2 -1
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +4 -4
- package/front_end/panels/issues/AffectedCookiesView.ts +4 -5
- package/front_end/panels/issues/AffectedDirectivesView.ts +19 -19
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +7 -8
- package/front_end/panels/issues/AffectedElementsView.ts +4 -4
- package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +7 -8
- package/front_end/panels/issues/AffectedHeavyAdView.ts +8 -8
- package/front_end/panels/issues/AffectedResourcesView.ts +25 -26
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +8 -8
- package/front_end/panels/issues/AffectedSourcesView.ts +4 -4
- package/front_end/panels/issues/AffectedTrustedWebActivityIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +17 -17
- package/front_end/panels/issues/CSPViolationsListView.ts +22 -23
- package/front_end/panels/issues/CSPViolationsView.ts +17 -17
- package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +13 -13
- package/front_end/panels/issues/CorsIssueDetailsView.ts +23 -23
- package/front_end/panels/issues/GenericIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/HiddenIssuesRow.ts +7 -7
- package/front_end/panels/issues/IssueAggregator.ts +95 -95
- package/front_end/panels/issues/IssueKindView.ts +14 -14
- package/front_end/panels/issues/IssueView.ts +98 -98
- package/front_end/panels/issues/IssuesPane.ts +102 -102
- package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +5 -5
- package/front_end/panels/issues/components/HideIssuesMenu.ts +10 -10
- package/front_end/panels/media/PlayerListView.ts +160 -97
- package/front_end/panels/media/PlayerMessagesView.ts +1 -0
- package/front_end/panels/media/playerListView.css +58 -0
- package/front_end/panels/network/NetworkLogView.ts +2 -6
- package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -4
- package/front_end/panels/network/components/RequestTrustTokensView.ts +40 -40
- package/front_end/panels/network/components/WebBundleInfoView.ts +9 -9
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +92 -37
- package/front_end/panels/performance_monitor/performanceMonitor.css +32 -0
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +2 -2
- package/front_end/panels/search/SearchConfig.ts +0 -6
- package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -0
- package/front_end/panels/settings/components/SyncSection.ts +14 -14
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +96 -96
- package/front_end/panels/sources/BreakpointEditDialog.ts +4 -3
- package/front_end/panels/sources/NavigatorView.ts +3 -9
- package/front_end/panels/sources/SourceMapNamesResolver.ts +3 -3
- package/front_end/panels/sources/SourcesPanel.ts +1 -3
- package/front_end/panels/sources/SourcesView.ts +0 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +0 -3
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelineLoader.ts +0 -3
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/components/WebVitalsLane.ts +77 -76
- package/front_end/panels/timeline/components/WebVitalsTimeline.ts +133 -133
- package/front_end/panels/timeline/components/WebVitalsTooltip.ts +9 -9
- package/front_end/panels/webauthn/WebauthnPane.ts +203 -205
- package/front_end/third_party/codemirror.next/bundle.ts +3 -3
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +10 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +2 -1
- package/front_end/third_party/codemirror.next/package.json +3 -3
- package/front_end/third_party/diff/DiffWrapper.ts +7 -0
- package/front_end/ui/components/adorners/Adorner.ts +2 -2
- package/front_end/ui/components/buttons/Button.ts +9 -9
- package/front_end/ui/components/data_grid/DataGrid.ts +64 -64
- package/front_end/ui/components/data_grid/DataGridController.ts +22 -22
- package/front_end/ui/components/data_grid/DataGridUtils.ts +3 -0
- package/front_end/ui/components/diff_view/DiffView.ts +6 -6
- package/front_end/ui/components/expandable_list/ExpandableList.ts +5 -5
- package/front_end/ui/components/icon_button/Icon.ts +4 -4
- package/front_end/ui/components/icon_button/IconButton.ts +4 -4
- package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +50 -50
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -6
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +4 -4
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +12 -12
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +40 -39
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +18 -18
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -4
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +5 -5
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +2 -2
- package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +2 -2
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +4 -4
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +22 -22
- package/front_end/ui/components/report_view/ReportView.ts +16 -16
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +14 -14
- package/front_end/ui/components/settings/SettingCheckbox.ts +5 -5
- package/front_end/ui/components/survey_link/SurveyLink.ts +8 -8
- package/front_end/ui/components/text_editor/TextEditor.ts +9 -9
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +7 -1
- package/front_end/ui/components/text_prompt/TextPrompt.ts +18 -18
- package/front_end/ui/components/tree_outline/TreeOutline.ts +69 -70
- package/front_end/ui/legacy/ContextFlavorListener.ts +0 -4
- package/front_end/ui/legacy/SearchableView.ts +13 -4
- package/front_end/ui/legacy/SuggestBox.ts +0 -3
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -3
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +13 -12
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -2
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +34 -7
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/use_private_class_members.js +41 -0
- package/scripts/eslint_rules/tests/use_private_class_members_test.js +62 -0
- package/scripts/migration/class-fields/migrate.js +2 -3
- package/scripts/migration/class-fields/migrate.sh +1 -3
- package/scripts/migration/class-fields/package.json +1 -1
- package/config/gni/all_devtools_files.gni +0 -255
- package/scripts/build/devtools_file_hashes.py +0 -82
- package/scripts/devtools_run/devtools_run_cli +0 -49
- package/scripts/devtools_run/package.json +0 -13
- package/scripts/unzip.py +0 -20
- package/scripts/visualize_deps/jquery_svg.html +0 -57
- package/scripts/visualize_deps/run_visualize.js +0 -119
|
@@ -19,17 +19,17 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/LowTextContrastI
|
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
21
|
export class LowTextContrastIssue extends Issue {
|
|
22
|
-
|
|
22
|
+
#issueDetails: Protocol.Audits.LowTextContrastIssueDetails;
|
|
23
23
|
|
|
24
24
|
constructor(issueDetails: Protocol.Audits.LowTextContrastIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
25
25
|
super('LowTextContrastIssue', issuesModel);
|
|
26
|
-
this
|
|
26
|
+
this.#issueDetails = issueDetails;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
primaryKey(): string {
|
|
30
30
|
// We intend to keep only one issue per element so other issues for the element will be discarded even
|
|
31
31
|
// if the issue content is slightly different.
|
|
32
|
-
return `${this.code()}-(${this
|
|
32
|
+
return `${this.code()}-(${this.#issueDetails.violatingNodeId})`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
getCategory(): IssueCategory {
|
|
@@ -37,7 +37,7 @@ export class LowTextContrastIssue extends Issue {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
details(): Protocol.Audits.LowTextContrastIssueDetails {
|
|
40
|
-
return this
|
|
40
|
+
return this.#issueDetails;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
getDescription(): MarkdownIssueDescription {
|
|
@@ -19,22 +19,22 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/MixedContentIssu
|
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
21
|
export class MixedContentIssue extends Issue {
|
|
22
|
-
|
|
22
|
+
#issueDetails: Protocol.Audits.MixedContentIssueDetails;
|
|
23
23
|
|
|
24
24
|
constructor(issueDetails: Protocol.Audits.MixedContentIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
25
25
|
super(Protocol.Audits.InspectorIssueCode.MixedContentIssue, issuesModel);
|
|
26
|
-
this
|
|
26
|
+
this.#issueDetails = issueDetails;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
requests(): Iterable<Protocol.Audits.AffectedRequest> {
|
|
30
|
-
if (this
|
|
31
|
-
return [this
|
|
30
|
+
if (this.#issueDetails.request) {
|
|
31
|
+
return [this.#issueDetails.request];
|
|
32
32
|
}
|
|
33
33
|
return [];
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
getDetails(): Protocol.Audits.MixedContentIssueDetails {
|
|
37
|
-
return this
|
|
37
|
+
return this.#issueDetails;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
getCategory(): IssueCategory {
|
|
@@ -50,11 +50,11 @@ export class MixedContentIssue extends Issue {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
primaryKey(): string {
|
|
53
|
-
return JSON.stringify(this
|
|
53
|
+
return JSON.stringify(this.#issueDetails);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
getKind(): IssueKind {
|
|
57
|
-
switch (this
|
|
57
|
+
switch (this.#issueDetails.resolutionStatus) {
|
|
58
58
|
case Protocol.Audits.MixedContentResolutionStatus.MixedContentAutomaticallyUpgraded:
|
|
59
59
|
return IssueKind.Improvement;
|
|
60
60
|
case Protocol.Audits.MixedContentResolutionStatus.MixedContentBlocked:
|
|
@@ -27,11 +27,11 @@ export enum IssueCode {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export class NavigatorUserAgentIssue extends Issue<IssueCode> {
|
|
30
|
-
|
|
30
|
+
#issueDetails: Protocol.Audits.NavigatorUserAgentIssueDetails;
|
|
31
31
|
|
|
32
32
|
constructor(issueDetails: Protocol.Audits.NavigatorUserAgentIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
33
33
|
super(IssueCode.NavigatorUserAgentIssue, issuesModel);
|
|
34
|
-
this
|
|
34
|
+
this.#issueDetails = issueDetails;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
getCategory(): IssueCategory {
|
|
@@ -39,7 +39,7 @@ export class NavigatorUserAgentIssue extends Issue<IssueCode> {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
details(): Protocol.Audits.NavigatorUserAgentIssueDetails {
|
|
42
|
-
return this
|
|
42
|
+
return this.#issueDetails;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
getDescription(): MarkdownIssueDescription|null {
|
|
@@ -53,14 +53,14 @@ export class NavigatorUserAgentIssue extends Issue<IssueCode> {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
sources(): Iterable<Protocol.Audits.SourceCodeLocation> {
|
|
56
|
-
if (this
|
|
57
|
-
return [this
|
|
56
|
+
if (this.#issueDetails.location) {
|
|
57
|
+
return [this.#issueDetails.location];
|
|
58
58
|
}
|
|
59
59
|
return [];
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
primaryKey(): string {
|
|
63
|
-
return JSON.stringify(this
|
|
63
|
+
return JSON.stringify(this.#issueDetails);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
getKind(): IssueKind {
|
|
@@ -69,7 +69,7 @@ export class NavigatorUserAgentIssue extends Issue<IssueCode> {
|
|
|
69
69
|
|
|
70
70
|
isCausedByThirdParty(): boolean {
|
|
71
71
|
const topFrame = SDK.FrameManager.FrameManager.instance().getTopFrame();
|
|
72
|
-
return isCausedByThirdParty(topFrame, this
|
|
72
|
+
return isCausedByThirdParty(topFrame, this.#issueDetails.url);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
static fromInspectorIssue(issuesModel: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue):
|
|
@@ -19,17 +19,17 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/QuirksModeIssue.
|
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
21
|
export class QuirksModeIssue extends Issue {
|
|
22
|
-
|
|
22
|
+
#issueDetails: Protocol.Audits.QuirksModeIssueDetails;
|
|
23
23
|
|
|
24
24
|
constructor(issueDetails: Protocol.Audits.QuirksModeIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
25
25
|
const mode = issueDetails.isLimitedQuirksMode ? 'LimitedQuirksMode' : 'QuirksMode';
|
|
26
26
|
const umaCode = [Protocol.Audits.InspectorIssueCode.QuirksModeIssue, mode].join('::');
|
|
27
27
|
super({code: Protocol.Audits.InspectorIssueCode.QuirksModeIssue, umaCode}, issuesModel);
|
|
28
|
-
this
|
|
28
|
+
this.#issueDetails = issueDetails;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
primaryKey(): string {
|
|
32
|
-
return `${this.code()}-(${this
|
|
32
|
+
return `${this.code()}-(${this.#issueDetails.documentNodeId})-(${this.#issueDetails.url})`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
getCategory(): IssueCategory {
|
|
@@ -37,7 +37,7 @@ export class QuirksModeIssue extends Issue {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
details(): Protocol.Audits.QuirksModeIssueDetails {
|
|
40
|
-
return this
|
|
40
|
+
return this.#issueDetails;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
getDescription(): MarkdownIssueDescription {
|
|
@@ -38,27 +38,27 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/SameSiteCookieIs
|
|
|
38
38
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
39
39
|
|
|
40
40
|
export class SameSiteCookieIssue extends Issue {
|
|
41
|
-
|
|
41
|
+
#issueDetails: Protocol.Audits.SameSiteCookieIssueDetails;
|
|
42
42
|
|
|
43
43
|
constructor(
|
|
44
44
|
code: string, issueDetails: Protocol.Audits.SameSiteCookieIssueDetails,
|
|
45
45
|
issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
46
46
|
super(code, issuesModel);
|
|
47
|
-
this
|
|
47
|
+
this.#issueDetails = issueDetails;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
if (this
|
|
52
|
-
const {domain, path, name} = this
|
|
50
|
+
#cookieId(): string {
|
|
51
|
+
if (this.#issueDetails.cookie) {
|
|
52
|
+
const {domain, path, name} = this.#issueDetails.cookie;
|
|
53
53
|
const cookieId = `${domain};${path};${name}`;
|
|
54
54
|
return cookieId;
|
|
55
55
|
}
|
|
56
|
-
return this
|
|
56
|
+
return this.#issueDetails.rawCookieLine ?? 'no-cookie-info';
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
primaryKey(): string {
|
|
60
|
-
const requestId = this
|
|
61
|
-
return `${this.code()}-(${this
|
|
60
|
+
const requestId = this.#issueDetails.request ? this.#issueDetails.request.requestId : 'no-request';
|
|
61
|
+
return `${this.code()}-(${this.#cookieId()})-(${requestId})`;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -162,22 +162,22 @@ export class SameSiteCookieIssue extends Issue {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
cookies(): Iterable<Protocol.Audits.AffectedCookie> {
|
|
165
|
-
if (this
|
|
166
|
-
return [this
|
|
165
|
+
if (this.#issueDetails.cookie) {
|
|
166
|
+
return [this.#issueDetails.cookie];
|
|
167
167
|
}
|
|
168
168
|
return [];
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
rawCookieLines(): Iterable<string> {
|
|
172
|
-
if (this
|
|
173
|
-
return [this
|
|
172
|
+
if (this.#issueDetails.rawCookieLine) {
|
|
173
|
+
return [this.#issueDetails.rawCookieLine];
|
|
174
174
|
}
|
|
175
175
|
return [];
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
requests(): Iterable<Protocol.Audits.AffectedRequest> {
|
|
179
|
-
if (this
|
|
180
|
-
return [this
|
|
179
|
+
if (this.#issueDetails.request) {
|
|
180
|
+
return [this.#issueDetails.request];
|
|
181
181
|
}
|
|
182
182
|
return [];
|
|
183
183
|
}
|
|
@@ -196,11 +196,11 @@ export class SameSiteCookieIssue extends Issue {
|
|
|
196
196
|
|
|
197
197
|
isCausedByThirdParty(): boolean {
|
|
198
198
|
const topFrame = SDK.FrameManager.FrameManager.instance().getTopFrame();
|
|
199
|
-
return isCausedByThirdParty(topFrame, this
|
|
199
|
+
return isCausedByThirdParty(topFrame, this.#issueDetails.cookieUrl);
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
getKind(): IssueKind {
|
|
203
|
-
if (this
|
|
203
|
+
if (this.#issueDetails.cookieExclusionReasons?.length > 0) {
|
|
204
204
|
return IssueKind.PageError;
|
|
205
205
|
}
|
|
206
206
|
return IssueKind.BreakingChange;
|
|
@@ -20,12 +20,12 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/SharedArrayBuffe
|
|
|
20
20
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
21
21
|
|
|
22
22
|
export class SharedArrayBufferIssue extends Issue {
|
|
23
|
-
|
|
23
|
+
#issueDetails: Protocol.Audits.SharedArrayBufferIssueDetails;
|
|
24
24
|
|
|
25
25
|
constructor(issueDetails: Protocol.Audits.SharedArrayBufferIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
26
26
|
const umaCode = [Protocol.Audits.InspectorIssueCode.SharedArrayBufferIssue, issueDetails.type].join('::');
|
|
27
27
|
super({code: Protocol.Audits.InspectorIssueCode.SharedArrayBufferIssue, umaCode}, issuesModel);
|
|
28
|
-
this
|
|
28
|
+
this.#issueDetails = issueDetails;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
getCategory(): IssueCategory {
|
|
@@ -33,7 +33,7 @@ export class SharedArrayBufferIssue extends Issue {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
details(): Protocol.Audits.SharedArrayBufferIssueDetails {
|
|
36
|
-
return this
|
|
36
|
+
return this.#issueDetails;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
getDescription(): MarkdownIssueDescription {
|
|
@@ -47,11 +47,11 @@ export class SharedArrayBufferIssue extends Issue {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
primaryKey(): string {
|
|
50
|
-
return JSON.stringify(this
|
|
50
|
+
return JSON.stringify(this.#issueDetails);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
getKind(): IssueKind {
|
|
54
|
-
if (this
|
|
54
|
+
if (this.#issueDetails.isWarning) {
|
|
55
55
|
return IssueKind.BreakingChange;
|
|
56
56
|
}
|
|
57
57
|
return IssueKind.PageError;
|
|
@@ -16,21 +16,21 @@ import {Events} from './IssuesManagerEvents.js';
|
|
|
16
16
|
import {getIssueTitleFromMarkdownDescription} from './MarkdownIssueDescription.js';
|
|
17
17
|
|
|
18
18
|
export class SourceFrameIssuesManager {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
#locationPool = new Bindings.LiveLocation.LiveLocationPool();
|
|
20
|
+
#issueMessages = new Array<IssueMessage>();
|
|
21
21
|
|
|
22
22
|
constructor(private readonly issuesManager: IssuesManager) {
|
|
23
|
-
this.issuesManager.addEventListener(Events.IssueAdded, this
|
|
24
|
-
this.issuesManager.addEventListener(Events.FullUpdateRequired, this
|
|
23
|
+
this.issuesManager.addEventListener(Events.IssueAdded, this.#onIssueAdded, this);
|
|
24
|
+
this.issuesManager.addEventListener(Events.FullUpdateRequired, this.#onFullUpdateRequired, this);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
#onIssueAdded(event: Common.EventTarget.EventTargetEvent<IssueAddedEvent>): void {
|
|
28
28
|
const {issue} = event.data;
|
|
29
|
-
this
|
|
29
|
+
this.#addIssue(issue);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
if (!this
|
|
32
|
+
#addIssue(issue: Issue): void {
|
|
33
|
+
if (!this.#isTrustedTypeIssue(issue)) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
const issuesModel = issue.model();
|
|
@@ -43,20 +43,20 @@ export class SourceFrameIssuesManager {
|
|
|
43
43
|
const rawLocation =
|
|
44
44
|
debuggerModel.createRawLocationByURL(srcLocation.url, srcLocation.lineNumber, srcLocation.columnNumber);
|
|
45
45
|
if (rawLocation) {
|
|
46
|
-
this
|
|
46
|
+
this.#addIssueMessageToScript(issue, rawLocation);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
this
|
|
51
|
+
#onFullUpdateRequired(): void {
|
|
52
|
+
this.#resetMessages();
|
|
53
53
|
const issues = this.issuesManager.issues();
|
|
54
54
|
for (const issue of issues) {
|
|
55
|
-
this
|
|
55
|
+
this.#addIssue(issue);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
async #addIssueMessageToScript(issue: Issue, rawLocation: SDK.DebuggerModel.Location): Promise<void> {
|
|
60
60
|
const description = issue.getDescription();
|
|
61
61
|
if (description) {
|
|
62
62
|
const title = await getIssueTitleFromMarkdownDescription(description);
|
|
@@ -64,58 +64,59 @@ export class SourceFrameIssuesManager {
|
|
|
64
64
|
const clickHandler = (): void => {
|
|
65
65
|
Common.Revealer.reveal(issue);
|
|
66
66
|
};
|
|
67
|
-
this
|
|
67
|
+
this.#issueMessages.push(
|
|
68
|
+
new IssueMessage(title, issue.getKind(), rawLocation, this.#locationPool, clickHandler));
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
#isTrustedTypeIssue(issue: Issue): issue is ContentSecurityPolicyIssue {
|
|
73
74
|
return issue instanceof ContentSecurityPolicyIssue && issue.code() === trustedTypesSinkViolationCode ||
|
|
74
75
|
issue.code() === trustedTypesPolicyViolationCode;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
for (const message of this
|
|
78
|
+
#resetMessages(): void {
|
|
79
|
+
for (const message of this.#issueMessages) {
|
|
79
80
|
message.dispose();
|
|
80
81
|
}
|
|
81
|
-
this
|
|
82
|
-
this
|
|
82
|
+
this.#issueMessages = [];
|
|
83
|
+
this.#locationPool.disposeAll();
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
export class IssueMessage extends Workspace.UISourceCode.Message {
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
#uiSourceCode?: Workspace.UISourceCode.UISourceCode = undefined;
|
|
89
|
+
#kind: IssueKind;
|
|
89
90
|
|
|
90
91
|
constructor(
|
|
91
92
|
title: string, kind: IssueKind, rawLocation: SDK.DebuggerModel.Location,
|
|
92
93
|
locationPool: Bindings.LiveLocation.LiveLocationPool, clickHandler: () => void) {
|
|
93
94
|
super(Workspace.UISourceCode.Message.Level.Issue, title, clickHandler);
|
|
94
|
-
this
|
|
95
|
+
this.#kind = kind;
|
|
95
96
|
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createLiveLocation(
|
|
96
|
-
rawLocation, this
|
|
97
|
+
rawLocation, this.#updateLocation.bind(this), locationPool);
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
if (this
|
|
101
|
-
this
|
|
100
|
+
async #updateLocation(liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> {
|
|
101
|
+
if (this.#uiSourceCode) {
|
|
102
|
+
this.#uiSourceCode.removeMessage(this);
|
|
102
103
|
}
|
|
103
104
|
const uiLocation = await liveLocation.uiLocation();
|
|
104
105
|
if (!uiLocation) {
|
|
105
106
|
return;
|
|
106
107
|
}
|
|
107
108
|
this.range = TextUtils.TextRange.TextRange.createFromLocation(uiLocation.lineNumber, uiLocation.columnNumber || 0);
|
|
108
|
-
this
|
|
109
|
-
this
|
|
109
|
+
this.#uiSourceCode = uiLocation.uiSourceCode;
|
|
110
|
+
this.#uiSourceCode.addMessage(this);
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
getIssueKind(): IssueKind {
|
|
113
|
-
return this
|
|
114
|
+
return this.#kind;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
dispose(): void {
|
|
117
|
-
if (this
|
|
118
|
-
this
|
|
118
|
+
if (this.#uiSourceCode) {
|
|
119
|
+
this.#uiSourceCode.removeMessage(this);
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
}
|
|
@@ -20,21 +20,21 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/TrustedWebActivi
|
|
|
20
20
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
21
21
|
|
|
22
22
|
export class TrustedWebActivityIssue extends Issue {
|
|
23
|
-
|
|
23
|
+
#issueDetails: Protocol.Audits.TrustedWebActivityIssueDetails;
|
|
24
24
|
|
|
25
25
|
constructor(issueDetails: Protocol.Audits.TrustedWebActivityIssueDetails) {
|
|
26
26
|
const issueCode =
|
|
27
27
|
[Protocol.Audits.InspectorIssueCode.TrustedWebActivityIssue, issueDetails.violationType].join('::');
|
|
28
28
|
super(issueCode);
|
|
29
|
-
this
|
|
29
|
+
this.#issueDetails = issueDetails;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
details(): Protocol.Audits.TrustedWebActivityIssueDetails {
|
|
33
|
-
return this
|
|
33
|
+
return this.#issueDetails;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
getDescription(): MarkdownIssueDescription|null {
|
|
37
|
-
const description = issueDescriptions.get(this
|
|
37
|
+
const description = issueDescriptions.get(this.#issueDetails.violationType);
|
|
38
38
|
if (!description) {
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
@@ -46,7 +46,7 @@ export class TrustedWebActivityIssue extends Issue {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
primaryKey(): string {
|
|
49
|
-
return `${Protocol.Audits.InspectorIssueCode.TrustedWebActivityIssue}-${JSON.stringify(this
|
|
49
|
+
return `${Protocol.Audits.InspectorIssueCode.TrustedWebActivityIssue}-${JSON.stringify(this.#issueDetails)}`;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
getKind(): IssueKind {
|
|
@@ -20,13 +20,13 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
20
20
|
|
|
21
21
|
export class WasmCrossOriginModuleSharingIssue extends
|
|
22
22
|
Issue<Protocol.Audits.InspectorIssueCode.WasmCrossOriginModuleSharingIssue> {
|
|
23
|
-
|
|
23
|
+
#issueDetails: Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails;
|
|
24
24
|
|
|
25
25
|
constructor(
|
|
26
26
|
issueDetails: Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails,
|
|
27
27
|
issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
28
28
|
super(Protocol.Audits.InspectorIssueCode.WasmCrossOriginModuleSharingIssue, issuesModel);
|
|
29
|
-
this
|
|
29
|
+
this.#issueDetails = issueDetails;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
getCategory(): IssueCategory {
|
|
@@ -34,7 +34,7 @@ export class WasmCrossOriginModuleSharingIssue extends
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
details(): Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails {
|
|
37
|
-
return this
|
|
37
|
+
return this.#issueDetails;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
getDescription(): MarkdownIssueDescription|null {
|
|
@@ -48,11 +48,11 @@ export class WasmCrossOriginModuleSharingIssue extends
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
primaryKey(): string {
|
|
51
|
-
return JSON.stringify(this
|
|
51
|
+
return JSON.stringify(this.#issueDetails);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
getKind(): IssueKind {
|
|
55
|
-
return this
|
|
55
|
+
return this.#issueDetails.isWarning ? IssueKind.BreakingChange : IssueKind.PageError;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
static fromInspectorIssue(issuesModel: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue):
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as AttributionReportingIssue from './AttributionReportingIssue.js';
|
|
6
|
+
import * as ClientHintIssue from './ClientHintIssue.js';
|
|
6
7
|
import * as ContentSecurityPolicyIssue from './ContentSecurityPolicyIssue.js';
|
|
7
8
|
import * as ContrastCheckTrigger from './ContrastCheckTrigger.js';
|
|
8
9
|
import * as CorsIssue from './CorsIssue.js';
|
|
@@ -27,6 +28,7 @@ import * as WasmCrossOriginModuleSharingIssue from './WasmCrossOriginModuleShari
|
|
|
27
28
|
|
|
28
29
|
export {
|
|
29
30
|
AttributionReportingIssue,
|
|
31
|
+
ClientHintIssue,
|
|
30
32
|
ContentSecurityPolicyIssue,
|
|
31
33
|
ContrastCheckTrigger,
|
|
32
34
|
CorsIssue,
|
|
@@ -122,7 +122,7 @@ export class TimelineModelImpl {
|
|
|
122
122
|
static forEachEvent(
|
|
123
123
|
events: SDK.TracingModel.Event[], onStartEvent: (arg0: SDK.TracingModel.Event) => void,
|
|
124
124
|
onEndEvent: (arg0: SDK.TracingModel.Event) => void,
|
|
125
|
-
onInstantEvent?: ((arg0: SDK.TracingModel.Event, arg1: SDK.TracingModel.Event|null) =>
|
|
125
|
+
onInstantEvent?: ((arg0: SDK.TracingModel.Event, arg1: SDK.TracingModel.Event|null) => void), startTime?: number,
|
|
126
126
|
endTime?: number, filter?: ((arg0: SDK.TracingModel.Event) => boolean)): void {
|
|
127
127
|
startTime = startTime || 0;
|
|
128
128
|
endTime = endTime || Infinity;
|