chrome-devtools-frontend 1.0.1690116 → 1.0.1695017
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/skills/devtools-model-management/SKILL.md +3 -3
- package/.agents/skills/foundation-test-migration/SKILL.md +2 -2
- package/.agents/skills/merging-devtools-module/SKILL.md +5 -5
- package/AUTHORS +3 -0
- package/config/typescript/tsconfig.base.json +1 -0
- package/docs/get_the_code.md +4 -9
- package/front_end/Images/src/comment-mode-cursor.svg +23 -0
- package/front_end/Tests.js +1 -1
- package/front_end/application_tokens.css +5 -0
- package/front_end/core/common/ColorConverter.ts +3 -3
- package/front_end/core/host/UserMetrics.ts +27 -0
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +0 -46
- package/front_end/core/protocol_client/InspectorBackend.ts +6 -6
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/CSSLocation.ts +32 -0
- package/front_end/core/sdk/CSSModel.ts +2 -22
- package/front_end/core/sdk/CSSQuery.ts +2 -1
- package/front_end/core/sdk/CSSRule.ts +29 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -1
- package/front_end/core/sdk/NetworkManager.ts +2 -0
- package/front_end/core/sdk/NetworkRequest.ts +63 -4
- package/front_end/core/sdk/NetworkRequestAccess.ts +191 -0
- package/front_end/core/sdk/ResourceTreeModel.ts +72 -23
- package/front_end/core/sdk/SecurityOrigin.ts +97 -12
- package/front_end/core/sdk/Target.ts +18 -0
- package/front_end/core/sdk/sdk.ts +4 -0
- package/front_end/entrypoints/main/MainImpl.ts +8 -1
- package/front_end/foundation/Universe.ts +14 -11
- package/front_end/generated/Deprecation.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +9 -8
- package/front_end/generated/SupportedCSSProperties.ts +14 -4
- package/front_end/generated/protocol.ts +24 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +46 -10
- package/front_end/models/ai_assistance/AiConversation.ts +35 -24
- package/front_end/models/ai_assistance/README.md +5 -3
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +28 -34
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +13 -17
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +5 -3
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +16 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -4
- package/front_end/models/ai_assistance/ai_assistance.ts +0 -2
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +11 -2
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +17 -5
- package/front_end/models/ai_assistance/contexts/FileContext.ts +13 -6
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +52 -25
- package/front_end/models/ai_assistance/contexts/RequestContext.ts +18 -34
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +14 -3
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +2 -5
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +135 -58
- package/front_end/models/ai_assistance/tools/CookieUtils.ts +25 -35
- package/front_end/models/ai_assistance/tools/DOMStorageUtils.ts +6 -3
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +9 -2
- package/front_end/models/ai_assistance/tools/GetCookieValues.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +3 -2
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +3 -5
- package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +8 -11
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +2 -4
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +6 -13
- package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +9 -9
- package/front_end/models/ai_assistance/tools/GetStyles.ts +3 -2
- package/front_end/models/ai_assistance/tools/ListCookies.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +6 -14
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +10 -15
- package/front_end/models/ai_assistance/tools/ListSources.ts +5 -7
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +9 -9
- package/front_end/models/ai_assistance/tools/README.md +4 -2
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +3 -2
- package/front_end/models/ai_assistance/tools/Tool.ts +27 -3
- package/front_end/models/comment_manager/CD4ABridge.ts +128 -0
- package/front_end/models/comment_manager/CommentManager.ts +50 -8
- package/front_end/models/comment_manager/comment_manager.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +37 -47
- package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -1
- package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +9 -7
- package/front_end/models/trace/ModelImpl.ts +2 -0
- package/front_end/models/trace/Processor.ts +6 -4
- package/front_end/models/trace/handlers/LayerTreeHandler.ts +3 -3
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -1
- package/front_end/models/trace/helpers/SyntheticEvents.ts +23 -1
- package/front_end/models/trace/types/Configuration.ts +7 -0
- package/front_end/models/trace/types/TraceEvents.ts +20 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -0
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingListView.ts +177 -0
- package/front_end/panels/accessibility/accessibility.ts +2 -0
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingListView.css +33 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -15
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +6 -35
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +4 -3
- package/front_end/panels/ai_assistance/components/chatMessage.css +3 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -0
- package/front_end/panels/application/CrashReportContextView.ts +0 -1
- package/front_end/panels/application/FrameDetailsView.ts +5 -4
- package/front_end/panels/application/IndexedDBViews.ts +4 -4
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +2 -1
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/indexedDBViews.css +0 -14
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionView.ts +2 -1
- package/front_end/panels/console/ConsoleContextSelector.ts +12 -5
- package/front_end/panels/console/ConsolePinPane.ts +4 -2
- package/front_end/panels/console/ConsoleSidebar.ts +6 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +12 -8
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -4
- package/front_end/panels/coverage/coverageView.css +8 -8
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +13 -14
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/developer_resources/developerResourcesView.css +3 -3
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +43 -15
- package/front_end/panels/elements/ElementsTreeOutline.ts +185 -109
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
- package/front_end/panels/elements/ShortcutTreeElement.ts +6 -1
- package/front_end/panels/elements/StandaloneStylesContainer.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +2 -35
- package/front_end/panels/elements/StylesSidebarPane.ts +3 -2
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +5 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +161 -148
- package/front_end/panels/elements/components/computedStyleProperty.css +5 -5
- package/front_end/panels/elements/components/computedStyleTrace.css +5 -5
- package/front_end/panels/elements/components/cssHintDetailsView.css +1 -1
- package/front_end/panels/elements/components/cssPropertyDocsView.css +3 -3
- package/front_end/panels/elements/components/cssVariableValueView.css +4 -4
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +3 -3
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -5
- package/front_end/panels/elements/components/queryContainer.css +2 -2
- package/front_end/panels/elements/elementsTreeOutline.css +20 -4
- package/front_end/panels/emulation/MediaQueryInspector.ts +2 -1
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/issues/AffectedElementsView.ts +3 -0
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +12 -10
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -0
- package/front_end/panels/layer_viewer/Layers3DView.ts +13 -11
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspectorUtils.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +11 -11
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
- package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
- package/front_end/panels/media/TickingFlameChart.ts +3 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +2 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +11 -9
- package/front_end/panels/network/NetworkLogView.ts +4 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +5 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +47 -11
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
- package/front_end/panels/network/components/RequestHeadersView.css +12 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
- package/front_end/panels/recorder/RecordingListView.ts +0 -6
- package/front_end/panels/recorder/RecordingView.ts +0 -6
- package/front_end/panels/recorder/controlButton.css +10 -10
- package/front_end/panels/recorder/startView.css +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +4 -2
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +46 -35
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
- package/front_end/panels/sources/ProfilePlugin.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/timeline/IsolateSelector.ts +1 -1
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/NetworkTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -32
- package/front_end/panels/timeline/TimelineHistoryManager.ts +1 -1
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
- package/front_end/panels/timeline/TimelinePanel.ts +3 -20
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
- package/front_end/panels/timeline/components/Sidebar.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
- package/front_end/panels/timeline/components/cwvMetrics.css +2 -2
- package/front_end/panels/timeline/components/insights/checklist.css +1 -1
- package/front_end/panels/timeline/components/insights/table.css +3 -3
- package/front_end/panels/timeline/overlays/components/entriesLinkOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +2 -2
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +4 -4
- package/front_end/panels/timeline/timelinePanel.css +0 -74
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
- package/front_end/panels/web_audio/WebAudioView.ts +3 -3
- package/front_end/panels/web_audio/webAudio.css +5 -5
- package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
- package/front_end/third_party/acorn/acorn.ts +3 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
- package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
- package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
- package/front_end/third_party/csp_evaluator/package/tsconfig.json +1 -0
- package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
- package/front_end/third_party/diff/DiffWrapper.ts +1 -8
- package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
- package/front_end/third_party/json5/json5.ts +2 -2
- 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 +183 -4
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +708 -122
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +85 -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 +84 -11
- 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/ScreenRecording.d.ts +75 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js +102 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +6 -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 +7 -0
- 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/ScreenRecording.d.ts +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js +138 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +6 -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 +23 -0
- 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/cdp/Page.d.ts +6 -1
- 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 +7 -0
- 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/ScreenRecording.d.ts +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +131 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -0
- 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/common/BrowserConnector.js +7 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +42 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js +265 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +4 -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 +24 -3
- 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/NodeWebSocketTransport.d.ts +23 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +49 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.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/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +183 -4
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +143 -11
- package/front_end/third_party/puppeteer/package/src/api/ScreenRecording.ts +145 -0
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/bidi/ScreenRecording.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/bidi/bidi.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +41 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +101 -0
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +17 -9
- package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +46 -0
- package/front_end/third_party/puppeteer/package/src/common/Device.ts +287 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +30 -1
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +73 -2
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +3 -0
- package/front_end/tsconfig.json +1 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +8 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +53 -12
- package/front_end/ui/comments/CommentsOverlayWidget.ts +3 -3
- package/front_end/ui/comments/CommentsStatusBarPill.ts +96 -0
- package/front_end/ui/comments/comments-meta.ts +21 -0
- package/front_end/ui/comments/comments.ts +2 -0
- package/front_end/ui/comments/commentsOverlay.css +22 -3
- package/front_end/ui/components/buttons/floatingButton.css +25 -0
- package/front_end/ui/components/markdown_view/MarkdownView.ts +31 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +45 -25
- package/front_end/ui/kit/icons/Icon.ts +0 -1
- package/front_end/ui/kit/link/Link.ts +8 -1
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/DropTarget.ts +6 -1
- package/front_end/ui/legacy/EmptyWidget.ts +1 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
- package/front_end/ui/legacy/SplitWidget.ts +18 -3
- package/front_end/ui/legacy/StackedPane.ts +1 -1
- package/front_end/ui/legacy/StatusBar.ts +78 -0
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +5 -1
- package/front_end/ui/legacy/Treeoutline.ts +91 -48
- package/front_end/ui/legacy/UIUtils.ts +8 -4
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/ViewRegistration.ts +1 -0
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +7 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +23 -23
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +48 -44
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.docs.ts +83 -0
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +600 -0
- package/front_end/ui/legacy/components/inline_editor/animationNameSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/colorMixSwatch.css +4 -4
- package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +3 -3
- package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +2 -0
- package/front_end/ui/legacy/components/inline_editor/linkSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +154 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +224 -127
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +10 -7
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +25 -106
- package/front_end/ui/legacy/components/object_ui/customPreviewComponent.css +7 -3
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -66
- package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +7 -5
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +8 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
- package/front_end/ui/legacy/inspectorCommon.css +41 -6
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/legacy/statusBar.css +18 -0
- package/front_end/ui/visual_logging/Debugging.ts +2 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -1
- package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
- package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/visual_logging.ts +67 -56
- package/inspector_overlay/main.ts +8 -8
- package/mcp/mcp.ts +5 -0
- package/package.json +2 -8
- package/front_end/Images/generate-css-vars.js +0 -52
- package/front_end/Images/rollup.config.mjs +0 -36
- package/front_end/models/ai_assistance/AiOrigins.ts +0 -107
- package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +0 -20
- package/front_end/panels/recorder/injected/rollup.config.mjs +0 -20
- package/front_end/panels/timeline/EasterEgg.d.ts +0 -6
- package/front_end/panels/timeline/easter-egg-tsconfig.json +0 -8
- package/front_end/panels/timeline/enable-easter-egg.js +0 -20
- package/front_end/third_party/acorn/acorn-tsconfig.json +0 -12
- package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
- package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/front_end/third_party/json5/json5-tsconfig.json +0 -8
- package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
- package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
- package/front_end/third_party/lit/lit-tsconfig.json +0 -15
- package/front_end/third_party/marked/marked-tsconfig.json +0 -8
- package/front_end/third_party/puppeteer-replay/puppeteer-replay-tsconfig.json +0 -8
- package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +0 -606
- package/inspector_overlay/loadCSS.rollup.js +0 -29
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import type * as NetworkRequest from './NetworkRequest.js';
|
|
6
|
+
import * as SecurityOrigin from './SecurityOrigin.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Specifies how a network request's response data (body and headers) can be accessed
|
|
10
|
+
* relative to the initiating context's security origin.
|
|
11
|
+
*
|
|
12
|
+
* DevTools features that inspect network requests (such as AI Assistance) must respect
|
|
13
|
+
* the browser Same-Origin Policy (SOP) and Cross-Origin Resource Sharing (CORS) rules:
|
|
14
|
+
* - Same-origin responses are fully readable by the initiating document.
|
|
15
|
+
* - Cross-origin responses with valid CORS headers (`Access-Control-Allow-Origin`) are readable.
|
|
16
|
+
* - Opaque cross-origin responses (such as `no-cors` fetches to third-party endpoints) are NOT
|
|
17
|
+
* readable by the page and must never have their response bodies or restricted headers exposed
|
|
18
|
+
* to unauthorized contexts (b/513821237).
|
|
19
|
+
*/
|
|
20
|
+
export const enum ResponseAccessMode {
|
|
21
|
+
/** The request target URL is same-origin with the initiator context. */
|
|
22
|
+
SAME_ORIGIN = 'SAME_ORIGIN',
|
|
23
|
+
/** The request is cross-origin, but explicit CORS response headers permit access by the initiator. */
|
|
24
|
+
CORS_ALLOWED = 'CORS_ALLOWED',
|
|
25
|
+
/** The request is cross-origin without CORS authorization; response body and unexposed headers are restricted. */
|
|
26
|
+
OPAQUE_CROSS_ORIGIN = 'OPAQUE_CROSS_ORIGIN',
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Standard CORS-safelisted response headers that are exposed on cross-origin requests
|
|
31
|
+
* without requiring explicit `Access-Control-Expose-Headers`.
|
|
32
|
+
*
|
|
33
|
+
* @see https://fetch.spec.whatwg.org/#cors-safelisted-response-header-name
|
|
34
|
+
*/
|
|
35
|
+
export const CORS_SAFELISTED_RESPONSE_HEADERS: ReadonlySet<string> = new Set([
|
|
36
|
+
'cache-control',
|
|
37
|
+
'content-language',
|
|
38
|
+
'content-length',
|
|
39
|
+
'content-type',
|
|
40
|
+
'expires',
|
|
41
|
+
'last-modified',
|
|
42
|
+
'pragma',
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Placeholder text replacing response body content when cross-origin access is forbidden.
|
|
47
|
+
*/
|
|
48
|
+
export const REDACTED_RESPONSE_BODY = '<redacted cross-origin response body>';
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Returns whether a network request was made with credentials (cookies or authorization headers)
|
|
52
|
+
* or received `Set-Cookie` in the response.
|
|
53
|
+
*
|
|
54
|
+
* NOTE: The response header `Access-Control-Allow-Credentials: true` is sent by the server
|
|
55
|
+
* to grant permission for credentialed CORS; it is not a credential sent by the client.
|
|
56
|
+
*
|
|
57
|
+
* Example:
|
|
58
|
+
* If a page makes an uncredentialed request:
|
|
59
|
+
* `fetch('https://api.example.com/data', {credentials: 'omit'})`
|
|
60
|
+
* And the server responds with:
|
|
61
|
+
* `Access-Control-Allow-Origin: *`
|
|
62
|
+
* `Access-Control-Allow-Credentials: true`
|
|
63
|
+
* The browser allows the page to read the response under `*` because the client sent no cookies or auth.
|
|
64
|
+
* If we treated `Access-Control-Allow-Credentials: true` as a credential here, we would falsely mark
|
|
65
|
+
* this request as credentialed and reject the wildcard `*`.
|
|
66
|
+
*
|
|
67
|
+
* @param request The network request to inspect.
|
|
68
|
+
* @returns True if the request or response carried authentication credentials or cookies.
|
|
69
|
+
* @see https://fetch.spec.whatwg.org/#credentials
|
|
70
|
+
*/
|
|
71
|
+
export function isRequestCredentialed(request: NetworkRequest.NetworkRequest): boolean {
|
|
72
|
+
const hasAuthHeaders = Boolean(
|
|
73
|
+
request.requestHeaderValue('authorization') || request.requestHeaderValue('proxy-authorization'),
|
|
74
|
+
);
|
|
75
|
+
const hasCookies = request.includedRequestCookies().length > 0 || request.responseCookies.length > 0 ||
|
|
76
|
+
Boolean(request.requestHeaderValue('cookie')) || Boolean(request.responseHeaderValue('set-cookie'));
|
|
77
|
+
|
|
78
|
+
return hasAuthHeaders || hasCookies;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Evaluates the response access mode for a network request relative to an initiator origin.
|
|
83
|
+
*
|
|
84
|
+
* Evaluation rules:
|
|
85
|
+
* 1. If the initiator security origin is opaque (e.g. sandboxed iframe or `data:` URL), returns `OPAQUE_CROSS_ORIGIN`.
|
|
86
|
+
* 2. If the initiator security origin is same-origin with the request URL, returns `SAME_ORIGIN`.
|
|
87
|
+
* 3. If Chrome's network stack flagged a CORS error (`corsErrorStatus`), returns `OPAQUE_CROSS_ORIGIN`.
|
|
88
|
+
* 4. If the server provided an `Access-Control-Allow-Origin` header:
|
|
89
|
+
* - Wildcard `*` grants `CORS_ALLOWED` only if the request does not include credentials. Under the
|
|
90
|
+
* Fetch specification, wildcard `*` is invalid for credentialed requests.
|
|
91
|
+
* - An explicit match against the initiator origin grants `CORS_ALLOWED` if uncredentialed, or if
|
|
92
|
+
* `Access-Control-Allow-Credentials: true` is also present for credentialed requests.
|
|
93
|
+
* 5. Otherwise, returns `OPAQUE_CROSS_ORIGIN`.
|
|
94
|
+
*
|
|
95
|
+
* @param request The network request being inspected.
|
|
96
|
+
* @param initiatorSecurityOrigin The security origin of the initiating context (e.g. page or conversation origin).
|
|
97
|
+
* @returns The evaluated `ResponseAccessMode`.
|
|
98
|
+
*/
|
|
99
|
+
export function evaluateResponseAccessMode(
|
|
100
|
+
request: NetworkRequest.NetworkRequest,
|
|
101
|
+
initiatorSecurityOrigin: SecurityOrigin.SecurityOrigin,
|
|
102
|
+
): ResponseAccessMode {
|
|
103
|
+
// Opaque initiator contexts (e.g. data: URLs, sandboxed iframes) are never permitted
|
|
104
|
+
// to inspect cross-origin response content.
|
|
105
|
+
if (initiatorSecurityOrigin.isOpaque()) {
|
|
106
|
+
return ResponseAccessMode.OPAQUE_CROSS_ORIGIN;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const resourceOrigin = request.requestURLSecurityOrigin();
|
|
110
|
+
if (initiatorSecurityOrigin.isSameOriginWith(resourceOrigin)) {
|
|
111
|
+
return ResponseAccessMode.SAME_ORIGIN;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// If the browser blocked the request with a CORS error, treat the response
|
|
115
|
+
// as opaque regardless of any Access-Control-Allow-Origin header value.
|
|
116
|
+
if (request.corsErrorStatus()) {
|
|
117
|
+
return ResponseAccessMode.OPAQUE_CROSS_ORIGIN;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const allowOriginHeader = request.responseHeaderValue('access-control-allow-origin')?.trim();
|
|
121
|
+
if (!allowOriginHeader) {
|
|
122
|
+
return ResponseAccessMode.OPAQUE_CROSS_ORIGIN;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const isCredentialed = isRequestCredentialed(request);
|
|
126
|
+
|
|
127
|
+
// Under the Fetch specification, wildcard '*' is forbidden from exposing responses if credentials are used.
|
|
128
|
+
if (allowOriginHeader === '*' && !isCredentialed) {
|
|
129
|
+
return ResponseAccessMode.CORS_ALLOWED;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const allowedOrigin = SecurityOrigin.SecurityOrigin.create(allowOriginHeader);
|
|
133
|
+
if (initiatorSecurityOrigin.isSameOriginWith(allowedOrigin)) {
|
|
134
|
+
// Under the WHATWG Fetch specification (§ 3.2.5), when a request includes
|
|
135
|
+
// credentials (cookies or authorization headers), the response is only exposed
|
|
136
|
+
// if the server explicitly includes Access-Control-Allow-Credentials: true.
|
|
137
|
+
if (isCredentialed) {
|
|
138
|
+
const allowCredentials =
|
|
139
|
+
request.responseHeaderValue('access-control-allow-credentials')?.trim().toLowerCase() === 'true';
|
|
140
|
+
if (!allowCredentials) {
|
|
141
|
+
return ResponseAccessMode.OPAQUE_CROSS_ORIGIN;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return ResponseAccessMode.CORS_ALLOWED;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return ResponseAccessMode.OPAQUE_CROSS_ORIGIN;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Filters the response headers of a network request based on its access mode.
|
|
152
|
+
*
|
|
153
|
+
* - `SAME_ORIGIN`: Returns all response headers.
|
|
154
|
+
* - `CORS_ALLOWED`: Returns CORS-safelisted headers plus headers exposed via
|
|
155
|
+
* `Access-Control-Expose-Headers`.
|
|
156
|
+
* - `OPAQUE_CROSS_ORIGIN`: Returns only CORS-safelisted response headers. Under the Fetch
|
|
157
|
+
* specification, opaque responses do not expose headers configured by `Access-Control-Expose-Headers`.
|
|
158
|
+
*
|
|
159
|
+
* @param request The network request whose headers are being filtered.
|
|
160
|
+
* @param accessMode The evaluated response access mode for this request.
|
|
161
|
+
* @returns Array of allowed header name/value pairs.
|
|
162
|
+
*/
|
|
163
|
+
export function getFilterableResponseHeaders(
|
|
164
|
+
request: NetworkRequest.NetworkRequest,
|
|
165
|
+
accessMode: ResponseAccessMode,
|
|
166
|
+
): Array<{name: string, value: string}> {
|
|
167
|
+
if (accessMode === ResponseAccessMode.SAME_ORIGIN) {
|
|
168
|
+
return request.responseHeaders;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (accessMode === ResponseAccessMode.OPAQUE_CROSS_ORIGIN) {
|
|
172
|
+
return request.responseHeaders.filter(header => {
|
|
173
|
+
const lowerName = header.name.toLowerCase().trim();
|
|
174
|
+
return CORS_SAFELISTED_RESPONSE_HEADERS.has(lowerName);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// For CORS_ALLOWED requests, parse Access-Control-Expose-Headers.
|
|
179
|
+
const exposeHeadersValue = request.responseHeaderValue('access-control-expose-headers')?.trim() || '';
|
|
180
|
+
const exposedSet = new Set(
|
|
181
|
+
exposeHeadersValue.split(',').map(h => h.trim().toLowerCase()).filter(Boolean),
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
const isCredentialed = isRequestCredentialed(request);
|
|
185
|
+
const allowWildcardExposure = !isCredentialed && exposedSet.has('*');
|
|
186
|
+
|
|
187
|
+
return request.responseHeaders.filter(header => {
|
|
188
|
+
const lowerName = header.name.toLowerCase().trim();
|
|
189
|
+
return CORS_SAFELISTED_RESPONSE_HEADERS.has(lowerName) || allowWildcardExposure || exposedSet.has(lowerName);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
@@ -15,6 +15,7 @@ import type {NetworkRequest} from './NetworkRequest.js';
|
|
|
15
15
|
import {Resource} from './Resource.js';
|
|
16
16
|
import {ExecutionContext, RuntimeModel} from './RuntimeModel.js';
|
|
17
17
|
import {SDKModel} from './SDKModel.js';
|
|
18
|
+
import {SecurityOrigin} from './SecurityOrigin.js';
|
|
18
19
|
import {SecurityOriginManager} from './SecurityOriginManager.js';
|
|
19
20
|
import {StorageKeyManager} from './StorageKeyManager.js';
|
|
20
21
|
import {Capability, type Target, Type} from './Target.js';
|
|
@@ -82,6 +83,37 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
|
82
83
|
return result;
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Finds the first active frame that matches the specified security origin under
|
|
88
|
+
* the given primary page target.
|
|
89
|
+
*
|
|
90
|
+
* Returns `null` if the target has no outermost target or if no matching frame
|
|
91
|
+
* exists.
|
|
92
|
+
*
|
|
93
|
+
* @param primaryPageTarget The primary page target that contains the candidate frames.
|
|
94
|
+
* @param origin The security origin to match.
|
|
95
|
+
* @returns The first matching frame, or `null` if no frame matches.
|
|
96
|
+
*/
|
|
97
|
+
static frameForOrigin(
|
|
98
|
+
primaryPageTarget: Target,
|
|
99
|
+
origin: SecurityOrigin,
|
|
100
|
+
): ResourceTreeFrame|null {
|
|
101
|
+
const outermostTarget = primaryPageTarget.outermostTarget();
|
|
102
|
+
if (!outermostTarget) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
for (const frame of ResourceTreeModel.frames(primaryPageTarget.targetManager())) {
|
|
106
|
+
if (frame.resourceTreeModel().target().outermostTarget() !== outermostTarget) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (frame.securityOrigin().isSameOriginWith(origin)) {
|
|
110
|
+
return frame;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
|
|
85
117
|
static resourceForURL(targetManager: TargetManager, url: Platform.DevToolsPath.UrlString): Resource|null {
|
|
86
118
|
for (const resourceTreeModel of targetManager.models(ResourceTreeModel)) {
|
|
87
119
|
const mainFrame = resourceTreeModel.mainFrame;
|
|
@@ -500,24 +532,26 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
|
500
532
|
}
|
|
501
533
|
|
|
502
534
|
private getSecurityOriginData(): SecurityOriginData {
|
|
503
|
-
const securityOrigins =
|
|
535
|
+
const securityOrigins: SecurityOrigin[] = [];
|
|
504
536
|
|
|
505
|
-
let mainSecurityOrigin:
|
|
506
|
-
let unreachableMainSecurityOrigin:
|
|
537
|
+
let mainSecurityOrigin: SecurityOrigin|null = null;
|
|
538
|
+
let unreachableMainSecurityOrigin: SecurityOrigin|null = null;
|
|
507
539
|
for (const frame of this.framesInternal.values()) {
|
|
508
|
-
const origin = frame.securityOrigin;
|
|
509
|
-
if (!origin) {
|
|
510
|
-
continue;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
securityOrigins.add(origin);
|
|
540
|
+
const origin = frame.securityOrigin();
|
|
514
541
|
if (frame.isMainFrame()) {
|
|
515
|
-
mainSecurityOrigin = origin;
|
|
542
|
+
mainSecurityOrigin = origin.isOpaque() ? null : origin;
|
|
516
543
|
if (frame.unreachableUrl()) {
|
|
517
|
-
const
|
|
518
|
-
unreachableMainSecurityOrigin =
|
|
544
|
+
const unreachable = SecurityOrigin.create(frame.unreachableUrl());
|
|
545
|
+
unreachableMainSecurityOrigin = unreachable.isOpaque() ? null : unreachable;
|
|
519
546
|
}
|
|
520
547
|
}
|
|
548
|
+
if (origin.isOpaque()) {
|
|
549
|
+
continue;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (!securityOrigins.some(existing => existing.isSameOriginWith(origin))) {
|
|
553
|
+
securityOrigins.push(origin);
|
|
554
|
+
}
|
|
521
555
|
}
|
|
522
556
|
return {
|
|
523
557
|
securityOrigins,
|
|
@@ -548,9 +582,12 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
|
548
582
|
|
|
549
583
|
private updateSecurityOrigins(): void {
|
|
550
584
|
const data = this.getSecurityOriginData();
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
585
|
+
// TODO(crbug.com/559122726): SecurityOriginManager currently expects string identifiers.
|
|
586
|
+
// Update SecurityOriginManager to store and emit SecurityOrigin objects directly so
|
|
587
|
+
// that the siteId() conversions below can be removed.
|
|
588
|
+
this.#securityOriginManager.setMainSecurityOrigin(data.mainSecurityOrigin?.siteId() || '',
|
|
589
|
+
data.unreachableMainSecurityOrigin?.siteId() || '');
|
|
590
|
+
this.#securityOriginManager.updateSecurityOrigins(new Set(data.securityOrigins.map(o => o.siteId())));
|
|
554
591
|
}
|
|
555
592
|
|
|
556
593
|
private async updateStorageKeys(): Promise<void> {
|
|
@@ -563,9 +600,10 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
|
563
600
|
return this.mainFrame ? await this.mainFrame.getStorageKey(/* forceFetch */ false) : null;
|
|
564
601
|
}
|
|
565
602
|
|
|
603
|
+
// TODO(crbug.com/559122726): Remove siteId() usage and evaluate removing this method in favor of direct SecurityOrigin handling.
|
|
566
604
|
getMainSecurityOrigin(): string|null {
|
|
567
605
|
const data = this.getSecurityOriginData();
|
|
568
|
-
return data.mainSecurityOrigin || data.unreachableMainSecurityOrigin;
|
|
606
|
+
return data.mainSecurityOrigin?.siteId() || data.unreachableMainSecurityOrigin?.siteId() || null;
|
|
569
607
|
}
|
|
570
608
|
|
|
571
609
|
onBackForwardCacheNotUsed(event: Protocol.Page.BackForwardCacheNotUsedEvent): void {
|
|
@@ -649,7 +687,7 @@ export class ResourceTreeFrame {
|
|
|
649
687
|
#name: string|null|undefined;
|
|
650
688
|
#url: Platform.DevToolsPath.UrlString;
|
|
651
689
|
#domainAndRegistry: string;
|
|
652
|
-
#securityOrigin:
|
|
690
|
+
#securityOrigin: SecurityOrigin;
|
|
653
691
|
#securityOriginDetails?: Protocol.Page.SecurityOriginDetails;
|
|
654
692
|
#storageKey?: Promise<string|null>;
|
|
655
693
|
#unreachableUrl: Platform.DevToolsPath.UrlString;
|
|
@@ -680,7 +718,7 @@ export class ResourceTreeFrame {
|
|
|
680
718
|
this.#name = payload?.name;
|
|
681
719
|
this.#url = payload && payload.url as Platform.DevToolsPath.UrlString || Platform.DevToolsPath.EmptyUrlString;
|
|
682
720
|
this.#domainAndRegistry = (payload?.domainAndRegistry) || '';
|
|
683
|
-
this.#securityOrigin = payload?.securityOrigin ??
|
|
721
|
+
this.#securityOrigin = SecurityOrigin.create(payload?.securityOrigin ?? '');
|
|
684
722
|
this.#securityOriginDetails = payload?.securityOriginDetails;
|
|
685
723
|
this.#unreachableUrl =
|
|
686
724
|
(payload && payload.unreachableUrl as Platform.DevToolsPath.UrlString) || Platform.DevToolsPath.EmptyUrlString;
|
|
@@ -729,7 +767,7 @@ export class ResourceTreeFrame {
|
|
|
729
767
|
this.#name = framePayload.name;
|
|
730
768
|
this.#url = framePayload.url as Platform.DevToolsPath.UrlString;
|
|
731
769
|
this.#domainAndRegistry = framePayload.domainAndRegistry;
|
|
732
|
-
this.#securityOrigin = framePayload.securityOrigin;
|
|
770
|
+
this.#securityOrigin = SecurityOrigin.create(framePayload.securityOrigin);
|
|
733
771
|
this.#securityOriginDetails = framePayload.securityOriginDetails;
|
|
734
772
|
void this.getStorageKey(/* forceFetch */ true);
|
|
735
773
|
this.#unreachableUrl =
|
|
@@ -779,7 +817,15 @@ export class ResourceTreeFrame {
|
|
|
779
817
|
return res.adScriptAncestry || null;
|
|
780
818
|
}
|
|
781
819
|
|
|
782
|
-
|
|
820
|
+
/**
|
|
821
|
+
* Returns the security origin of this frame.
|
|
822
|
+
*
|
|
823
|
+
* If the frame does not have a valid origin (such as `about:blank`), this
|
|
824
|
+
* method returns a unique opaque origin.
|
|
825
|
+
*
|
|
826
|
+
* @returns The security origin of the frame.
|
|
827
|
+
*/
|
|
828
|
+
securityOrigin(): SecurityOrigin {
|
|
783
829
|
return this.#securityOrigin;
|
|
784
830
|
}
|
|
785
831
|
|
|
@@ -1165,10 +1211,13 @@ export class PageDispatcher implements ProtocolProxyApi.PageDispatcher {
|
|
|
1165
1211
|
}
|
|
1166
1212
|
|
|
1167
1213
|
SDKModel.register(ResourceTreeModel, {capabilities: Capability.DOM, autostart: true, early: true});
|
|
1214
|
+
/**
|
|
1215
|
+
* Aggregated security origin data for frames belonging to a resource tree model.
|
|
1216
|
+
*/
|
|
1168
1217
|
export interface SecurityOriginData {
|
|
1169
|
-
securityOrigins:
|
|
1170
|
-
mainSecurityOrigin:
|
|
1171
|
-
unreachableMainSecurityOrigin:
|
|
1218
|
+
securityOrigins: SecurityOrigin[];
|
|
1219
|
+
mainSecurityOrigin: SecurityOrigin|null;
|
|
1220
|
+
unreachableMainSecurityOrigin: SecurityOrigin|null;
|
|
1172
1221
|
}
|
|
1173
1222
|
|
|
1174
1223
|
export interface StorageKeyData {
|
|
@@ -7,11 +7,12 @@ import type * as Platform from '../platform/platform.js';
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Internal representation of a security origin:
|
|
10
|
-
* - `origin`: A comparable origin string (`<scheme>://<host>[:<port>]`
|
|
10
|
+
* - `origin`: A comparable origin string (`<scheme>://<host>[:<port>]`).
|
|
11
|
+
* - `file`: A path-scoped local file origin (`file://<host>/<path>`).
|
|
11
12
|
* - `opaque`: An isolated opaque origin uniquely identified by a UUID that never matches any other origin.
|
|
12
13
|
*/
|
|
13
|
-
type InternalOrigin
|
|
14
|
-
|
|
14
|
+
type InternalOrigin =|{readonly type: 'origin', readonly value: string}|{readonly type: 'file', readonly value: string}|
|
|
15
|
+
{readonly type: 'opaque', readonly uuid: string};
|
|
15
16
|
|
|
16
17
|
/** Exact string matches that represent an invalid or opaque origin. */
|
|
17
18
|
const OPAQUE_EXACT_MATCHES = new Set([
|
|
@@ -30,6 +31,17 @@ const OPAQUE_PREFIXES = [
|
|
|
30
31
|
'blob:null',
|
|
31
32
|
] as const;
|
|
32
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Scheme prefixes for imported artifact data (such as HAR archives and performance traces).
|
|
36
|
+
* DevTools isolates imported artifacts into scheme-scoped and host-scoped origins
|
|
37
|
+
* (`imported-har://${host}`, `imported-trace://${host}`). These origins never match live
|
|
38
|
+
* web origins (`https://${host}`) or other artifact schemes.
|
|
39
|
+
*/
|
|
40
|
+
export const IMPORTED_ORIGIN_PREFIXES: ReadonlySet<string> = new Set([
|
|
41
|
+
'imported-har:',
|
|
42
|
+
'imported-trace:',
|
|
43
|
+
]);
|
|
44
|
+
|
|
33
45
|
function isOpaqueUrlString(url: string): boolean {
|
|
34
46
|
const lower = url.trim().toLowerCase();
|
|
35
47
|
if (OPAQUE_EXACT_MATCHES.has(lower)) {
|
|
@@ -60,7 +72,12 @@ function isOpaqueUrlString(url: string): boolean {
|
|
|
60
72
|
* `isOpaque()` returns `false` for `file://` URLs, and two `file://` URLs are considered same-origin
|
|
61
73
|
* only if their full file path and host match exactly.
|
|
62
74
|
*
|
|
63
|
-
* 3. **
|
|
75
|
+
* 3. **Imported Artifact Origins (`imported-har:`, `imported-trace:`)**: Custom schemes for imported
|
|
76
|
+
* recordings (such as HAR archives and performance traces) resolve to `<scheme>//<host>`.
|
|
77
|
+
* DevTools isolates imported artifact origins from live web pages (`imported-trace://example.com` != `https://example.com`)
|
|
78
|
+
* and isolates different artifact schemes from each other (`imported-trace://example.com` != `imported-har://example.com`).
|
|
79
|
+
*
|
|
80
|
+
* 4. **Opaque Origins**: Opaque contexts (`data:`, `about:blank`, invalid URLs, or synthetic
|
|
64
81
|
* opaque origins) are backed by unique UUIDs. An opaque origin never matches any other origin,
|
|
65
82
|
* even another opaque origin created from the same URL string.
|
|
66
83
|
*/
|
|
@@ -76,6 +93,8 @@ export class SecurityOrigin {
|
|
|
76
93
|
*
|
|
77
94
|
* - If the URL is determined to be opaque (e.g. `data:`, `about:blank`, empty, `null`),
|
|
78
95
|
* a new unique opaque origin is returned.
|
|
96
|
+
* - If the URL is an imported artifact scheme (e.g. `imported-har:`, `imported-trace:`),
|
|
97
|
+
* a scheme-and-host origin (`<scheme>//<host>`) is returned.
|
|
79
98
|
* - If the URL is a `file://` URL, a path-scoped origin (`file://<authority><path>`) is returned.
|
|
80
99
|
* - Otherwise, the standard origin (`<scheme>://<host>[:<port>]`) is extracted and returned.
|
|
81
100
|
*
|
|
@@ -86,13 +105,18 @@ export class SecurityOrigin {
|
|
|
86
105
|
return SecurityOrigin.createUniqueOpaque();
|
|
87
106
|
}
|
|
88
107
|
|
|
108
|
+
const importedOrigin = SecurityOrigin.#tryCreateImportedArtifactOrigin(rawUrl);
|
|
109
|
+
if (importedOrigin) {
|
|
110
|
+
return importedOrigin;
|
|
111
|
+
}
|
|
112
|
+
|
|
89
113
|
if (rawUrl.toLowerCase().startsWith('file://')) {
|
|
90
114
|
const parsed = Common.ParsedURL.ParsedURL.fromString(rawUrl as Platform.DevToolsPath.UrlString);
|
|
91
115
|
if (!parsed) {
|
|
92
116
|
return SecurityOrigin.createUniqueOpaque();
|
|
93
117
|
}
|
|
94
118
|
const authority = parsed.host + (parsed.port ? ':' + parsed.port : '');
|
|
95
|
-
return new SecurityOrigin({type: '
|
|
119
|
+
return new SecurityOrigin({type: 'file', value: `file://${authority}${parsed.path}`});
|
|
96
120
|
}
|
|
97
121
|
|
|
98
122
|
const origin = Common.ParsedURL.ParsedURL.extractOrigin(rawUrl as Platform.DevToolsPath.UrlString);
|
|
@@ -100,7 +124,35 @@ export class SecurityOrigin {
|
|
|
100
124
|
return SecurityOrigin.createUniqueOpaque();
|
|
101
125
|
}
|
|
102
126
|
|
|
103
|
-
return new SecurityOrigin({type: 'origin', value: origin});
|
|
127
|
+
return new SecurityOrigin({type: 'origin', value: origin.toLowerCase()});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Attempts to parse a URL as an imported artifact scheme (such as `imported-har:` or `imported-trace:`).
|
|
132
|
+
*
|
|
133
|
+
* Standard web origins do not match imported artifact origins. If the URL starts with an imported
|
|
134
|
+
* prefix, this helper isolates the origin to `<scheme>//<host>`. If the authority or host is missing,
|
|
135
|
+
* or if the URL cannot be parsed, it returns a unique opaque origin.
|
|
136
|
+
*
|
|
137
|
+
* @param rawUrl The raw URL string to evaluate.
|
|
138
|
+
* @returns A `SecurityOrigin` if the URL matches an imported artifact scheme, or `null` otherwise.
|
|
139
|
+
*/
|
|
140
|
+
static #tryCreateImportedArtifactOrigin(rawUrl: string): SecurityOrigin|null {
|
|
141
|
+
const lowerUrl = rawUrl.toLowerCase();
|
|
142
|
+
for (const prefix of IMPORTED_ORIGIN_PREFIXES) {
|
|
143
|
+
if (lowerUrl.startsWith(prefix)) {
|
|
144
|
+
try {
|
|
145
|
+
const parsedUrl = new URL(rawUrl);
|
|
146
|
+
if (!parsedUrl.host) {
|
|
147
|
+
return SecurityOrigin.createUniqueOpaque();
|
|
148
|
+
}
|
|
149
|
+
return new SecurityOrigin({type: 'origin', value: `${parsedUrl.protocol}//${parsedUrl.host.toLowerCase()}`});
|
|
150
|
+
} catch {
|
|
151
|
+
return SecurityOrigin.createUniqueOpaque();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
104
156
|
}
|
|
105
157
|
|
|
106
158
|
/**
|
|
@@ -113,6 +165,28 @@ export class SecurityOrigin {
|
|
|
113
165
|
return new SecurityOrigin({type: 'opaque', uuid: crypto.randomUUID()});
|
|
114
166
|
}
|
|
115
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Creates an isolated security origin for an imported performance trace.
|
|
170
|
+
*
|
|
171
|
+
* Imported traces isolate to `imported-trace://${authority}` based on the recorded
|
|
172
|
+
* main frame URL. If the URL is missing, invalid, or has no host, this returns a
|
|
173
|
+
* unique opaque origin so that unhosted traces do not share access with each other
|
|
174
|
+
* or live web origins.
|
|
175
|
+
*
|
|
176
|
+
* @param mainFrameURL The URL string of the main frame recorded in the trace.
|
|
177
|
+
*/
|
|
178
|
+
static createForImportedTrace(mainFrameURL: string|null|undefined): SecurityOrigin {
|
|
179
|
+
if (!mainFrameURL) {
|
|
180
|
+
return SecurityOrigin.createUniqueOpaque();
|
|
181
|
+
}
|
|
182
|
+
const parsed = Common.ParsedURL.ParsedURL.fromString(mainFrameURL);
|
|
183
|
+
if (!parsed?.host) {
|
|
184
|
+
return SecurityOrigin.createUniqueOpaque();
|
|
185
|
+
}
|
|
186
|
+
const authority = parsed.host + (parsed.port ? `:${parsed.port}` : '');
|
|
187
|
+
return SecurityOrigin.create(`imported-trace://${authority}`);
|
|
188
|
+
}
|
|
189
|
+
|
|
116
190
|
/**
|
|
117
191
|
* Checks whether this security origin is equivalent to another security origin.
|
|
118
192
|
*
|
|
@@ -131,7 +205,7 @@ export class SecurityOrigin {
|
|
|
131
205
|
return this.#origin.type === 'opaque' && other.#origin.type === 'opaque' &&
|
|
132
206
|
this.#origin.uuid === other.#origin.uuid;
|
|
133
207
|
}
|
|
134
|
-
return this.#origin.value === other.#origin.value;
|
|
208
|
+
return this.#origin.type === other.#origin.type && this.#origin.value === other.#origin.value;
|
|
135
209
|
}
|
|
136
210
|
|
|
137
211
|
/**
|
|
@@ -145,12 +219,23 @@ export class SecurityOrigin {
|
|
|
145
219
|
}
|
|
146
220
|
|
|
147
221
|
/**
|
|
148
|
-
* Returns
|
|
149
|
-
|
|
222
|
+
* Returns whether this origin represents a local file origin (`file://`).
|
|
223
|
+
*/
|
|
224
|
+
isFile(): boolean {
|
|
225
|
+
return this.#origin.type === 'file';
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Returns a stable string identifier for display, logging, or storage keys.
|
|
230
|
+
*
|
|
231
|
+
* WARNING: Do not compare `siteId()` strings to verify origin equality or
|
|
232
|
+
* enforce security boundaries. Always use `isSameOriginWith()` instead.
|
|
150
233
|
*
|
|
151
|
-
*
|
|
152
|
-
* -
|
|
153
|
-
* -
|
|
234
|
+
* Return formats:
|
|
235
|
+
* - Standard origins: `<scheme>://<host>[:<port>]` (e.g., `https://example.com:8080`).
|
|
236
|
+
* - File origins: `file://<authority><path>` (e.g., `file:///path/to/file.html`).
|
|
237
|
+
* - Opaque origins: A bare UUID string (e.g., `3fa85f64-5717-4562-b3fc-2c963f66afa6`).
|
|
238
|
+
* Note: Opaque site IDs do not have URI schemes and are not valid URLs.
|
|
154
239
|
*/
|
|
155
240
|
siteId(): string {
|
|
156
241
|
return this.#origin.type === 'opaque' ? this.#origin.uuid : this.#origin.value;
|
|
@@ -8,6 +8,7 @@ import * as Platform from '../platform/platform.js';
|
|
|
8
8
|
import * as ProtocolClient from '../protocol_client/protocol_client.js';
|
|
9
9
|
|
|
10
10
|
import {SDKModel, type SDKModelConstructor} from './SDKModel.js';
|
|
11
|
+
import {SecurityOrigin} from './SecurityOrigin.js';
|
|
11
12
|
import type {TargetManager} from './TargetManager.js';
|
|
12
13
|
|
|
13
14
|
export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
@@ -15,6 +16,8 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
|
15
16
|
#name: string;
|
|
16
17
|
#inspectedURL: Platform.DevToolsPath.UrlString = Platform.DevToolsPath.EmptyUrlString;
|
|
17
18
|
#inspectedURLName = '';
|
|
19
|
+
/** Caches the parsed security origin for `#inspectedURL`. */
|
|
20
|
+
#inspectedSecurityOrigin: SecurityOrigin|null = null;
|
|
18
21
|
readonly #capabilitiesMask: number;
|
|
19
22
|
#type: Type;
|
|
20
23
|
readonly #parentTarget: Target|null;
|
|
@@ -206,8 +209,23 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
|
206
209
|
return this.#inspectedURL;
|
|
207
210
|
}
|
|
208
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Returns the security origin for this target's inspected URL.
|
|
214
|
+
*
|
|
215
|
+
* The target caches the origin until `setInspectedURL()` changes the URL.
|
|
216
|
+
* If the URL is empty or invalid, this method returns a unique opaque origin.
|
|
217
|
+
* An opaque origin does not match any other origin.
|
|
218
|
+
*/
|
|
219
|
+
inspectedSecurityOrigin(): SecurityOrigin {
|
|
220
|
+
if (!this.#inspectedSecurityOrigin) {
|
|
221
|
+
this.#inspectedSecurityOrigin = SecurityOrigin.create(this.#inspectedURL);
|
|
222
|
+
}
|
|
223
|
+
return this.#inspectedSecurityOrigin;
|
|
224
|
+
}
|
|
225
|
+
|
|
209
226
|
setInspectedURL(inspectedURL: Platform.DevToolsPath.UrlString): void {
|
|
210
227
|
this.#inspectedURL = inspectedURL;
|
|
228
|
+
this.#inspectedSecurityOrigin = null;
|
|
211
229
|
const parsedURL = Common.ParsedURL.ParsedURL.fromString(inspectedURL);
|
|
212
230
|
this.#inspectedURLName = parsedURL ? parsedURL.lastPathComponentWithFragment() : '#' + this.#id;
|
|
213
231
|
this.#targetManager.onInspectedURLChange(this);
|
|
@@ -26,6 +26,7 @@ import * as CrashReportContextModel from './CrashReportContextModel.js';
|
|
|
26
26
|
import * as CSSContainerQuery from './CSSContainerQuery.js';
|
|
27
27
|
import * as CSSFontFace from './CSSFontFace.js';
|
|
28
28
|
import * as CSSLayer from './CSSLayer.js';
|
|
29
|
+
import * as CSSLocation from './CSSLocation.js';
|
|
29
30
|
import * as CSSMatchedStyles from './CSSMatchedStyles.js';
|
|
30
31
|
import * as CSSMedia from './CSSMedia.js';
|
|
31
32
|
import * as CSSMetadata from './CSSMetadata.js';
|
|
@@ -58,6 +59,7 @@ import * as LayerTreeBase from './LayerTreeBase.js';
|
|
|
58
59
|
import * as LogModel from './LogModel.js';
|
|
59
60
|
import * as NetworkManager from './NetworkManager.js';
|
|
60
61
|
import * as NetworkRequest from './NetworkRequest.js';
|
|
62
|
+
import * as NetworkRequestAccess from './NetworkRequestAccess.js';
|
|
61
63
|
import * as OverlayColorGenerator from './OverlayColorGenerator.js';
|
|
62
64
|
import * as OverlayModel from './OverlayModel.js';
|
|
63
65
|
import * as OverlayPersistentHighlighter from './OverlayPersistentHighlighter.js';
|
|
@@ -114,6 +116,7 @@ export {
|
|
|
114
116
|
CSSContainerQuery,
|
|
115
117
|
CSSFontFace,
|
|
116
118
|
CSSLayer,
|
|
119
|
+
CSSLocation,
|
|
117
120
|
CSSMatchedStyles,
|
|
118
121
|
CSSMedia,
|
|
119
122
|
CSSMetadata,
|
|
@@ -146,6 +149,7 @@ export {
|
|
|
146
149
|
LogModel,
|
|
147
150
|
NetworkManager,
|
|
148
151
|
NetworkRequest,
|
|
152
|
+
NetworkRequestAccess,
|
|
149
153
|
OverlayColorGenerator,
|
|
150
154
|
OverlayModel,
|
|
151
155
|
OverlayPersistentHighlighter,
|
|
@@ -214,6 +214,8 @@ export class MainImpl {
|
|
|
214
214
|
};
|
|
215
215
|
this.#universe = new Foundation.Universe.Universe(creationOptions);
|
|
216
216
|
Root.DevToolsContext.setGlobalInstance(this.#universe.context as Root.DevToolsContext.WritableDevToolsContext);
|
|
217
|
+
// Needed to allow CD4A to access the server bridge class.
|
|
218
|
+
(globalThis as unknown as {universe: Foundation.Universe.Universe}).universe = this.#universe;
|
|
217
219
|
|
|
218
220
|
// Mark 'cache-disabled' as requiring user interaction when multiple CDP clients are attached.
|
|
219
221
|
if (Root.Runtime.Runtime.queryParam('hasOtherClients')) {
|
|
@@ -552,6 +554,7 @@ export class MainImpl {
|
|
|
552
554
|
inspectorView.displaySelectOverrideFolderInfobar(event.data);
|
|
553
555
|
});
|
|
554
556
|
await inspectorView.createToolbars();
|
|
557
|
+
inspectorView.renderStatusBar();
|
|
555
558
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.loadCompleted();
|
|
556
559
|
|
|
557
560
|
// Initialize elements for the live announcer functionality for a11y.
|
|
@@ -669,7 +672,7 @@ export class MainImpl {
|
|
|
669
672
|
}
|
|
670
673
|
|
|
671
674
|
#redispatchClipboardEvent(event: Event): void {
|
|
672
|
-
const eventCopy = new CustomEvent('clipboard-' + event.type, {bubbles: true});
|
|
675
|
+
const eventCopy = new CustomEvent('clipboard-' + event.type, {bubbles: true, composed: true});
|
|
673
676
|
// @ts-expect-error Used in ElementsTreeOutline
|
|
674
677
|
eventCopy['original'] = event;
|
|
675
678
|
const document = event.target && (event.target as HTMLElement).ownerDocument;
|
|
@@ -702,6 +705,10 @@ export class MainImpl {
|
|
|
702
705
|
UI.InspectorView.InspectorView.instance().onSuspendStateChanged(suspended);
|
|
703
706
|
}
|
|
704
707
|
|
|
708
|
+
redispatchClipboardEventForTest(event: Event): void {
|
|
709
|
+
this.#redispatchClipboardEvent(event);
|
|
710
|
+
}
|
|
711
|
+
|
|
705
712
|
static instanceForTest: MainImpl|null = null;
|
|
706
713
|
}
|
|
707
714
|
|