chrome-devtools-frontend 1.0.950971 → 1.0.952403
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 +6 -3
- 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 +186 -183
- package/front_end/core/i18n/locales/en-XL.json +186 -183
- package/front_end/core/root/Runtime.ts +4 -12
- package/front_end/core/sdk/CSSRule.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +12 -37
- package/front_end/core/sdk/OverlayModel.ts +18 -34
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -12
- package/front_end/core/sdk/PageResourceLoader.ts +2 -1
- package/front_end/core/sdk/RuntimeModel.ts +0 -1
- package/front_end/core/sdk/SourceMap.ts +1 -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 +65 -70
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +203 -204
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +109 -108
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +18 -18
- 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/DebuggerLanguagePlugins.ts +1 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -4
- package/front_end/models/bindings/FileUtils.ts +0 -4
- package/front_end/models/bindings/IgnoreListManager.ts +1 -2
- package/front_end/models/bindings/NetworkProject.ts +1 -2
- package/front_end/models/extensions/ExtensionAPI.ts +2 -2
- 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 +17 -18
- 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/models/timeline_model/TracingLayerTree.ts +0 -1
- package/front_end/panels/accessibility/ARIAMetadata.ts +0 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +2 -2
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
- package/front_end/panels/animation/AnimationTimeline.ts +0 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -4
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +0 -2
- package/front_end/panels/application/StorageView.ts +2 -6
- package/front_end/panels/application/{BackForwardCacheStrings.ts → components/BackForwardCacheStrings.ts} +2 -2
- package/front_end/panels/application/{BackForwardCacheView.ts → components/BackForwardCacheView.ts} +96 -62
- 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/application/{backForwardCacheView.css → components/backForwardCacheView.css} +9 -0
- package/front_end/panels/application/components/components.ts +2 -0
- 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/ComputedStyleModel.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -6
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- 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/layer_viewer/Layers3DView.ts +3 -9
- package/front_end/panels/lighthouse/LighthouseController.ts +4 -5
- package/front_end/panels/media/PlayerListView.ts +160 -97
- package/front_end/panels/media/PlayerMessagesView.ts +1 -0
- package/front_end/panels/media/TickingFlameChart.ts +1 -2
- package/front_end/panels/media/playerListView.css +58 -0
- package/front_end/panels/network/NetworkLogView.ts +2 -6
- package/front_end/panels/network/NetworkLogViewColumns.ts +1 -1
- 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/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +2 -2
- package/front_end/panels/search/SearchConfig.ts +0 -6
- package/front_end/panels/security/SecurityModel.ts +2 -4
- package/front_end/panels/security/SecurityPanel.ts +2 -2
- 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/FilteredUISourceCodeListProvider.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +4 -10
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +2 -3
- 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 +1 -4
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -5
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +0 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -2
- package/front_end/panels/timeline/TimelineLoader.ts +0 -3
- package/front_end/panels/timeline/TimelinePanel.ts +2 -3
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.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/third_party/puppeteer/package/README.md +11 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +21 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +50 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +70 -33
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +25 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +39 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +36 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts +3 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +46 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +124 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +27 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +144 -74
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +43 -17
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +101 -34
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +24 -17
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +7 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +50 -11
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +70 -34
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +26 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +39 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +38 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +46 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +120 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +27 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +144 -75
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +12 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +10 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +43 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +104 -40
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/web.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +173 -36
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- 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 -5
- 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/ContextMenu.ts +2 -3
- package/front_end/ui/legacy/InspectorView.ts +1 -1
- package/front_end/ui/legacy/ReportView.ts +3 -4
- package/front_end/ui/legacy/SearchableView.ts +14 -6
- package/front_end/ui/legacy/SplitWidget.ts +2 -3
- package/front_end/ui/legacy/SuggestBox.ts +0 -3
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/XLink.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +9 -9
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +7 -7
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +1 -5
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +13 -13
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +2 -2
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +42 -4
- 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
|
@@ -36,7 +36,7 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/ContentSecurityP
|
|
|
36
36
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
37
37
|
|
|
38
38
|
export class ContentSecurityPolicyIssue extends Issue {
|
|
39
|
-
|
|
39
|
+
#issueDetails: Protocol.Audits.ContentSecurityPolicyIssueDetails;
|
|
40
40
|
|
|
41
41
|
constructor(
|
|
42
42
|
issueDetails: Protocol.Audits.ContentSecurityPolicyIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel,
|
|
@@ -46,7 +46,7 @@ export class ContentSecurityPolicyIssue extends Issue {
|
|
|
46
46
|
issueDetails.contentSecurityPolicyViolationType,
|
|
47
47
|
].join('::');
|
|
48
48
|
super(issueCode, issuesModel, issueId);
|
|
49
|
-
this
|
|
49
|
+
this.#issueDetails = issueDetails;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
getCategory(): IssueCategory {
|
|
@@ -54,7 +54,7 @@ export class ContentSecurityPolicyIssue extends Issue {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
primaryKey(): string {
|
|
57
|
-
return JSON.stringify(this
|
|
57
|
+
return JSON.stringify(this.#issueDetails, [
|
|
58
58
|
'blockedURL',
|
|
59
59
|
'contentSecurityPolicyViolationType',
|
|
60
60
|
'violatedDirective',
|
|
@@ -68,7 +68,7 @@ export class ContentSecurityPolicyIssue extends Issue {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
getDescription(): MarkdownIssueDescription|null {
|
|
71
|
-
const description = issueDescriptions.get(this
|
|
71
|
+
const description = issueDescriptions.get(this.#issueDetails.contentSecurityPolicyViolationType);
|
|
72
72
|
if (!description) {
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
@@ -76,11 +76,11 @@ export class ContentSecurityPolicyIssue extends Issue {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
details(): Protocol.Audits.ContentSecurityPolicyIssueDetails {
|
|
79
|
-
return this
|
|
79
|
+
return this.#issueDetails;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
getKind(): IssueKind {
|
|
83
|
-
if (this
|
|
83
|
+
if (this.#issueDetails.isReportOnly) {
|
|
84
84
|
return IssueKind.Improvement;
|
|
85
85
|
}
|
|
86
86
|
return IssueKind.PageError;
|
|
@@ -9,9 +9,9 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
9
9
|
let contrastCheckTriggerInstance: ContrastCheckTrigger|null = null;
|
|
10
10
|
|
|
11
11
|
export class ContrastCheckTrigger {
|
|
12
|
-
|
|
12
|
+
#pageLoadListeners: WeakMap<SDK.ResourceTreeModel.ResourceTreeModel, Common.EventTarget.EventDescriptor> =
|
|
13
13
|
new WeakMap();
|
|
14
|
-
|
|
14
|
+
#frameAddedListeners: WeakMap<SDK.ResourceTreeModel.ResourceTreeModel, Common.EventTarget.EventDescriptor> =
|
|
15
15
|
new WeakMap();
|
|
16
16
|
|
|
17
17
|
constructor() {
|
|
@@ -27,40 +27,40 @@ export class ContrastCheckTrigger {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
async modelAdded(resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel): Promise<void> {
|
|
30
|
-
this
|
|
30
|
+
this.#pageLoadListeners.set(
|
|
31
31
|
resourceTreeModel,
|
|
32
|
-
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load, this
|
|
33
|
-
this
|
|
32
|
+
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load, this.#pageLoaded, this));
|
|
33
|
+
this.#frameAddedListeners.set(
|
|
34
34
|
resourceTreeModel,
|
|
35
|
-
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameAdded, this
|
|
35
|
+
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameAdded, this.#frameAdded, this));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
modelRemoved(resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel): void {
|
|
39
|
-
const pageLoadListener = this
|
|
39
|
+
const pageLoadListener = this.#pageLoadListeners.get(resourceTreeModel);
|
|
40
40
|
if (pageLoadListener) {
|
|
41
41
|
Common.EventTarget.removeEventListeners([pageLoadListener]);
|
|
42
42
|
}
|
|
43
|
-
const frameAddedListeners = this
|
|
43
|
+
const frameAddedListeners = this.#frameAddedListeners.get(resourceTreeModel);
|
|
44
44
|
if (frameAddedListeners) {
|
|
45
45
|
Common.EventTarget.removeEventListeners([frameAddedListeners]);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
#checkContrast(resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel): void {
|
|
50
50
|
if (!Root.Runtime.experiments.isEnabled('contrastIssues')) {
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
resourceTreeModel.target().auditsAgent().invoke_checkContrast({});
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
#pageLoaded(event: Common.EventTarget
|
|
57
|
+
.EventTargetEvent<{resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel, loadTime: number}>):
|
|
58
|
+
void {
|
|
59
59
|
const {resourceTreeModel} = event.data;
|
|
60
|
-
this
|
|
60
|
+
this.#checkContrast(resourceTreeModel);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
async #frameAdded(event: Common.EventTarget.EventTargetEvent<SDK.ResourceTreeModel.ResourceTreeFrame>):
|
|
64
64
|
Promise<void> {
|
|
65
65
|
if (!Root.Runtime.experiments.isEnabled('contrastIssues')) {
|
|
66
66
|
return;
|
|
@@ -74,7 +74,7 @@ export class ContrastCheckTrigger {
|
|
|
74
74
|
const response = await frame.resourceTreeModel().target().runtimeAgent().invoke_evaluate(
|
|
75
75
|
{expression: 'document.readyState', returnByValue: true});
|
|
76
76
|
if (response.result && response.result.value === 'complete') {
|
|
77
|
-
this
|
|
77
|
+
this.#checkContrast(frame.resourceTreeModel());
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -99,13 +99,13 @@ function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
export class CorsIssue extends Issue<IssueCode> {
|
|
102
|
-
|
|
102
|
+
#issueDetails: Protocol.Audits.CorsIssueDetails;
|
|
103
103
|
|
|
104
104
|
constructor(
|
|
105
105
|
issueDetails: Protocol.Audits.CorsIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel,
|
|
106
106
|
issueId: Protocol.Audits.IssueId|undefined) {
|
|
107
107
|
super(getIssueCode(issueDetails), issuesModel, issueId);
|
|
108
|
-
this
|
|
108
|
+
this.#issueDetails = issueDetails;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
getCategory(): IssueCategory {
|
|
@@ -113,11 +113,11 @@ export class CorsIssue extends Issue<IssueCode> {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
details(): Protocol.Audits.CorsIssueDetails {
|
|
116
|
-
return this
|
|
116
|
+
return this.#issueDetails;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
getDescription(): MarkdownIssueDescription|null {
|
|
120
|
-
switch (getIssueCode(this
|
|
120
|
+
switch (getIssueCode(this.#issueDetails)) {
|
|
121
121
|
case IssueCode.InsecurePrivateNetwork:
|
|
122
122
|
return {
|
|
123
123
|
file: 'corsInsecurePrivateNetwork.md',
|
|
@@ -231,15 +231,15 @@ export class CorsIssue extends Issue<IssueCode> {
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
primaryKey(): string {
|
|
234
|
-
return JSON.stringify(this
|
|
234
|
+
return JSON.stringify(this.#issueDetails);
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
getKind(): IssueKind {
|
|
238
|
-
if (this
|
|
239
|
-
(this
|
|
240
|
-
this
|
|
238
|
+
if (this.#issueDetails.isWarning &&
|
|
239
|
+
(this.#issueDetails.corsErrorStatus.corsError === Protocol.Network.CorsError.InsecurePrivateNetwork ||
|
|
240
|
+
this.#issueDetails.corsErrorStatus.corsError ===
|
|
241
241
|
Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork ||
|
|
242
|
-
this
|
|
242
|
+
this.#issueDetails.corsErrorStatus.corsError ===
|
|
243
243
|
Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork)) {
|
|
244
244
|
return IssueKind.BreakingChange;
|
|
245
245
|
}
|
|
@@ -40,23 +40,23 @@ export function isCrossOriginEmbedderPolicyIssue(reason: Protocol.Audits.Blocked
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export class CrossOriginEmbedderPolicyIssue extends Issue {
|
|
43
|
-
|
|
43
|
+
#issueDetails: Protocol.Audits.BlockedByResponseIssueDetails;
|
|
44
44
|
|
|
45
45
|
constructor(issueDetails: Protocol.Audits.BlockedByResponseIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
46
46
|
super(`CrossOriginEmbedderPolicyIssue::${issueDetails.reason}`, issuesModel);
|
|
47
|
-
this
|
|
47
|
+
this.#issueDetails = issueDetails;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
primaryKey(): string {
|
|
51
|
-
return `${this.code()}-(${this
|
|
51
|
+
return `${this.code()}-(${this.#issueDetails.request.requestId})`;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
getBlockedByResponseDetails(): Iterable<Protocol.Audits.BlockedByResponseIssueDetails> {
|
|
55
|
-
return [this
|
|
55
|
+
return [this.#issueDetails];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
requests(): Iterable<Protocol.Audits.AffectedRequest> {
|
|
59
|
-
return [this
|
|
59
|
+
return [this.#issueDetails.request];
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
getCategory(): IssueCategory {
|
|
@@ -13,11 +13,11 @@ export const enum IssueCode {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export class DeprecationIssue extends Issue<IssueCode> {
|
|
16
|
-
|
|
16
|
+
#issueDetails: Protocol.Audits.DeprecationIssueDetails;
|
|
17
17
|
|
|
18
18
|
constructor(issueDetails: Protocol.Audits.DeprecationIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
19
19
|
super(IssueCode.DeprecationIssue, issuesModel);
|
|
20
|
-
this
|
|
20
|
+
this.#issueDetails = issueDetails;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
getCategory(): IssueCategory {
|
|
@@ -25,7 +25,7 @@ export class DeprecationIssue extends Issue<IssueCode> {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
details(): Protocol.Audits.DeprecationIssueDetails {
|
|
28
|
-
return this
|
|
28
|
+
return this.#issueDetails;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
getDescription(): MarkdownIssueDescription|null {
|
|
@@ -34,21 +34,21 @@ export class DeprecationIssue extends Issue<IssueCode> {
|
|
|
34
34
|
substitutions: new Map([
|
|
35
35
|
// TODO(crbug.com/1264960): Re-work format to add i18n support per:
|
|
36
36
|
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/devtools_protocol/README.md
|
|
37
|
-
['PLACEHOLDER_message', String(this
|
|
37
|
+
['PLACEHOLDER_message', String(this.#issueDetails.message)],
|
|
38
38
|
]),
|
|
39
39
|
links: [],
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
sources(): Iterable<Protocol.Audits.SourceCodeLocation> {
|
|
44
|
-
if (this
|
|
45
|
-
return [this
|
|
44
|
+
if (this.#issueDetails.sourceCodeLocation) {
|
|
45
|
+
return [this.#issueDetails.sourceCodeLocation];
|
|
46
46
|
}
|
|
47
47
|
return [];
|
|
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 {
|
|
@@ -20,7 +20,7 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/GenericIssue.ts'
|
|
|
20
20
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
21
21
|
|
|
22
22
|
export class GenericIssue extends Issue {
|
|
23
|
-
|
|
23
|
+
#issueDetails: Protocol.Audits.GenericIssueDetails;
|
|
24
24
|
|
|
25
25
|
constructor(
|
|
26
26
|
issueDetails: Protocol.Audits.GenericIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel,
|
|
@@ -30,7 +30,7 @@ export class GenericIssue extends Issue {
|
|
|
30
30
|
issueDetails.errorType,
|
|
31
31
|
].join('::');
|
|
32
32
|
super(issueCode, issuesModel, issueId);
|
|
33
|
-
this
|
|
33
|
+
this.#issueDetails = issueDetails;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
getCategory(): IssueCategory {
|
|
@@ -38,11 +38,11 @@ export class GenericIssue extends Issue {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
primaryKey(): string {
|
|
41
|
-
return `${this.code()}-(${this
|
|
41
|
+
return `${this.code()}-(${this.#issueDetails.frameId})`;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
getDescription(): MarkdownIssueDescription|null {
|
|
45
|
-
const description = issueDescriptions.get(this
|
|
45
|
+
const description = issueDescriptions.get(this.#issueDetails.errorType);
|
|
46
46
|
if (!description) {
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
@@ -50,7 +50,7 @@ export class GenericIssue extends Issue {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
details(): Protocol.Audits.GenericIssueDetails {
|
|
53
|
-
return this
|
|
53
|
+
return this.#issueDetails;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
getKind(): IssueKind {
|
|
@@ -19,20 +19,20 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/HeavyAdIssue.ts'
|
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
21
|
export class HeavyAdIssue extends Issue {
|
|
22
|
-
|
|
22
|
+
#issueDetails: Protocol.Audits.HeavyAdIssueDetails;
|
|
23
23
|
|
|
24
24
|
constructor(issueDetails: Protocol.Audits.HeavyAdIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
25
25
|
const umaCode = [Protocol.Audits.InspectorIssueCode.HeavyAdIssue, issueDetails.reason].join('::');
|
|
26
26
|
super({code: Protocol.Audits.InspectorIssueCode.HeavyAdIssue, umaCode}, issuesModel);
|
|
27
|
-
this
|
|
27
|
+
this.#issueDetails = issueDetails;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
details(): Protocol.Audits.HeavyAdIssueDetails {
|
|
31
|
-
return this
|
|
31
|
+
return this.#issueDetails;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
primaryKey(): string {
|
|
35
|
-
return `${Protocol.Audits.InspectorIssueCode.HeavyAdIssue}-${JSON.stringify(this
|
|
35
|
+
return `${Protocol.Audits.InspectorIssueCode.HeavyAdIssue}-${JSON.stringify(this.#issueDetails)}`;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
getDescription(): MarkdownIssueDescription {
|
|
@@ -52,7 +52,7 @@ export class HeavyAdIssue extends Issue {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
getKind(): IssueKind {
|
|
55
|
-
switch (this
|
|
55
|
+
switch (this.#issueDetails.resolution) {
|
|
56
56
|
case Protocol.Audits.HeavyAdResolutionStatus.HeavyAdBlocked:
|
|
57
57
|
return IssueKind.PageError;
|
|
58
58
|
case Protocol.Audits.HeavyAdResolutionStatus.HeavyAdWarning:
|
|
@@ -123,23 +123,23 @@ export interface AffectedElement {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
export abstract class Issue<IssueCode extends string = string> {
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
#issueCode: IssueCode;
|
|
127
|
+
#issuesModel: SDK.IssuesModel.IssuesModel|null;
|
|
128
128
|
protected issueId: Protocol.Audits.IssueId|undefined = undefined;
|
|
129
|
-
|
|
129
|
+
#hidden: boolean;
|
|
130
130
|
|
|
131
131
|
constructor(
|
|
132
132
|
code: IssueCode|{code: IssueCode, umaCode: string}, issuesModel: SDK.IssuesModel.IssuesModel|null = null,
|
|
133
133
|
issueId?: Protocol.Audits.IssueId) {
|
|
134
|
-
this
|
|
135
|
-
this
|
|
134
|
+
this.#issueCode = typeof code === 'object' ? code.code : code;
|
|
135
|
+
this.#issuesModel = issuesModel;
|
|
136
136
|
this.issueId = issueId;
|
|
137
137
|
Host.userMetrics.issueCreated(typeof code === 'string' ? code : code.umaCode);
|
|
138
|
-
this
|
|
138
|
+
this.#hidden = false;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
code(): IssueCode {
|
|
142
|
-
return this
|
|
142
|
+
return this.#issueCode;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
abstract primaryKey(): string;
|
|
@@ -184,7 +184,7 @@ export abstract class Issue<IssueCode extends string = string> {
|
|
|
184
184
|
* The model might be unavailable or belong to a target that has already been disposed.
|
|
185
185
|
*/
|
|
186
186
|
model(): SDK.IssuesModel.IssuesModel|null {
|
|
187
|
-
return this
|
|
187
|
+
return this.#issuesModel;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
isCausedByThirdParty(): boolean {
|
|
@@ -196,11 +196,11 @@ export abstract class Issue<IssueCode extends string = string> {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
isHidden(): boolean {
|
|
199
|
-
return this
|
|
199
|
+
return this.#hidden;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
setHidden(hidden: boolean): void {
|
|
203
|
-
this
|
|
203
|
+
this.#hidden = hidden;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
|
|
@@ -13,19 +13,19 @@ import type {IssueAddedEvent} from './IssuesManager.js';
|
|
|
13
13
|
* A class that facilitates resolving an issueId to an issue. See `ResolverBase` for more info.
|
|
14
14
|
*/
|
|
15
15
|
export class IssueResolver extends Common.ResolverBase.ResolverBase<Protocol.Audits.IssueId, Issue> {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
#issuesListener: Common.EventTarget.EventDescriptor|null = null;
|
|
17
|
+
#issuesManager: IssuesManager;
|
|
18
18
|
|
|
19
19
|
constructor(issuesManager: IssuesManager = IssuesManager.instance()) {
|
|
20
20
|
super();
|
|
21
|
-
this
|
|
21
|
+
this.#issuesManager = issuesManager;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
protected override getForId(id: Protocol.Audits.IssueId): Issue|null {
|
|
25
|
-
return this
|
|
25
|
+
return this.#issuesManager.getIssueById(id) || null;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
#onIssueAdded(event: Common.EventTarget.EventTargetEvent<IssueAddedEvent>): void {
|
|
29
29
|
const {issue} = event.data;
|
|
30
30
|
const id = issue.getIssueId();
|
|
31
31
|
if (id) {
|
|
@@ -34,17 +34,18 @@ export class IssueResolver extends Common.ResolverBase.ResolverBase<Protocol.Aud
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
protected override startListening(): void {
|
|
37
|
-
if (this
|
|
37
|
+
if (this.#issuesListener) {
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
this
|
|
40
|
+
this.#issuesListener =
|
|
41
|
+
this.#issuesManager.addEventListener(IssueManagerEvents.IssueAdded, this.#onIssueAdded, this);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
protected override stopListening(): void {
|
|
44
|
-
if (!this
|
|
45
|
+
if (!this.#issuesListener) {
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
Common.EventTarget.removeEventListeners([this
|
|
48
|
-
this
|
|
48
|
+
Common.EventTarget.removeEventListeners([this.#issuesListener]);
|
|
49
|
+
this.#issuesListener = null;
|
|
49
50
|
}
|
|
50
51
|
}
|