chrome-devtools-frontend 1.0.1512349 → 1.0.1513662
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/cookbook/release_management.md +15 -13
- package/docs/get_the_code.md +114 -35
- package/front_end/core/common/Color.ts +40 -44
- package/front_end/core/common/Console.ts +4 -4
- package/front_end/core/common/ParsedURL.ts +14 -14
- package/front_end/core/common/ResourceType.ts +20 -20
- package/front_end/core/common/SegmentedRange.ts +13 -14
- package/front_end/core/common/Settings.ts +4 -4
- package/front_end/core/common/StringOutputStream.ts +4 -4
- package/front_end/core/host/GdpClient.ts +38 -0
- package/front_end/core/host/InspectorFrontendHost.ts +4 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/host/ResourceLoader.ts +2 -2
- package/front_end/core/host/UserMetrics.ts +0 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +9 -9
- package/front_end/core/root/Runtime.ts +5 -2
- package/front_end/core/sdk/AccessibilityModel.ts +48 -48
- package/front_end/core/sdk/AnimationModel.ts +78 -79
- package/front_end/core/sdk/CPUProfilerModel.ts +5 -5
- package/front_end/core/sdk/CPUThrottlingManager.ts +17 -17
- package/front_end/core/sdk/CSSMatchedStyles.ts +44 -44
- package/front_end/core/sdk/CSSMedia.ts +22 -22
- package/front_end/core/sdk/CSSModel.ts +4 -4
- package/front_end/core/sdk/CSSProperty.ts +9 -9
- package/front_end/core/sdk/CSSPropertyParser.ts +1 -2
- package/front_end/core/sdk/CSSRule.ts +3 -3
- package/front_end/core/sdk/CSSStyleDeclaration.ts +27 -28
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +13 -13
- package/front_end/core/sdk/CategorizedBreakpoint.ts +4 -4
- package/front_end/core/sdk/ChildTargetManager.ts +6 -6
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +4 -4
- package/front_end/core/sdk/ConsoleModel.ts +24 -24
- package/front_end/core/sdk/Cookie.ts +16 -16
- package/front_end/core/sdk/CookieParser.ts +6 -6
- package/front_end/core/sdk/DOMDebuggerModel.ts +88 -89
- package/front_end/core/sdk/DOMModel.ts +113 -113
- package/front_end/core/sdk/DebuggerModel.ts +102 -103
- package/front_end/core/sdk/EmulationModel.ts +6 -6
- package/front_end/core/sdk/EventBreakpointsModel.ts +5 -5
- package/front_end/core/sdk/HeapProfilerModel.ts +5 -5
- package/front_end/core/sdk/IsolateManager.ts +26 -26
- package/front_end/core/sdk/LayerTreeBase.ts +29 -30
- package/front_end/core/sdk/OverlayModel.ts +6 -6
- package/front_end/core/sdk/Resource.ts +43 -43
- package/front_end/core/sdk/ResourceTreeModel.ts +58 -61
- package/front_end/core/sdk/RuntimeModel.ts +12 -13
- package/front_end/core/sdk/SDKModel.ts +3 -3
- package/front_end/core/sdk/Script.ts +17 -17
- package/front_end/core/sdk/SecurityOriginManager.ts +14 -14
- package/front_end/core/sdk/ServerTiming.ts +2 -2
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +15 -15
- package/front_end/core/sdk/ServiceWorkerManager.ts +19 -24
- package/front_end/core/sdk/SourceMap.ts +10 -10
- package/front_end/core/sdk/StorageKeyManager.ts +12 -12
- package/front_end/core/sdk/Target.ts +33 -34
- package/front_end/core/sdk/TargetManager.ts +20 -20
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +8 -8
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -24
- package/front_end/entrypoints/main/GlobalAiButton.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +16 -14
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/generated/InspectorBackendCommands.js +3 -2
- package/front_end/generated/SupportedCSSProperties.js +20 -0
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +20 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -16
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +127 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +149 -26
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +9 -10
- package/front_end/models/badges/AiExplorerBadge.ts +21 -0
- package/front_end/models/badges/Badge.ts +3 -5
- package/front_end/models/badges/CodeWhispererBadge.ts +21 -0
- package/front_end/models/badges/DOMDetectiveBadge.ts +4 -3
- package/front_end/models/badges/SpeedsterBadge.ts +6 -4
- package/front_end/models/badges/StarterBadge.ts +4 -3
- package/front_end/models/badges/UserBadges.ts +29 -3
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +6 -6
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +18 -18
- package/front_end/models/bindings/FileUtils.ts +15 -15
- package/front_end/models/bindings/ResourceScriptMapping.ts +14 -14
- package/front_end/models/elements/ElementUpdateRecord.ts +11 -11
- package/front_end/models/emulation/DeviceModeModel.ts +123 -131
- package/front_end/models/emulation/EmulatedDevices.ts +22 -22
- package/front_end/models/extensions/ExtensionPanel.ts +24 -24
- package/front_end/models/extensions/ExtensionServer.ts +4 -4
- package/front_end/models/javascript_metadata/NativeFunctions.js +14 -2
- package/front_end/models/persistence/IsolatedFileSystem.ts +18 -19
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +13 -13
- package/front_end/models/trace/EventsSerializer.ts +5 -5
- package/front_end/models/trace/LanternComputationData.ts +10 -10
- package/front_end/models/trace/ModelImpl.ts +32 -41
- package/front_end/models/trace/Processor.ts +28 -30
- package/front_end/models/trace/extras/FilmStrip.ts +6 -6
- package/front_end/models/trace/extras/StackTraceForEvent.ts +22 -25
- package/front_end/models/trace/extras/ThirdParties.ts +16 -17
- package/front_end/models/trace/extras/TraceFilter.ts +1 -1
- package/front_end/models/trace/handlers/Threads.ts +10 -10
- package/front_end/models/trace/handlers/helpers.ts +9 -9
- package/front_end/models/trace/handlers/types.ts +3 -3
- package/front_end/models/trace/insights/CLSCulprits.ts +12 -14
- package/front_end/models/trace/insights/Cache.ts +8 -4
- package/front_end/models/trace/insights/DOMSize.ts +8 -5
- package/front_end/models/trace/insights/DocumentLatency.ts +2 -2
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +3 -3
- package/front_end/models/trace/insights/FontDisplay.ts +3 -4
- package/front_end/models/trace/insights/ForcedReflow.ts +3 -3
- package/front_end/models/trace/insights/INPBreakdown.ts +2 -2
- package/front_end/models/trace/insights/ImageDelivery.ts +11 -11
- package/front_end/models/trace/insights/LCPBreakdown.ts +4 -4
- package/front_end/models/trace/insights/LCPDiscovery.ts +4 -4
- package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -2
- package/front_end/models/trace/insights/ModernHTTP.ts +4 -5
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +12 -12
- package/front_end/models/trace/insights/RenderBlocking.ts +9 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +2 -2
- package/front_end/models/trace/insights/ThirdParties.ts +4 -5
- package/front_end/models/trace/insights/Viewport.ts +8 -5
- package/front_end/models/trace/insights/types.ts +1 -0
- package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +10 -10
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +52 -52
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +8 -8
- package/front_end/panels/animation/AnimationTimeline.ts +5 -5
- package/front_end/panels/animation/AnimationUI.ts +22 -23
- package/front_end/panels/application/ApplicationPanelSidebar.ts +12 -12
- package/front_end/panels/application/DOMStorageModel.ts +23 -23
- package/front_end/panels/application/ExtensionStorageModel.ts +31 -31
- package/front_end/panels/application/IndexedDBModel.ts +1 -0
- package/front_end/panels/application/PreloadingTreeElement.ts +8 -8
- package/front_end/panels/application/ServiceWorkersView.ts +0 -53
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/common/BadgeNotification.ts +24 -4
- package/front_end/panels/common/GdpSignUpDialog.ts +5 -0
- package/front_end/panels/common/badgeNotification.css +26 -9
- package/front_end/panels/console/ConsoleContextSelector.ts +9 -9
- package/front_end/panels/console/ConsolePrompt.ts +8 -5
- package/front_end/panels/console/ConsoleView.ts +13 -13
- package/front_end/panels/console/ConsoleViewport.ts +29 -29
- package/front_end/panels/coverage/CoverageModel.ts +22 -22
- package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
- package/front_end/panels/elements/ComputedStyleModel.ts +17 -18
- package/front_end/panels/elements/DOMPath.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +13 -13
- package/front_end/panels/elements/ElementsTreeElement.ts +18 -18
- package/front_end/panels/elements/ElementsTreeOutline.ts +41 -48
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -50
- package/front_end/panels/elements/StylesSidebarPane.ts +19 -19
- package/front_end/panels/emulation/DeviceModeToolbar.ts +7 -7
- package/front_end/panels/emulation/DeviceModeView.ts +6 -6
- package/front_end/panels/emulation/MediaQueryInspector.ts +18 -18
- package/front_end/panels/event_listeners/EventListenersView.ts +13 -14
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +3 -3
- package/front_end/panels/layer_viewer/LayerViewHost.ts +13 -13
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +9 -10
- package/front_end/panels/layer_viewer/TransformController.ts +34 -36
- package/front_end/panels/layers/LayerTreeModel.ts +41 -40
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +13 -13
- package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -7
- package/front_end/panels/media/PlayerMessagesView.ts +5 -5
- package/front_end/panels/media/TickingFlameChart.ts +24 -24
- package/front_end/panels/media/TickingFlameChartHelpers.ts +32 -32
- package/front_end/panels/network/NetworkItemView.ts +4 -4
- package/front_end/panels/network/NetworkLogViewColumns.ts +29 -29
- package/front_end/panels/network/NetworkPanel.ts +8 -5
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +10 -10
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +3 -4
- package/front_end/panels/profiler/ProfileHeader.ts +25 -25
- package/front_end/panels/profiler/ProfileLauncherView.ts +5 -6
- package/front_end/panels/recorder/components/ReplaySection.ts +3 -1
- package/front_end/panels/security/OriginTreeElement.ts +8 -8
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/settings/SettingsScreen.ts +18 -12
- package/front_end/panels/settings/components/SyncSection.ts +20 -6
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +3 -0
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -9
- package/front_end/panels/sources/NavigatorView.ts +43 -46
- package/front_end/panels/sources/SourcesPanel.ts +35 -35
- package/front_end/panels/sources/SourcesView.ts +13 -13
- package/front_end/panels/sources/TabbedEditorContainer.ts +19 -22
- package/front_end/panels/sources/UISourceCodeFrame.ts +4 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +34 -36
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +3 -3
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +8 -8
- package/front_end/panels/timeline/CountersGraph.ts +16 -16
- package/front_end/panels/timeline/EntriesFilter.ts +4 -3
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/GPUTrackAppender.ts +3 -3
- package/front_end/panels/timeline/Initiators.ts +10 -10
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +5 -5
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +7 -7
- package/front_end/panels/timeline/ModificationsManager.ts +8 -15
- package/front_end/panels/timeline/TargetForEvent.ts +2 -2
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -1
- package/front_end/panels/timeline/ThreadAppender.ts +13 -13
- package/front_end/panels/timeline/TimelineDetailsView.ts +6 -14
- package/front_end/panels/timeline/TimelineEventOverview.ts +27 -26
- package/front_end/panels/timeline/TimelineFilters.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +54 -53
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +34 -34
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -31
- package/front_end/panels/timeline/TimelineHistoryManager.ts +17 -18
- package/front_end/panels/timeline/TimelineMiniMap.ts +6 -6
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +6 -6
- package/front_end/panels/timeline/TimelinePanel.ts +52 -59
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +7 -5
- package/front_end/panels/timeline/TimelineTreeView.ts +10 -10
- package/front_end/panels/timeline/TimelineUIUtils.ts +43 -43
- package/front_end/panels/timeline/TimingsTrackAppender.ts +12 -12
- package/front_end/panels/timeline/TracingLayerTree.ts +43 -43
- package/front_end/panels/timeline/TrackConfigBanner.ts +6 -6
- package/front_end/panels/timeline/TrackConfiguration.ts +1 -1
- package/front_end/panels/timeline/components/DetailsView.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +12 -21
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -5
- package/front_end/panels/timeline/components/Sidebar.ts +4 -14
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +13 -36
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +21 -19
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/insights/Cache.ts +4 -0
- package/front_end/panels/timeline/components/insights/DOMSize.ts +5 -1
- package/front_end/panels/timeline/components/insights/Helpers.ts +19 -0
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/panels/timeline/components/insights/Viewport.ts +4 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
- package/front_end/panels/timeline/utils/AICallTree.ts +11 -11
- package/front_end/panels/timeline/utils/AIContext.ts +17 -19
- package/front_end/panels/timeline/utils/EntityMapper.ts +6 -5
- package/front_end/panels/timeline/utils/EntryName.ts +2 -2
- package/front_end/panels/timeline/utils/EntryNodes.ts +5 -5
- package/front_end/panels/timeline/utils/EntryStyles.ts +4 -4
- package/front_end/panels/timeline/utils/FreshRecording.ts +3 -3
- package/front_end/panels/timeline/utils/Helpers.ts +0 -18
- package/front_end/panels/timeline/utils/InsightAIContext.ts +6 -6
- package/front_end/panels/timeline/utils/SourceMapsResolver.ts +7 -7
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
- package/front_end/third_party/json5/rebuild.sh +1 -1
- package/front_end/third_party/legacy-javascript/{update.sh → rebuild.sh} +1 -1
- package/front_end/third_party/lit/lib/decorators.d.ts +26 -9
- package/front_end/third_party/lit/lib/decorators.js +5 -5
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.js +8 -13
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +26 -9
- package/front_end/third_party/lit/lib/lit.js +5 -5
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.js +2 -2
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/rebuild.sh +1 -1
- package/front_end/third_party/third-party-web/rebuild.sh +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +6 -7
- package/front_end/ui/legacy/ActionRegistration.ts +9 -9
- package/front_end/ui/legacy/DockController.ts +18 -18
- package/front_end/ui/legacy/FilterBar.ts +7 -7
- package/front_end/ui/legacy/Fragment.ts +4 -4
- package/front_end/ui/legacy/GlassPane.ts +12 -12
- package/front_end/ui/legacy/InspectorView.ts +5 -15
- package/front_end/ui/legacy/ListControl.ts +27 -27
- package/front_end/ui/legacy/ListWidget.ts +4 -4
- package/front_end/ui/legacy/PopoverHelper.ts +4 -4
- package/front_end/ui/legacy/ShortcutRegistry.ts +17 -17
- package/front_end/ui/legacy/TabbedPane.ts +74 -75
- package/front_end/ui/legacy/TextPrompt.ts +31 -31
- package/front_end/ui/legacy/Toolbar.ts +13 -14
- package/front_end/ui/legacy/ViewManager.ts +30 -31
- package/front_end/ui/legacy/Widget.ts +6 -6
- package/front_end/ui/legacy/XLink.ts +9 -9
- package/front_end/ui/legacy/ZoomManager.ts +9 -9
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +27 -27
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +30 -32
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +15 -15
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +64 -64
- package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -11
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +12 -12
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +14 -14
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -8
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +4 -4
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +4 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -2
- package/package.json +1 -1
@@ -650,24 +650,24 @@ export interface EventTypes {
|
|
650
650
|
|
651
651
|
export class ResourceTreeFrame {
|
652
652
|
#model: ResourceTreeModel;
|
653
|
-
#
|
654
|
-
readonly #
|
653
|
+
#sameTargetParentFrame: ResourceTreeFrame|null;
|
654
|
+
readonly #id: Protocol.Page.FrameId;
|
655
655
|
crossTargetParentFrameId: string|null = null;
|
656
|
-
#
|
657
|
-
#
|
658
|
-
#
|
659
|
-
#
|
656
|
+
#loaderId: Protocol.Network.LoaderId;
|
657
|
+
#name: string|null|undefined;
|
658
|
+
#url: Platform.DevToolsPath.UrlString;
|
659
|
+
#domainAndRegistry: string;
|
660
660
|
#securityOrigin: string|null;
|
661
661
|
#securityOriginDetails?: Protocol.Page.SecurityOriginDetails;
|
662
|
-
#
|
663
|
-
#
|
664
|
-
#
|
662
|
+
#storageKey?: Promise<string|null>;
|
663
|
+
#unreachableUrl: Platform.DevToolsPath.UrlString;
|
664
|
+
#adFrameStatus?: Protocol.Page.AdFrameStatus;
|
665
665
|
#secureContextType: Protocol.Page.SecureContextType|null;
|
666
666
|
#crossOriginIsolatedContextType: Protocol.Page.CrossOriginIsolatedContextType|null;
|
667
667
|
#gatedAPIFeatures: Protocol.Page.GatedAPIFeatures[]|null;
|
668
668
|
#creationStackTrace: Protocol.Runtime.StackTrace|null;
|
669
669
|
#creationStackTraceTarget: Target|null = null;
|
670
|
-
#
|
670
|
+
#childFrames = new Set<ResourceTreeFrame>();
|
671
671
|
resourcesMap = new Map<Platform.DevToolsPath.UrlString, Resource>();
|
672
672
|
backForwardCacheDetails: {
|
673
673
|
restoredFromCache: boolean|undefined,
|
@@ -683,27 +683,26 @@ export class ResourceTreeFrame {
|
|
683
683
|
model: ResourceTreeModel, parentFrame: ResourceTreeFrame|null, frameId: Protocol.Page.FrameId,
|
684
684
|
payload: Protocol.Page.Frame|null, creationStackTrace: Protocol.Runtime.StackTrace|null) {
|
685
685
|
this.#model = model;
|
686
|
-
this.#
|
687
|
-
this.#
|
688
|
-
|
689
|
-
this.#
|
690
|
-
this.#
|
691
|
-
this.#
|
692
|
-
|
693
|
-
this.#domainAndRegistryInternal = (payload?.domainAndRegistry) || '';
|
686
|
+
this.#sameTargetParentFrame = parentFrame;
|
687
|
+
this.#id = frameId;
|
688
|
+
|
689
|
+
this.#loaderId = payload?.loaderId ?? '' as Protocol.Network.LoaderId;
|
690
|
+
this.#name = payload?.name;
|
691
|
+
this.#url = payload && payload.url as Platform.DevToolsPath.UrlString || Platform.DevToolsPath.EmptyUrlString;
|
692
|
+
this.#domainAndRegistry = (payload?.domainAndRegistry) || '';
|
694
693
|
this.#securityOrigin = payload?.securityOrigin ?? null;
|
695
694
|
this.#securityOriginDetails = payload?.securityOriginDetails;
|
696
|
-
this.#
|
695
|
+
this.#unreachableUrl =
|
697
696
|
(payload && payload.unreachableUrl as Platform.DevToolsPath.UrlString) || Platform.DevToolsPath.EmptyUrlString;
|
698
|
-
this.#
|
697
|
+
this.#adFrameStatus = payload?.adFrameStatus;
|
699
698
|
this.#secureContextType = payload?.secureContextType ?? null;
|
700
699
|
this.#crossOriginIsolatedContextType = payload?.crossOriginIsolatedContextType ?? null;
|
701
700
|
this.#gatedAPIFeatures = payload?.gatedAPIFeatures ?? null;
|
702
701
|
|
703
702
|
this.#creationStackTrace = creationStackTrace;
|
704
703
|
|
705
|
-
if (this.#
|
706
|
-
this.#
|
704
|
+
if (this.#sameTargetParentFrame) {
|
705
|
+
this.#sameTargetParentFrame.#childFrames.add(this);
|
707
706
|
}
|
708
707
|
}
|
709
708
|
|
@@ -736,16 +735,16 @@ export class ResourceTreeFrame {
|
|
736
735
|
}
|
737
736
|
|
738
737
|
navigate(framePayload: Protocol.Page.Frame): void {
|
739
|
-
this.#
|
740
|
-
this.#
|
741
|
-
this.#
|
742
|
-
this.#
|
738
|
+
this.#loaderId = framePayload.loaderId;
|
739
|
+
this.#name = framePayload.name;
|
740
|
+
this.#url = framePayload.url as Platform.DevToolsPath.UrlString;
|
741
|
+
this.#domainAndRegistry = framePayload.domainAndRegistry;
|
743
742
|
this.#securityOrigin = framePayload.securityOrigin;
|
744
743
|
this.#securityOriginDetails = framePayload.securityOriginDetails;
|
745
744
|
void this.getStorageKey(/* forceFetch */ true);
|
746
|
-
this.#
|
745
|
+
this.#unreachableUrl =
|
747
746
|
framePayload.unreachableUrl as Platform.DevToolsPath.UrlString || Platform.DevToolsPath.EmptyUrlString;
|
748
|
-
this.#
|
747
|
+
this.#adFrameStatus = framePayload?.adFrameStatus;
|
749
748
|
this.#secureContextType = framePayload.secureContextType;
|
750
749
|
this.#crossOriginIsolatedContextType = framePayload.crossOriginIsolatedContextType;
|
751
750
|
this.#gatedAPIFeatures = framePayload.gatedAPIFeatures;
|
@@ -755,10 +754,10 @@ export class ResourceTreeFrame {
|
|
755
754
|
explanationsTree: undefined,
|
756
755
|
};
|
757
756
|
|
758
|
-
const mainResource = this.resourcesMap.get(this.#
|
757
|
+
const mainResource = this.resourcesMap.get(this.#url);
|
759
758
|
this.resourcesMap.clear();
|
760
759
|
this.removeChildFrames();
|
761
|
-
if (mainResource && mainResource.loaderId === this.#
|
760
|
+
if (mainResource && mainResource.loaderId === this.#loaderId) {
|
762
761
|
this.addResource(mainResource);
|
763
762
|
}
|
764
763
|
}
|
@@ -768,19 +767,19 @@ export class ResourceTreeFrame {
|
|
768
767
|
}
|
769
768
|
|
770
769
|
get id(): Protocol.Page.FrameId {
|
771
|
-
return this.#
|
770
|
+
return this.#id;
|
772
771
|
}
|
773
772
|
|
774
773
|
get name(): string {
|
775
|
-
return this.#
|
774
|
+
return this.#name || '';
|
776
775
|
}
|
777
776
|
|
778
777
|
get url(): Platform.DevToolsPath.UrlString {
|
779
|
-
return this.#
|
778
|
+
return this.#url;
|
780
779
|
}
|
781
780
|
|
782
781
|
domainAndRegistry(): string {
|
783
|
-
return this.#
|
782
|
+
return this.#domainAndRegistry;
|
784
783
|
}
|
785
784
|
|
786
785
|
async getAdScriptAncestry(frameId: Protocol.Page.FrameId): Promise<Protocol.Page.AdScriptAncestry|null> {
|
@@ -797,37 +796,37 @@ export class ResourceTreeFrame {
|
|
797
796
|
}
|
798
797
|
|
799
798
|
getStorageKey(forceFetch: boolean): Promise<string|null> {
|
800
|
-
if (!this.#
|
801
|
-
this.#
|
799
|
+
if (!this.#storageKey || forceFetch) {
|
800
|
+
this.#storageKey = this.#model.storageKeyForFrame(this.#id);
|
802
801
|
}
|
803
|
-
return this.#
|
802
|
+
return this.#storageKey;
|
804
803
|
}
|
805
804
|
|
806
805
|
unreachableUrl(): Platform.DevToolsPath.UrlString {
|
807
|
-
return this.#
|
806
|
+
return this.#unreachableUrl;
|
808
807
|
}
|
809
808
|
|
810
809
|
get loaderId(): Protocol.Network.LoaderId {
|
811
|
-
return this.#
|
810
|
+
return this.#loaderId;
|
812
811
|
}
|
813
812
|
|
814
813
|
adFrameType(): Protocol.Page.AdFrameType {
|
815
|
-
return this.#
|
814
|
+
return this.#adFrameStatus?.adFrameType || Protocol.Page.AdFrameType.None;
|
816
815
|
}
|
817
816
|
|
818
817
|
adFrameStatus(): Protocol.Page.AdFrameStatus|undefined {
|
819
|
-
return this.#
|
818
|
+
return this.#adFrameStatus;
|
820
819
|
}
|
821
820
|
|
822
821
|
get childFrames(): ResourceTreeFrame[] {
|
823
|
-
return [...this.#
|
822
|
+
return [...this.#childFrames];
|
824
823
|
}
|
825
824
|
|
826
825
|
/**
|
827
826
|
* Returns the parent frame if both #frames are part of the same process/target.
|
828
827
|
*/
|
829
828
|
sameTargetParentFrame(): ResourceTreeFrame|null {
|
830
|
-
return this.#
|
829
|
+
return this.#sameTargetParentFrame;
|
831
830
|
}
|
832
831
|
|
833
832
|
/**
|
@@ -868,7 +867,7 @@ export class ResourceTreeFrame {
|
|
868
867
|
* https://chromium.googlesource.com/chromium/src/+/HEAD/docs/frame_trees.md
|
869
868
|
*/
|
870
869
|
isMainFrame(): boolean {
|
871
|
-
return !this.#
|
870
|
+
return !this.#sameTargetParentFrame;
|
872
871
|
}
|
873
872
|
|
874
873
|
/**
|
@@ -877,7 +876,7 @@ export class ResourceTreeFrame {
|
|
877
876
|
* https://chromium.googlesource.com/chromium/src/+/HEAD/docs/frame_trees.md
|
878
877
|
*/
|
879
878
|
isOutermostFrame(): boolean {
|
880
|
-
return this.#model.target().parentTarget()?.type() !== Type.FRAME && !this.#
|
879
|
+
return this.#model.target().parentTarget()?.type() !== Type.FRAME && !this.#sameTargetParentFrame &&
|
881
880
|
!this.crossTargetParentFrameId;
|
882
881
|
}
|
883
882
|
|
@@ -887,18 +886,17 @@ export class ResourceTreeFrame {
|
|
887
886
|
* https://chromium.googlesource.com/chromium/src/+/HEAD/docs/frame_trees.md
|
888
887
|
*/
|
889
888
|
isPrimaryFrame(): boolean {
|
890
|
-
return !this.#
|
891
|
-
this.#model.target() === TargetManager.instance().primaryPageTarget();
|
889
|
+
return !this.#sameTargetParentFrame && this.#model.target() === TargetManager.instance().primaryPageTarget();
|
892
890
|
}
|
893
891
|
|
894
892
|
removeChildFrame(frame: ResourceTreeFrame, isSwap: boolean): void {
|
895
|
-
this.#
|
893
|
+
this.#childFrames.delete(frame);
|
896
894
|
frame.remove(isSwap);
|
897
895
|
}
|
898
896
|
|
899
897
|
private removeChildFrames(): void {
|
900
|
-
const frames = this.#
|
901
|
-
this.#
|
898
|
+
const frames = this.#childFrames;
|
899
|
+
this.#childFrames = new Set();
|
902
900
|
for (const frame of frames) {
|
903
901
|
frame.remove(false);
|
904
902
|
}
|
@@ -941,7 +939,7 @@ export class ResourceTreeFrame {
|
|
941
939
|
if (resource) {
|
942
940
|
return resource;
|
943
941
|
}
|
944
|
-
for (const frame of this.#
|
942
|
+
for (const frame of this.#childFrames) {
|
945
943
|
const resource = frame.resourceForURL(url);
|
946
944
|
if (resource) {
|
947
945
|
return resource;
|
@@ -957,7 +955,7 @@ export class ResourceTreeFrame {
|
|
957
955
|
}
|
958
956
|
}
|
959
957
|
|
960
|
-
for (const frame of this.#
|
958
|
+
for (const frame of this.#childFrames) {
|
961
959
|
if (frame.callForFrameResources(callback)) {
|
962
960
|
return true;
|
963
961
|
}
|
@@ -969,12 +967,12 @@ export class ResourceTreeFrame {
|
|
969
967
|
if (this.isOutermostFrame()) {
|
970
968
|
return i18n.i18n.lockedString('top');
|
971
969
|
}
|
972
|
-
const subtitle = new Common.ParsedURL.ParsedURL(this.#
|
970
|
+
const subtitle = new Common.ParsedURL.ParsedURL(this.#url).displayName;
|
973
971
|
if (subtitle) {
|
974
|
-
if (!this.#
|
972
|
+
if (!this.#name) {
|
975
973
|
return subtitle;
|
976
974
|
}
|
977
|
-
return this.#
|
975
|
+
return this.#name + ' (' + subtitle + ')';
|
978
976
|
}
|
979
977
|
return i18n.i18n.lockedString('iframe');
|
980
978
|
}
|
@@ -984,7 +982,7 @@ export class ResourceTreeFrame {
|
|
984
982
|
if (!parentFrame) {
|
985
983
|
return null;
|
986
984
|
}
|
987
|
-
return await parentFrame.resourceTreeModel().domModel().getOwnerNodeForFrame(this.#
|
985
|
+
return await parentFrame.resourceTreeModel().domModel().getOwnerNodeForFrame(this.#id);
|
988
986
|
}
|
989
987
|
|
990
988
|
async getOwnerDOMNodeOrDocument(): Promise<DOMNode|null> {
|
@@ -1002,7 +1000,7 @@ export class ResourceTreeFrame {
|
|
1002
1000
|
const parentFrame = this.parentFrame();
|
1003
1001
|
const parentTarget = this.resourceTreeModel().target().parentTarget();
|
1004
1002
|
const highlightFrameOwner = async(domModel: DOMModel): Promise<void> => {
|
1005
|
-
const deferredNode = await domModel.getOwnerNodeForFrame(this.#
|
1003
|
+
const deferredNode = await domModel.getOwnerNodeForFrame(this.#id);
|
1006
1004
|
if (deferredNode) {
|
1007
1005
|
domModel.overlayModel().highlightInOverlay({deferredNode, selectorList: ''}, 'all', true);
|
1008
1006
|
}
|
@@ -1029,8 +1027,8 @@ export class ResourceTreeFrame {
|
|
1029
1027
|
}
|
1030
1028
|
|
1031
1029
|
async getPermissionsPolicyState(): Promise<Protocol.Page.PermissionsPolicyFeatureState[]|null> {
|
1032
|
-
const response =
|
1033
|
-
{frameId: this.#
|
1030
|
+
const response =
|
1031
|
+
await this.resourceTreeModel().target().pageAgent().invoke_getPermissionsPolicyState({frameId: this.#id});
|
1034
1032
|
if (response.getError()) {
|
1035
1033
|
return null;
|
1036
1034
|
}
|
@@ -1038,8 +1036,7 @@ export class ResourceTreeFrame {
|
|
1038
1036
|
}
|
1039
1037
|
|
1040
1038
|
async getOriginTrials(): Promise<Protocol.Page.OriginTrial[]> {
|
1041
|
-
const response =
|
1042
|
-
await this.resourceTreeModel().target().pageAgent().invoke_getOriginTrials({frameId: this.#idInternal});
|
1039
|
+
const response = await this.resourceTreeModel().target().pageAgent().invoke_getOriginTrials({frameId: this.#id});
|
1043
1040
|
if (response.getError()) {
|
1044
1041
|
return [];
|
1045
1042
|
}
|
@@ -54,8 +54,7 @@ import {Capability, type Target, Type} from './Target.js';
|
|
54
54
|
export class RuntimeModel extends SDKModel<EventTypes> {
|
55
55
|
readonly agent: ProtocolProxyApi.RuntimeApi;
|
56
56
|
readonly #executionContextById = new Map<number, ExecutionContext>();
|
57
|
-
#
|
58
|
-
(arg0: ExecutionContext, arg1: ExecutionContext) => number = ExecutionContext.comparator;
|
57
|
+
#executionContextComparator: (arg0: ExecutionContext, arg1: ExecutionContext) => number = ExecutionContext.comparator;
|
59
58
|
constructor(target: Target) {
|
60
59
|
super(target);
|
61
60
|
|
@@ -92,14 +91,14 @@ export class RuntimeModel extends SDKModel<EventTypes> {
|
|
92
91
|
}
|
93
92
|
|
94
93
|
setExecutionContextComparator(comparator: (arg0: ExecutionContext, arg1: ExecutionContext) => number): void {
|
95
|
-
this.#
|
94
|
+
this.#executionContextComparator = comparator;
|
96
95
|
}
|
97
96
|
|
98
97
|
/**
|
99
98
|
* comparator
|
100
99
|
*/
|
101
100
|
executionContextComparator(): (arg0: ExecutionContext, arg1: ExecutionContext) => number {
|
102
|
-
return this.#
|
101
|
+
return this.#executionContextComparator;
|
103
102
|
}
|
104
103
|
|
105
104
|
defaultExecutionContext(): ExecutionContext|null {
|
@@ -528,7 +527,7 @@ export class ExecutionContext {
|
|
528
527
|
id: Protocol.Runtime.ExecutionContextId;
|
529
528
|
uniqueId: string;
|
530
529
|
name: string;
|
531
|
-
#
|
530
|
+
#label: string|null;
|
532
531
|
origin: Platform.DevToolsPath.UrlString;
|
533
532
|
isDefault: boolean;
|
534
533
|
runtimeModel: RuntimeModel;
|
@@ -540,13 +539,13 @@ export class ExecutionContext {
|
|
540
539
|
this.id = id;
|
541
540
|
this.uniqueId = uniqueId;
|
542
541
|
this.name = name;
|
543
|
-
this.#
|
542
|
+
this.#label = null;
|
544
543
|
this.origin = origin;
|
545
544
|
this.isDefault = isDefault;
|
546
545
|
this.runtimeModel = runtimeModel;
|
547
546
|
this.debuggerModel = runtimeModel.debuggerModel();
|
548
547
|
this.frameId = frameId;
|
549
|
-
this
|
548
|
+
this.#setLabel('');
|
550
549
|
}
|
551
550
|
|
552
551
|
target(): Target {
|
@@ -697,25 +696,25 @@ export class ExecutionContext {
|
|
697
696
|
}
|
698
697
|
|
699
698
|
label(): string|null {
|
700
|
-
return this.#
|
699
|
+
return this.#label;
|
701
700
|
}
|
702
701
|
|
703
702
|
setLabel(label: string): void {
|
704
|
-
this
|
703
|
+
this.#setLabel(label);
|
705
704
|
this.runtimeModel.dispatchEventToListeners(Events.ExecutionContextChanged, this);
|
706
705
|
}
|
707
706
|
|
708
|
-
|
707
|
+
#setLabel(label: string): void {
|
709
708
|
if (label) {
|
710
|
-
this.#
|
709
|
+
this.#label = label;
|
711
710
|
return;
|
712
711
|
}
|
713
712
|
if (this.name) {
|
714
|
-
this.#
|
713
|
+
this.#label = this.name;
|
715
714
|
return;
|
716
715
|
}
|
717
716
|
const parsedUrl = Common.ParsedURL.ParsedURL.fromString(this.origin);
|
718
|
-
this.#
|
717
|
+
this.#label = parsedUrl ? parsedUrl.lastPathComponentWithFragment() : '';
|
719
718
|
}
|
720
719
|
}
|
721
720
|
|
@@ -18,15 +18,15 @@ const registeredModels = new Map<new (arg1: Target) => SDKModel, RegistrationInf
|
|
18
18
|
// all event emitters and sinks have been migrated.
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
20
20
|
export class SDKModel<Events = any> extends Common.ObjectWrapper.ObjectWrapper<Events> {
|
21
|
-
readonly #
|
21
|
+
readonly #target: Target;
|
22
22
|
|
23
23
|
constructor(target: Target) {
|
24
24
|
super();
|
25
|
-
this.#
|
25
|
+
this.#target = target;
|
26
26
|
}
|
27
27
|
|
28
28
|
target(): Target {
|
29
|
-
return this.#
|
29
|
+
return this.#target;
|
30
30
|
}
|
31
31
|
|
32
32
|
/**
|
@@ -75,17 +75,17 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
|
|
75
75
|
endColumn: number;
|
76
76
|
executionContextId: number;
|
77
77
|
hash: string;
|
78
|
-
readonly #
|
79
|
-
readonly #
|
78
|
+
readonly #isContentScript: boolean;
|
79
|
+
readonly #isLiveEdit: boolean;
|
80
80
|
sourceMapURL?: string;
|
81
81
|
debugSymbols: Protocol.Debugger.DebugSymbols|null;
|
82
82
|
hasSourceURL: boolean;
|
83
83
|
contentLength: number;
|
84
84
|
originStackTrace: Protocol.Runtime.StackTrace|null;
|
85
|
-
readonly #
|
85
|
+
readonly #codeOffset: number|null;
|
86
86
|
readonly #language: string|null;
|
87
87
|
#contentPromise: Promise<TextUtils.ContentData.ContentDataOrError>|null;
|
88
|
-
readonly #
|
88
|
+
readonly #embedderName: Platform.DevToolsPath.UrlString|null;
|
89
89
|
readonly isModule: boolean|null;
|
90
90
|
readonly buildId: string|null;
|
91
91
|
constructor(
|
@@ -107,21 +107,21 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
|
|
107
107
|
|
108
108
|
this.executionContextId = executionContextId;
|
109
109
|
this.hash = hash;
|
110
|
-
this.#
|
111
|
-
this.#
|
110
|
+
this.#isContentScript = isContentScript;
|
111
|
+
this.#isLiveEdit = isLiveEdit;
|
112
112
|
this.sourceMapURL = sourceMapURL;
|
113
113
|
this.debugSymbols = debugSymbols;
|
114
114
|
this.hasSourceURL = hasSourceURL;
|
115
115
|
this.contentLength = length;
|
116
116
|
this.originStackTrace = originStackTrace;
|
117
|
-
this.#
|
117
|
+
this.#codeOffset = codeOffset;
|
118
118
|
this.#language = scriptLanguage;
|
119
119
|
this.#contentPromise = null;
|
120
|
-
this.#
|
120
|
+
this.#embedderName = embedderName;
|
121
121
|
}
|
122
122
|
|
123
123
|
embedderName(): Platform.DevToolsPath.UrlString|null {
|
124
|
-
return this.#
|
124
|
+
return this.#embedderName;
|
125
125
|
}
|
126
126
|
|
127
127
|
target(): Target {
|
@@ -148,11 +148,11 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
|
|
148
148
|
}
|
149
149
|
|
150
150
|
isContentScript(): boolean {
|
151
|
-
return this.#
|
151
|
+
return this.#isContentScript;
|
152
152
|
}
|
153
153
|
|
154
154
|
codeOffset(): number|null {
|
155
|
-
return this.#
|
155
|
+
return this.#codeOffset;
|
156
156
|
}
|
157
157
|
|
158
158
|
isJavaScript(): boolean {
|
@@ -172,7 +172,7 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
|
|
172
172
|
}
|
173
173
|
|
174
174
|
isLiveEdit(): boolean {
|
175
|
-
return this.#
|
175
|
+
return this.#isLiveEdit;
|
176
176
|
}
|
177
177
|
|
178
178
|
contentURL(): Platform.DevToolsPath.UrlString {
|
@@ -257,7 +257,7 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
|
|
257
257
|
requestContentData(): Promise<TextUtils.ContentData.ContentDataOrError> {
|
258
258
|
if (!this.#contentPromise) {
|
259
259
|
const fileSizeToCache = 65535; // We won't bother cacheing files under 64K
|
260
|
-
if (this.hash && !this.#
|
260
|
+
if (this.hash && !this.#isLiveEdit && this.contentLength > fileSizeToCache) {
|
261
261
|
// For large files that aren't live edits and have a hash, we keep a content-addressed cache
|
262
262
|
// so we don't need to load multiple copies or disassemble wasm modules multiple times.
|
263
263
|
if (!scriptCacheInstance) {
|
@@ -275,25 +275,25 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
|
|
275
275
|
this.columnOffset,
|
276
276
|
this.endLine,
|
277
277
|
this.endColumn,
|
278
|
-
this.#
|
278
|
+
this.#codeOffset,
|
279
279
|
this.hash,
|
280
280
|
].join(':');
|
281
281
|
const cachedContentPromise = scriptCacheInstance.cache.get(fullHash)?.deref();
|
282
282
|
if (cachedContentPromise) {
|
283
283
|
this.#contentPromise = cachedContentPromise;
|
284
284
|
} else {
|
285
|
-
this.#contentPromise = this
|
285
|
+
this.#contentPromise = this.#requestContent();
|
286
286
|
scriptCacheInstance.cache.set(fullHash, new WeakRef(this.#contentPromise));
|
287
287
|
scriptCacheInstance.registry.register(this.#contentPromise, fullHash);
|
288
288
|
}
|
289
289
|
} else {
|
290
|
-
this.#contentPromise = this
|
290
|
+
this.#contentPromise = this.#requestContent();
|
291
291
|
}
|
292
292
|
}
|
293
293
|
return this.#contentPromise;
|
294
294
|
}
|
295
295
|
|
296
|
-
|
296
|
+
async #requestContent(): Promise<TextUtils.ContentData.ContentDataOrError> {
|
297
297
|
if (!this.scriptId) {
|
298
298
|
return {error: i18nString(UIStrings.scriptRemovedOrDeleted)};
|
299
299
|
}
|
@@ -10,21 +10,21 @@ export class SecurityOriginManager extends SDKModel<EventTypes> {
|
|
10
10
|
// 'chrome-error://chromewebdata/', and |this.#mainSecurityOriginInternal| stores
|
11
11
|
// its origin. In this situation, the original unreachable URL's security
|
12
12
|
// origin will be stored in |this.#unreachableMainSecurityOriginInternal|.
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
13
|
+
#mainSecurityOrigin = '';
|
14
|
+
#unreachableMainSecurityOrigin: string|null = '';
|
15
|
+
#securityOrigins = new Set<string>();
|
16
16
|
|
17
17
|
updateSecurityOrigins(securityOrigins: Set<string>): void {
|
18
|
-
const oldOrigins = this.#
|
19
|
-
this.#
|
18
|
+
const oldOrigins = this.#securityOrigins;
|
19
|
+
this.#securityOrigins = securityOrigins;
|
20
20
|
|
21
21
|
for (const origin of oldOrigins) {
|
22
|
-
if (!this.#
|
22
|
+
if (!this.#securityOrigins.has(origin)) {
|
23
23
|
this.dispatchEventToListeners(Events.SecurityOriginRemoved, origin);
|
24
24
|
}
|
25
25
|
}
|
26
26
|
|
27
|
-
for (const origin of this.#
|
27
|
+
for (const origin of this.#securityOrigins) {
|
28
28
|
if (!oldOrigins.has(origin)) {
|
29
29
|
this.dispatchEventToListeners(Events.SecurityOriginAdded, origin);
|
30
30
|
}
|
@@ -32,23 +32,23 @@ export class SecurityOriginManager extends SDKModel<EventTypes> {
|
|
32
32
|
}
|
33
33
|
|
34
34
|
securityOrigins(): string[] {
|
35
|
-
return [...this.#
|
35
|
+
return [...this.#securityOrigins];
|
36
36
|
}
|
37
37
|
|
38
38
|
mainSecurityOrigin(): string {
|
39
|
-
return this.#
|
39
|
+
return this.#mainSecurityOrigin;
|
40
40
|
}
|
41
41
|
|
42
42
|
unreachableMainSecurityOrigin(): string|null {
|
43
|
-
return this.#
|
43
|
+
return this.#unreachableMainSecurityOrigin;
|
44
44
|
}
|
45
45
|
|
46
46
|
setMainSecurityOrigin(securityOrigin: string, unreachableSecurityOrigin: string): void {
|
47
|
-
this.#
|
48
|
-
this.#
|
47
|
+
this.#mainSecurityOrigin = securityOrigin;
|
48
|
+
this.#unreachableMainSecurityOrigin = unreachableSecurityOrigin || null;
|
49
49
|
this.dispatchEventToListeners(Events.MainSecurityOriginChanged, {
|
50
|
-
mainSecurityOrigin: this.#
|
51
|
-
unreachableMainSecurityOrigin: this.#
|
50
|
+
mainSecurityOrigin: this.#mainSecurityOrigin,
|
51
|
+
unreachableMainSecurityOrigin: this.#unreachableMainSecurityOrigin,
|
52
52
|
});
|
53
53
|
}
|
54
54
|
}
|
@@ -75,13 +75,13 @@ export class ServerTiming {
|
|
75
75
|
return null;
|
76
76
|
}
|
77
77
|
|
78
|
-
const serverTimings = rawServerTimingHeaders.reduce((timings, header) => {
|
78
|
+
const serverTimings = rawServerTimingHeaders.reduce<ServerTiming[]>((timings, header) => {
|
79
79
|
const timing = this.createFromHeaderValue(header.value);
|
80
80
|
timings.push(...timing.map(function(entry) {
|
81
81
|
return new ServerTiming(entry.name, entry.dur ?? null, entry.desc ?? '');
|
82
82
|
}));
|
83
83
|
return timings;
|
84
|
-
},
|
84
|
+
}, []);
|
85
85
|
return serverTimings;
|
86
86
|
}
|
87
87
|
|