chrome-devtools-frontend 1.0.1526203 → 1.0.1528866
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/i18n/i18nImpl.ts +5 -0
- package/front_end/core/protocol_client/protocol_client.ts +1 -1
- package/front_end/core/root/Runtime.ts +28 -4
- package/front_end/core/sdk/CSSMatchedStyles.ts +50 -7
- package/front_end/core/sdk/CSSRule.ts +35 -6
- package/front_end/core/sdk/ChildTargetManager.ts +2 -0
- 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 +214 -31
- 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 +37 -11
- package/front_end/core/sdk/SourceMapManager.ts +13 -2
- package/front_end/core/sdk/SourceMapScopesInfo.ts +17 -0
- 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 +20 -25
- package/front_end/generated/InspectorBackendCommands.js +4 -3
- package/front_end/generated/protocol-mapping.d.ts +3 -1
- package/front_end/generated/protocol-proxy-api.d.ts +3 -1
- package/front_end/generated/protocol.ts +17 -3
- package/front_end/models/ai_assistance/BuiltInAi.ts +111 -0
- 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 +23 -27
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +31 -29
- package/front_end/models/persistence/EditFileSystemView.ts +1 -0
- 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/panels/console/ConsoleInsightTeaser.ts +106 -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 +27 -0
- package/front_end/panels/{explain → console}/PromptBuilder.ts +12 -7
- package/front_end/panels/console/console.ts +6 -0
- package/front_end/panels/console/consoleInsightTeaser.css +55 -0
- package/front_end/panels/coverage/CoverageListView.ts +141 -277
- package/front_end/panels/coverage/CoverageView.ts +330 -324
- 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 +1 -2
- package/front_end/panels/explain/components/ConsoleInsight.ts +14 -12
- 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 +12 -19
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +27 -43
- 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 +111 -85
- 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 +2 -1
- 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/panels/settings/WorkspaceSettingsTab.ts +2 -0
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
- 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/panels/sources/UISourceCodeFrame.ts +17 -2
- 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/web_audio/WebAudioView.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +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/buttons/Button.ts +1 -1
- 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/EmptyWidget.ts +11 -1
- package/front_end/ui/legacy/InspectorView.ts +2 -0
- 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/Toolbar.ts +25 -4
- package/front_end/ui/legacy/UIUtils.ts +28 -13
- package/front_end/ui/legacy/ViewManager.ts +1 -0
- package/front_end/ui/legacy/Widget.ts +5 -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/data_grid/DataGridElement.ts +1 -1
- 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 +9 -8
- package/front_end/ui/visual_logging/KnownContextValues.ts +17 -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
|
@@ -9,6 +9,8 @@ import * as Platform from '../platform/platform.js';
|
|
|
9
9
|
import * as Root from '../root/root.js';
|
|
10
10
|
|
|
11
11
|
import type {CallFrame, ScopeChainEntry} from './DebuggerModel.js';
|
|
12
|
+
import {scopeTreeForScript} from './ScopeTreeCache.js';
|
|
13
|
+
import type {Script} from './Script.js';
|
|
12
14
|
import {buildOriginalScopes, decodePastaRanges, type NamedFunctionRange} from './SourceMapFunctionRanges.js';
|
|
13
15
|
import {SourceMapScopesInfo} from './SourceMapScopesInfo.js';
|
|
14
16
|
|
|
@@ -131,18 +133,22 @@ export class SourceMap {
|
|
|
131
133
|
readonly #sourceInfos: SourceInfo[] = [];
|
|
132
134
|
readonly #sourceInfoByURL = new Map<Platform.DevToolsPath.UrlString, SourceInfo>();
|
|
133
135
|
|
|
136
|
+
readonly #script?: Script;
|
|
134
137
|
#scopesInfo: SourceMapScopesInfo|null = null;
|
|
135
138
|
|
|
136
139
|
readonly #debugId?: DebugId;
|
|
137
140
|
|
|
141
|
+
scopesFallbackPromiseForTest?: Promise<unknown>;
|
|
142
|
+
|
|
138
143
|
/**
|
|
139
144
|
* Implements Source Map V3 model. See https://github.com/google/closure-compiler/wiki/Source-Maps
|
|
140
145
|
* for format description.
|
|
141
146
|
*/
|
|
142
147
|
constructor(
|
|
143
148
|
compiledURL: Platform.DevToolsPath.UrlString, sourceMappingURL: Platform.DevToolsPath.UrlString,
|
|
144
|
-
payload: SourceMapV3) {
|
|
149
|
+
payload: SourceMapV3, script?: Script) {
|
|
145
150
|
this.#json = payload;
|
|
151
|
+
this.#script = script;
|
|
146
152
|
this.#compiledURL = compiledURL;
|
|
147
153
|
this.#sourceMappingURL = sourceMappingURL;
|
|
148
154
|
this.#baseURL = (Common.ParsedURL.schemeIs(sourceMappingURL, 'data:')) ? compiledURL : sourceMappingURL;
|
|
@@ -163,7 +169,7 @@ export class SourceMap {
|
|
|
163
169
|
}
|
|
164
170
|
|
|
165
171
|
augmentWithScopes(scriptUrl: Platform.DevToolsPath.UrlString, ranges: NamedFunctionRange[]): void {
|
|
166
|
-
this.#
|
|
172
|
+
this.#ensureSourceMapProcessed();
|
|
167
173
|
if (this.#json && this.#json.version > 3) {
|
|
168
174
|
throw new Error('Only support augmenting source maps up to version 3.');
|
|
169
175
|
}
|
|
@@ -212,12 +218,12 @@ export class SourceMap {
|
|
|
212
218
|
}
|
|
213
219
|
|
|
214
220
|
hasScopeInfo(): boolean {
|
|
215
|
-
this.#
|
|
216
|
-
return this.#scopesInfo !== null;
|
|
221
|
+
this.#ensureSourceMapProcessed();
|
|
222
|
+
return this.#scopesInfo !== null && !this.#scopesInfo.isEmpty();
|
|
217
223
|
}
|
|
218
224
|
|
|
219
225
|
findEntry(lineNumber: number, columnNumber: number, inlineFrameIndex?: number): SourceMapEntry|null {
|
|
220
|
-
this.#
|
|
226
|
+
this.#ensureSourceMapProcessed();
|
|
221
227
|
if (inlineFrameIndex && this.#scopesInfo !== null) {
|
|
222
228
|
// For inlineFrameIndex != 0 we use the callsite info for the corresponding inlining site.
|
|
223
229
|
// Note that the callsite for "inlineFrameIndex" is actually in the previous frame.
|
|
@@ -372,20 +378,40 @@ export class SourceMap {
|
|
|
372
378
|
}
|
|
373
379
|
|
|
374
380
|
mappings(): SourceMapEntry[] {
|
|
375
|
-
this.#
|
|
381
|
+
this.#ensureSourceMapProcessed();
|
|
376
382
|
return this.#mappings ?? [];
|
|
377
383
|
}
|
|
378
384
|
|
|
385
|
+
/**
|
|
386
|
+
* If the source map does not contain scope information by itself (e.g. "scopes proposal"
|
|
387
|
+
* or "pasta" scopes), then we'll use this getter to calculate basic function name information from
|
|
388
|
+
* the AST and mappings.
|
|
389
|
+
*/
|
|
390
|
+
async #buildScopesFallback(): Promise<SourceMapScopesInfo|null> {
|
|
391
|
+
const scopeTreeAndText = this.#script ? await scopeTreeForScript(this.#script) : null;
|
|
392
|
+
if (!scopeTreeAndText) {
|
|
393
|
+
return null;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const {scopeTree, text} = scopeTreeAndText;
|
|
397
|
+
return SourceMapScopesInfo.createFromAst(this, scopeTree, text);
|
|
398
|
+
}
|
|
399
|
+
|
|
379
400
|
private reversedMappings(sourceURL: Platform.DevToolsPath.UrlString): number[] {
|
|
380
|
-
this.#
|
|
401
|
+
this.#ensureSourceMapProcessed();
|
|
381
402
|
return this.#sourceInfoByURL.get(sourceURL)?.reverseMappings ?? [];
|
|
382
403
|
}
|
|
383
404
|
|
|
384
|
-
#
|
|
405
|
+
#ensureSourceMapProcessed(): void {
|
|
385
406
|
if (this.#mappings === null) {
|
|
386
407
|
this.#mappings = [];
|
|
387
408
|
try {
|
|
388
409
|
this.eachSection(this.parseMap.bind(this));
|
|
410
|
+
if (!this.hasScopeInfo()) {
|
|
411
|
+
this.scopesFallbackPromiseForTest = this.#buildScopesFallback().then(info => {
|
|
412
|
+
this.#scopesInfo = info;
|
|
413
|
+
});
|
|
414
|
+
}
|
|
389
415
|
} catch (e) {
|
|
390
416
|
console.error('Failed to parse source map', e);
|
|
391
417
|
this.#mappings = [];
|
|
@@ -728,7 +754,7 @@ export class SourceMap {
|
|
|
728
754
|
}
|
|
729
755
|
|
|
730
756
|
expandCallFrame(frame: CallFrame): CallFrame[] {
|
|
731
|
-
this.#
|
|
757
|
+
this.#ensureSourceMapProcessed();
|
|
732
758
|
if (this.#scopesInfo === null) {
|
|
733
759
|
return [frame];
|
|
734
760
|
}
|
|
@@ -737,7 +763,7 @@ export class SourceMap {
|
|
|
737
763
|
}
|
|
738
764
|
|
|
739
765
|
resolveScopeChain(frame: CallFrame): ScopeChainEntry[]|null {
|
|
740
|
-
this.#
|
|
766
|
+
this.#ensureSourceMapProcessed();
|
|
741
767
|
if (this.#scopesInfo === null) {
|
|
742
768
|
return null;
|
|
743
769
|
}
|
|
@@ -746,7 +772,7 @@ export class SourceMap {
|
|
|
746
772
|
}
|
|
747
773
|
|
|
748
774
|
findOriginalFunctionName(position: ScopesCodec.Position): string|null {
|
|
749
|
-
this.#
|
|
775
|
+
this.#ensureSourceMapProcessed();
|
|
750
776
|
return this.#scopesInfo?.findOriginalFunctionName(position) ?? null;
|
|
751
777
|
}
|
|
752
778
|
}
|
|
@@ -11,17 +11,24 @@ import {type DebugId, parseSourceMap, SourceMap, type SourceMapV3} from './Sourc
|
|
|
11
11
|
import {SourceMapCache} from './SourceMapCache.js';
|
|
12
12
|
import {type Target, Type} from './Target.js';
|
|
13
13
|
|
|
14
|
+
export type SourceMapFactory<T> =
|
|
15
|
+
(compiledURL: Platform.DevToolsPath.UrlString, sourceMappingURL: Platform.DevToolsPath.UrlString,
|
|
16
|
+
payload: SourceMapV3, client: T) => SourceMap;
|
|
17
|
+
|
|
14
18
|
export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWrapper.ObjectWrapper<EventTypes<T>> {
|
|
15
19
|
readonly #target: Target;
|
|
20
|
+
readonly #factory: SourceMapFactory<T>;
|
|
16
21
|
#isEnabled = true;
|
|
17
22
|
readonly #clientData = new Map<T, ClientData>();
|
|
18
23
|
readonly #sourceMaps = new Map<SourceMap, T>();
|
|
19
24
|
#attachingClient: T|null = null;
|
|
20
25
|
|
|
21
|
-
constructor(target: Target) {
|
|
26
|
+
constructor(target: Target, factory?: SourceMapFactory<T>) {
|
|
22
27
|
super();
|
|
23
28
|
|
|
24
29
|
this.#target = target;
|
|
30
|
+
this.#factory =
|
|
31
|
+
factory ?? ((compiledURL, sourceMappingURL, payload) => new SourceMap(compiledURL, sourceMappingURL, payload));
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
setEnabled(isEnabled: boolean): void {
|
|
@@ -109,7 +116,7 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
|
|
|
109
116
|
loadSourceMap(sourceMapURL, client.debugId(), initiator)
|
|
110
117
|
.then(
|
|
111
118
|
payload => {
|
|
112
|
-
const sourceMap =
|
|
119
|
+
const sourceMap = this.#factory(sourceURL, sourceMapURL, payload, client);
|
|
113
120
|
if (this.#clientData.get(client) === clientData) {
|
|
114
121
|
clientData.sourceMap = sourceMap;
|
|
115
122
|
this.#sourceMaps.set(sourceMap, client);
|
|
@@ -167,6 +174,10 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
|
|
|
167
174
|
this.dispatchEventToListeners(Events.SourceMapFailedToAttach, {client});
|
|
168
175
|
}
|
|
169
176
|
}
|
|
177
|
+
|
|
178
|
+
waitForSourceMapsProcessedForTest(): Promise<unknown> {
|
|
179
|
+
return Promise.all(this.#sourceMaps.keys().map(sourceMap => sourceMap.scopesFallbackPromiseForTest));
|
|
180
|
+
}
|
|
170
181
|
}
|
|
171
182
|
|
|
172
183
|
export async function loadSourceMap(
|
|
@@ -95,6 +95,10 @@ export class SourceMapScopesInfo {
|
|
|
95
95
|
return Boolean(this.#originalScopes[sourceIdx]);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
isEmpty(): boolean {
|
|
99
|
+
return !this.#originalScopes.length && !this.#generatedRanges.length;
|
|
100
|
+
}
|
|
101
|
+
|
|
98
102
|
addOriginalScopesAtIndex(sourceIdx: number, scope: ScopesCodec.OriginalScope): void {
|
|
99
103
|
if (!this.#originalScopes[sourceIdx]) {
|
|
100
104
|
this.#originalScopes[sourceIdx] = scope;
|
|
@@ -103,6 +107,19 @@ export class SourceMapScopesInfo {
|
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
109
|
|
|
110
|
+
/**
|
|
111
|
+
* @returns true, iff the function surrounding the provided position is marked as "hidden".
|
|
112
|
+
*/
|
|
113
|
+
isOutlinedFrame(generatedLine: number, generatedColumn: number): boolean {
|
|
114
|
+
const rangeChain = this.#findGeneratedRangeChain(generatedLine, generatedColumn);
|
|
115
|
+
for (let i = rangeChain.length - 1; i >= 0; --i) {
|
|
116
|
+
if (rangeChain[i].isStackFrame) {
|
|
117
|
+
return rangeChain[i].isHidden;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
|
|
106
123
|
/**
|
|
107
124
|
* Given a generated position, returns the original name of the surrounding function as well as
|
|
108
125
|
* all the original function names that got inlined into the surrounding generated function and their
|
|
@@ -10,8 +10,6 @@ import {assertNotNullOrUndefined} from '../platform/platform.js';
|
|
|
10
10
|
import type * as ProtocolClient from '../protocol_client/protocol_client.js';
|
|
11
11
|
import * as Root from '../root/root.js';
|
|
12
12
|
|
|
13
|
-
import {StubConnection} from './Connections.js';
|
|
14
|
-
import {RehydratingConnection} from './RehydratingConnection.js';
|
|
15
13
|
import {SDKModel} from './SDKModel.js';
|
|
16
14
|
import {Target, Type as TargetType} from './Target.js';
|
|
17
15
|
|
|
@@ -312,26 +310,6 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
312
310
|
return this.#browserTarget;
|
|
313
311
|
}
|
|
314
312
|
|
|
315
|
-
/**
|
|
316
|
-
* If this returns true, the target is not connected to a legit CDP server.
|
|
317
|
-
* However, it's not exhaustive, so some `false` responses may be misleading.
|
|
318
|
-
* (eg., tab URL of `devtools://devtools/bundled/devtools_app.html` uses a MainConnection but has no CDP server behind it).
|
|
319
|
-
*/
|
|
320
|
-
hasFakeConnection(): boolean {
|
|
321
|
-
// Rehydrated DevTools always has a fake connection, so we shortcut and avoid the race.
|
|
322
|
-
if (Root.Runtime.getPathName().includes('rehydrated_devtools_app')) {
|
|
323
|
-
return true;
|
|
324
|
-
}
|
|
325
|
-
// There _may_ be a race condition hiding here on the router/connection creation.
|
|
326
|
-
// So we play it safe and consider "no connection yet" as "not fake".
|
|
327
|
-
const connection = this.primaryPageTarget()?.router()?.connection();
|
|
328
|
-
if (!connection) {
|
|
329
|
-
return false;
|
|
330
|
-
}
|
|
331
|
-
const isFakeConnection = (connection instanceof StubConnection) || (connection instanceof RehydratingConnection);
|
|
332
|
-
return isFakeConnection;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
313
|
async maybeAttachInitialTarget(): Promise<boolean> {
|
|
336
314
|
if (!Boolean(Root.Runtime.Runtime.queryParam('browserConnection'))) {
|
|
337
315
|
return false;
|
|
@@ -14,13 +14,14 @@ import type {SourceMapV3} from './SourceMap.js';
|
|
|
14
14
|
export class TraceObject {
|
|
15
15
|
readonly traceEvents: Protocol.Tracing.DataCollectedEvent['value'];
|
|
16
16
|
readonly metadata: {sourceMaps?: Array<{sourceMapUrl: string, sourceMap: SourceMapV3, url: string}>};
|
|
17
|
-
constructor(payload: Protocol.Tracing.DataCollectedEvent['value']|TraceObject, meta
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
constructor(payload: Protocol.Tracing.DataCollectedEvent['value']|TraceObject, meta?: Object) {
|
|
18
|
+
if (Array.isArray(payload)) {
|
|
19
|
+
this.traceEvents = payload;
|
|
20
|
+
this.metadata = meta ?? {};
|
|
21
|
+
} else {
|
|
22
|
+
this.traceEvents = payload.traceEvents;
|
|
23
|
+
this.metadata = payload.metadata;
|
|
24
|
+
}
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -1403,6 +1403,71 @@ export abstract class HeapSnapshot {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
return getBit;
|
|
1405
1405
|
}
|
|
1406
|
+
case 'objectsRetainedByEventHandlers': {
|
|
1407
|
+
// This filter is based on the assumption that event handler functions are contained
|
|
1408
|
+
// (directly or indirectly) by V8EventListener nodes. In particular, the callback_object_
|
|
1409
|
+
// field of V8EventListener points to either the function used as the event handler,
|
|
1410
|
+
// or to a framework-specific wrapper object that in turn contains the actual handler.
|
|
1411
|
+
//
|
|
1412
|
+
// The filter works in two steps:
|
|
1413
|
+
// 1. Identify all event handler functions and mark them in a bitmap.
|
|
1414
|
+
// 2. Traverse the graph, avoiding paths that pass through any of the event handlers
|
|
1415
|
+
const node = this.createNode(0);
|
|
1416
|
+
const nodeFieldCount = this.nodeFieldCount;
|
|
1417
|
+
|
|
1418
|
+
// First, identify which nodes are event handlers
|
|
1419
|
+
const eventHandlerBitmap = Platform.TypedArrayUtilities.createBitVector(this.nodeCount);
|
|
1420
|
+
|
|
1421
|
+
// Iterate all nodes looking for V8EventListener objects
|
|
1422
|
+
for (let i = 0; i < this.nodeCount; ++i) {
|
|
1423
|
+
node.nodeIndex = i * nodeFieldCount;
|
|
1424
|
+
|
|
1425
|
+
// Check if this node is a V8EventListener
|
|
1426
|
+
if (node.rawName() === 'V8EventListener') {
|
|
1427
|
+
// Get the callback_object_ (edge "1")
|
|
1428
|
+
const callbackNode = this.getEdgeTarget(node, '1');
|
|
1429
|
+
if (!callbackNode) {
|
|
1430
|
+
continue;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
const callbackOrdinal = callbackNode.nodeIndex / nodeFieldCount;
|
|
1434
|
+
|
|
1435
|
+
// Check if callback has a "code" edge (direct function handler)
|
|
1436
|
+
if (this.getEdgeTarget(callbackNode, 'code')) {
|
|
1437
|
+
eventHandlerBitmap.setBit(callbackOrdinal);
|
|
1438
|
+
continue;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
// Check if any child has a "code" edge (framework wrapper)
|
|
1442
|
+
let foundChildWithCode = false;
|
|
1443
|
+
for (let childEdgeIt = callbackNode.edges(); childEdgeIt.hasNext(); childEdgeIt.next()) {
|
|
1444
|
+
const childNode = childEdgeIt.item().node();
|
|
1445
|
+
if (this.getEdgeTarget(childNode, 'code')) {
|
|
1446
|
+
eventHandlerBitmap.setBit(childNode.nodeIndex / nodeFieldCount);
|
|
1447
|
+
foundChildWithCode = true;
|
|
1448
|
+
break;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
// Fallback to marking the callback node itself
|
|
1453
|
+
if (!foundChildWithCode) {
|
|
1454
|
+
eventHandlerBitmap.setBit(callbackOrdinal);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
// Traverse the graph, avoiding paths that pass through event handlers
|
|
1460
|
+
traverse((currentNode: HeapSnapshotNode, edge: HeapSnapshotEdge) => {
|
|
1461
|
+
const targetNode = edge.node();
|
|
1462
|
+
const targetOrdinal = targetNode.nodeIndex / nodeFieldCount;
|
|
1463
|
+
// Return false (don't traverse) if the target node is an event handler
|
|
1464
|
+
return !eventHandlerBitmap.getBit(targetOrdinal);
|
|
1465
|
+
});
|
|
1466
|
+
|
|
1467
|
+
markUnreachableNodes();
|
|
1468
|
+
|
|
1469
|
+
return (node: HeapSnapshotNode) => !getBit(node);
|
|
1470
|
+
}
|
|
1406
1471
|
}
|
|
1407
1472
|
throw new Error('Invalid filter name');
|
|
1408
1473
|
}
|
|
@@ -2394,6 +2459,22 @@ export abstract class HeapSnapshot {
|
|
|
2394
2459
|
return this.strings.length - 1;
|
|
2395
2460
|
}
|
|
2396
2461
|
|
|
2462
|
+
/**
|
|
2463
|
+
* Gets the target node of an edge with the specified name.
|
|
2464
|
+
* @param node The source node to search from
|
|
2465
|
+
* @param edgeName The name of the edge to find
|
|
2466
|
+
* @returns The target node if found, null otherwise
|
|
2467
|
+
*/
|
|
2468
|
+
private getEdgeTarget(node: HeapSnapshotNode, edgeName: string): HeapSnapshotNode|null {
|
|
2469
|
+
for (let edgeIt = node.edges(); edgeIt.hasNext(); edgeIt.next()) {
|
|
2470
|
+
const edge = edgeIt.item();
|
|
2471
|
+
if (edge.name() === edgeName) {
|
|
2472
|
+
return edge.node();
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
return null;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2397
2478
|
/**
|
|
2398
2479
|
* The phase propagates whether a node is attached or detached through the
|
|
2399
2480
|
* graph and adjusts the low-level representation of nodes.
|
|
@@ -65,7 +65,9 @@ export class InspectorMainImpl implements Common.Runnable.Runnable {
|
|
|
65
65
|
await SDK.Connections.initMainConnection(async () => {
|
|
66
66
|
const type = Root.Runtime.Runtime.queryParam('v8only') ?
|
|
67
67
|
SDK.Target.Type.NODE :
|
|
68
|
-
(Root.Runtime.Runtime.queryParam('targetType') === 'tab'
|
|
68
|
+
(Root.Runtime.Runtime.queryParam('targetType') === 'tab' || Root.Runtime.Runtime.isTraceApp() ?
|
|
69
|
+
SDK.Target.Type.TAB :
|
|
70
|
+
SDK.Target.Type.FRAME);
|
|
69
71
|
// TODO(crbug.com/1348385): support waiting for debugger with tab target.
|
|
70
72
|
const waitForDebuggerInPage =
|
|
71
73
|
type === SDK.Target.Type.FRAME && Root.Runtime.Runtime.queryParam('panel') === 'sources';
|
|
@@ -510,6 +510,8 @@ export class MainImpl {
|
|
|
510
510
|
LiveMetrics.LiveMetrics.instance();
|
|
511
511
|
CrUXManager.CrUXManager.instance();
|
|
512
512
|
|
|
513
|
+
void AiAssistanceModel.BuiltInAi.BuiltInAi.instance();
|
|
514
|
+
|
|
513
515
|
new PauseListener();
|
|
514
516
|
|
|
515
517
|
const actionRegistryInstance = UI.ActionRegistry.ActionRegistry.instance({forceNew: true});
|
|
@@ -571,14 +573,6 @@ export class MainImpl {
|
|
|
571
573
|
await UI.InspectorView.InspectorView.instance().createToolbars();
|
|
572
574
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.loadCompleted();
|
|
573
575
|
|
|
574
|
-
const value = Root.Runtime.Runtime.queryParam('loadTimelineFromURL');
|
|
575
|
-
if (value !== null) {
|
|
576
|
-
// Only import Timeline if needed. If this was a static import, every load of devtools
|
|
577
|
-
// would request and evaluate the Timeline panel dep tree, slowing down the UI's load.
|
|
578
|
-
const Timeline = await import('../../panels/timeline/timeline.js');
|
|
579
|
-
Timeline.TimelinePanel.LoadTimelineHandler.instance().handleQueryParam(value);
|
|
580
|
-
}
|
|
581
|
-
|
|
582
576
|
// Initialize elements for the live announcer functionality for a11y.
|
|
583
577
|
UI.ARIAUtils.LiveAnnouncer.initializeAnnouncerElements();
|
|
584
578
|
UI.DockController.DockController.instance().announceDockLocation();
|
|
@@ -1072,15 +1066,16 @@ type ExternalRequestInput = {
|
|
|
1072
1066
|
export async function handleExternalRequest(input: ExternalRequestInput):
|
|
1073
1067
|
Promise<{response: string, devToolsLogs: object[]}> {
|
|
1074
1068
|
const generator = await handleExternalRequestGenerator(input);
|
|
1075
|
-
let result: IteratorResult<
|
|
1069
|
+
let result: IteratorResult<
|
|
1070
|
+
AiAssistanceModel.AiAgent.ExternalRequestResponse, AiAssistanceModel.AiAgent.ExternalRequestResponse>;
|
|
1076
1071
|
do {
|
|
1077
1072
|
result = await generator.next();
|
|
1078
1073
|
} while (!result.done);
|
|
1079
1074
|
const response = result.value;
|
|
1080
|
-
if (response.type === AiAssistanceModel.ExternalRequestResponseType.ERROR) {
|
|
1075
|
+
if (response.type === AiAssistanceModel.AiAgent.ExternalRequestResponseType.ERROR) {
|
|
1081
1076
|
throw new Error(response.message);
|
|
1082
1077
|
}
|
|
1083
|
-
if (response.type === AiAssistanceModel.ExternalRequestResponseType.ANSWER) {
|
|
1078
|
+
if (response.type === AiAssistanceModel.AiAgent.ExternalRequestResponseType.ANSWER) {
|
|
1084
1079
|
return {
|
|
1085
1080
|
response: response.message,
|
|
1086
1081
|
devToolsLogs: response.devToolsLogs,
|
|
@@ -1092,8 +1087,8 @@ export async function handleExternalRequest(input: ExternalRequestInput):
|
|
|
1092
1087
|
// @ts-expect-error
|
|
1093
1088
|
globalThis.handleExternalRequest = handleExternalRequest;
|
|
1094
1089
|
|
|
1095
|
-
export async function handleExternalRequestGenerator(input: ExternalRequestInput):
|
|
1096
|
-
|
|
1090
|
+
export async function handleExternalRequestGenerator(input: ExternalRequestInput): Promise<AsyncGenerator<
|
|
1091
|
+
AiAssistanceModel.AiAgent.ExternalRequestResponse, AiAssistanceModel.AiAgent.ExternalRequestResponse>> {
|
|
1097
1092
|
switch (input.kind) {
|
|
1098
1093
|
case 'PERFORMANCE_RELOAD_GATHER_INSIGHTS': {
|
|
1099
1094
|
const TimelinePanel = await import('../../panels/timeline/timeline.js');
|
|
@@ -1105,32 +1100,32 @@ export async function handleExternalRequestGenerator(input: ExternalRequestInput
|
|
|
1105
1100
|
}
|
|
1106
1101
|
case 'NETWORK_DEBUGGER': {
|
|
1107
1102
|
const AiAssistanceModel = await import('../../models/ai_assistance/ai_assistance.js');
|
|
1108
|
-
const conversationHandler = await AiAssistanceModel.ConversationHandler.instance();
|
|
1103
|
+
const conversationHandler = await AiAssistanceModel.ConversationHandler.ConversationHandler.instance();
|
|
1109
1104
|
return await conversationHandler.handleExternalRequest({
|
|
1110
|
-
conversationType: AiAssistanceModel.ConversationType.NETWORK,
|
|
1105
|
+
conversationType: AiAssistanceModel.AiHistoryStorage.ConversationType.NETWORK,
|
|
1111
1106
|
prompt: input.args.prompt,
|
|
1112
1107
|
requestUrl: input.args.requestUrl,
|
|
1113
1108
|
});
|
|
1114
1109
|
}
|
|
1115
1110
|
case 'LIVE_STYLE_DEBUGGER': {
|
|
1116
1111
|
const AiAssistanceModel = await import('../../models/ai_assistance/ai_assistance.js');
|
|
1117
|
-
const conversationHandler = AiAssistanceModel.ConversationHandler.instance();
|
|
1112
|
+
const conversationHandler = AiAssistanceModel.ConversationHandler.ConversationHandler.instance();
|
|
1118
1113
|
return await conversationHandler.handleExternalRequest({
|
|
1119
|
-
conversationType: AiAssistanceModel.ConversationType.STYLING,
|
|
1114
|
+
conversationType: AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING,
|
|
1120
1115
|
prompt: input.args.prompt,
|
|
1121
1116
|
selector: input.args.selector,
|
|
1122
1117
|
});
|
|
1123
1118
|
}
|
|
1124
1119
|
}
|
|
1125
1120
|
// eslint-disable-next-line require-yield
|
|
1126
|
-
return (async function*
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1121
|
+
return (async function*(): AsyncGenerator<
|
|
1122
|
+
AiAssistanceModel.AiAgent.ExternalRequestResponse, AiAssistanceModel.AiAgent.ExternalRequestResponse> {
|
|
1123
|
+
return {
|
|
1124
|
+
type: AiAssistanceModel.AiAgent.ExternalRequestResponseType.ERROR,
|
|
1125
|
+
// @ts-expect-error
|
|
1126
|
+
message: `Debugging with an agent of type '${input.kind}' is not implemented yet.`,
|
|
1127
|
+
};
|
|
1128
|
+
})();
|
|
1134
1129
|
}
|
|
1135
1130
|
|
|
1136
1131
|
// @ts-expect-error
|
|
@@ -784,7 +784,7 @@ inspectorBackend.registerEnum("Network.TrustTokenParamsRefreshPolicy", {UseCache
|
|
|
784
784
|
inspectorBackend.registerEnum("Network.TrustTokenOperationType", {Issuance: "Issuance", Redemption: "Redemption", Signing: "Signing"});
|
|
785
785
|
inspectorBackend.registerEnum("Network.AlternateProtocolUsage", {AlternativeJobWonWithoutRace: "alternativeJobWonWithoutRace", AlternativeJobWonRace: "alternativeJobWonRace", MainJobWonRace: "mainJobWonRace", MappingMissing: "mappingMissing", Broken: "broken", DnsAlpnH3JobWonWithoutRace: "dnsAlpnH3JobWonWithoutRace", DnsAlpnH3JobWonRace: "dnsAlpnH3JobWonRace", UnspecifiedReason: "unspecifiedReason"});
|
|
786
786
|
inspectorBackend.registerEnum("Network.ServiceWorkerRouterSource", {Network: "network", Cache: "cache", FetchEvent: "fetch-event", RaceNetworkAndFetchHandler: "race-network-and-fetch-handler", RaceNetworkAndCache: "race-network-and-cache"});
|
|
787
|
-
inspectorBackend.registerEnum("Network.InitiatorType", {Parser: "parser", Script: "script", Preload: "preload", SignedExchange: "SignedExchange", Preflight: "preflight", Other: "other"});
|
|
787
|
+
inspectorBackend.registerEnum("Network.InitiatorType", {Parser: "parser", Script: "script", Preload: "preload", SignedExchange: "SignedExchange", Preflight: "preflight", FedCM: "FedCM", Other: "other"});
|
|
788
788
|
inspectorBackend.registerEnum("Network.SetCookieBlockedReason", {SecureOnly: "SecureOnly", SameSiteStrict: "SameSiteStrict", SameSiteLax: "SameSiteLax", SameSiteUnspecifiedTreatedAsLax: "SameSiteUnspecifiedTreatedAsLax", SameSiteNoneInsecure: "SameSiteNoneInsecure", UserPreferences: "UserPreferences", ThirdPartyPhaseout: "ThirdPartyPhaseout", ThirdPartyBlockedInFirstPartySet: "ThirdPartyBlockedInFirstPartySet", SyntaxError: "SyntaxError", SchemeNotSupported: "SchemeNotSupported", OverwriteSecure: "OverwriteSecure", InvalidDomain: "InvalidDomain", InvalidPrefix: "InvalidPrefix", UnknownError: "UnknownError", SchemefulSameSiteStrict: "SchemefulSameSiteStrict", SchemefulSameSiteLax: "SchemefulSameSiteLax", SchemefulSameSiteUnspecifiedTreatedAsLax: "SchemefulSameSiteUnspecifiedTreatedAsLax", SamePartyFromCrossPartyContext: "SamePartyFromCrossPartyContext", SamePartyConflictsWithOtherAttributes: "SamePartyConflictsWithOtherAttributes", NameValuePairExceedsMaxSize: "NameValuePairExceedsMaxSize", DisallowedCharacter: "DisallowedCharacter", NoCookieContent: "NoCookieContent"});
|
|
789
789
|
inspectorBackend.registerEnum("Network.CookieBlockedReason", {SecureOnly: "SecureOnly", NotOnPath: "NotOnPath", DomainMismatch: "DomainMismatch", SameSiteStrict: "SameSiteStrict", SameSiteLax: "SameSiteLax", SameSiteUnspecifiedTreatedAsLax: "SameSiteUnspecifiedTreatedAsLax", SameSiteNoneInsecure: "SameSiteNoneInsecure", UserPreferences: "UserPreferences", ThirdPartyPhaseout: "ThirdPartyPhaseout", ThirdPartyBlockedInFirstPartySet: "ThirdPartyBlockedInFirstPartySet", UnknownError: "UnknownError", SchemefulSameSiteStrict: "SchemefulSameSiteStrict", SchemefulSameSiteLax: "SchemefulSameSiteLax", SchemefulSameSiteUnspecifiedTreatedAsLax: "SchemefulSameSiteUnspecifiedTreatedAsLax", SamePartyFromCrossPartyContext: "SamePartyFromCrossPartyContext", NameValuePairExceedsMaxSize: "NameValuePairExceedsMaxSize", PortMismatch: "PortMismatch", SchemeMismatch: "SchemeMismatch", AnonymousContext: "AnonymousContext"});
|
|
790
790
|
inspectorBackend.registerEnum("Network.CookieExemptionReason", {None: "None", UserSetting: "UserSetting", TPCDMetadata: "TPCDMetadata", TPCDDeprecationTrial: "TPCDDeprecationTrial", TopLevelTPCDDeprecationTrial: "TopLevelTPCDDeprecationTrial", TPCDHeuristics: "TPCDHeuristics", EnterprisePolicy: "EnterprisePolicy", StorageAccess: "StorageAccess", TopLevelStorageAccess: "TopLevelStorageAccess", Scheme: "Scheme", SameSiteNoneCookiesInSandbox: "SameSiteNoneCookiesInSandbox"});
|
|
@@ -858,7 +858,7 @@ inspectorBackend.registerCommand("Network.continueInterceptedRequest", [{"name":
|
|
|
858
858
|
inspectorBackend.registerCommand("Network.deleteCookies", [{"name": "name", "type": "string", "optional": false, "description": "Name of the cookies to remove.", "typeRef": null}, {"name": "url", "type": "string", "optional": true, "description": "If specified, deletes all the cookies with the given name where domain and path match provided URL.", "typeRef": null}, {"name": "domain", "type": "string", "optional": true, "description": "If specified, deletes only cookies with the exact domain.", "typeRef": null}, {"name": "path", "type": "string", "optional": true, "description": "If specified, deletes only cookies with the exact path.", "typeRef": null}, {"name": "partitionKey", "type": "object", "optional": true, "description": "If specified, deletes only cookies with the the given name and partitionKey where all partition key attributes match the cookie partition key attribute.", "typeRef": "Network.CookiePartitionKey"}], [], "Deletes browser cookies with matching name and url or domain/path/partitionKey pair.");
|
|
859
859
|
inspectorBackend.registerCommand("Network.disable", [], [], "Disables network tracking, prevents network events from being sent to the client.");
|
|
860
860
|
inspectorBackend.registerCommand("Network.emulateNetworkConditions", [{"name": "offline", "type": "boolean", "optional": false, "description": "True to emulate internet disconnection.", "typeRef": null}, {"name": "latency", "type": "number", "optional": false, "description": "Minimum latency from request sent to response headers received (ms).", "typeRef": null}, {"name": "downloadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.", "typeRef": null}, {"name": "uploadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.", "typeRef": null}, {"name": "connectionType", "type": "string", "optional": true, "description": "Connection type if known.", "typeRef": "Network.ConnectionType"}, {"name": "packetLoss", "type": "number", "optional": true, "description": "WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.", "typeRef": null}, {"name": "packetQueueLength", "type": "number", "optional": true, "description": "WebRTC packet queue length (packet). 0 removes any queue length limitations.", "typeRef": null}, {"name": "packetReordering", "type": "boolean", "optional": true, "description": "WebRTC packetReordering feature.", "typeRef": null}], [], "Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule and overrideNetworkState commands, which can be used together to the same effect.");
|
|
861
|
-
inspectorBackend.registerCommand("Network.emulateNetworkConditionsByRule", [{"name": "offline", "type": "boolean", "optional": false, "description": "True to emulate internet disconnection.", "typeRef": null}, {"name": "matchedNetworkConditions", "type": "array", "optional": false, "description": "Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are also applied for throttling of p2p connections.", "typeRef": "Network.NetworkConditions"}], ["ruleIds"], "Activates emulation of network conditions for individual requests using URL match patterns.");
|
|
861
|
+
inspectorBackend.registerCommand("Network.emulateNetworkConditionsByRule", [{"name": "offline", "type": "boolean", "optional": false, "description": "True to emulate internet disconnection.", "typeRef": null}, {"name": "matchedNetworkConditions", "type": "array", "optional": false, "description": "Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are also applied for throttling of p2p connections.", "typeRef": "Network.NetworkConditions"}], ["ruleIds"], "Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated Network.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to explicitly modify `navigator` behavior.");
|
|
862
862
|
inspectorBackend.registerCommand("Network.overrideNetworkState", [{"name": "offline", "type": "boolean", "optional": false, "description": "True to emulate internet disconnection.", "typeRef": null}, {"name": "latency", "type": "number", "optional": false, "description": "Minimum latency from request sent to response headers received (ms).", "typeRef": null}, {"name": "downloadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.", "typeRef": null}, {"name": "uploadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.", "typeRef": null}, {"name": "connectionType", "type": "string", "optional": true, "description": "Connection type if known.", "typeRef": "Network.ConnectionType"}], [], "Override the state of navigator.onLine and navigator.connection.");
|
|
863
863
|
inspectorBackend.registerCommand("Network.enable", [{"name": "maxTotalBufferSize", "type": "number", "optional": true, "description": "Buffer size in bytes to use when preserving network payloads (XHRs, etc).", "typeRef": null}, {"name": "maxResourceBufferSize", "type": "number", "optional": true, "description": "Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).", "typeRef": null}, {"name": "maxPostDataSize", "type": "number", "optional": true, "description": "Longest post body size (in bytes) that would be included in requestWillBeSent notification", "typeRef": null}, {"name": "reportDirectSocketTraffic", "type": "boolean", "optional": true, "description": "Whether DirectSocket chunk send/receive events should be reported.", "typeRef": null}, {"name": "enableDurableMessages", "type": "boolean", "optional": true, "description": "Enable storing response bodies outside of renderer, so that these survive a cross-process navigation. Requires maxTotalBufferSize to be set. Currently defaults to false.", "typeRef": null}], [], "Enables network tracking, network events will now be delivered to the client.");
|
|
864
864
|
inspectorBackend.registerCommand("Network.getAllCookies", [], ["cookies"], "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field. Deprecated. Use Storage.getCookies instead.");
|
|
@@ -870,7 +870,7 @@ inspectorBackend.registerCommand("Network.getResponseBodyForInterception", [{"na
|
|
|
870
870
|
inspectorBackend.registerCommand("Network.takeResponseBodyForInterceptionAsStream", [{"name": "interceptionId", "type": "string", "optional": false, "description": "", "typeRef": "Network.InterceptionId"}], ["stream"], "Returns a handle to the stream representing the response body. Note that after this command, the intercepted request can't be continued as is -- you either need to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified.");
|
|
871
871
|
inspectorBackend.registerCommand("Network.replayXHR", [{"name": "requestId", "type": "string", "optional": false, "description": "Identifier of XHR to replay.", "typeRef": "Network.RequestId"}], [], "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.");
|
|
872
872
|
inspectorBackend.registerCommand("Network.searchInResponseBody", [{"name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network response to search.", "typeRef": "Network.RequestId"}, {"name": "query", "type": "string", "optional": false, "description": "String to search for.", "typeRef": null}, {"name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive.", "typeRef": null}, {"name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex.", "typeRef": null}], ["result"], "Searches for given string in response content.");
|
|
873
|
-
inspectorBackend.registerCommand("Network.setBlockedURLs", [{"name": "urlPatterns", "type": "array", "optional": true, "description": "
|
|
873
|
+
inspectorBackend.registerCommand("Network.setBlockedURLs", [{"name": "urlPatterns", "type": "array", "optional": true, "description": "Patterns to match in the order in which they are given. These patterns also take precedence over any wildcard patterns defined in `urls`.", "typeRef": "Network.BlockPattern"}, {"name": "urls", "type": "array", "optional": true, "description": "URL patterns to block. Wildcards ('*') are allowed.", "typeRef": "string"}], [], "Blocks URLs from loading.");
|
|
874
874
|
inspectorBackend.registerCommand("Network.setBypassServiceWorker", [{"name": "bypass", "type": "boolean", "optional": false, "description": "Bypass service worker and load from network.", "typeRef": null}], [], "Toggles ignoring of service worker for each request.");
|
|
875
875
|
inspectorBackend.registerCommand("Network.setCacheDisabled", [{"name": "cacheDisabled", "type": "boolean", "optional": false, "description": "Cache disabled state.", "typeRef": null}], [], "Toggles ignoring cache for each request. If `true`, cache will not be used.");
|
|
876
876
|
inspectorBackend.registerCommand("Network.setCookie", [{"name": "name", "type": "string", "optional": false, "description": "Cookie name.", "typeRef": null}, {"name": "value", "type": "string", "optional": false, "description": "Cookie value.", "typeRef": null}, {"name": "url", "type": "string", "optional": true, "description": "The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.", "typeRef": null}, {"name": "domain", "type": "string", "optional": true, "description": "Cookie domain.", "typeRef": null}, {"name": "path", "type": "string", "optional": true, "description": "Cookie path.", "typeRef": null}, {"name": "secure", "type": "boolean", "optional": true, "description": "True if cookie is secure.", "typeRef": null}, {"name": "httpOnly", "type": "boolean", "optional": true, "description": "True if cookie is http-only.", "typeRef": null}, {"name": "sameSite", "type": "string", "optional": true, "description": "Cookie SameSite type.", "typeRef": "Network.CookieSameSite"}, {"name": "expires", "type": "number", "optional": true, "description": "Cookie expiration date, session cookie if not set", "typeRef": "Network.TimeSinceEpoch"}, {"name": "priority", "type": "string", "optional": true, "description": "Cookie Priority type.", "typeRef": "Network.CookiePriority"}, {"name": "sameParty", "type": "boolean", "optional": true, "description": "True if cookie is SameParty.", "typeRef": null}, {"name": "sourceScheme", "type": "string", "optional": true, "description": "Cookie source scheme type.", "typeRef": "Network.CookieSourceScheme"}, {"name": "sourcePort", "type": "number", "optional": true, "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.", "typeRef": null}, {"name": "partitionKey", "type": "object", "optional": true, "description": "Cookie partition key. If not set, the cookie will be set as not partitioned.", "typeRef": "Network.CookiePartitionKey"}], ["success"], "Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.");
|
|
@@ -912,6 +912,7 @@ inspectorBackend.registerType("Network.SignedExchangeHeader", [{"name": "request
|
|
|
912
912
|
inspectorBackend.registerType("Network.SignedExchangeError", [{"name": "message", "type": "string", "optional": false, "description": "Error message.", "typeRef": null}, {"name": "signatureIndex", "type": "number", "optional": true, "description": "The index of the signature which caused the error.", "typeRef": null}, {"name": "errorField", "type": "string", "optional": true, "description": "The field which caused the error.", "typeRef": "Network.SignedExchangeErrorField"}]);
|
|
913
913
|
inspectorBackend.registerType("Network.SignedExchangeInfo", [{"name": "outerResponse", "type": "object", "optional": false, "description": "The outer response of signed HTTP exchange which was received from network.", "typeRef": "Network.Response"}, {"name": "hasExtraInfo", "type": "boolean", "optional": false, "description": "Whether network response for the signed exchange was accompanied by extra headers.", "typeRef": null}, {"name": "header", "type": "object", "optional": true, "description": "Information about the signed exchange header.", "typeRef": "Network.SignedExchangeHeader"}, {"name": "securityDetails", "type": "object", "optional": true, "description": "Security details for the signed exchange header.", "typeRef": "Network.SecurityDetails"}, {"name": "errors", "type": "array", "optional": true, "description": "Errors occurred while handling the signed exchange.", "typeRef": "Network.SignedExchangeError"}]);
|
|
914
914
|
inspectorBackend.registerType("Network.NetworkConditions", [{"name": "urlPattern", "type": "string", "optional": false, "description": "Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are matched (including p2p connections).", "typeRef": null}, {"name": "latency", "type": "number", "optional": false, "description": "Minimum latency from request sent to response headers received (ms).", "typeRef": null}, {"name": "downloadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.", "typeRef": null}, {"name": "uploadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.", "typeRef": null}, {"name": "connectionType", "type": "string", "optional": true, "description": "Connection type if known.", "typeRef": "Network.ConnectionType"}, {"name": "packetLoss", "type": "number", "optional": true, "description": "WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.", "typeRef": null}, {"name": "packetQueueLength", "type": "number", "optional": true, "description": "WebRTC packet queue length (packet). 0 removes any queue length limitations.", "typeRef": null}, {"name": "packetReordering", "type": "boolean", "optional": true, "description": "WebRTC packetReordering feature.", "typeRef": null}]);
|
|
915
|
+
inspectorBackend.registerType("Network.BlockPattern", [{"name": "urlPattern", "type": "string", "optional": false, "description": "URL pattern to match. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. Example: `*://*:*/*.css`.", "typeRef": null}, {"name": "block", "type": "boolean", "optional": false, "description": "Whether or not to block the pattern. If false, a matching request will not be blocked even if it matches a later `BlockPattern`.", "typeRef": null}]);
|
|
915
916
|
inspectorBackend.registerType("Network.DirectTCPSocketOptions", [{"name": "noDelay", "type": "boolean", "optional": false, "description": "TCP_NODELAY option", "typeRef": null}, {"name": "keepAliveDelay", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null}, {"name": "sendBufferSize", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null}, {"name": "receiveBufferSize", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null}, {"name": "dnsQueryType", "type": "string", "optional": true, "description": "", "typeRef": "Network.DirectSocketDnsQueryType"}]);
|
|
916
917
|
inspectorBackend.registerType("Network.DirectUDPSocketOptions", [{"name": "remoteAddr", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "remotePort", "type": "number", "optional": true, "description": "Unsigned int 16.", "typeRef": null}, {"name": "localAddr", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "localPort", "type": "number", "optional": true, "description": "Unsigned int 16.", "typeRef": null}, {"name": "dnsQueryType", "type": "string", "optional": true, "description": "", "typeRef": "Network.DirectSocketDnsQueryType"}, {"name": "sendBufferSize", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null}, {"name": "receiveBufferSize", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null}]);
|
|
917
918
|
inspectorBackend.registerType("Network.DirectUDPMessage", [{"name": "data", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "remoteAddr", "type": "string", "optional": true, "description": "Null for connected mode.", "typeRef": null}, {"name": "remotePort", "type": "number", "optional": true, "description": "Null for connected mode. Expected to be unsigned integer.", "typeRef": null}]);
|
|
@@ -3349,7 +3349,9 @@ export namespace ProtocolMapping {
|
|
|
3349
3349
|
returnType: void;
|
|
3350
3350
|
};
|
|
3351
3351
|
/**
|
|
3352
|
-
* Activates emulation of network conditions for individual requests using URL match patterns.
|
|
3352
|
+
* Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated
|
|
3353
|
+
* Network.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to
|
|
3354
|
+
* explicitly modify `navigator` behavior.
|
|
3353
3355
|
*/
|
|
3354
3356
|
'Network.emulateNetworkConditionsByRule': {
|
|
3355
3357
|
paramsType: [Protocol.Network.EmulateNetworkConditionsByRuleRequest];
|
|
@@ -2523,7 +2523,9 @@ declare namespace ProtocolProxyApi {
|
|
|
2523
2523
|
invoke_emulateNetworkConditions(params: Protocol.Network.EmulateNetworkConditionsRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
2524
2524
|
|
|
2525
2525
|
/**
|
|
2526
|
-
* Activates emulation of network conditions for individual requests using URL match patterns.
|
|
2526
|
+
* Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated
|
|
2527
|
+
* Network.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to
|
|
2528
|
+
* explicitly modify `navigator` behavior.
|
|
2527
2529
|
*/
|
|
2528
2530
|
invoke_emulateNetworkConditionsByRule(params: Protocol.Network.EmulateNetworkConditionsByRuleRequest): Promise<Protocol.Network.EmulateNetworkConditionsByRuleResponse>;
|
|
2529
2531
|
|
|
@@ -10466,6 +10466,7 @@ export namespace Network {
|
|
|
10466
10466
|
Preload = 'preload',
|
|
10467
10467
|
SignedExchange = 'SignedExchange',
|
|
10468
10468
|
Preflight = 'preflight',
|
|
10469
|
+
FedCM = 'FedCM',
|
|
10469
10470
|
Other = 'other',
|
|
10470
10471
|
}
|
|
10471
10472
|
|
|
@@ -11046,6 +11047,19 @@ export namespace Network {
|
|
|
11046
11047
|
packetReordering?: boolean;
|
|
11047
11048
|
}
|
|
11048
11049
|
|
|
11050
|
+
export interface BlockPattern {
|
|
11051
|
+
/**
|
|
11052
|
+
* URL pattern to match. Patterns use the URLPattern constructor string syntax
|
|
11053
|
+
* (https://urlpattern.spec.whatwg.org/) and must be absolute. Example: `*://*:*\/*.css`.
|
|
11054
|
+
*/
|
|
11055
|
+
urlPattern: string;
|
|
11056
|
+
/**
|
|
11057
|
+
* Whether or not to block the pattern. If false, a matching request will not be blocked even if it matches a later
|
|
11058
|
+
* `BlockPattern`.
|
|
11059
|
+
*/
|
|
11060
|
+
block: boolean;
|
|
11061
|
+
}
|
|
11062
|
+
|
|
11049
11063
|
export const enum DirectSocketDnsQueryType {
|
|
11050
11064
|
Ipv4 = 'ipv4',
|
|
11051
11065
|
Ipv6 = 'ipv6',
|
|
@@ -11607,10 +11621,10 @@ export namespace Network {
|
|
|
11607
11621
|
|
|
11608
11622
|
export interface SetBlockedURLsRequest {
|
|
11609
11623
|
/**
|
|
11610
|
-
*
|
|
11611
|
-
*
|
|
11624
|
+
* Patterns to match in the order in which they are given. These patterns
|
|
11625
|
+
* also take precedence over any wildcard patterns defined in `urls`.
|
|
11612
11626
|
*/
|
|
11613
|
-
urlPatterns?:
|
|
11627
|
+
urlPatterns?: BlockPattern[];
|
|
11614
11628
|
/**
|
|
11615
11629
|
* URL patterns to block. Wildcards ('*') are allowed.
|
|
11616
11630
|
* @deprecated
|