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
|
@@ -525,7 +525,7 @@ export class TimelineTreeView extends UI.Widget.VBox implements UI.SearchableVie
|
|
|
525
525
|
return;
|
|
526
526
|
}
|
|
527
527
|
const searchRegex = searchConfig.toSearchRegex();
|
|
528
|
-
this.searchResults = this.root.searchTree(event => TimelineUIUtils.testContentMatching(event, searchRegex));
|
|
528
|
+
this.searchResults = this.root.searchTree(event => TimelineUIUtils.testContentMatching(event, searchRegex.regex));
|
|
529
529
|
this.searchableView.updateSearchMatchesCount(this.searchResults.length);
|
|
530
530
|
}
|
|
531
531
|
|
|
@@ -1521,7 +1521,7 @@ export class TimelineUIUtils {
|
|
|
1521
1521
|
if (!color) {
|
|
1522
1522
|
throw new Error('Unable to parse color from TimelineUIUtils.categories().scripting.color');
|
|
1523
1523
|
}
|
|
1524
|
-
return
|
|
1524
|
+
return color.setAlpha(0.3).asString(null) as string;
|
|
1525
1525
|
}
|
|
1526
1526
|
|
|
1527
1527
|
return color;
|
|
@@ -66,40 +66,40 @@ abstract class WebVitalsLane {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export class WebVitalsEventLane extends WebVitalsLane {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
#markers: readonly Marker[] = [];
|
|
70
|
+
#selectedMarker: Marker|null = null;
|
|
71
|
+
#hoverMarker: Marker|null = null;
|
|
72
|
+
#labelMetrics: TextMetrics;
|
|
73
|
+
#label: string;
|
|
74
|
+
#getMarkerType: GetMarkerTypeCallback;
|
|
75
|
+
#getMarkerOverlay?: GetMarkerOverlayCallback;
|
|
76
76
|
|
|
77
77
|
constructor(
|
|
78
78
|
timeline: WebVitalsTimeline, label: string, getMarkerType: GetMarkerTypeCallback,
|
|
79
79
|
getMarkerOverlay?: GetMarkerOverlayCallback) {
|
|
80
80
|
super(timeline);
|
|
81
81
|
this.context = timeline.getContext();
|
|
82
|
-
this
|
|
83
|
-
this
|
|
84
|
-
this
|
|
85
|
-
this
|
|
82
|
+
this.#label = label;
|
|
83
|
+
this.#getMarkerType = getMarkerType;
|
|
84
|
+
this.#getMarkerOverlay = getMarkerOverlay;
|
|
85
|
+
this.#labelMetrics = this.#measureLabel(this.#label);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
handlePointerMove(x: number|null): void {
|
|
89
|
-
const prevHoverMarker = this
|
|
89
|
+
const prevHoverMarker = this.#hoverMarker;
|
|
90
90
|
if (x === null) {
|
|
91
|
-
this
|
|
91
|
+
this.#hoverMarker = null;
|
|
92
92
|
} else {
|
|
93
|
-
this
|
|
93
|
+
this.#hoverMarker = this.#markers.find(m => {
|
|
94
94
|
const tX = this.tX(m.timestamp);
|
|
95
95
|
return tX - 5 <= x && x <= tX + m.widthIncludingLabel;
|
|
96
96
|
}) ||
|
|
97
97
|
null;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
if (prevHoverMarker !== this
|
|
101
|
-
if (this
|
|
102
|
-
this.timeline.showOverlay(this
|
|
100
|
+
if (prevHoverMarker !== this.#hoverMarker) {
|
|
101
|
+
if (this.#hoverMarker && this.#getMarkerOverlay) {
|
|
102
|
+
this.timeline.showOverlay(this.#getMarkerOverlay(this.#hoverMarker));
|
|
103
103
|
} else {
|
|
104
104
|
this.timeline.hideOverlay();
|
|
105
105
|
}
|
|
@@ -107,16 +107,16 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
handleClick(_: number|null): void {
|
|
110
|
-
this
|
|
110
|
+
this.#selectedMarker = this.#hoverMarker;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
setEvents(markers: readonly Event[]): void {
|
|
114
|
-
this
|
|
115
|
-
this
|
|
116
|
-
this
|
|
114
|
+
this.#hoverMarker = null;
|
|
115
|
+
this.#selectedMarker = null;
|
|
116
|
+
this.#markers = markers.map(e => this.#getMarker(e));
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
#measureLabel(label: string): TextMetrics {
|
|
120
120
|
this.context.save();
|
|
121
121
|
this.context.font = '11px ' + Host.Platform.fontFamily();
|
|
122
122
|
const textMetrics = this.context.measureText(label);
|
|
@@ -124,7 +124,7 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
124
124
|
return textMetrics;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
#measureTimestamp(timestamp: string): TextMetrics {
|
|
128
128
|
this.context.save();
|
|
129
129
|
this.context.font = '11px ' + Host.Platform.fontFamily();
|
|
130
130
|
const textMetrics = this.context.measureText(timestamp);
|
|
@@ -132,12 +132,12 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
132
132
|
return textMetrics;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
const markerType = this
|
|
135
|
+
#getMarker(event: Event): Marker {
|
|
136
|
+
const markerType = this.#getMarkerType(event);
|
|
137
137
|
const timestamp = this.timeline.getTimeSinceLastMainFrameNavigation(event.timestamp);
|
|
138
138
|
const timestampLabel = i18n.TimeUtilities.preciseMillisToString(timestamp, 1);
|
|
139
|
-
const timestampMetrics = this
|
|
140
|
-
const widthIncludingLabel = 10 + 5 + this
|
|
139
|
+
const timestampMetrics = this.#measureTimestamp(timestampLabel);
|
|
140
|
+
const widthIncludingLabel = 10 + 5 + this.#labelMetrics.width + 5;
|
|
141
141
|
const widthIncludingTimestamp = widthIncludingLabel + 5 + timestampMetrics.width;
|
|
142
142
|
|
|
143
143
|
return {
|
|
@@ -150,7 +150,7 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
#renderLabel(position: number, label: string, textMetrics: TextMetrics): void {
|
|
154
154
|
this.context.save();
|
|
155
155
|
this.context.font = '11px ' + Host.Platform.fontFamily();
|
|
156
156
|
const height = textMetrics.actualBoundingBoxAscent - textMetrics.actualBoundingBoxDescent;
|
|
@@ -161,7 +161,7 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
161
161
|
this.context.restore();
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
#renderTimestamp(position: number, textWidth: number, timestamp: string, textMetrics: TextMetrics): void {
|
|
165
165
|
this.context.save();
|
|
166
166
|
this.context.font = '11px ' + Host.Platform.fontFamily();
|
|
167
167
|
const height = textMetrics.actualBoundingBoxAscent - textMetrics.actualBoundingBoxDescent;
|
|
@@ -172,7 +172,7 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
172
172
|
this.context.restore();
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
#renderGoodMarkerSymbol(timestamp: number): void {
|
|
176
176
|
const radius = 5;
|
|
177
177
|
|
|
178
178
|
this.context.save();
|
|
@@ -191,7 +191,7 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
191
191
|
this.context.restore();
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
#renderMediumMarkerSymbol(timestamp: number): void {
|
|
195
195
|
this.context.save();
|
|
196
196
|
this.context.beginPath();
|
|
197
197
|
this.context.strokeStyle = this.theme.medium;
|
|
@@ -208,7 +208,7 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
208
208
|
this.context.restore();
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
#renderBadMarkerSymbol(timestamp: number): void {
|
|
212
212
|
this.context.save();
|
|
213
213
|
this.context.beginPath();
|
|
214
214
|
this.context.strokeStyle = this.theme.bad;
|
|
@@ -229,9 +229,9 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
229
229
|
this.context.restore();
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
#renderMarker(marker: Marker, selected: boolean, hover: boolean, nextMarker: Marker|null): void {
|
|
233
233
|
const timestampLabel = marker.timestampLabel;
|
|
234
|
-
const labelMetrics = this
|
|
234
|
+
const labelMetrics = this.#labelMetrics;
|
|
235
235
|
const timestampMetrics = marker.timestampMetrics;
|
|
236
236
|
|
|
237
237
|
const showFrame = selected;
|
|
@@ -264,54 +264,55 @@ export class WebVitalsEventLane extends WebVitalsLane {
|
|
|
264
264
|
|
|
265
265
|
if (showLabel) {
|
|
266
266
|
if (labelMetrics) {
|
|
267
|
-
this
|
|
267
|
+
this.#renderLabel(marker.timestamp, this.#label, labelMetrics);
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
if (showDetails) {
|
|
271
|
-
this
|
|
271
|
+
this.#renderTimestamp(
|
|
272
|
+
marker.timestamp, labelMetrics ? labelMetrics.width : 0, timestampLabel, timestampMetrics);
|
|
272
273
|
}
|
|
273
274
|
}
|
|
274
275
|
|
|
275
276
|
if (marker.type === MarkerType.Good) {
|
|
276
|
-
this
|
|
277
|
+
this.#renderGoodMarkerSymbol(marker.timestamp);
|
|
277
278
|
} else if (marker.type === MarkerType.Medium) {
|
|
278
|
-
this
|
|
279
|
+
this.#renderMediumMarkerSymbol(marker.timestamp);
|
|
279
280
|
} else {
|
|
280
|
-
this
|
|
281
|
+
this.#renderBadMarkerSymbol(marker.timestamp);
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
284
|
|
|
284
285
|
render(): void {
|
|
285
|
-
for (let i = 0; i < this
|
|
286
|
-
const event = this
|
|
287
|
-
if (event === this
|
|
286
|
+
for (let i = 0; i < this.#markers.length; i++) {
|
|
287
|
+
const event = this.#markers[i];
|
|
288
|
+
if (event === this.#selectedMarker || event === this.#hoverMarker) {
|
|
288
289
|
continue;
|
|
289
290
|
}
|
|
290
|
-
this
|
|
291
|
+
this.#renderMarker(event, false, false, i < this.#markers.length - 1 ? this.#markers[i + 1] : null);
|
|
291
292
|
}
|
|
292
293
|
|
|
293
|
-
if (this
|
|
294
|
-
this
|
|
294
|
+
if (this.#hoverMarker && this.#hoverMarker !== this.#selectedMarker) {
|
|
295
|
+
this.#renderMarker(this.#hoverMarker, false, true, null);
|
|
295
296
|
}
|
|
296
297
|
|
|
297
|
-
if (this
|
|
298
|
-
this
|
|
298
|
+
if (this.#selectedMarker) {
|
|
299
|
+
this.#renderMarker(this.#selectedMarker, true, false, null);
|
|
299
300
|
}
|
|
300
301
|
}
|
|
301
302
|
}
|
|
302
303
|
|
|
303
304
|
export class WebVitalsTimeboxLane extends WebVitalsLane {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
#longTaskPattern: CanvasPattern;
|
|
306
|
+
#boxes: readonly Timebox[] = [];
|
|
307
|
+
#label: string;
|
|
308
|
+
#hoverBox: number = -1;
|
|
309
|
+
#selectedBox: number = -1;
|
|
310
|
+
#getTimeboxOverlay?: GetTimeboxOverlayCallback;
|
|
310
311
|
|
|
311
312
|
constructor(timeline: WebVitalsTimeline, label: string, getTimeboxOverlay?: GetTimeboxOverlayCallback) {
|
|
312
313
|
super(timeline);
|
|
313
314
|
|
|
314
|
-
this
|
|
315
|
+
this.#label = label;
|
|
315
316
|
const patternCanvas = document.createElement('canvas');
|
|
316
317
|
const patternContext = patternCanvas.getContext('2d');
|
|
317
318
|
|
|
@@ -332,25 +333,25 @@ export class WebVitalsTimeboxLane extends WebVitalsLane {
|
|
|
332
333
|
}
|
|
333
334
|
const canvasPattern = this.context.createPattern(patternCanvas, 'repeat');
|
|
334
335
|
assertInstanceOf(canvasPattern, CanvasPattern);
|
|
335
|
-
this
|
|
336
|
-
this
|
|
336
|
+
this.#longTaskPattern = canvasPattern;
|
|
337
|
+
this.#getTimeboxOverlay = getTimeboxOverlay;
|
|
337
338
|
}
|
|
338
339
|
|
|
339
340
|
handlePointerMove(x: number|null): void {
|
|
340
|
-
const prevHoverBox = this
|
|
341
|
+
const prevHoverBox = this.#hoverBox;
|
|
341
342
|
if (x === null) {
|
|
342
|
-
this
|
|
343
|
+
this.#hoverBox = -1;
|
|
343
344
|
} else {
|
|
344
|
-
this
|
|
345
|
+
this.#hoverBox = this.#boxes.findIndex((box): boolean => {
|
|
345
346
|
const start = this.tX(box.start);
|
|
346
347
|
const end = this.tX(box.start + box.duration);
|
|
347
348
|
return start <= x && x <= end;
|
|
348
349
|
});
|
|
349
350
|
}
|
|
350
351
|
|
|
351
|
-
if (prevHoverBox !== this
|
|
352
|
-
if (this
|
|
353
|
-
this.timeline.showOverlay(this
|
|
352
|
+
if (prevHoverBox !== this.#hoverBox) {
|
|
353
|
+
if (this.#hoverBox !== -1 && this.#getTimeboxOverlay) {
|
|
354
|
+
this.timeline.showOverlay(this.#getTimeboxOverlay(this.#boxes[this.#hoverBox]));
|
|
354
355
|
} else {
|
|
355
356
|
this.timeline.hideOverlay();
|
|
356
357
|
}
|
|
@@ -358,16 +359,16 @@ export class WebVitalsTimeboxLane extends WebVitalsLane {
|
|
|
358
359
|
}
|
|
359
360
|
|
|
360
361
|
handleClick(_: number|null): void {
|
|
361
|
-
this
|
|
362
|
+
this.#selectedBox = this.#hoverBox;
|
|
362
363
|
}
|
|
363
364
|
|
|
364
365
|
setTimeboxes(boxes: readonly Timebox[]): void {
|
|
365
|
-
this
|
|
366
|
-
this
|
|
367
|
-
this
|
|
366
|
+
this.#selectedBox = -1;
|
|
367
|
+
this.#hoverBox = -1;
|
|
368
|
+
this.#boxes = boxes;
|
|
368
369
|
}
|
|
369
370
|
|
|
370
|
-
|
|
371
|
+
#renderTimebox(box: Timebox, hover: boolean): void {
|
|
371
372
|
const r = 2;
|
|
372
373
|
|
|
373
374
|
this.context.save();
|
|
@@ -408,7 +409,7 @@ export class WebVitalsTimeboxLane extends WebVitalsLane {
|
|
|
408
409
|
|
|
409
410
|
// Fill the box with a striped pattern for everything over 50ms.
|
|
410
411
|
this.context.beginPath();
|
|
411
|
-
this.context.fillStyle = this
|
|
412
|
+
this.context.fillStyle = this.#longTaskPattern;
|
|
412
413
|
this.context.moveTo(this.tX(box.start + LONG_TASK_THRESHOLD) + r, 2);
|
|
413
414
|
this.context.lineTo(this.tX(box.start + box.duration) - r, 2);
|
|
414
415
|
this.context.quadraticCurveTo(
|
|
@@ -442,21 +443,21 @@ export class WebVitalsTimeboxLane extends WebVitalsLane {
|
|
|
442
443
|
}
|
|
443
444
|
|
|
444
445
|
render(): void {
|
|
445
|
-
for (let i = 0; i < this
|
|
446
|
-
if (i === this
|
|
446
|
+
for (let i = 0; i < this.#boxes.length; i++) {
|
|
447
|
+
if (i === this.#hoverBox || i === this.#selectedBox) {
|
|
447
448
|
continue;
|
|
448
449
|
}
|
|
449
|
-
this
|
|
450
|
+
this.#renderTimebox(this.#boxes[i], false);
|
|
450
451
|
}
|
|
451
452
|
|
|
452
|
-
if (this
|
|
453
|
-
this
|
|
453
|
+
if (this.#hoverBox !== -1) {
|
|
454
|
+
this.#renderTimebox(this.#boxes[this.#hoverBox], true);
|
|
454
455
|
}
|
|
455
456
|
|
|
456
|
-
if (this
|
|
457
|
-
this
|
|
457
|
+
if (this.#selectedBox !== -1) {
|
|
458
|
+
this.#renderTimebox(this.#boxes[this.#selectedBox], true);
|
|
458
459
|
}
|
|
459
460
|
|
|
460
|
-
this.renderLaneLabel(this
|
|
461
|
+
this.renderLaneLabel(this.#label);
|
|
461
462
|
}
|
|
462
463
|
}
|