chrome-devtools-frontend 1.0.1526630 → 1.0.1529186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/ui_engineering.md +159 -0
- package/eslint.config.mjs +6 -1
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/i18nImpl.ts +6 -1
- package/front_end/core/protocol_client/protocol_client.ts +1 -1
- package/front_end/core/root/Runtime.ts +38 -4
- package/front_end/core/sdk/CSSMatchedStyles.ts +50 -7
- package/front_end/core/sdk/CSSRule.ts +35 -6
- package/front_end/core/sdk/Connections.ts +2 -1
- package/front_end/core/sdk/DOMModel.ts +4 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -1
- package/front_end/core/sdk/NetworkManager.ts +267 -34
- package/front_end/core/sdk/PreloadingModel.ts +82 -17
- package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1 -1
- package/front_end/core/sdk/RehydratingConnection.ts +29 -4
- package/front_end/core/sdk/ScopeTreeCache.ts +8 -3
- package/front_end/core/sdk/SourceMap.ts +41 -11
- package/front_end/core/sdk/SourceMapManager.ts +13 -2
- package/front_end/core/sdk/SourceMapScopesInfo.ts +49 -2
- package/front_end/core/sdk/TargetManager.ts +0 -22
- package/front_end/core/sdk/TraceObject.ts +8 -7
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +81 -0
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
- package/front_end/entrypoints/main/GlobalAiButton.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +42 -28
- package/front_end/generated/InspectorBackendCommands.js +3 -2
- package/front_end/generated/SupportedCSSProperties.js +2 -0
- package/front_end/generated/protocol.ts +17 -3
- package/front_end/models/ai_assistance/BuiltInAi.ts +111 -0
- package/front_end/models/ai_assistance/ConversationHandler.ts +15 -14
- package/front_end/models/ai_assistance/ai_assistance.ts +53 -24
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +105 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +6 -1
- package/front_end/models/extensions/ExtensionView.ts +3 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +31 -27
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +31 -29
- package/front_end/models/persistence/NetworkPersistenceManager.ts +3 -5
- package/front_end/models/persistence/PersistenceImpl.ts +0 -5
- package/front_end/models/persistence/persistence-meta.ts +0 -31
- package/front_end/models/persistence/persistence.ts +0 -6
- package/front_end/models/source_map_scopes/NamesResolver.ts +5 -11
- package/front_end/models/stack_trace/Trie.ts +9 -0
- package/front_end/models/trace/lantern/types/Lantern.ts +1 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -0
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +1 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +120 -113
- package/front_end/panels/ai_assistance/PatchWidget.ts +9 -8
- package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +29 -29
- package/front_end/panels/ai_assistance/components/UserActionRow.ts +1 -0
- package/front_end/panels/animation/AnimationTimeline.ts +1 -0
- package/front_end/panels/application/CookieItemsView.ts +1 -0
- package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +2 -0
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +11 -5
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +7 -5
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +22 -10
- package/front_end/panels/changes/CombinedDiffView.ts +1 -0
- package/front_end/{models/persistence → panels/common}/PersistenceUtils.ts +15 -17
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/console/ConsoleInsightTeaser.ts +369 -0
- package/front_end/panels/console/ConsolePanel.ts +2 -0
- package/front_end/panels/console/ConsolePrompt.ts +12 -2
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +12 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +44 -0
- package/front_end/panels/{explain → console}/PromptBuilder.ts +12 -7
- package/front_end/panels/console/console-meta.ts +14 -0
- package/front_end/panels/console/console.ts +6 -0
- package/front_end/panels/console/consoleInsightTeaser.css +83 -0
- package/front_end/panels/coverage/CoverageListView.ts +29 -11
- package/front_end/panels/coverage/CoverageView.ts +292 -284
- package/front_end/panels/coverage/coverageView.css +17 -0
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -0
- package/front_end/panels/elements/LayoutPane.ts +1 -0
- package/front_end/panels/elements/NodeStackTraceWidget.ts +1 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -1
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +17 -0
- package/front_end/panels/emulation/DeviceModeView.ts +2 -0
- package/front_end/panels/explain/ActionDelegate.ts +4 -2
- package/front_end/panels/explain/components/ConsoleInsight.ts +14 -12
- package/front_end/panels/explain/explain-meta.ts +7 -0
- package/front_end/panels/explain/explain.ts +0 -1
- package/front_end/panels/js_timeline/js_timeline-meta.ts +1 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -0
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +1 -0
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +1 -0
- package/front_end/panels/media/MainView.ts +1 -0
- package/front_end/panels/media/TickingFlameChart.ts +2 -0
- package/front_end/panels/network/BlockedURLsPane.ts +237 -108
- package/front_end/panels/network/EventSourceMessagesView.ts +1 -0
- package/front_end/panels/network/NetworkItemView.ts +1 -0
- package/front_end/panels/network/NetworkLogView.ts +9 -7
- package/front_end/panels/network/NetworkOverview.ts +1 -0
- package/front_end/panels/network/RequestCookiesView.ts +1 -0
- package/front_end/panels/network/RequestHTMLView.ts +1 -0
- package/front_end/panels/network/RequestInitiatorView.ts +1 -0
- package/front_end/panels/network/RequestPayloadView.ts +1 -0
- package/front_end/panels/network/RequestPreviewView.ts +1 -0
- package/front_end/panels/network/RequestResponseView.ts +1 -0
- package/front_end/panels/network/RequestTimingView.ts +2 -0
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -0
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -0
- package/front_end/panels/network/components/RequestHeadersView.ts +2 -0
- package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -0
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +2 -0
- package/front_end/panels/profiler/HeapSnapshotView.ts +7 -0
- package/front_end/panels/profiler/IsolateSelector.ts +1 -0
- package/front_end/panels/profiler/LiveHeapProfileView.ts +1 -0
- package/front_end/panels/profiler/ProfileView.ts +1 -0
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
- package/front_end/panels/recorder/RecorderPanel.ts +2 -0
- package/front_end/panels/screencast/ScreencastView.ts +1 -0
- package/front_end/panels/search/SearchView.ts +1 -0
- package/front_end/panels/settings/AISettingsTab.ts +3 -3
- package/front_end/{models/persistence → panels/settings}/EditFileSystemView.ts +3 -6
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +4 -1
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
- package/front_end/panels/settings/settings.ts +2 -0
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +12 -0
- package/front_end/panels/sources/BreakpointsView.ts +1 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -0
- package/front_end/{models/persistence → panels/sources}/PersistenceActions.ts +8 -12
- package/front_end/panels/sources/TabbedEditorContainer.ts +2 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +17 -2
- package/front_end/panels/sources/sources-meta.ts +15 -0
- package/front_end/panels/sources/sources.ts +2 -0
- package/front_end/panels/timeline/README.md +2 -2
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -3
- package/front_end/panels/timeline/TimelineLayersView.ts +1 -0
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +114 -37
- package/front_end/panels/timeline/TimelinePanel.ts +43 -62
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -0
- package/front_end/panels/timeline/components/LiveMetricsView.ts +4 -8
- package/front_end/panels/timeline/components/Sidebar.ts +2 -0
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +7 -7
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +4 -4
- package/front_end/panels/utils/utils.ts +2 -1
- package/front_end/panels/web_audio/WebAudioView.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/diff/diff_match_patch.js +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1530 -2426
- package/front_end/third_party/lighthouse/locales/ar-XB.json +107 -455
- package/front_end/third_party/lighthouse/locales/ar.json +107 -455
- package/front_end/third_party/lighthouse/locales/bg.json +96 -444
- package/front_end/third_party/lighthouse/locales/ca.json +96 -444
- package/front_end/third_party/lighthouse/locales/cs.json +96 -444
- package/front_end/third_party/lighthouse/locales/da.json +96 -444
- package/front_end/third_party/lighthouse/locales/de.json +96 -444
- package/front_end/third_party/lighthouse/locales/el.json +96 -444
- package/front_end/third_party/lighthouse/locales/en-GB.json +96 -444
- package/front_end/third_party/lighthouse/locales/en-US.json +116 -467
- package/front_end/third_party/lighthouse/locales/en-XA.json +93 -441
- package/front_end/third_party/lighthouse/locales/en-XL.json +116 -467
- package/front_end/third_party/lighthouse/locales/es-419.json +96 -444
- package/front_end/third_party/lighthouse/locales/es.json +96 -444
- package/front_end/third_party/lighthouse/locales/fi.json +96 -444
- package/front_end/third_party/lighthouse/locales/fil.json +96 -444
- package/front_end/third_party/lighthouse/locales/fr.json +96 -444
- package/front_end/third_party/lighthouse/locales/he.json +118 -466
- package/front_end/third_party/lighthouse/locales/hi.json +96 -444
- package/front_end/third_party/lighthouse/locales/hr.json +100 -448
- package/front_end/third_party/lighthouse/locales/hu.json +96 -444
- package/front_end/third_party/lighthouse/locales/id.json +96 -444
- package/front_end/third_party/lighthouse/locales/it.json +96 -444
- package/front_end/third_party/lighthouse/locales/ja.json +96 -444
- package/front_end/third_party/lighthouse/locales/ko.json +97 -445
- package/front_end/third_party/lighthouse/locales/lt.json +96 -444
- package/front_end/third_party/lighthouse/locales/lv.json +97 -445
- package/front_end/third_party/lighthouse/locales/nl.json +96 -444
- package/front_end/third_party/lighthouse/locales/no.json +96 -444
- package/front_end/third_party/lighthouse/locales/pl.json +96 -444
- package/front_end/third_party/lighthouse/locales/pt-PT.json +96 -444
- package/front_end/third_party/lighthouse/locales/pt.json +97 -445
- package/front_end/third_party/lighthouse/locales/ro.json +97 -445
- package/front_end/third_party/lighthouse/locales/ru.json +96 -444
- package/front_end/third_party/lighthouse/locales/sk.json +96 -444
- package/front_end/third_party/lighthouse/locales/sl.json +96 -444
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +96 -444
- package/front_end/third_party/lighthouse/locales/sr.json +96 -444
- package/front_end/third_party/lighthouse/locales/sv.json +96 -444
- package/front_end/third_party/lighthouse/locales/ta.json +96 -444
- package/front_end/third_party/lighthouse/locales/te.json +97 -445
- package/front_end/third_party/lighthouse/locales/th.json +96 -444
- package/front_end/third_party/lighthouse/locales/tr.json +96 -444
- package/front_end/third_party/lighthouse/locales/uk.json +96 -444
- package/front_end/third_party/lighthouse/locales/vi.json +96 -444
- package/front_end/third_party/lighthouse/locales/zh-HK.json +96 -444
- package/front_end/third_party/lighthouse/locales/zh-TW.json +97 -445
- package/front_end/third_party/lighthouse/locales/zh.json +96 -444
- package/front_end/third_party/lighthouse/report/bundle.d.ts +8 -14
- package/front_end/third_party/lighthouse/report/bundle.js +10 -49
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/third_party/web-vitals/README.chromium +5 -8
- package/front_end/third_party/web-vitals/package/README.md +191 -152
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.js +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +45 -26
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +3 -3
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +10 -10
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +307 -206
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +69 -49
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/index.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/index.js +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +33 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +111 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/{attribution/deprecated.js → lib/LCPEntryManager.js} +6 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.d.ts +6 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.js +44 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/generateUniqueID.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getNavigationEntry.js +5 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.js +9 -12
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.d.ts +1 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +52 -33
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +0 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.js +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initUnique.d.ts +6 -0
- package/front_end/third_party/web-vitals/package/dist/modules/{deprecated.js → lib/initUnique.js} +11 -4
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +3 -6
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +6 -6
- package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.d.ts → whenIdleOrHidden.d.ts} +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.js → whenIdleOrHidden.js} +10 -8
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +17 -35
- package/front_end/third_party/web-vitals/package/dist/modules/onFCP.js +3 -5
- package/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +9 -7
- package/front_end/third_party/web-vitals/package/dist/modules/onINP.js +27 -19
- package/front_end/third_party/web-vitals/package/dist/modules/onLCP.js +33 -26
- package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.js +2 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types/base.d.ts +6 -5
- package/front_end/third_party/web-vitals/package/dist/modules/types/cls.d.ts +5 -3
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +80 -33
- package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +6 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +28 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
- package/front_end/third_party/web-vitals/package/package.json +4 -10
- package/front_end/third_party/web-vitals/package/src/attribution/index.ts +0 -1
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +58 -33
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +4 -4
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +382 -258
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +96 -69
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +3 -3
- package/front_end/third_party/web-vitals/package/src/index.ts +0 -1
- package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +146 -0
- package/front_end/third_party/web-vitals/package/src/{attribution/deprecated.ts → lib/LCPEntryManager.ts} +6 -9
- package/front_end/third_party/web-vitals/package/src/lib/LayoutShiftManager.ts +50 -0
- package/front_end/third_party/web-vitals/package/src/lib/bindReporter.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/generateUniqueID.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getNavigationEntry.ts +5 -8
- package/front_end/third_party/web-vitals/package/src/lib/getSelector.ts +12 -12
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +57 -35
- package/front_end/third_party/web-vitals/package/src/lib/initMetric.ts +2 -2
- package/front_end/third_party/web-vitals/package/src/{deprecated.ts → lib/initUnique.ts} +14 -8
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +3 -11
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +12 -6
- package/front_end/third_party/web-vitals/package/src/lib/{whenIdle.ts → whenIdleOrHidden.ts} +10 -8
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +17 -38
- package/front_end/third_party/web-vitals/package/src/onFCP.ts +3 -6
- package/front_end/third_party/web-vitals/package/src/onINP.ts +33 -28
- package/front_end/third_party/web-vitals/package/src/onLCP.ts +36 -29
- package/front_end/third_party/web-vitals/package/src/onTTFB.ts +2 -5
- package/front_end/third_party/web-vitals/package/src/types/base.ts +5 -5
- package/front_end/third_party/web-vitals/package/src/types/cls.ts +5 -3
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +88 -33
- package/front_end/third_party/web-vitals/package/src/types/lcp.ts +6 -2
- package/front_end/third_party/web-vitals/package/src/types.ts +47 -4
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +75 -0
- package/front_end/third_party/web-vitals/rebuild.sh +32 -18
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +5 -10
- package/front_end/third_party/web-vitals/web-vitals.ts +0 -2
- package/front_end/ui/components/docs/console_insight/basic.ts +3 -2
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +2 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +0 -2
- package/front_end/ui/legacy/InspectorView.ts +2 -0
- package/front_end/ui/legacy/ListWidget.ts +2 -2
- package/front_end/ui/legacy/SplitWidget.ts +2 -0
- package/front_end/ui/legacy/TabbedPane.ts +1 -0
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -0
- package/front_end/ui/legacy/UIUtils.ts +8 -19
- package/front_end/ui/legacy/ViewManager.ts +1 -0
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +7 -20
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +1 -0
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +1 -0
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +25 -0
- package/mcp/README.md +7 -0
- package/mcp/mcp.ts +8 -0
- package/package.json +1 -1
- package/front_end/models/live-metrics/web-vitals-injected/OnEachInteraction.ts +0 -34
- package/front_end/third_party/web-vitals/package/attribution.d.ts +0 -16
- package/front_end/third_party/web-vitals/package/attribution.js +0 -18
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/deprecated.d.ts +0 -7
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.d.ts +0 -11
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.js +0 -46
- package/front_end/third_party/web-vitals/package/dist/modules/deprecated.d.ts +0 -5
- package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.d.ts +0 -31
- package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.js +0 -107
- package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.js +0 -22
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.d.ts +0 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.js +0 -147
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.js +0 -25
- package/front_end/third_party/web-vitals/package/dist/modules/onFID.d.ts +0 -13
- package/front_end/third_party/web-vitals/package/dist/modules/onFID.js +0 -70
- package/front_end/third_party/web-vitals/package/dist/modules/types/fid.d.ts +0 -46
- package/front_end/third_party/web-vitals/package/dist/modules/types/fid.js +0 -16
- package/front_end/third_party/web-vitals/package/src/attribution/onFID.ts +0 -62
- package/front_end/third_party/web-vitals/package/src/lib/interactions.ts +0 -139
- package/front_end/third_party/web-vitals/package/src/lib/onHidden.ts +0 -23
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/firstInputPolyfill.ts +0 -174
- package/front_end/third_party/web-vitals/package/src/onFID.ts +0 -105
- package/front_end/third_party/web-vitals/package/src/types/fid.ts +0 -65
- package/front_end/ui/components/text_editor/textEditor.css +0 -18
- package/front_end/ui/legacy/inlineButton.css +0 -22
- /package/front_end/entrypoints/{rehydrated_devtools_app/rehydrated_devtools_app.ts → trace_app/trace_app.ts} +0 -0
- /package/front_end/{models/persistence → panels/settings}/editFileSystemView.css +0 -0
|
@@ -14,7 +14,21 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type {
|
|
18
|
+
LoadState,
|
|
19
|
+
Metric,
|
|
20
|
+
ReportOpts,
|
|
21
|
+
AttributionReportOpts,
|
|
22
|
+
} from './base.js';
|
|
23
|
+
|
|
24
|
+
export interface INPReportOpts extends ReportOpts {
|
|
25
|
+
durationThreshold?: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface INPAttributionReportOpts extends AttributionReportOpts {
|
|
29
|
+
durationThreshold?: number;
|
|
30
|
+
onEachInteraction?: (interaction: INPMetricWithAttribution) => void;
|
|
31
|
+
}
|
|
18
32
|
|
|
19
33
|
/**
|
|
20
34
|
* An INP-specific version of the Metric object.
|
|
@@ -24,6 +38,22 @@ export interface INPMetric extends Metric {
|
|
|
24
38
|
entries: PerformanceEventTiming[];
|
|
25
39
|
}
|
|
26
40
|
|
|
41
|
+
export interface INPLongestScriptSummary {
|
|
42
|
+
/**
|
|
43
|
+
* The longest Long Animation Frame script entry that intersects the INP
|
|
44
|
+
* interaction.
|
|
45
|
+
*/
|
|
46
|
+
entry: PerformanceScriptTiming;
|
|
47
|
+
/**
|
|
48
|
+
* The INP subpart where the longest script ran.
|
|
49
|
+
*/
|
|
50
|
+
subpart: 'input-delay' | 'processing-duration' | 'presentation-delay';
|
|
51
|
+
/**
|
|
52
|
+
* The amount of time the longest script intersected the INP duration.
|
|
53
|
+
*/
|
|
54
|
+
intersectingDuration: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
27
57
|
/**
|
|
28
58
|
* An object containing potentially-helpful debugging information that
|
|
29
59
|
* can be sent along with the INP value for the current page visit in order
|
|
@@ -31,37 +61,21 @@ export interface INPMetric extends Metric {
|
|
|
31
61
|
*/
|
|
32
62
|
export interface INPAttribution {
|
|
33
63
|
/**
|
|
34
|
-
*
|
|
35
|
-
* as part of the frame where the INP candidate interaction
|
|
36
|
-
* If this value is an empty string, that generally means the
|
|
37
|
-
* removed from the DOM after the interaction.
|
|
64
|
+
* By default, a selector identifying the element that the user first
|
|
65
|
+
* interacted with as part of the frame where the INP candidate interaction
|
|
66
|
+
* occurred. If this value is an empty string, that generally means the
|
|
67
|
+
* element was removed from the DOM after the interaction. If the
|
|
68
|
+
* `generateTarget` configuration option was passed, then this will instead
|
|
69
|
+
* be the return value of that function, falling back to the default if that
|
|
70
|
+
* returns null or undefined.
|
|
38
71
|
*/
|
|
39
72
|
interactionTarget: string;
|
|
40
|
-
/**
|
|
41
|
-
* A reference to the HTML element identified by `interactionTargetSelector`.
|
|
42
|
-
* NOTE: for attribution purpose, a selector identifying the element is
|
|
43
|
-
* typically more useful than the element itself. However, the element is
|
|
44
|
-
* also made available in case additional context is needed.
|
|
45
|
-
*/
|
|
46
|
-
interactionTargetElement: Node | undefined;
|
|
47
73
|
/**
|
|
48
74
|
* The time when the user first interacted during the frame where the INP
|
|
49
75
|
* candidate interaction occurred (if more than one interaction occurred
|
|
50
76
|
* within the frame, only the first time is reported).
|
|
51
77
|
*/
|
|
52
78
|
interactionTime: DOMHighResTimeStamp;
|
|
53
|
-
/**
|
|
54
|
-
* The best-guess timestamp of the next paint after the interaction.
|
|
55
|
-
* In general, this timestamp is the same as the `startTime + duration` of
|
|
56
|
-
* the event timing entry. However, since `duration` values are rounded to
|
|
57
|
-
* the nearest 8ms, it can sometimes appear that the paint occurred before
|
|
58
|
-
* processing ended (which cannot happen). This value clamps the paint time
|
|
59
|
-
* so it's always after `processingEnd` from the Event Timing API and
|
|
60
|
-
* `renderStart` from the Long Animation Frame API (where available).
|
|
61
|
-
* It also averages the duration values for all entries in the same
|
|
62
|
-
* animation frame, which should be closer to the "real" value.
|
|
63
|
-
*/
|
|
64
|
-
nextPaintTime: DOMHighResTimeStamp;
|
|
65
79
|
/**
|
|
66
80
|
* The type of interaction, based on the event type of the `event` entry
|
|
67
81
|
* that corresponds to the interaction (i.e. the first `event` entry
|
|
@@ -70,20 +84,19 @@ export interface INPAttribution {
|
|
|
70
84
|
* and for "keydown" or "keyup" events this will be "keyboard".
|
|
71
85
|
*/
|
|
72
86
|
interactionType: 'pointer' | 'keyboard';
|
|
87
|
+
/**
|
|
88
|
+
* The best-guess timestamp of the next paint after the interaction.
|
|
89
|
+
* In general, this timestamp is the same as the `startTime + duration` of
|
|
90
|
+
* the event timing entry. However, since duration values are rounded to the
|
|
91
|
+
* nearest 8ms (and can be rounded down), this value is clamped to always be
|
|
92
|
+
* reported after the processing times.
|
|
93
|
+
*/
|
|
94
|
+
nextPaintTime: DOMHighResTimeStamp;
|
|
73
95
|
/**
|
|
74
96
|
* An array of Event Timing entries that were processed within the same
|
|
75
97
|
* animation frame as the INP candidate interaction.
|
|
76
98
|
*/
|
|
77
99
|
processedEventEntries: PerformanceEventTiming[];
|
|
78
|
-
/**
|
|
79
|
-
* If the browser supports the Long Animation Frame API, this array will
|
|
80
|
-
* include any `long-animation-frame` entries that intersect with the INP
|
|
81
|
-
* candidate interaction's `startTime` and the `processingEnd` time of the
|
|
82
|
-
* last event processed within that animation frame. If the browser does not
|
|
83
|
-
* support the Long Animation Frame API or no `long-animation-frame` entries
|
|
84
|
-
* are detect, this array will be empty.
|
|
85
|
-
*/
|
|
86
|
-
longAnimationFrameEntries: PerformanceLongAnimationFrameTiming[];
|
|
87
100
|
/**
|
|
88
101
|
* The time from when the user interacted with the page until when the
|
|
89
102
|
* browser was first able to start processing event listeners for that
|
|
@@ -112,6 +125,48 @@ export interface INPAttribution {
|
|
|
112
125
|
* (e.g. usually in the `dom-interactive` phase) it can result in long delays.
|
|
113
126
|
*/
|
|
114
127
|
loadState: LoadState;
|
|
128
|
+
/**
|
|
129
|
+
* If the browser supports the Long Animation Frame API, this array will
|
|
130
|
+
* include any `long-animation-frame` entries that intersect with the INP
|
|
131
|
+
* candidate interaction's `startTime` and the `processingEnd` time of the
|
|
132
|
+
* last event processed within that animation frame. If the browser does not
|
|
133
|
+
* support the Long Animation Frame API or no `long-animation-frame` entries
|
|
134
|
+
* are detected, this array will be empty.
|
|
135
|
+
*/
|
|
136
|
+
longAnimationFrameEntries: PerformanceLongAnimationFrameTiming[];
|
|
137
|
+
/**
|
|
138
|
+
* Summary information about the longest script entry intersecting the INP
|
|
139
|
+
* duration. Note, only script entries above 5 milliseconds are reported by
|
|
140
|
+
* the Long Animation Frame API.
|
|
141
|
+
*/
|
|
142
|
+
longestScript?: INPLongestScriptSummary;
|
|
143
|
+
/**
|
|
144
|
+
* The total duration of Long Animation Frame scripts that intersect the INP
|
|
145
|
+
* duration excluding any forced style and layout (that is included in
|
|
146
|
+
* totalStyleAndLayout). Note, this is limited to scripts > 5 milliseconds.
|
|
147
|
+
*/
|
|
148
|
+
totalScriptDuration?: number;
|
|
149
|
+
/**
|
|
150
|
+
* The total style and layout duration from any Long Animation Frames
|
|
151
|
+
* intersecting the INP interaction. This includes any end-of-frame style and
|
|
152
|
+
* layout duration + any forced style and layout duration.
|
|
153
|
+
*/
|
|
154
|
+
totalStyleAndLayoutDuration?: number;
|
|
155
|
+
/**
|
|
156
|
+
* The off main-thread presentation delay from the end of the last Long
|
|
157
|
+
* Animation Frame (where available) until the INP end point.
|
|
158
|
+
*/
|
|
159
|
+
totalPaintDuration?: number;
|
|
160
|
+
/**
|
|
161
|
+
* The total unattributed time not included in any of the previous totals.
|
|
162
|
+
* This includes scripts < 5 milliseconds and other timings not attributed
|
|
163
|
+
* by Long Animation Frame (including when a frame is < 50ms and so has no
|
|
164
|
+
* Long Animation Frame).
|
|
165
|
+
* When no Long Animation Frames are present this will be undefined, rather
|
|
166
|
+
* than everything being unattributed to make it clearer when it's expected
|
|
167
|
+
* to be small.
|
|
168
|
+
*/
|
|
169
|
+
totalUnattributedDuration?: number;
|
|
115
170
|
}
|
|
116
171
|
|
|
117
172
|
/**
|
|
@@ -31,9 +31,13 @@ export interface LCPMetric extends Metric {
|
|
|
31
31
|
*/
|
|
32
32
|
export interface LCPAttribution {
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* By default, a selector identifying the element corresponding to the
|
|
35
|
+
* largest contentful paint for the page. If the `generateTarget`
|
|
36
|
+
* configuration option was passed, then this will instead be the return
|
|
37
|
+
* value of that function, falling back to the default if that returns null
|
|
38
|
+
* or undefined.
|
|
35
39
|
*/
|
|
36
|
-
|
|
40
|
+
target?: string;
|
|
37
41
|
/**
|
|
38
42
|
* The URL (if applicable) of the LCP image resource. If the LCP element
|
|
39
43
|
* is a text node, this value will not be set.
|
|
@@ -19,7 +19,6 @@ export * from './types/polyfills.js';
|
|
|
19
19
|
|
|
20
20
|
export * from './types/cls.js';
|
|
21
21
|
export * from './types/fcp.js';
|
|
22
|
-
export * from './types/fid.js';
|
|
23
22
|
export * from './types/inp.js';
|
|
24
23
|
export * from './types/lcp.js';
|
|
25
24
|
export * from './types/ttfb.js';
|
|
@@ -67,7 +66,7 @@ declare global {
|
|
|
67
66
|
|
|
68
67
|
// https://wicg.github.io/layout-instability/#sec-layout-shift-attribution
|
|
69
68
|
interface LayoutShiftAttribution {
|
|
70
|
-
node
|
|
69
|
+
node: Node | null;
|
|
71
70
|
previousRect: DOMRectReadOnly;
|
|
72
71
|
currentRect: DOMRectReadOnly;
|
|
73
72
|
}
|
|
@@ -89,9 +88,53 @@ declare global {
|
|
|
89
88
|
readonly element: Element | null;
|
|
90
89
|
}
|
|
91
90
|
|
|
91
|
+
// https://w3c.github.io/long-animation-frame/#sec-PerformanceLongAnimationFrameTiming
|
|
92
|
+
export type ScriptInvokerType =
|
|
93
|
+
| 'classic-script'
|
|
94
|
+
| 'module-script'
|
|
95
|
+
| 'event-listener'
|
|
96
|
+
| 'user-callback'
|
|
97
|
+
| 'resolve-promise'
|
|
98
|
+
| 'reject-promise';
|
|
99
|
+
|
|
100
|
+
// https://w3c.github.io/long-animation-frame/#sec-PerformanceLongAnimationFrameTiming
|
|
101
|
+
export type ScriptWindowAttribution =
|
|
102
|
+
| 'self'
|
|
103
|
+
| 'descendant'
|
|
104
|
+
| 'ancestor'
|
|
105
|
+
| 'same-page'
|
|
106
|
+
| 'other';
|
|
107
|
+
|
|
108
|
+
// https://w3c.github.io/long-animation-frame/#sec-PerformanceLongAnimationFrameTiming
|
|
109
|
+
interface PerformanceScriptTiming extends PerformanceEntry {
|
|
110
|
+
/* Overloading PerformanceEntry */
|
|
111
|
+
readonly startTime: DOMHighResTimeStamp;
|
|
112
|
+
readonly duration: DOMHighResTimeStamp;
|
|
113
|
+
readonly name: string;
|
|
114
|
+
readonly entryType: string;
|
|
115
|
+
|
|
116
|
+
readonly invokerType: ScriptInvokerType;
|
|
117
|
+
readonly invoker: string;
|
|
118
|
+
readonly executionStart: DOMHighResTimeStamp;
|
|
119
|
+
readonly sourceURL: string;
|
|
120
|
+
readonly sourceFunctionName: string;
|
|
121
|
+
readonly sourceCharPosition: number;
|
|
122
|
+
readonly pauseDuration: DOMHighResTimeStamp;
|
|
123
|
+
readonly forcedStyleAndLayoutDuration: DOMHighResTimeStamp;
|
|
124
|
+
readonly window?: Window;
|
|
125
|
+
readonly windowAttribution: ScriptWindowAttribution;
|
|
126
|
+
}
|
|
127
|
+
|
|
92
128
|
// https://w3c.github.io/long-animation-frame/#sec-PerformanceLongAnimationFrameTiming
|
|
93
129
|
interface PerformanceLongAnimationFrameTiming extends PerformanceEntry {
|
|
94
|
-
|
|
95
|
-
duration: DOMHighResTimeStamp;
|
|
130
|
+
readonly startTime: DOMHighResTimeStamp;
|
|
131
|
+
readonly duration: DOMHighResTimeStamp;
|
|
132
|
+
readonly name: string;
|
|
133
|
+
readonly entryType: string;
|
|
134
|
+
readonly renderStart: DOMHighResTimeStamp;
|
|
135
|
+
readonly styleAndLayoutStart: DOMHighResTimeStamp;
|
|
136
|
+
readonly blockingDuration: DOMHighResTimeStamp;
|
|
137
|
+
readonly firstUIEventTimestamp: DOMHighResTimeStamp;
|
|
138
|
+
readonly scripts: PerformanceScriptTiming[];
|
|
96
139
|
}
|
|
97
140
|
}
|
package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
From 491debaabfe255b3c046c79db34defee146e5eec Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: Connor Clark <cjamcl@gmail.com>
|
|
3
|
+
Date: Fri, 10 Oct 2025 09:46:44 -0700
|
|
4
|
+
Subject: [PATCH] Add onEachInteraction to onINP options
|
|
5
|
+
|
|
6
|
+
This adds an "onEachInteraction" option to onINP, which exposes to us
|
|
7
|
+
each interaction. It also calls attributeINP on each value given to the
|
|
8
|
+
callback.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
src/attribution/onINP.ts | 35 ++++++++++++++++++++++++++++++++++-
|
|
12
|
+
src/types/inp.ts | 1 +
|
|
13
|
+
2 files changed, 35 insertions(+), 1 deletion(-)
|
|
14
|
+
|
|
15
|
+
diff --git a/src/attribution/onINP.ts b/src/attribution/onINP.ts
|
|
16
|
+
index 479a00f..d295263 100644
|
|
17
|
+
--- a/src/attribution/onINP.ts
|
|
18
|
+
+++ b/src/attribution/onINP.ts
|
|
19
|
+
@@ -240,7 +240,40 @@ export const onINP = (
|
|
20
|
+
cleanupPending = false;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
- interactionManager._onBeforeProcessingEntry = groupEntriesByRenderTime;
|
|
24
|
+
+ async function handleOnEachInteractionCallback(
|
|
25
|
+
+ entry: PerformanceEventTiming,
|
|
26
|
+
+ ) {
|
|
27
|
+
+ if (!opts.onEachInteraction) {
|
|
28
|
+
+ return;
|
|
29
|
+
+ }
|
|
30
|
+
+
|
|
31
|
+
+ // Wait a microtask so this "pre" processing callback actually
|
|
32
|
+
+ // becomes a "post" processing callback.
|
|
33
|
+
+ void (await Promise.resolve());
|
|
34
|
+
+ if (!entry.interactionId) {
|
|
35
|
+
+ return;
|
|
36
|
+
+ }
|
|
37
|
+
+
|
|
38
|
+
+ const interaction = attributeINP({
|
|
39
|
+
+ entries: [entry],
|
|
40
|
+
+ // The only value we really need for `attributeINP` is `entries`
|
|
41
|
+
+ // Everything else is included to fill out the type.
|
|
42
|
+
+ name: 'INP',
|
|
43
|
+
+ rating: 'good',
|
|
44
|
+
+ value: entry.duration,
|
|
45
|
+
+ delta: entry.duration,
|
|
46
|
+
+ navigationType: 'navigate',
|
|
47
|
+
+ id: 'N/A',
|
|
48
|
+
+ });
|
|
49
|
+
+ opts.onEachInteraction(interaction);
|
|
50
|
+
+ }
|
|
51
|
+
+
|
|
52
|
+
+ interactionManager._onBeforeProcessingEntry = (
|
|
53
|
+
+ entry: PerformanceEventTiming,
|
|
54
|
+
+ ) => {
|
|
55
|
+
+ void handleOnEachInteractionCallback(entry);
|
|
56
|
+
+ groupEntriesByRenderTime(entry);
|
|
57
|
+
+ };
|
|
58
|
+
interactionManager._onAfterProcessingINPCandidate = saveInteractionTarget;
|
|
59
|
+
|
|
60
|
+
const getIntersectingLoAFs = (
|
|
61
|
+
diff --git a/src/types/inp.ts b/src/types/inp.ts
|
|
62
|
+
index 7dfa9bb..f87a2c5 100644
|
|
63
|
+
--- a/src/types/inp.ts
|
|
64
|
+
+++ b/src/types/inp.ts
|
|
65
|
+
@@ -27,6 +27,7 @@ export interface INPReportOpts extends ReportOpts {
|
|
66
|
+
|
|
67
|
+
export interface INPAttributionReportOpts extends AttributionReportOpts {
|
|
68
|
+
durationThreshold?: number;
|
|
69
|
+
+ onEachInteraction?: (interaction: INPMetricWithAttribution) => void;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
--
|
|
74
|
+
2.51.0.760.g7b8bcc2412-goog
|
|
75
|
+
|
|
@@ -4,21 +4,35 @@ set -euo pipefail
|
|
|
4
4
|
|
|
5
5
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
VERSION=5.1.0
|
|
8
|
+
GIT_SHA=1b872cf5f2159e8ace0e98d55d8eb54fb09adfbe # web-vitals does not tag releases.
|
|
9
|
+
|
|
10
|
+
# Note: this is just to handle updating README.chromium.
|
|
11
|
+
# For the actual sources, below we checkout the repo, apply local patches, then build with tsc.
|
|
12
|
+
vpython3 scripts/deps/roll_front_end_third_party.py web-vitals web-vitals dist $VERSION
|
|
13
|
+
|
|
14
|
+
cd "$SCRIPT_DIR"
|
|
15
|
+
|
|
16
|
+
# As per above comment, we don't need this from npm.
|
|
17
|
+
rm -rf package/src package/dist
|
|
18
|
+
|
|
19
|
+
if [ ! -d tmp-repo ]; then
|
|
20
|
+
git clone http://github.com/GoogleChrome/web-vitals tmp-repo
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
cd tmp-repo
|
|
24
|
+
rm -fr .git/rebase-apply
|
|
25
|
+
git checkout main
|
|
26
|
+
git reset --hard $GIT_SHA
|
|
27
|
+
git am ../patches/*.patch
|
|
28
|
+
# Note: to modify the local patches applied, exit the script at this point:
|
|
29
|
+
# exit 1
|
|
30
|
+
# then cd into tmp-repo, make whatever modifications you need, then write the patches back:
|
|
31
|
+
# git format-patch -o ../patches origin/main
|
|
32
|
+
cd -
|
|
33
|
+
|
|
34
|
+
# Copy the source files to our repo, and build it.
|
|
35
|
+
cp -r tmp-repo/src package/src
|
|
36
|
+
../../../node_modules/.bin/tsc -d -t esnext -m esnext --moduleResolution node --strict --outDir package/dist/modules/ package/src/**/*.ts package/src/index.ts
|
|
37
|
+
|
|
38
|
+
echo "Rebuild complete."
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
"composite": true
|
|
4
4
|
},
|
|
5
5
|
"files": [
|
|
6
|
-
"package/dist/modules/attribution/deprecated.js",
|
|
7
6
|
"package/dist/modules/attribution/index.js",
|
|
8
7
|
"package/dist/modules/attribution/onCLS.js",
|
|
9
8
|
"package/dist/modules/attribution/onFCP.js",
|
|
10
|
-
"package/dist/modules/attribution/onFID.js",
|
|
11
9
|
"package/dist/modules/attribution/onINP.js",
|
|
12
10
|
"package/dist/modules/attribution/onLCP.js",
|
|
13
11
|
"package/dist/modules/attribution/onTTFB.js",
|
|
14
|
-
"package/dist/modules/deprecated.js",
|
|
15
12
|
"package/dist/modules/index.js",
|
|
13
|
+
"package/dist/modules/lib/InteractionManager.js",
|
|
14
|
+
"package/dist/modules/lib/LCPEntryManager.js",
|
|
15
|
+
"package/dist/modules/lib/LayoutShiftManager.js",
|
|
16
16
|
"package/dist/modules/lib/bfcache.js",
|
|
17
17
|
"package/dist/modules/lib/bindReporter.js",
|
|
18
18
|
"package/dist/modules/lib/doubleRAF.js",
|
|
@@ -23,18 +23,14 @@
|
|
|
23
23
|
"package/dist/modules/lib/getSelector.js",
|
|
24
24
|
"package/dist/modules/lib/getVisibilityWatcher.js",
|
|
25
25
|
"package/dist/modules/lib/initMetric.js",
|
|
26
|
-
"package/dist/modules/lib/
|
|
26
|
+
"package/dist/modules/lib/initUnique.js",
|
|
27
27
|
"package/dist/modules/lib/observe.js",
|
|
28
|
-
"package/dist/modules/lib/onHidden.js",
|
|
29
|
-
"package/dist/modules/lib/polyfills/firstInputPolyfill.js",
|
|
30
|
-
"package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.js",
|
|
31
28
|
"package/dist/modules/lib/polyfills/interactionCountPolyfill.js",
|
|
32
29
|
"package/dist/modules/lib/runOnce.js",
|
|
33
30
|
"package/dist/modules/lib/whenActivated.js",
|
|
34
|
-
"package/dist/modules/lib/
|
|
31
|
+
"package/dist/modules/lib/whenIdleOrHidden.js",
|
|
35
32
|
"package/dist/modules/onCLS.js",
|
|
36
33
|
"package/dist/modules/onFCP.js",
|
|
37
|
-
"package/dist/modules/onFID.js",
|
|
38
34
|
"package/dist/modules/onINP.js",
|
|
39
35
|
"package/dist/modules/onLCP.js",
|
|
40
36
|
"package/dist/modules/onTTFB.js",
|
|
@@ -42,7 +38,6 @@
|
|
|
42
38
|
"package/dist/modules/types/base.js",
|
|
43
39
|
"package/dist/modules/types/cls.js",
|
|
44
40
|
"package/dist/modules/types/fcp.js",
|
|
45
|
-
"package/dist/modules/types/fid.js",
|
|
46
41
|
"package/dist/modules/types/inp.js",
|
|
47
42
|
"package/dist/modules/types/lcp.js",
|
|
48
43
|
"package/dist/modules/types/polyfills.js",
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export * from './package/dist/modules/index.js';
|
|
2
2
|
export * as Attribution from './package/dist/modules/attribution/index.js';
|
|
3
3
|
export {onBFCacheRestore} from './package/dist/modules/lib/bfcache.js';
|
|
4
|
-
export {attributeINP} from './package/dist/modules/attribution/onINP.js';
|
|
5
|
-
export {entryPreProcessingCallbacks} from './package/dist/modules/lib/interactions.js';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Host from '../../../../core/host/host.js';
|
|
6
|
+
import * as Console from '../../../../panels/console/console.js';
|
|
6
7
|
import * as Explain from '../../../../panels/explain/explain.js';
|
|
7
8
|
import * as FrontendHelpers from '../../../../testing/EnvironmentHelpers.js';
|
|
8
9
|
import * as ComponentHelpers from '../../helpers/helpers.js';
|
|
@@ -23,11 +24,11 @@ const component = new ConsoleInsight(
|
|
|
23
24
|
isPageReloadRecommended: false,
|
|
24
25
|
sources: [
|
|
25
26
|
{
|
|
26
|
-
type:
|
|
27
|
+
type: Console.PromptBuilder.SourceType.MESSAGE,
|
|
27
28
|
value: 'Something went wrong\n\nSomething went wrong',
|
|
28
29
|
},
|
|
29
30
|
{
|
|
30
|
-
type:
|
|
31
|
+
type: Console.PromptBuilder.SourceType.NETWORK_REQUEST,
|
|
31
32
|
value: `Request: https://example.com/data.html
|
|
32
33
|
|
|
33
34
|
Request headers:
|
|
@@ -39,11 +39,13 @@ export function legacyWrapper<T extends Platform.Constructor.Constructor<UI.Widg
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
override wasShown(): void {
|
|
42
|
+
super.wasShown();
|
|
42
43
|
this.#component.wasShown();
|
|
43
44
|
void this.#component.render();
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
override willHide(): void {
|
|
48
|
+
super.willHide();
|
|
47
49
|
this.#component.willHide();
|
|
48
50
|
}
|
|
49
51
|
|
|
@@ -10,7 +10,6 @@ import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
|
|
|
10
10
|
|
|
11
11
|
import {baseConfiguration, dummyDarkTheme, dynamicSetting, DynamicSetting, themeSelection} from './config.js';
|
|
12
12
|
import {toLineColumn, toOffset} from './position.js';
|
|
13
|
-
import textEditorStyles from './textEditor.css.js';
|
|
14
13
|
|
|
15
14
|
declare global {
|
|
16
15
|
interface HTMLElementTagNameMap {
|
|
@@ -42,7 +41,6 @@ export class TextEditor extends HTMLElement {
|
|
|
42
41
|
super();
|
|
43
42
|
this.#pendingState = pendingState;
|
|
44
43
|
this.#shadow.createChild('style').textContent = CodeHighlighter.codeHighlighterStyles;
|
|
45
|
-
this.#shadow.createChild('style').textContent = textEditorStyles;
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
#createEditor(): CodeMirror.EditorView {
|
|
@@ -362,6 +362,7 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
override wasShown(): void {
|
|
365
|
+
super.wasShown();
|
|
365
366
|
this.#resizeObserver.observe(this.element);
|
|
366
367
|
this.#observedResize();
|
|
367
368
|
this.element.ownerDocument.addEventListener('keydown', this.keyDownBound, false);
|
|
@@ -371,6 +372,7 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
371
372
|
}
|
|
372
373
|
|
|
373
374
|
override willHide(): void {
|
|
375
|
+
super.willHide();
|
|
374
376
|
this.#resizeObserver.unobserve(this.element);
|
|
375
377
|
this.element.ownerDocument.removeEventListener('keydown', this.keyDownBound, false);
|
|
376
378
|
DockController.instance().removeEventListener(
|
|
@@ -118,7 +118,7 @@ export class ListWidget<T> extends VBox {
|
|
|
118
118
|
if (this.isTable) {
|
|
119
119
|
element.role = 'rowgroup';
|
|
120
120
|
}
|
|
121
|
-
const content = this.delegate.renderItem(item, editable);
|
|
121
|
+
const content = this.delegate.renderItem(item, editable, this.items.length - 1);
|
|
122
122
|
if (!content.hasAttribute('jslog')) {
|
|
123
123
|
element.setAttribute('jslog', `${VisualLogging.item()}`);
|
|
124
124
|
}
|
|
@@ -297,7 +297,7 @@ export class ListWidget<T> extends VBox {
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
export interface Delegate<T> {
|
|
300
|
-
renderItem(item: T, editable: boolean): Element;
|
|
300
|
+
renderItem(item: T, editable: boolean, index: number): Element;
|
|
301
301
|
removeItemRequested(item: T, index: number): void;
|
|
302
302
|
beginEdit(item: T): Editor<T>;
|
|
303
303
|
commitEdit(item: T, editor: Editor<T>, isNew: boolean): void;
|
|
@@ -648,11 +648,13 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
648
648
|
}
|
|
649
649
|
|
|
650
650
|
override wasShown(): void {
|
|
651
|
+
super.wasShown();
|
|
651
652
|
this.#forceUpdateLayout();
|
|
652
653
|
ZoomManager.instance().addEventListener(ZoomManagerEvents.ZOOM_CHANGED, this.onZoomChanged, this);
|
|
653
654
|
}
|
|
654
655
|
|
|
655
656
|
override willHide(): void {
|
|
657
|
+
super.willHide();
|
|
656
658
|
ZoomManager.instance().removeEventListener(ZoomManagerEvents.ZOOM_CHANGED, this.onZoomChanged, this);
|
|
657
659
|
}
|
|
658
660
|
|
|
@@ -503,6 +503,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
override wasShown(): void {
|
|
506
|
+
super.wasShown();
|
|
506
507
|
const effectiveTab = this.currentTab || this.tabsHistory[0];
|
|
507
508
|
if (effectiveTab && this.autoSelectFirstItemOnShow) {
|
|
508
509
|
this.selectTab(effectiveTab.id);
|
|
@@ -55,11 +55,9 @@ import checkboxTextLabelStyles from './checkboxTextLabel.css.js';
|
|
|
55
55
|
import confirmDialogStyles from './confirmDialog.css.js';
|
|
56
56
|
import {Dialog} from './Dialog.js';
|
|
57
57
|
import {GlassPane, PointerEventsBehavior, SizeBehavior} from './GlassPane.js';
|
|
58
|
-
import inlineButtonStyles from './inlineButton.css.js';
|
|
59
58
|
import inspectorCommonStyles from './inspectorCommon.css.js';
|
|
60
59
|
import {KeyboardShortcut, Keys} from './KeyboardShortcut.js';
|
|
61
60
|
import smallBubbleStyles from './smallBubble.css.js';
|
|
62
|
-
import type {ToolbarButton} from './Toolbar.js';
|
|
63
61
|
import {Tooltip} from './Tooltip.js';
|
|
64
62
|
import {Widget} from './Widget.js';
|
|
65
63
|
|
|
@@ -1757,15 +1755,6 @@ export class ConfirmDialog {
|
|
|
1757
1755
|
}
|
|
1758
1756
|
}
|
|
1759
1757
|
|
|
1760
|
-
export function createInlineButton(toolbarButton: ToolbarButton): Element {
|
|
1761
|
-
const element = document.createElement('span');
|
|
1762
|
-
const shadowRoot = createShadowRootWithCoreStyles(element, {cssFile: inlineButtonStyles});
|
|
1763
|
-
element.classList.add('inline-button');
|
|
1764
|
-
const toolbar = shadowRoot.createChild('devtools-toolbar');
|
|
1765
|
-
toolbar.appendToolbarItem(toolbarButton);
|
|
1766
|
-
return element;
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
1758
|
export interface RenderedObject {
|
|
1770
1759
|
element: HTMLElement;
|
|
1771
1760
|
forceSelect(): void;
|
|
@@ -2154,7 +2143,14 @@ export function bindToAction(actionName: string): ReturnType<typeof Directives.r
|
|
|
2154
2143
|
action.addEventListener(ActionRegistration.Events.ENABLED, actionEnabledChanged);
|
|
2155
2144
|
|
|
2156
2145
|
const toggleable = action.toggleable();
|
|
2157
|
-
|
|
2146
|
+
const title = action.title();
|
|
2147
|
+
const iconName = action.icon() ?? '';
|
|
2148
|
+
const jslogContext = action.id();
|
|
2149
|
+
const toggledIconName = action.toggledIcon() ?? iconName;
|
|
2150
|
+
const toggleType = action.toggleWithRedColor() ? Buttons.Button.ToggleType.RED : Buttons.Button.ToggleType.PRIMARY;
|
|
2151
|
+
if (e.childNodes.length) {
|
|
2152
|
+
e.jslogContext = jslogContext;
|
|
2153
|
+
} else if (toggleable) {
|
|
2158
2154
|
toggled = () => {
|
|
2159
2155
|
e.toggled = action.toggled();
|
|
2160
2156
|
if (action.title()) {
|
|
@@ -2163,13 +2159,6 @@ export function bindToAction(actionName: string): ReturnType<typeof Directives.r
|
|
|
2163
2159
|
}
|
|
2164
2160
|
};
|
|
2165
2161
|
action.addEventListener(ActionRegistration.Events.TOGGLED, toggled);
|
|
2166
|
-
}
|
|
2167
|
-
const title = action.title();
|
|
2168
|
-
const iconName = action.icon() ?? '';
|
|
2169
|
-
const jslogContext = action.id();
|
|
2170
|
-
const toggledIconName = action.toggledIcon() ?? iconName;
|
|
2171
|
-
const toggleType = action.toggleWithRedColor() ? Buttons.Button.ToggleType.RED : Buttons.Button.ToggleType.PRIMARY;
|
|
2172
|
-
if (toggleable) {
|
|
2173
2162
|
e.data = {
|
|
2174
2163
|
jslogContext,
|
|
2175
2164
|
title,
|