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
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
const originalAssert = console.assert;
|
|
5
|
+
import * as Platform from '../platform/platform.js';
|
|
7
6
|
|
|
8
7
|
const queryParamsObject = new URLSearchParams(location.search);
|
|
9
8
|
|
|
@@ -100,13 +99,6 @@ export class Runtime {
|
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
101
|
|
|
103
|
-
static assert(value: boolean|undefined, message: string): void {
|
|
104
|
-
if (value) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
originalAssert.call(originalConsole, value, message + ' ' + new Error().stack);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
102
|
static setPlatform(platform: string): void {
|
|
111
103
|
runtimePlatform = platform;
|
|
112
104
|
}
|
|
@@ -197,8 +189,8 @@ export class ExperimentsSupport {
|
|
|
197
189
|
}
|
|
198
190
|
|
|
199
191
|
register(experimentName: string, experimentTitle: string, unstable?: boolean, docLink?: string): void {
|
|
200
|
-
|
|
201
|
-
!this.#experimentNames.has(experimentName), 'Duplicate registration of experiment ' + experimentName);
|
|
192
|
+
Platform.DCHECK(
|
|
193
|
+
() => !this.#experimentNames.has(experimentName), 'Duplicate registration of experiment ' + experimentName);
|
|
202
194
|
this.#experimentNames.add(experimentName);
|
|
203
195
|
this.#experiments.push(new Experiment(this, experimentName, experimentTitle, Boolean(unstable), docLink ?? ''));
|
|
204
196
|
}
|
|
@@ -278,7 +270,7 @@ export class ExperimentsSupport {
|
|
|
278
270
|
}
|
|
279
271
|
|
|
280
272
|
private checkExperiment(experimentName: string): void {
|
|
281
|
-
|
|
273
|
+
Platform.DCHECK(() => this.#experimentNames.has(experimentName), 'Unknown experiment ' + experimentName);
|
|
282
274
|
}
|
|
283
275
|
}
|
|
284
276
|
|
|
@@ -73,7 +73,7 @@ export class CSSRule {
|
|
|
73
73
|
getStyleSheetHeader(styleSheetId: Protocol.CSS.StyleSheetId): CSSStyleSheetHeader {
|
|
74
74
|
const styleSheetHeader = this.cssModelInternal.styleSheetHeaderForId(styleSheetId);
|
|
75
75
|
console.assert(styleSheetHeader !== null);
|
|
76
|
-
return
|
|
76
|
+
return styleSheetHeader as CSSStyleSheetHeader;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -408,11 +408,7 @@ export class DOMNode {
|
|
|
408
408
|
return this.localName();
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
setNodeName(
|
|
412
|
-
name: string,
|
|
413
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
414
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
415
|
-
callback?: ((arg0: string|null, arg1: DOMNode|null) => any)): void {
|
|
411
|
+
setNodeName(name: string, callback?: ((arg0: string|null, arg1: DOMNode|null) => void)): void {
|
|
416
412
|
this.#agent.invoke_setNodeName({nodeId: this.id, name}).then(response => {
|
|
417
413
|
if (!response.getError()) {
|
|
418
414
|
this.#domModelInternal.markUndoableState();
|
|
@@ -435,9 +431,7 @@ export class DOMNode {
|
|
|
435
431
|
this.nodeValueInternal = nodeValue;
|
|
436
432
|
}
|
|
437
433
|
|
|
438
|
-
|
|
439
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
440
|
-
setNodeValue(value: string, callback?: ((arg0: string|null) => any)): void {
|
|
434
|
+
setNodeValue(value: string, callback?: ((arg0: string|null) => void)): void {
|
|
441
435
|
this.#agent.invoke_setNodeValue({nodeId: this.id, value}).then(response => {
|
|
442
436
|
if (!response.getError()) {
|
|
443
437
|
this.#domModelInternal.markUndoableState();
|
|
@@ -453,11 +447,7 @@ export class DOMNode {
|
|
|
453
447
|
return attr ? attr.value : undefined;
|
|
454
448
|
}
|
|
455
449
|
|
|
456
|
-
setAttribute(
|
|
457
|
-
name: string, text: string,
|
|
458
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
459
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
460
|
-
callback?: ((arg0: string|null) => any)): void {
|
|
450
|
+
setAttribute(name: string, text: string, callback?: ((arg0: string|null) => void)): void {
|
|
461
451
|
this.#agent.invoke_setAttributesAsText({nodeId: this.id, text, name}).then(response => {
|
|
462
452
|
if (!response.getError()) {
|
|
463
453
|
this.#domModelInternal.markUndoableState();
|
|
@@ -468,11 +458,7 @@ export class DOMNode {
|
|
|
468
458
|
});
|
|
469
459
|
}
|
|
470
460
|
|
|
471
|
-
setAttributeValue(
|
|
472
|
-
name: string, value: string,
|
|
473
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
474
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
475
|
-
callback?: ((arg0: string|null) => any)): void {
|
|
461
|
+
setAttributeValue(name: string, value: string, callback?: ((arg0: string|null) => void)): void {
|
|
476
462
|
this.#agent.invoke_setAttributeValue({nodeId: this.id, name, value}).then(response => {
|
|
477
463
|
if (!response.getError()) {
|
|
478
464
|
this.#domModelInternal.markUndoableState();
|
|
@@ -520,9 +506,7 @@ export class DOMNode {
|
|
|
520
506
|
return outerHTML;
|
|
521
507
|
}
|
|
522
508
|
|
|
523
|
-
|
|
524
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
525
|
-
setOuterHTML(html: string, callback?: ((arg0: string|null) => any)): void {
|
|
509
|
+
setOuterHTML(html: string, callback?: ((arg0: string|null) => void)): void {
|
|
526
510
|
this.#agent.invoke_setOuterHTML({nodeId: this.id, outerHTML: html}).then(response => {
|
|
527
511
|
if (!response.getError()) {
|
|
528
512
|
this.#domModelInternal.markUndoableState();
|
|
@@ -533,10 +517,7 @@ export class DOMNode {
|
|
|
533
517
|
});
|
|
534
518
|
}
|
|
535
519
|
|
|
536
|
-
removeNode(callback?: (
|
|
537
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
538
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
539
|
-
(arg0: string|null, arg1?: Protocol.DOM.NodeId|undefined) => any)): Promise<void> {
|
|
520
|
+
removeNode(callback?: ((arg0: string|null, arg1?: Protocol.DOM.NodeId|undefined) => void)): Promise<void> {
|
|
540
521
|
return this.#agent.invoke_removeNode({nodeId: this.id}).then(response => {
|
|
541
522
|
if (!response.getError()) {
|
|
542
523
|
this.#domModelInternal.markUndoableState();
|
|
@@ -738,11 +719,8 @@ export class DOMNode {
|
|
|
738
719
|
this.#attributesInternal.delete(name);
|
|
739
720
|
}
|
|
740
721
|
|
|
741
|
-
copyTo(
|
|
742
|
-
|
|
743
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
744
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
745
|
-
callback?: ((arg0: string|null, arg1: DOMNode|null) => any)): void {
|
|
722
|
+
copyTo(targetNode: DOMNode, anchorNode: DOMNode|null, callback?: ((arg0: string|null, arg1: DOMNode|null) => void)):
|
|
723
|
+
void {
|
|
746
724
|
this.#agent
|
|
747
725
|
.invoke_copyTo(
|
|
748
726
|
{nodeId: this.id, targetNodeId: targetNode.id, insertBeforeNodeId: anchorNode ? anchorNode.id : undefined})
|
|
@@ -756,11 +734,8 @@ export class DOMNode {
|
|
|
756
734
|
});
|
|
757
735
|
}
|
|
758
736
|
|
|
759
|
-
moveTo(
|
|
760
|
-
|
|
761
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
762
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
763
|
-
callback?: ((arg0: string|null, arg1: DOMNode|null) => any)): void {
|
|
737
|
+
moveTo(targetNode: DOMNode, anchorNode: DOMNode|null, callback?: ((arg0: string|null, arg1: DOMNode|null) => void)):
|
|
738
|
+
void {
|
|
764
739
|
this.#agent
|
|
765
740
|
.invoke_moveTo(
|
|
766
741
|
{nodeId: this.id, targetNodeId: targetNode.id, insertBeforeNodeId: anchorNode ? anchorNode.id : undefined})
|
|
@@ -1076,11 +1051,11 @@ export class DOMModel extends SDKModel<EventTypes> {
|
|
|
1076
1051
|
}
|
|
1077
1052
|
|
|
1078
1053
|
cssModel(): CSSModel {
|
|
1079
|
-
return
|
|
1054
|
+
return this.target().model(CSSModel) as CSSModel;
|
|
1080
1055
|
}
|
|
1081
1056
|
|
|
1082
1057
|
overlayModel(): OverlayModel {
|
|
1083
|
-
return
|
|
1058
|
+
return this.target().model(OverlayModel) as OverlayModel;
|
|
1084
1059
|
}
|
|
1085
1060
|
|
|
1086
1061
|
static cancelSearch(): void {
|
|
@@ -59,27 +59,13 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
|
|
|
59
59
|
#hideHighlightTimeout: number|null;
|
|
60
60
|
#defaultHighlighter: Highlighter;
|
|
61
61
|
#highlighter: Highlighter;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
#
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
#
|
|
68
|
-
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
-
#showAdHighlightsSetting: Common.Settings.Setting<any>;
|
|
71
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
-
#showDebugBordersSetting: Common.Settings.Setting<any>;
|
|
74
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
75
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
76
|
-
#showFPSCounterSetting: Common.Settings.Setting<any>;
|
|
77
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
|
-
#showScrollBottleneckRectsSetting: Common.Settings.Setting<any>;
|
|
80
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
81
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
|
-
#showWebVitalsSetting: Common.Settings.Setting<any>;
|
|
62
|
+
#showPaintRectsSetting: Common.Settings.Setting<boolean>;
|
|
63
|
+
#showLayoutShiftRegionsSetting: Common.Settings.Setting<boolean>;
|
|
64
|
+
#showAdHighlightsSetting: Common.Settings.Setting<boolean>;
|
|
65
|
+
#showDebugBordersSetting: Common.Settings.Setting<boolean>;
|
|
66
|
+
#showFPSCounterSetting: Common.Settings.Setting<boolean>;
|
|
67
|
+
#showScrollBottleneckRectsSetting: Common.Settings.Setting<boolean>;
|
|
68
|
+
#showWebVitalsSetting: Common.Settings.Setting<boolean>;
|
|
83
69
|
#registeredListeners: Common.EventTarget.EventDescriptor[];
|
|
84
70
|
#showViewportSizeOnResize: boolean;
|
|
85
71
|
#persistentHighlighter: OverlayPersistentHighlighter|null;
|
|
@@ -113,14 +99,15 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
|
|
|
113
99
|
this.#defaultHighlighter = new DefaultHighlighter(this);
|
|
114
100
|
this.#highlighter = this.#defaultHighlighter;
|
|
115
101
|
|
|
116
|
-
this.#showPaintRectsSetting = Common.Settings.Settings.instance().moduleSetting('showPaintRects');
|
|
117
|
-
this.#showLayoutShiftRegionsSetting =
|
|
118
|
-
|
|
119
|
-
this.#
|
|
120
|
-
this.#
|
|
102
|
+
this.#showPaintRectsSetting = Common.Settings.Settings.instance().moduleSetting<boolean>('showPaintRects');
|
|
103
|
+
this.#showLayoutShiftRegionsSetting =
|
|
104
|
+
Common.Settings.Settings.instance().moduleSetting<boolean>('showLayoutShiftRegions');
|
|
105
|
+
this.#showAdHighlightsSetting = Common.Settings.Settings.instance().moduleSetting<boolean>('showAdHighlights');
|
|
106
|
+
this.#showDebugBordersSetting = Common.Settings.Settings.instance().moduleSetting<boolean>('showDebugBorders');
|
|
107
|
+
this.#showFPSCounterSetting = Common.Settings.Settings.instance().moduleSetting<boolean>('showFPSCounter');
|
|
121
108
|
this.#showScrollBottleneckRectsSetting =
|
|
122
|
-
Common.Settings.Settings.instance().moduleSetting('showScrollBottleneckRects');
|
|
123
|
-
this.#showWebVitalsSetting = Common.Settings.Settings.instance().moduleSetting('showWebVitals');
|
|
109
|
+
Common.Settings.Settings.instance().moduleSetting<boolean>('showScrollBottleneckRects');
|
|
110
|
+
this.#showWebVitalsSetting = Common.Settings.Settings.instance().moduleSetting<boolean>('showWebVitals');
|
|
124
111
|
|
|
125
112
|
this.#registeredListeners = [];
|
|
126
113
|
this.#showViewportSizeOnResize = true;
|
|
@@ -178,18 +165,15 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
|
|
|
178
165
|
return this.#domModel;
|
|
179
166
|
}
|
|
180
167
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
highlightRect({x, y, width, height, color, outlineColor}: HighlightRect): Promise<any> {
|
|
168
|
+
highlightRect({x, y, width, height, color, outlineColor}: HighlightRect):
|
|
169
|
+
Promise<Protocol.ProtocolResponseWithError> {
|
|
184
170
|
const highlightColor = color || {r: 255, g: 0, b: 255, a: 0.3};
|
|
185
171
|
const highlightOutlineColor = outlineColor || {r: 255, g: 0, b: 255, a: 0.5};
|
|
186
172
|
return this.overlayAgent.invoke_highlightRect(
|
|
187
173
|
{x, y, width, height, color: highlightColor, outlineColor: highlightOutlineColor});
|
|
188
174
|
}
|
|
189
175
|
|
|
190
|
-
|
|
191
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
192
|
-
clearHighlight(): Promise<any> {
|
|
176
|
+
clearHighlight(): Promise<Protocol.ProtocolResponseWithError> {
|
|
193
177
|
return this.overlayAgent.invoke_hideHighlight();
|
|
194
178
|
}
|
|
195
179
|
|
|
@@ -360,15 +360,9 @@ export class OverlayPersistentHighlighter {
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
/**
|
|
364
|
-
* @interface
|
|
365
|
-
*/
|
|
366
363
|
export interface DOMModel {
|
|
367
364
|
nodeForId(nodeId: Protocol.DOM.NodeId): void;
|
|
368
365
|
}
|
|
369
|
-
/**
|
|
370
|
-
* @interface
|
|
371
|
-
*/
|
|
372
366
|
export interface OverlayAgent {
|
|
373
367
|
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
374
368
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -415,16 +409,10 @@ export interface OverlayAgent {
|
|
|
415
409
|
}): void;
|
|
416
410
|
}
|
|
417
411
|
|
|
418
|
-
/**
|
|
419
|
-
* @interface
|
|
420
|
-
*/
|
|
421
412
|
export interface Target {
|
|
422
413
|
overlayAgent(): OverlayAgent;
|
|
423
414
|
}
|
|
424
415
|
|
|
425
|
-
/**
|
|
426
|
-
* @interface
|
|
427
|
-
*/
|
|
428
416
|
export interface OverlayModel {
|
|
429
417
|
getDOMModel(): DOMModel;
|
|
430
418
|
|
|
@@ -219,7 +219,8 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
|
|
|
219
219
|
return this.#loadOverride(url);
|
|
220
220
|
}
|
|
221
221
|
const parsedURL = new Common.ParsedURL.ParsedURL(url);
|
|
222
|
-
const eligibleForLoadFromTarget =
|
|
222
|
+
const eligibleForLoadFromTarget =
|
|
223
|
+
getLoadThroughTargetSetting().get() && parsedURL && parsedURL.scheme !== 'file' && parsedURL.scheme !== 'data';
|
|
223
224
|
Host.userMetrics.developerResourceScheme(this.getDeveloperResourceScheme(parsedURL));
|
|
224
225
|
if (eligibleForLoadFromTarget) {
|
|
225
226
|
try {
|
|
@@ -644,7 +644,6 @@ export class ExecutionContext {
|
|
|
644
644
|
return this.evaluateGlobal(options, userGesture, awaitPromise);
|
|
645
645
|
}
|
|
646
646
|
|
|
647
|
-
/** @type {!EvaluationResult} */
|
|
648
647
|
if (this.runtimeModel.hasSideEffectSupport() !== false) {
|
|
649
648
|
await this.runtimeModel.checkSideEffectSupport();
|
|
650
649
|
if (this.runtimeModel.hasSideEffectSupport()) {
|
|
@@ -303,7 +303,7 @@ export class TextSourceMap implements SourceMap {
|
|
|
303
303
|
this.eachSection(this.parseMap.bind(this));
|
|
304
304
|
this.#json = null;
|
|
305
305
|
}
|
|
306
|
-
return
|
|
306
|
+
return this.#mappingsInternal;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
private reversedMappings(sourceURL: string): number[] {
|
|
@@ -34,28 +34,28 @@ export type TokenOrComment = Acorn.Token|Acorn.Comment;
|
|
|
34
34
|
* out whether the next token should be the preceding comment or not.
|
|
35
35
|
*/
|
|
36
36
|
export class AcornTokenizer {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
readonly #content: string;
|
|
38
|
+
readonly #comments: Acorn.Comment[];
|
|
39
|
+
#tokenizer: {
|
|
40
40
|
getToken(): Acorn.Token,
|
|
41
41
|
[Symbol.iterator](): Iterator<Acorn.Token>,
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
#textCursor: TextUtils.TextCursor.TextCursor;
|
|
44
|
+
#tokenLineStartInternal: number;
|
|
45
|
+
#tokenLineEndInternal: number;
|
|
46
|
+
#tokenColumnStartInternal: number;
|
|
47
|
+
#bufferedToken?: TokenOrComment;
|
|
48
48
|
|
|
49
49
|
constructor(content: string) {
|
|
50
|
-
this
|
|
51
|
-
this
|
|
52
|
-
this
|
|
53
|
-
Acorn.tokenizer(this
|
|
54
|
-
const contentLineEndings = Platform.StringUtilities.findLineEndingIndexes(this
|
|
55
|
-
this
|
|
56
|
-
this
|
|
57
|
-
this
|
|
58
|
-
this
|
|
50
|
+
this.#content = content;
|
|
51
|
+
this.#comments = [];
|
|
52
|
+
this.#tokenizer =
|
|
53
|
+
Acorn.tokenizer(this.#content, {onComment: this.#comments, ecmaVersion: ECMA_VERSION, allowHashBang: true});
|
|
54
|
+
const contentLineEndings = Platform.StringUtilities.findLineEndingIndexes(this.#content);
|
|
55
|
+
this.#textCursor = new TextUtils.TextCursor.TextCursor(contentLineEndings);
|
|
56
|
+
this.#tokenLineStartInternal = 0;
|
|
57
|
+
this.#tokenLineEndInternal = 0;
|
|
58
|
+
this.#tokenColumnStartInternal = 0;
|
|
59
59
|
// If the first "token" should be a comment, we don't want to shift
|
|
60
60
|
// the comment from the array (which happens in `nextTokenInternal`).
|
|
61
61
|
// Therefore, we should bail out from retrieving the token if this
|
|
@@ -65,8 +65,8 @@ export class AcornTokenizer {
|
|
|
65
65
|
// themselves. In that case, we first retrieve the actual token, before
|
|
66
66
|
// we see the comment itself. In that case, we should proceed and
|
|
67
67
|
// initialize `bufferedToken` as normal, to allow us to fix the reordering.
|
|
68
|
-
if (this
|
|
69
|
-
this
|
|
68
|
+
if (this.#comments.length === 0) {
|
|
69
|
+
this.#nextTokenInternal();
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -94,59 +94,59 @@ export class AcornTokenizer {
|
|
|
94
94
|
return token.type === 'Block';
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
if (this
|
|
99
|
-
const nextComment = this
|
|
97
|
+
#nextTokenInternal(): TokenOrComment|undefined {
|
|
98
|
+
if (this.#comments.length) {
|
|
99
|
+
const nextComment = this.#comments.shift();
|
|
100
100
|
// If this was the last comment to process, we need to make
|
|
101
101
|
// sure to update our `bufferedToken` to become the actual
|
|
102
102
|
// token. This only happens when we are processing the very
|
|
103
103
|
// first comment of a file (usually a hashbang comment)
|
|
104
104
|
// in which case we don't have to fix the reordering of tokens.
|
|
105
|
-
if (!this
|
|
106
|
-
this
|
|
105
|
+
if (!this.#bufferedToken && this.#comments.length === 0) {
|
|
106
|
+
this.#bufferedToken = this.#tokenizer.getToken();
|
|
107
107
|
}
|
|
108
108
|
return nextComment;
|
|
109
109
|
}
|
|
110
|
-
const token = this
|
|
111
|
-
this
|
|
110
|
+
const token = this.#bufferedToken;
|
|
111
|
+
this.#bufferedToken = this.#tokenizer.getToken();
|
|
112
112
|
return token;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
nextToken(): TokenOrComment|null {
|
|
116
|
-
const token = this
|
|
116
|
+
const token = this.#nextTokenInternal();
|
|
117
117
|
if (!token || token.type === Acorn.tokTypes.eof) {
|
|
118
118
|
return null;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
this
|
|
122
|
-
this
|
|
123
|
-
this
|
|
121
|
+
this.#textCursor.advance(token.start);
|
|
122
|
+
this.#tokenLineStartInternal = this.#textCursor.lineNumber();
|
|
123
|
+
this.#tokenColumnStartInternal = this.#textCursor.columnNumber();
|
|
124
124
|
|
|
125
|
-
this
|
|
126
|
-
this
|
|
125
|
+
this.#textCursor.advance(token.end);
|
|
126
|
+
this.#tokenLineEndInternal = this.#textCursor.lineNumber();
|
|
127
127
|
return token;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
peekToken(): TokenOrComment|null {
|
|
131
|
-
if (this
|
|
132
|
-
return this
|
|
131
|
+
if (this.#comments.length) {
|
|
132
|
+
return this.#comments[0];
|
|
133
133
|
}
|
|
134
|
-
if (!this
|
|
134
|
+
if (!this.#bufferedToken) {
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
return this
|
|
137
|
+
return this.#bufferedToken.type !== Acorn.tokTypes.eof ? this.#bufferedToken : null;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
tokenLineStart(): number {
|
|
141
|
-
return this
|
|
141
|
+
return this.#tokenLineStartInternal;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
tokenLineEnd(): number {
|
|
145
|
-
return this
|
|
145
|
+
return this.#tokenLineEndInternal;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
tokenColumnStart(): number {
|
|
149
|
-
return this
|
|
149
|
+
return this.#tokenColumnStartInternal;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -40,21 +40,21 @@ const cssTrimEnd = (tokenValue: string): string => {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export class CSSFormatter {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
readonly #builder: FormattedContentBuilder;
|
|
44
|
+
#toOffset!: number;
|
|
45
|
+
#fromOffset!: number;
|
|
46
|
+
#lineEndings!: number[];
|
|
47
|
+
#lastLine: number;
|
|
48
|
+
#state: {
|
|
49
49
|
eatWhitespace: (boolean|undefined),
|
|
50
50
|
seenProperty: (boolean|undefined),
|
|
51
51
|
inPropertyValue: (boolean|undefined),
|
|
52
52
|
afterClosingBrace: (boolean|undefined),
|
|
53
53
|
};
|
|
54
54
|
constructor(builder: FormattedContentBuilder) {
|
|
55
|
-
this
|
|
56
|
-
this
|
|
57
|
-
this
|
|
55
|
+
this.#builder = builder;
|
|
56
|
+
this.#lastLine = -1;
|
|
57
|
+
this.#state = {
|
|
58
58
|
eatWhitespace: undefined,
|
|
59
59
|
seenProperty: undefined,
|
|
60
60
|
inPropertyValue: undefined,
|
|
@@ -63,84 +63,84 @@ export class CSSFormatter {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
format(text: string, lineEndings: number[], fromOffset: number, toOffset: number): void {
|
|
66
|
-
this
|
|
67
|
-
this
|
|
68
|
-
this
|
|
69
|
-
this
|
|
66
|
+
this.#lineEndings = lineEndings;
|
|
67
|
+
this.#fromOffset = fromOffset;
|
|
68
|
+
this.#toOffset = toOffset;
|
|
69
|
+
this.#state = {
|
|
70
70
|
eatWhitespace: undefined,
|
|
71
71
|
seenProperty: undefined,
|
|
72
72
|
inPropertyValue: undefined,
|
|
73
73
|
afterClosingBrace: undefined,
|
|
74
74
|
};
|
|
75
|
-
this
|
|
75
|
+
this.#lastLine = -1;
|
|
76
76
|
const tokenize = createTokenizer('text/css');
|
|
77
|
-
const oldEnforce = this
|
|
78
|
-
tokenize(text.substring(this
|
|
79
|
-
this
|
|
77
|
+
const oldEnforce = this.#builder.setEnforceSpaceBetweenWords(false);
|
|
78
|
+
tokenize(text.substring(this.#fromOffset, this.#toOffset), this.#tokenCallback.bind(this));
|
|
79
|
+
this.#builder.setEnforceSpaceBetweenWords(oldEnforce);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
startPosition += this
|
|
84
|
-
const startLine =
|
|
85
|
-
|
|
86
|
-
if (startLine !== this
|
|
87
|
-
this
|
|
82
|
+
#tokenCallback(token: string, type: string|null, startPosition: number): void {
|
|
83
|
+
startPosition += this.#fromOffset;
|
|
84
|
+
const startLine = Platform.ArrayUtilities.lowerBound(
|
|
85
|
+
this.#lineEndings, startPosition, Platform.ArrayUtilities.DEFAULT_COMPARATOR);
|
|
86
|
+
if (startLine !== this.#lastLine) {
|
|
87
|
+
this.#state.eatWhitespace = true;
|
|
88
88
|
}
|
|
89
|
-
if (type && (/^property/.test(type) || /^variable-2/.test(type)) && !this
|
|
90
|
-
this
|
|
89
|
+
if (type && (/^property/.test(type) || /^variable-2/.test(type)) && !this.#state.inPropertyValue) {
|
|
90
|
+
this.#state.seenProperty = true;
|
|
91
91
|
}
|
|
92
|
-
this
|
|
92
|
+
this.#lastLine = startLine;
|
|
93
93
|
// https://drafts.csswg.org/css-syntax/#whitespace
|
|
94
94
|
const isWhitespace = /^(?:\r?\n|[\t\f\r ])+$/.test(token);
|
|
95
95
|
if (isWhitespace) {
|
|
96
|
-
if (!this
|
|
97
|
-
this
|
|
96
|
+
if (!this.#state.eatWhitespace) {
|
|
97
|
+
this.#builder.addSoftSpace();
|
|
98
98
|
}
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
this
|
|
101
|
+
this.#state.eatWhitespace = false;
|
|
102
102
|
if (token === '\n') {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
if (token !== '}') {
|
|
107
|
-
if (this
|
|
108
|
-
this
|
|
107
|
+
if (this.#state.afterClosingBrace) {
|
|
108
|
+
this.#builder.addNewLine(true);
|
|
109
109
|
}
|
|
110
|
-
this
|
|
110
|
+
this.#state.afterClosingBrace = false;
|
|
111
111
|
}
|
|
112
112
|
if (token === '}') {
|
|
113
|
-
if (this
|
|
114
|
-
this
|
|
113
|
+
if (this.#state.inPropertyValue) {
|
|
114
|
+
this.#builder.addNewLine();
|
|
115
115
|
}
|
|
116
|
-
this
|
|
117
|
-
this
|
|
118
|
-
this
|
|
119
|
-
} else if (token === ':' && !this
|
|
120
|
-
this
|
|
121
|
-
this
|
|
122
|
-
this
|
|
123
|
-
this
|
|
124
|
-
this
|
|
116
|
+
this.#builder.decreaseNestingLevel();
|
|
117
|
+
this.#state.afterClosingBrace = true;
|
|
118
|
+
this.#state.inPropertyValue = false;
|
|
119
|
+
} else if (token === ':' && !this.#state.inPropertyValue && this.#state.seenProperty) {
|
|
120
|
+
this.#builder.addToken(token, startPosition);
|
|
121
|
+
this.#builder.addSoftSpace();
|
|
122
|
+
this.#state.eatWhitespace = true;
|
|
123
|
+
this.#state.inPropertyValue = true;
|
|
124
|
+
this.#state.seenProperty = false;
|
|
125
125
|
return;
|
|
126
126
|
} else if (token === '{') {
|
|
127
|
-
this
|
|
128
|
-
this
|
|
129
|
-
this
|
|
130
|
-
this
|
|
127
|
+
this.#builder.addSoftSpace();
|
|
128
|
+
this.#builder.addToken(token, startPosition);
|
|
129
|
+
this.#builder.addNewLine();
|
|
130
|
+
this.#builder.increaseNestingLevel();
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
this
|
|
134
|
+
this.#builder.addToken(cssTrimEnd(token), startPosition);
|
|
135
135
|
|
|
136
|
-
if (type === 'comment' && !this
|
|
137
|
-
this
|
|
136
|
+
if (type === 'comment' && !this.#state.inPropertyValue && !this.#state.seenProperty) {
|
|
137
|
+
this.#builder.addNewLine();
|
|
138
138
|
}
|
|
139
|
-
if (token === ';' && this
|
|
140
|
-
this
|
|
141
|
-
this
|
|
139
|
+
if (token === ';' && this.#state.inPropertyValue) {
|
|
140
|
+
this.#state.inPropertyValue = false;
|
|
141
|
+
this.#builder.addNewLine();
|
|
142
142
|
} else if (token === '}') {
|
|
143
|
-
this
|
|
143
|
+
this.#builder.addNewLine();
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
}
|