chrome-devtools-frontend 1.0.1738725 → 1.0.1742811
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/.agents/rules/ui-and-widgets/ui-accessibility-and-semantic-html.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +44 -7
- package/.agents/rules/ui-and-widgets/ui-lit-declarative-templates-and-directives.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-view-output-and-callback-contracts.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-widget-dom-and-listener-lifecycle.md +1 -1
- package/.agents/skills/code-review/SKILL.md +23 -6
- package/.agents/skills/devtools-verification/SKILL.md +2 -1
- package/.agents/skills/migrate-chromium-test/SKILL.md +1 -0
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +27 -11
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +41 -23
- package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +12 -7
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +3 -0
- package/.agents/skills/ui-widgets/SKILL.md +22 -7
- package/.agents/skills/version-control/SKILL.md +10 -1
- package/.agents/skills/visual-regression-audit/SKILL.md +88 -0
- package/.gitallowed +2 -1
- package/.stylelintignore +1 -0
- package/.stylelintrc.json +5 -1
- package/AUTHORS +1 -0
- package/DIR_METADATA +2 -1
- package/PRESUBMIT_test.py +143 -0
- package/config/owner/INFRA_OWNERS +0 -1
- package/docs/contributing/infrastructure.md +2 -2
- package/docs/ui_engineering.md +14 -4
- package/eslint.config.mjs +119 -9
- package/front_end/application_tokens.css +0 -65
- package/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/AidaClientTypes.ts +2 -0
- package/front_end/core/host/AidaErrors.ts +3 -3
- package/front_end/core/host/AidaGcaTranslation.ts +39 -0
- package/front_end/core/host/GcaClient.ts +32 -20
- package/front_end/core/host/GcaTypes.ts +4 -2
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/i18n/DevToolsLocale.ts +0 -1
- package/front_end/core/sdk/DebuggerModel.ts +25 -13
- package/front_end/core/sdk/PreloadingModel.ts +2 -2
- package/front_end/core/sdk/RehydratingConnection.ts +59 -30
- package/front_end/core/sdk/SourceMap.ts +30 -3
- package/front_end/core/sdk/SourceMapRangeMappings.ts +57 -0
- package/front_end/core/sdk/StorageKeyManager.ts +0 -1
- package/front_end/core/sdk/Target.ts +6 -0
- package/front_end/core/sdk/TargetManager.ts +10 -4
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +5 -9
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +12 -2
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +159 -52
- package/front_end/entrypoints/inspector_main/outermostTargetSelector.css +77 -25
- package/front_end/entrypoints/main/MainImpl.ts +32 -15
- package/front_end/models/ai_assistance/AiAgent2.ts +95 -46
- package/front_end/models/ai_assistance/AiConversation.ts +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -2
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +3 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +5 -4
- package/front_end/models/ai_assistance/performance/AICallTree.ts +7 -9
- package/front_end/models/ai_assistance/performance/AIQueries.ts +4 -8
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +11 -1
- package/front_end/models/ai_assistance/skills/lighthouse.md +1 -0
- package/front_end/models/ai_assistance/skills/network.md +3 -4
- package/front_end/models/ai_assistance/skills/sources.md +1 -2
- package/front_end/models/ai_assistance/skills/styling.md +3 -4
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +11 -3
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +84 -23
- package/front_end/models/ai_assistance/tools/ListSources.ts +41 -13
- package/front_end/models/badges/Badge.ts +0 -1
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/bindings/ResourceScriptMapping.ts +1 -1
- package/front_end/models/breakpoints/BreakpointManager.ts +2 -4
- package/front_end/models/breakpoints/RecurringPauseDetector.ts +140 -0
- package/front_end/models/breakpoints/breakpoints.ts +2 -1
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +2 -2
- package/front_end/models/persistence/Automapping.ts +0 -1
- package/front_end/models/trace/Processor.ts +16 -7
- package/front_end/models/trace/README.md +17 -1
- package/front_end/models/trace/extras/ThirdParties.ts +4 -6
- package/front_end/models/trace/extras/TraceFilter.ts +16 -8
- package/front_end/models/trace/extras/TraceTree.ts +159 -125
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -5
- package/front_end/models/trace/handlers/MetaHandler.ts +3 -0
- package/front_end/models/trace/handlers/RendererHandler.ts +7 -6
- package/front_end/models/trace/handlers/SamplesHandler.ts +1 -1
- package/front_end/models/trace/handlers/types.ts +15 -0
- package/front_end/models/trace/helpers/Extensions.ts +1 -3
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +155 -87
- package/front_end/models/trace/helpers/Trace.ts +19 -14
- package/front_end/models/trace/helpers/TreeHelpers.ts +38 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +3 -3
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +19 -4
- package/front_end/models/trace/lantern/simulation/Simulator.ts +4 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +19 -9
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +30 -3
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +2 -4
- package/front_end/panels/ai_assistance/components/chatMessage.css +1 -22
- package/front_end/panels/ai_assistance/components/chatView.css +0 -180
- package/front_end/panels/ai_assistance/components/exploreWidget.css +1 -19
- package/front_end/panels/ai_assistance/components/optInChangeDialog.css +1 -1
- package/front_end/panels/ai_assistance/components/walkthroughView.css +0 -13
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +3 -2
- package/front_end/panels/animation/AnimationTimeline.ts +5 -3
- package/front_end/panels/animation/animationTimeline.css +10 -8
- package/front_end/panels/application/ApplicationPanelSidebar.ts +14 -11
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +66 -3
- package/front_end/panels/application/ReportingApiView.ts +0 -1
- package/front_end/panels/application/SubAppsView.ts +0 -1
- package/front_end/panels/application/WebMCPTreeElement.ts +3 -6
- package/front_end/panels/application/WebMCPView.ts +30 -0
- package/front_end/panels/application/components/ReportsGrid.ts +0 -1
- package/front_end/panels/application/components/backForwardCacheView.css +1 -8
- package/front_end/panels/application/components/permissionsPolicySection.css +2 -2
- package/front_end/panels/application/components/protocolHandlersView.css +46 -39
- package/front_end/panels/application/components/trustTokensView.css +0 -4
- package/front_end/panels/application/cookieItemsView.css +0 -7
- package/front_end/panels/application/indexedDBViews.css +0 -6
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +0 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +0 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -5
- package/front_end/panels/application/preloading/components/preloadingGrid.css +0 -9
- package/front_end/panels/application/resourcesPanel.css +0 -48
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +2 -9
- package/front_end/panels/application/serviceWorkersView.css +5 -4
- package/front_end/panels/application/storageView.css +0 -5
- package/front_end/panels/application/webMCPView.css +17 -0
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +15 -20
- package/front_end/panels/changes/changesView.css +0 -5
- package/front_end/panels/common/ExtensionServer.ts +80 -10
- package/front_end/panels/console/ConsolePanel.ts +92 -18
- package/front_end/panels/console/consoleContextSelector.css +1 -8
- package/front_end/panels/console/consoleInsightTeaser.css +10 -17
- package/front_end/panels/console/consolePinPane.css +3 -1
- package/front_end/panels/console/consoleView.css +14 -18
- package/front_end/panels/coverage/coverageListView.css +0 -4
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +0 -22
- package/front_end/panels/css_overview/cssOverviewStartView.css +0 -43
- package/front_end/panels/developer_resources/developerResourcesListView.css +0 -4
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +52 -45
- package/front_end/panels/elements/LayoutPane.ts +1 -3
- package/front_end/panels/elements/PropertiesWidget.ts +26 -8
- package/front_end/panels/elements/PropertyRenderer.ts +45 -21
- package/front_end/panels/elements/StandaloneStylesContainer.ts +6 -7
- package/front_end/panels/elements/StyleEditorWidget.ts +110 -63
- package/front_end/panels/elements/StylePropertiesSection.ts +18 -14
- package/front_end/panels/elements/StylePropertyTreeElement.ts +556 -527
- package/front_end/panels/elements/StylesContainer.ts +5 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -15
- package/front_end/panels/elements/classesPaneWidget.css +3 -7
- package/front_end/panels/elements/components/CSSQuery.ts +6 -5
- package/front_end/panels/elements/components/CSSVariableValueView.ts +17 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +178 -140
- package/front_end/panels/elements/components/cssQuery.css +1 -1
- package/front_end/panels/elements/components/stylePropertyEditor.css +60 -56
- package/front_end/panels/elements/layoutPane.css +2 -2
- package/front_end/panels/elements/metricsSidebarPane.css +7 -8
- package/front_end/panels/elements/platformFontsWidget.css +1 -1
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +1 -12
- package/front_end/panels/elements/stylesSidebarPane.css +3 -5
- package/front_end/panels/emulation/deviceModeView.css +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +9 -2
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/explain/components/consoleInsight.css +1 -7
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +88 -46
- package/front_end/panels/issues/AffectedHeavyAdView.ts +72 -43
- package/front_end/panels/issues/AffectedResourcesView.ts +81 -13
- package/front_end/panels/issues/GenericIssueDetailsView.ts +112 -32
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/issues/issuesTree.css +13 -43
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +1 -1
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/layer_viewer/paintProfiler.css +4 -3
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +1 -6
- package/front_end/panels/lighthouse/lighthousePanel.css +0 -9
- package/front_end/panels/lighthouse/lighthouseStartView.css +5 -16
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +0 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +1 -1
- package/front_end/panels/media/playerListView.css +1 -2
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +4 -4
- package/front_end/panels/network/NetworkLogView.ts +603 -582
- package/front_end/panels/network/RequestCookiesView.ts +0 -1
- package/front_end/panels/network/RequestTimingView.ts +16 -2
- package/front_end/panels/network/networkConfigView.css +3 -4
- package/front_end/panels/network/networkLogView.css +363 -377
- package/front_end/panels/network/networkPanel.css +1 -7
- package/front_end/panels/network/networkTimingTable.css +12 -27
- package/front_end/panels/network/networkWaterfallColumn.css +1 -1
- package/front_end/panels/network/requestConditionsDrawer.css +0 -4
- package/front_end/panels/network/requestCookiesView.css +7 -1
- package/front_end/panels/network/requestPayloadTree.css +0 -4
- package/front_end/panels/profiler/HeapProfileView.ts +1 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +0 -7
- package/front_end/panels/profiler/profilesPanel.css +0 -11
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecorderPanel.ts +1 -1
- package/front_end/panels/recorder/RecordingView.ts +32 -11
- package/front_end/panels/recorder/StepView.ts +31 -5
- package/front_end/panels/recorder/TimelineSection.ts +22 -6
- package/front_end/panels/recorder/controlButton.css +2 -9
- package/front_end/panels/recorder/createRecordingView.css +1 -1
- package/front_end/panels/recorder/recorderPanel.css +0 -9
- package/front_end/panels/recorder/recordingListView.css +4 -4
- package/front_end/panels/recorder/recordingView.css +44 -52
- package/front_end/panels/recorder/replaySection.css +2 -0
- package/front_end/panels/recorder/stepEditor.css +4 -4
- package/front_end/panels/recorder/stepView.css +47 -21
- package/front_end/panels/recorder/timelineSection.css +63 -83
- package/front_end/panels/screencast/ScreencastApp.ts +0 -1
- package/front_end/panels/search/searchView.css +1 -1
- package/front_end/panels/security/mainView.css +1 -1
- package/front_end/panels/security/originView.css +2 -2
- package/front_end/panels/sensors/SensorsView.ts +273 -361
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +0 -1
- package/front_end/panels/settings/backendLinkingSettingsTab.css +7 -7
- package/front_end/panels/settings/components/syncSection.css +0 -1
- package/front_end/panels/settings/workspaceSettingsTab.css +0 -5
- package/front_end/panels/sources/CSSPlugin.ts +177 -98
- package/front_end/panels/sources/DebuggerPausedMessage.ts +100 -27
- package/front_end/panels/sources/NavigatorView.ts +926 -946
- package/front_end/panels/sources/SourcesPanel.ts +9 -2
- package/front_end/panels/sources/breakpointsView.css +6 -28
- package/front_end/panels/sources/components/HeadersView.css +2 -2
- package/front_end/panels/sources/debuggerPausedMessage.css +7 -0
- package/front_end/panels/sources/navigatorTree.css +7 -2
- package/front_end/panels/sources/sourcesNavigator.css +0 -9
- package/front_end/panels/sources/sourcesView.css +2 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +0 -10
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +3 -0
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +18 -5
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +0 -10
- package/front_end/panels/timeline/ModificationsManager.ts +0 -1
- package/front_end/panels/timeline/ThreadAppender.ts +2 -6
- package/front_end/panels/timeline/TimelineController.ts +30 -26
- package/front_end/panels/timeline/TimelineDetailsView.ts +10 -9
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +4 -16
- package/front_end/panels/timeline/TimelineMiniMap.ts +132 -54
- package/front_end/panels/timeline/TimelinePanel.ts +2 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +63 -50
- package/front_end/panels/timeline/TimelineUIUtils.ts +8 -10
- package/front_end/panels/timeline/components/DetailsView.ts +7 -14
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +0 -2
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +5 -1
- package/front_end/panels/timeline/components/fieldSettingsDialog.css +1 -6
- package/front_end/panels/timeline/components/insights/baseInsightComponent.css +0 -12
- package/front_end/panels/timeline/components/interactionBreakdown.css +1 -1
- package/front_end/panels/timeline/components/layoutShiftDetails.css +2 -9
- package/front_end/panels/timeline/components/liveMetricsView.css +0 -16
- package/front_end/panels/timeline/components/metricCard.css +1 -5
- package/front_end/panels/timeline/components/networkRequestDetails.css +3 -3
- package/front_end/panels/timeline/components/networkRequestTooltip.css +6 -4
- package/front_end/panels/timeline/components/networkTrackWidget.css +1 -1
- package/front_end/panels/timeline/components/sidebarAnnotationsTab.css +1 -1
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -1
- package/front_end/panels/timeline/docs/profile_calls.md +7 -9
- package/front_end/panels/timeline/timelineDetailsView.css +1 -12
- package/front_end/panels/timeline/timelineFlamechartPopover.css +0 -4
- package/front_end/panels/timeline/timelineMiniMap.css +1 -4
- package/front_end/panels/timeline/timelinePanel.css +0 -4
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/panels/timeline/timelineTreeView.css +0 -12
- package/front_end/panels/timeline/utils/EntryNodes.ts +1 -1
- package/front_end/panels/webauthn/webauthnPane.css +2 -8
- package/front_end/panels/whats_new/ReleaseNoteText.ts +1 -1
- package/front_end/third_party/axe-core/README.chromium +2 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +328 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +907 -588
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +119 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts +120 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +23 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +21 -14
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +158 -67
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js +28 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js +19 -11
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +17 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js +62 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts +29 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js +60 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +24 -9
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js +16 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js +37 -20
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +10 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js +18 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js +24 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js +6 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js +30 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js +12 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +40 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts +23 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js +37 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +74 -16
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +34 -23
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.d.ts +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js +94 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js +29 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js +6 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +34 -15
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +11 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +10 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/decorators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +328 -11
- package/front_end/third_party/puppeteer/package/package.json +10 -8
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +118 -0
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +119 -0
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +25 -2
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +28 -0
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +65 -38
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +27 -7
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +43 -7
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +38 -8
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +27 -12
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +19 -6
- package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +72 -5
- package/front_end/third_party/puppeteer/package/src/bidi/NetworkEvents.ts +82 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +37 -13
- package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +26 -14
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +43 -22
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -5
- package/front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts +21 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Request.ts +27 -5
- package/front_end/third_party/puppeteer/package/src/cdp/Binding.ts +6 -4
- package/front_end/third_party/puppeteer/package/src/cdp/ExtensionTransport.ts +31 -6
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +18 -1
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +48 -0
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkEventManager.ts +58 -5
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +94 -14
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +50 -28
- package/front_end/third_party/puppeteer/package/src/cdp/ResponseBodyStream.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +38 -3
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +6 -5
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +17 -8
- package/front_end/third_party/puppeteer/package/src/common/util.ts +32 -15
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +21 -13
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +10 -10
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/decorators.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -0
- package/front_end/ui/components/adorners/adorner.css +1 -1
- package/front_end/ui/components/buttons/button.css +0 -28
- package/front_end/ui/components/buttons/textButton.css +1 -45
- package/front_end/ui/components/diff_view/diffView.css +0 -2
- package/front_end/ui/components/input/checkbox.css +3 -3
- package/front_end/ui/components/issue_counter/issueLinkIcon.css +2 -2
- package/front_end/ui/components/menus/Menu.ts +14 -0
- package/front_end/ui/components/menus/menu.css +2 -14
- package/front_end/ui/components/menus/menuItem.css +0 -4
- package/front_end/ui/components/request_link_icon/requestLinkIcon.css +2 -2
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/survey_link/surveyLink.css +3 -3
- package/front_end/ui/components/switch/switch.css +3 -2
- package/front_end/ui/components/text_editor/theme.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +29 -0
- package/front_end/ui/components/tree_outline/treeOutline.css +1 -24
- package/front_end/ui/legacy/ContextMenu.ts +5 -5
- package/front_end/ui/legacy/SoftContextMenu.ts +24 -8
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +31 -78
- package/front_end/ui/legacy/UIUtils.ts +9 -17
- package/front_end/ui/legacy/checkboxTextLabel.css +2 -44
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +39 -27
- package/front_end/ui/legacy/components/color_picker/spectrum.css +2 -10
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +2 -6
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +34 -26
- package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/swatchPopover.css +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +83 -21
- package/front_end/ui/legacy/components/object_ui/objectPopover.css +0 -4
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +41 -14
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +1 -9
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +2 -1
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +0 -5
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +6 -3
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +95 -1
- package/front_end/ui/legacy/components/source_frame/imageView.css +2 -2
- package/front_end/ui/legacy/filter.css +7 -3
- package/front_end/ui/legacy/inspectorCommon.css +7 -81
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +1 -1
- package/front_end/ui/legacy/listWidget.css +2 -2
- package/front_end/ui/legacy/progressIndicator.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +6 -10
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/front_end/ui/visual_logging/LoggingDriver.ts +4 -0
- package/front_end/ui/visual_logging/visual_logging.ts +1 -1
- package/inspector_overlay/common.ts +0 -3
- package/inspector_overlay/main.ts +1 -3
- package/inspector_overlay/tool_highlight.css +0 -7
- package/inspector_overlay/tool_highlight.ts +0 -1
- package/inspector_overlay/tool_source_order.css +0 -4
- package/package.json +1 -1
- package/front_end/generated/SupportedCSSProperties.ts +0 -9689
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPRequest.d.ts","sourceRoot":"","sources":["../../../src/cdp/HTTPRequest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,KAAK,gCAAgC,EAErC,WAAW,EAEX,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAGhC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAiB,KAAK,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAO/D,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAgBvD;;G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,MAAM,CAAA;KAAC,GAAG,IAAI;IAS9C,SAAS,CAAC,gBAAgB,IAAI,OAAO;IAQrC;;OAEG;IACG,SAAS,CACb,SAAS,GAAE,gCAAqC,GAC/C,OAAO,CAAC,IAAI,CAAC;IA4BV,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAsDtE,MAAM,CACV,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,GAC/C,OAAO,CAAC,IAAI,CAAC;IAkBhB;;;;;OAKG;IACH,IAAI,kBAAkB,IAAI,gCAAgC,CAIzD;IAED;;;;;;OAMG;IACG,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;CAU3C"}
|
|
@@ -21,6 +21,7 @@ export class CdpHTTPRequest extends HTTPRequest {
|
|
|
21
21
|
#initiator;
|
|
22
22
|
#logger;
|
|
23
23
|
#resolution = null;
|
|
24
|
+
#worker;
|
|
24
25
|
get client() {
|
|
25
26
|
return this.#client;
|
|
26
27
|
}
|
|
@@ -36,7 +37,7 @@ export class CdpHTTPRequest extends HTTPRequest {
|
|
|
36
37
|
set _fetchClient(fetchClient) {
|
|
37
38
|
this.#fetchClient = fetchClient;
|
|
38
39
|
}
|
|
39
|
-
constructor(client, frame, interceptionId, allowInterception, data, redirectChain, logger, fetchClient = client) {
|
|
40
|
+
constructor(client, frame, worker, interceptionId, allowInterception, data, redirectChain, logger, fetchClient = client) {
|
|
40
41
|
super();
|
|
41
42
|
this.#logger = logger;
|
|
42
43
|
this.#client = client;
|
|
@@ -67,6 +68,7 @@ export class CdpHTTPRequest extends HTTPRequest {
|
|
|
67
68
|
}
|
|
68
69
|
this.#hasPostData = data.request.hasPostData ?? false;
|
|
69
70
|
this.#frame = frame;
|
|
71
|
+
this.#worker = worker;
|
|
70
72
|
this._redirectChain = redirectChain;
|
|
71
73
|
this.#initiator = data.initiator;
|
|
72
74
|
this.interception.enabled = allowInterception;
|
|
@@ -125,6 +127,12 @@ export class CdpHTTPRequest extends HTTPRequest {
|
|
|
125
127
|
response() {
|
|
126
128
|
return this._response;
|
|
127
129
|
}
|
|
130
|
+
page() {
|
|
131
|
+
return this.#frame?.page() ?? null;
|
|
132
|
+
}
|
|
133
|
+
worker() {
|
|
134
|
+
return this.#worker;
|
|
135
|
+
}
|
|
128
136
|
frame() {
|
|
129
137
|
return this.#frame;
|
|
130
138
|
}
|
|
@@ -146,7 +154,9 @@ export class CdpHTTPRequest extends HTTPRequest {
|
|
|
146
154
|
};
|
|
147
155
|
}
|
|
148
156
|
canBeIntercepted() {
|
|
149
|
-
return !this.url().startsWith('data:') &&
|
|
157
|
+
return (!this.url().startsWith('data:') &&
|
|
158
|
+
!this._fromMemoryCache &&
|
|
159
|
+
Boolean(this._interceptionId));
|
|
150
160
|
}
|
|
151
161
|
/**
|
|
152
162
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPRequest.js","sourceRoot":"","sources":["../../../src/cdp/HTTPRequest.ts"],"names":[],"mappings":"AASA,OAAO,EAEL,YAAY,EACZ,WAAW,EACX,yBAAyB,EAGzB,YAAY,EACZ,WAAW,GACZ,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"HTTPRequest.js","sourceRoot":"","sources":["../../../src/cdp/HTTPRequest.ts"],"names":[],"mappings":"AASA,OAAO,EAEL,YAAY,EACZ,WAAW,EACX,yBAAyB,EAGzB,YAAY,EACZ,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAC,cAAc,EAAc,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAkB7B;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IACpC,EAAE,CAAS;IAIpB,OAAO,CAAa;IACpB,YAAY,CAAa;IACzB,oBAAoB,CAAU;IAE9B,IAAI,CA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C,KAAK,yBAAyB,CAAC,QAAQ;gBACrC,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;YAC1D,KAAK,yBAAyB,CAAC,OAAO;gBACpC,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACxD,KAAK,yBAAyB,CAAC,KAAK;gBAClC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;CACF"}
|
|
@@ -14,6 +14,7 @@ import type { CdpHTTPRequest } from './HTTPRequest.js';
|
|
|
14
14
|
export declare class CdpHTTPResponse extends HTTPResponse {
|
|
15
15
|
#private;
|
|
16
16
|
constructor(request: CdpHTTPRequest, responsePayload: Protocol.Network.Response, extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent | null);
|
|
17
|
+
_setEncodedDataLength(encodedDataLength: number): void;
|
|
17
18
|
_resolveBody(err?: Error): void;
|
|
18
19
|
remoteAddress(): RemoteAddress;
|
|
19
20
|
url(): string;
|
|
@@ -22,7 +23,9 @@ export declare class CdpHTTPResponse extends HTTPResponse {
|
|
|
22
23
|
headers(): Record<string, string>;
|
|
23
24
|
securityDetails(): SecurityDetails | null;
|
|
24
25
|
timing(): Protocol.Network.ResourceTiming | null;
|
|
26
|
+
encodedDataLength(): number;
|
|
25
27
|
content(): Promise<Uint8Array>;
|
|
28
|
+
stream(): Promise<ReadableStream<Uint8Array>>;
|
|
26
29
|
request(): CdpHTTPRequest;
|
|
27
30
|
fromCache(): boolean;
|
|
28
31
|
fromServiceWorker(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPResponse.d.ts","sourceRoot":"","sources":["../../../src/cdp/HTTPResponse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAC,QAAQ,EAAC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AAI,MAAM;IAI3B,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAkCxB,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAgCnD,OAAO,IAAI,cAAc;IAIzB,SAAS,IAAI,OAAO;IAIpB,iBAAiB,IAAI,OAAO;IAI5B,KAAK,IAAI,KAAK,GAAG,IAAI;CAG/B"}
|
|
@@ -4,6 +4,7 @@ import { SecurityDetails } from '../common/SecurityDetails.js';
|
|
|
4
4
|
import { Deferred } from '../util/Deferred.js';
|
|
5
5
|
import { stringToTypedArray } from '../util/encoding.js';
|
|
6
6
|
import { normalizeHeaderValue } from '../util/httpUtils.js';
|
|
7
|
+
import { createResponseBodyStream } from './ResponseBodyStream.js';
|
|
7
8
|
/**
|
|
8
9
|
* @internal
|
|
9
10
|
*/
|
|
@@ -19,6 +20,7 @@ export class CdpHTTPResponse extends HTTPResponse {
|
|
|
19
20
|
#headers = {};
|
|
20
21
|
#securityDetails;
|
|
21
22
|
#timing;
|
|
23
|
+
#encodedDataLength = 0;
|
|
22
24
|
constructor(request, responsePayload, extraInfo) {
|
|
23
25
|
super();
|
|
24
26
|
this.#request = request;
|
|
@@ -43,6 +45,7 @@ export class CdpHTTPResponse extends HTTPResponse {
|
|
|
43
45
|
? new SecurityDetails(responsePayload.securityDetails)
|
|
44
46
|
: null;
|
|
45
47
|
this.#timing = responsePayload.timing || null;
|
|
48
|
+
this._setEncodedDataLength(responsePayload.encodedDataLength);
|
|
46
49
|
}
|
|
47
50
|
#parseStatusTextFromExtraInfo(extraInfo) {
|
|
48
51
|
if (!extraInfo || !extraInfo.headersText) {
|
|
@@ -62,6 +65,14 @@ export class CdpHTTPResponse extends HTTPResponse {
|
|
|
62
65
|
}
|
|
63
66
|
return statusText;
|
|
64
67
|
}
|
|
68
|
+
_setEncodedDataLength(encodedDataLength) {
|
|
69
|
+
// Chromium reports -1 when no data was transferred over the network (e.g.
|
|
70
|
+
// data: or file: URLs) or when the size is unknown (e.g. synchronous XHRs
|
|
71
|
+
// to data: URLs). Keep the last known value in that case, defaulting to 0.
|
|
72
|
+
if (encodedDataLength >= 0) {
|
|
73
|
+
this.#encodedDataLength = encodedDataLength;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
65
76
|
_resolveBody(err) {
|
|
66
77
|
if (err) {
|
|
67
78
|
return this.#bodyLoadedDeferred.reject(err);
|
|
@@ -89,6 +100,9 @@ export class CdpHTTPResponse extends HTTPResponse {
|
|
|
89
100
|
timing() {
|
|
90
101
|
return this.#timing;
|
|
91
102
|
}
|
|
103
|
+
encodedDataLength() {
|
|
104
|
+
return this.#encodedDataLength;
|
|
105
|
+
}
|
|
92
106
|
content() {
|
|
93
107
|
if (!this.#contentPromise) {
|
|
94
108
|
this.#contentPromise = this.#bodyLoadedDeferred
|
|
@@ -114,6 +128,32 @@ export class CdpHTTPResponse extends HTTPResponse {
|
|
|
114
128
|
}
|
|
115
129
|
return this.#contentPromise;
|
|
116
130
|
}
|
|
131
|
+
async stream() {
|
|
132
|
+
if (this.#bodyLoadedDeferred.finished()) {
|
|
133
|
+
return await this.#contentStream();
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
// Use the request's client, as it might have been updated for an adopted
|
|
137
|
+
// OOPIF.
|
|
138
|
+
return await createResponseBodyStream(this.#request.client, this.#request.id);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
if (error instanceof ProtocolError &&
|
|
142
|
+
error.originalMessage.includes('already finished loading')) {
|
|
143
|
+
return await this.#contentStream();
|
|
144
|
+
}
|
|
145
|
+
throw error;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
async #contentStream() {
|
|
149
|
+
const content = await this.content();
|
|
150
|
+
return new ReadableStream({
|
|
151
|
+
start(controller) {
|
|
152
|
+
controller.enqueue(content);
|
|
153
|
+
controller.close();
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
}
|
|
117
157
|
request() {
|
|
118
158
|
return this.#request;
|
|
119
159
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPResponse.js","sourceRoot":"","sources":["../../../src/cdp/HTTPResponse.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,YAAY,EAAqB,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAC,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"HTTPResponse.js","sourceRoot":"","sources":["../../../src/cdp/HTTPResponse.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,YAAY,EAAqB,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAC,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAC,wBAAwB,EAAC,MAAM,yBAAyB,CAAC;AAEjE;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,YAAY;IAC/C,QAAQ,CAAiB;IACzB,eAAe,GAA+B,IAAI,CAAC;IACnD,mBAAmB,GAAG,QAAQ,CAAC,MAAM,EAAe,CAAC;IACrD,cAAc,CAAgB;IAC9B,OAAO,CAAS;IAChB,WAAW,CAAS;IACpB,cAAc,CAAU;IACxB,kBAAkB,CAAU;IAC5B,QAAQ,GAA2B,EAAE,CAAC;IACtC,gBAAgB,CAAyB;IACzC,OAAO,CAAyC;IAChD,kB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cAAc,EAAE,CAAC;QACrC,CAAC;QACD,IAAI,CAAC;YACH,yEAAyE;YACzE,SAAS;YACT,OAAO,MAAM,wBAAwB,CACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,EACpB,IAAI,CAAC,QAAQ,CAAC,EAAE,CACjB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IACE,KAAK,YAAY,aAAa;gBAC9B,KAAK,CAAC,eAAe,CAAC,QAAQ,CAAC,0BAA0B,CAAC,EAC1D,CAAC;gBACD,OAAO,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;YACrC,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrC,OAAO,IAAI,cAAc,CAAC;YACxB,KAAK,CAAC,UAAU;gBACd,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAC5B,UAAU,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAEQ,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAEQ,SAAS;QAChB,OAAO,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC/D,CAAC;IAEQ,iBAAiB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAEQ,KAAK;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -38,6 +38,16 @@ export interface SessionEvent<T> {
|
|
|
38
38
|
event: T;
|
|
39
39
|
client: CDPSession;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* A stored `Network.requestWillBeSent` event. With request interception
|
|
43
|
+
* enabled, it can also hold a `Network.loadingFailed` event that arrived
|
|
44
|
+
* before the `Fetch.requestPaused` event that creates the request.
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export interface StoredRequestWillBeSent extends SessionEvent<Protocol.Network.RequestWillBeSentEvent> {
|
|
49
|
+
loadingFailed?: SessionEvent<Protocol.Network.LoadingFailedEvent>;
|
|
50
|
+
}
|
|
41
51
|
/**
|
|
42
52
|
* @internal
|
|
43
53
|
*/
|
|
@@ -50,6 +60,11 @@ export type NetworkRequestId = string;
|
|
|
50
60
|
export declare class NetworkEventManager {
|
|
51
61
|
#private;
|
|
52
62
|
forget(networkRequestId: NetworkRequestId): void;
|
|
63
|
+
/**
|
|
64
|
+
* Ids of the requests whose Network events come from `client`, both the
|
|
65
|
+
* ones already emitted and the ones still waiting for more events.
|
|
66
|
+
*/
|
|
67
|
+
requestIdsForClient(client: CDPSession): Set<NetworkRequestId>;
|
|
53
68
|
requestExtraInfo(networkRequestId: NetworkRequestId): Protocol.Network.RequestWillBeSentExtraInfoEvent[];
|
|
54
69
|
responseExtraInfo(networkRequestId: NetworkRequestId): Protocol.Network.ResponseReceivedExtraInfoEvent[];
|
|
55
70
|
private queuedRedirectInfo;
|
|
@@ -57,7 +72,7 @@ export declare class NetworkEventManager {
|
|
|
57
72
|
takeQueuedRedirectInfo(fetchRequestId: FetchRequestId): RedirectInfo | undefined;
|
|
58
73
|
inFlightRequestsCount(): number;
|
|
59
74
|
storeRequestWillBeSent(networkRequestId: NetworkRequestId, event: Protocol.Network.RequestWillBeSentEvent, client: CDPSession): void;
|
|
60
|
-
getRequestWillBeSent(networkRequestId: NetworkRequestId):
|
|
75
|
+
getRequestWillBeSent(networkRequestId: NetworkRequestId): StoredRequestWillBeSent | undefined;
|
|
61
76
|
forgetRequestWillBeSent(networkRequestId: NetworkRequestId): void;
|
|
62
77
|
getRequestPaused(networkRequestId: NetworkRequestId): SessionEvent<Protocol.Fetch.RequestPausedEvent> | undefined;
|
|
63
78
|
forgetRequestPaused(networkRequestId: NetworkRequestId): void;
|
|
@@ -65,6 +80,13 @@ export declare class NetworkEventManager {
|
|
|
65
80
|
getRequest(networkRequestId: NetworkRequestId): CdpHTTPRequest | undefined;
|
|
66
81
|
storeRequest(networkRequestId: NetworkRequestId, request: CdpHTTPRequest): void;
|
|
67
82
|
forgetRequest(networkRequestId: NetworkRequestId): void;
|
|
83
|
+
/**
|
|
84
|
+
* With request interception enabled, Network.loadingFailed can arrive before
|
|
85
|
+
* the Fetch.requestPaused event that creates the request. The failure is
|
|
86
|
+
* kept with the stored requestWillBeSent event until then, so that
|
|
87
|
+
* `requestfailed` is not lost.
|
|
88
|
+
*/
|
|
89
|
+
storeLoadingFailedBeforeRequest(networkRequestId: NetworkRequestId, event: Protocol.Network.LoadingFailedEvent, client: CDPSession): void;
|
|
68
90
|
getQueuedEventGroup(networkRequestId: NetworkRequestId): QueuedEventGroup | undefined;
|
|
69
91
|
queueEventGroup(networkRequestId: NetworkRequestId, event: QueuedEventGroup): void;
|
|
70
92
|
forgetQueuedEventGroup(networkRequestId: NetworkRequestId): void;
|
package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkEventManager.d.ts","sourceRoot":"","sources":["../../../src/cdp/NetworkEventManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qBAAqB,EAAE,QAAQ,CAAC,OAAO,CAAC,qBAAqB,CAAC;IAC9D,oBAAoB,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,oBAAoB,CAAC;IAC7D,kBAAkB,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,kBAA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gB,GACjC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,SAAS;IAI9D,mBAAmB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,IAAI;IAI7D,kBAAkB,CAChB,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,kBAAkB,EACxC,MAAM,EAAE,UAAU,GACjB,IAAI;IAIP,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,cAAc,GAAG,SAAS;IAI1E,YAAY,CACV,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,cAAc,GACtB,IAAI;IAIP,aAAa,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,IAAI;IAIvD;;;;;OAKG;IACH,+BAA+B,CAC7B,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,kBAAkB,EAC1C,MAAM,EAAE,UAAU,GACjB,IAAI;IAOP,mBAAmB,CACjB,gBAAgB,EAAE,gBAAgB,GACjC,gBAAgB,GAAG,SAAS;IAI/B,eAAe,CACb,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,gBAAgB,GACtB,IAAI;IAIP,sBAAsB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,IAAI;IAIhE,UAAU,IAAI,IAAI;CAoCnB"}
|
|
@@ -67,6 +67,31 @@ export class NetworkEventManager {
|
|
|
67
67
|
this.#queuedRedirectInfoMap.delete(networkRequestId);
|
|
68
68
|
this.#responseReceivedExtraInfoMap.delete(networkRequestId);
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Ids of the requests whose Network events come from `client`, both the
|
|
72
|
+
* ones already emitted and the ones still waiting for more events.
|
|
73
|
+
*/
|
|
74
|
+
requestIdsForClient(client) {
|
|
75
|
+
const ids = new Set();
|
|
76
|
+
for (const [id, request] of this.#httpRequestsMap) {
|
|
77
|
+
if (request.client === client) {
|
|
78
|
+
ids.add(id);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
for (const [id, stored] of this.#requestWillBeSentMap) {
|
|
82
|
+
if (stored.client === client) {
|
|
83
|
+
ids.add(id);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
for (const [id, infos] of this.#queuedRedirectInfoMap) {
|
|
87
|
+
if (infos.some(info => {
|
|
88
|
+
return info.client === client;
|
|
89
|
+
})) {
|
|
90
|
+
ids.add(id);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return ids;
|
|
94
|
+
}
|
|
70
95
|
requestExtraInfo(networkRequestId) {
|
|
71
96
|
if (!this.#requestWillBeSentExtraInfoMap.has(networkRequestId)) {
|
|
72
97
|
this.#requestWillBeSentExtraInfoMap.set(networkRequestId, []);
|
|
@@ -127,6 +152,18 @@ export class NetworkEventManager {
|
|
|
127
152
|
forgetRequest(networkRequestId) {
|
|
128
153
|
this.#httpRequestsMap.delete(networkRequestId);
|
|
129
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* With request interception enabled, Network.loadingFailed can arrive before
|
|
157
|
+
* the Fetch.requestPaused event that creates the request. The failure is
|
|
158
|
+
* kept with the stored requestWillBeSent event until then, so that
|
|
159
|
+
* `requestfailed` is not lost.
|
|
160
|
+
*/
|
|
161
|
+
storeLoadingFailedBeforeRequest(networkRequestId, event, client) {
|
|
162
|
+
const requestWillBeSent = this.#requestWillBeSentMap.get(networkRequestId);
|
|
163
|
+
if (requestWillBeSent) {
|
|
164
|
+
requestWillBeSent.loadingFailed = { event, client };
|
|
165
|
+
}
|
|
166
|
+
}
|
|
130
167
|
getQueuedEventGroup(networkRequestId) {
|
|
131
168
|
return this.#queuedEventGroupMap.get(networkRequestId);
|
|
132
169
|
}
|
package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkEventManager.js","sourceRoot":"","sources":["../../../src/cdp/NetworkEvent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CACT,sBAAsB,EACtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,EAAE,CAAC,CAAC,CACpD,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -8,6 +8,7 @@ import { type CDPSession } from '../api/CDPSession.js';
|
|
|
8
8
|
import type { Frame } from '../api/Frame.js';
|
|
9
9
|
import { type HeadersInput } from '../api/HTTPRequest.js';
|
|
10
10
|
import type { Credentials, Page } from '../api/Page.js';
|
|
11
|
+
import type { WebWorker } from '../api/WebWorker.js';
|
|
11
12
|
import { type Logger } from '../common/Debug.js';
|
|
12
13
|
import { EventEmitter } from '../common/EventEmitter.js';
|
|
13
14
|
import { type NetworkManagerEvents } from '../common/NetworkManagerEvents.js';
|
|
@@ -52,6 +53,7 @@ export interface InternalNetworkConditions extends NetworkConditions {
|
|
|
52
53
|
*/
|
|
53
54
|
export interface FrameProvider {
|
|
54
55
|
frame(id: string): Frame | null;
|
|
56
|
+
worker(client: CDPSession): WebWorker | null;
|
|
55
57
|
page(): Page;
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkManager.d.ts","sourceRoot":"","sources":["../../../src/cdp/NetworkManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAkB,KAAK,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAuB,KAAK,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAC9E,OAAO,KAAK,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAiB,KAAK,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAE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C,MAAM,EAAE,MAAM,CAAC;IAI1C,qBAAqB,IAAI,MAAM;IAIzB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAa7C,wBAAwB,CAC5B,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,GAC1C,OAAO,CAAC,IAAI,CAAC;IAkEV,YAAY,CAChB,SAAS,EAAE,MAAM,EACjB,iBAAiB,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,iBAAiB,EACxD,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;IAOV,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAqCpE,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhD,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAqpB5D"}
|
|
@@ -93,6 +93,39 @@ export class NetworkManager extends EventEmitter {
|
|
|
93
93
|
async #removeClient(client) {
|
|
94
94
|
this.#clients.get(client)?.dispose();
|
|
95
95
|
this.#clients.delete(client);
|
|
96
|
+
// Only dedicated workers leave requests pending when their session goes
|
|
97
|
+
// away. The worker is still known here: the session is closed before the
|
|
98
|
+
// page handles the target detaching.
|
|
99
|
+
if (!this.#frameManager.worker(client)) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
for (const requestId of this.#networkEventManager.requestIdsForClient(client)) {
|
|
103
|
+
if (client.connection()?._closed) {
|
|
104
|
+
this.#networkEventManager.forgetRequest(requestId);
|
|
105
|
+
this.#networkEventManager.forget(requestId);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.#abortPendingWorkerRequest(requestId);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Chrome does not send `Network.loadingFailed` or `Network.loadingFinished`
|
|
114
|
+
* for requests that are still pending when a dedicated worker is
|
|
115
|
+
* terminated. Fail them so that listeners observe the end of the request
|
|
116
|
+
* and they no longer count as in flight (e.g. for `waitForNetworkIdle`).
|
|
117
|
+
*/
|
|
118
|
+
#abortPendingWorkerRequest(requestId) {
|
|
119
|
+
const request = this.#networkEventManager.getRequest(requestId);
|
|
120
|
+
if (!request) {
|
|
121
|
+
// The request was never surfaced (e.g. still waiting for
|
|
122
|
+
// `Fetch.requestPaused`), so only drop the buffered events.
|
|
123
|
+
this.#networkEventManager.forget(requestId);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
request._failureText = 'net::ERR_ABORTED';
|
|
127
|
+
this.#forgetRequest(request, true);
|
|
128
|
+
this.emit(NetworkManagerEvent.RequestFailed, request);
|
|
96
129
|
}
|
|
97
130
|
async authenticate(credentials) {
|
|
98
131
|
this.#credentials = credentials;
|
|
@@ -311,6 +344,10 @@ export class NetworkManager extends EventEmitter {
|
|
|
311
344
|
if (this.#userRequestInterceptionEnabled &&
|
|
312
345
|
!event.request.url.startsWith('data:')) {
|
|
313
346
|
const { requestId: networkRequestId } = event;
|
|
347
|
+
const previousRequestWillBeSent = this.#networkEventManager.getRequestWillBeSent(networkRequestId);
|
|
348
|
+
if (previousRequestWillBeSent && event.redirectResponse) {
|
|
349
|
+
this.#onRequest(previousRequestWillBeSent.client, previousRequestWillBeSent.event, undefined);
|
|
350
|
+
}
|
|
314
351
|
this.#networkEventManager.storeRequestWillBeSent(networkRequestId, event, client);
|
|
315
352
|
/**
|
|
316
353
|
* CDP may have sent a Fetch.requestPaused event already. Check for it.
|
|
@@ -390,7 +427,7 @@ export class NetworkManager extends EventEmitter {
|
|
|
390
427
|
// own Network.requestWillBeSent.
|
|
391
428
|
if (requestWillBeSentEvent.request.url !== event.request.url ||
|
|
392
429
|
requestWillBeSentEvent.request.method !== event.request.method) {
|
|
393
|
-
this.#
|
|
430
|
+
this.#onRequest(networkClient, requestWillBeSentEvent, undefined);
|
|
394
431
|
this.#networkEventManager.storeRequestPaused(networkRequestId, event, client);
|
|
395
432
|
return;
|
|
396
433
|
}
|
|
@@ -439,11 +476,21 @@ export class NetworkManager extends EventEmitter {
|
|
|
439
476
|
const frame = event.frameId
|
|
440
477
|
? this.#frameManager.frame(event.frameId)
|
|
441
478
|
: null;
|
|
442
|
-
const
|
|
479
|
+
const worker = this.#frameManager.worker(client);
|
|
480
|
+
const request = new CdpHTTPRequest(client, frame, worker, event.requestId, this.#userRequestInterceptionEnabled, event, [], this.#logger);
|
|
443
481
|
this.emit(NetworkManagerEvent.Request, request);
|
|
444
482
|
void request.finalizeInterceptions();
|
|
445
483
|
}
|
|
446
484
|
#onRequest(client, event, fetchRequestId, fetchClient = client, fromMemoryCache = false) {
|
|
485
|
+
// With request interception enabled, Network.loadingFailed may have
|
|
486
|
+
// arrived before the Fetch.requestPaused that created this request.
|
|
487
|
+
const storedRequestWillBeSent = this.#networkEventManager.getRequestWillBeSent(event.requestId);
|
|
488
|
+
const loadingFailed = storedRequestWillBeSent?.event === event
|
|
489
|
+
? storedRequestWillBeSent.loadingFailed
|
|
490
|
+
: undefined;
|
|
491
|
+
if (storedRequestWillBeSent?.event === event) {
|
|
492
|
+
this.#networkEventManager.forgetRequestWillBeSent(event.requestId);
|
|
493
|
+
}
|
|
447
494
|
let redirectChain = [];
|
|
448
495
|
if (event.redirectResponse) {
|
|
449
496
|
// We want to emit a response and requestfinished for the
|
|
@@ -485,7 +532,8 @@ export class NetworkManager extends EventEmitter {
|
|
|
485
532
|
const frame = event.frameId
|
|
486
533
|
? this.#frameManager.frame(event.frameId)
|
|
487
534
|
: null;
|
|
488
|
-
const
|
|
535
|
+
const worker = this.#frameManager.worker(client);
|
|
536
|
+
const request = new CdpHTTPRequest(client, frame, worker, fetchRequestId, this.#userRequestInterceptionEnabled, event, redirectChain, this.#logger, fetchClient);
|
|
489
537
|
const extraInfo = this.#networkEventManager
|
|
490
538
|
.requestExtraInfo(event.requestId)
|
|
491
539
|
.shift();
|
|
@@ -494,9 +542,15 @@ export class NetworkManager extends EventEmitter {
|
|
|
494
542
|
}
|
|
495
543
|
request._fromMemoryCache = fromMemoryCache;
|
|
496
544
|
this.#networkEventManager.storeRequest(event.requestId, request);
|
|
497
|
-
this.#networkEventManager.forgetRequestWillBeSent(event.requestId);
|
|
498
545
|
this.emit(NetworkManagerEvent.Request, request);
|
|
499
|
-
|
|
546
|
+
const interceptionsFinalized = request.finalizeInterceptions();
|
|
547
|
+
if (loadingFailed) {
|
|
548
|
+
// Emit the failure once the request's interception handlers have run,
|
|
549
|
+
// using the session that reported it.
|
|
550
|
+
void interceptionsFinalized.finally(() => {
|
|
551
|
+
this.#emitLoadingFailed(loadingFailed.client, loadingFailed.event);
|
|
552
|
+
});
|
|
553
|
+
}
|
|
500
554
|
}
|
|
501
555
|
#onRequestWillBeSentExtraInfo(_client, event) {
|
|
502
556
|
const request = this.#networkEventManager.getRequest(event.requestId);
|
|
@@ -601,6 +655,12 @@ export class NetworkManager extends EventEmitter {
|
|
|
601
655
|
this.#networkEventManager.responseExtraInfo(event.requestId).push(event);
|
|
602
656
|
}
|
|
603
657
|
#forgetRequest(request, events) {
|
|
658
|
+
// Settle the body so `response.content()` does not wait forever. Under
|
|
659
|
+
// certain conditions we never get the Network.responseReceived event from
|
|
660
|
+
// protocol (@see https://crbug.com/883475), so the response can be
|
|
661
|
+
// missing. A body that was already settled (e.g. rejected for a redirect)
|
|
662
|
+
// keeps its value.
|
|
663
|
+
request.response()?._resolveBody();
|
|
604
664
|
const requestId = request.id;
|
|
605
665
|
const interceptionId = request._interceptionId;
|
|
606
666
|
this.#networkEventManager.forgetRequest(requestId);
|
|
@@ -630,11 +690,7 @@ export class NetworkManager extends EventEmitter {
|
|
|
630
690
|
return;
|
|
631
691
|
}
|
|
632
692
|
this.#adoptCdpSessionIfNeeded(client, request);
|
|
633
|
-
|
|
634
|
-
// event from protocol. @see https://crbug.com/883475
|
|
635
|
-
if (request.response()) {
|
|
636
|
-
request.response()?._resolveBody();
|
|
637
|
-
}
|
|
693
|
+
request.response()?._setEncodedDataLength(event.encodedDataLength);
|
|
638
694
|
this.#forgetRequest(request, true);
|
|
639
695
|
this.emit(NetworkManagerEvent.RequestFinished, request);
|
|
640
696
|
}
|
|
@@ -651,17 +707,19 @@ export class NetworkManager extends EventEmitter {
|
|
|
651
707
|
}
|
|
652
708
|
#emitLoadingFailed(client, event) {
|
|
653
709
|
const request = this.#networkEventManager.getRequest(event.requestId);
|
|
654
|
-
// For certain requestIds we never receive requestWillBeSent event.
|
|
655
|
-
// @see https://crbug.com/750469
|
|
656
710
|
if (!request) {
|
|
711
|
+
// With request interception enabled, the request is only created on
|
|
712
|
+
// Fetch.requestPaused, which can arrive after Network.loadingFailed.
|
|
713
|
+
// Keep the failure until then so that `requestfailed` is still emitted.
|
|
714
|
+
if (this.#userRequestInterceptionEnabled) {
|
|
715
|
+
this.#networkEventManager.storeLoadingFailedBeforeRequest(event.requestId, event, client);
|
|
716
|
+
}
|
|
717
|
+
// For certain requestIds we never receive requestWillBeSent event.
|
|
718
|
+
// @see https://crbug.com/750469
|
|
657
719
|
return;
|
|
658
720
|
}
|
|
659
721
|
this.#adoptCdpSessionIfNeeded(client, request);
|
|
660
722
|
request._failureText = event.errorText || event.blockedReason || null;
|
|
661
|
-
const response = request.response();
|
|
662
|
-
if (response) {
|
|
663
|
-
response._resolveBody();
|
|
664
|
-
}
|
|
665
723
|
this.#forgetRequest(request, true);
|
|
666
724
|
this.emit(NetworkManagerEvent.RequestFailed, request);
|
|
667
725
|
}
|