chrome-devtools-frontend 1.0.1512147 → 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/Images/src/ai-explorer-badge.svg +114 -0
- package/front_end/Images/src/code-whisperer-badge.svg +166 -0
- package/front_end/Images/src/devtools-user-badge.svg +129 -0
- package/front_end/Images/src/dom-detective-badge.svg +136 -0
- package/front_end/Images/src/speedster-badge.svg +166 -0
- 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 +76 -2
- 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/i18n/NumberFormatter.ts +7 -0
- 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 +18 -35
- package/front_end/models/ai_assistance/ai_assistance.ts +1 -1
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +7 -6
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +246 -119
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +187 -73
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +106 -100
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +20 -27
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +151 -0
- package/front_end/models/badges/AiExplorerBadge.ts +21 -0
- package/front_end/models/badges/Badge.ts +10 -9
- package/front_end/models/badges/CodeWhispererBadge.ts +21 -0
- package/front_end/models/badges/DOMDetectiveBadge.ts +21 -0
- package/front_end/models/badges/SpeedsterBadge.ts +7 -2
- package/front_end/models/badges/StarterBadge.ts +6 -1
- package/front_end/models/badges/UserBadges.ts +61 -9
- 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 -54
- 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 +140 -10
- package/front_end/panels/common/GdpSignUpDialog.ts +5 -0
- package/front_end/panels/common/badgeNotification.css +30 -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 +30 -18
- package/front_end/panels/elements/ElementsTreeOutline.ts +44 -48
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +7 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +54 -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 -18
- package/front_end/panels/settings/components/SyncSection.ts +26 -8
- 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 +73 -68
- 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 +47 -46
- 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/filter.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +1 -1
- package/front_end/ui/legacy/softDropDownButton.css +1 -1
- 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
- package/front_end/models/ai_assistance/data_formatters/Types.ts +0 -9
@@ -108,30 +108,30 @@ export const ARIA_ATTRIBUTES = new Set<string>([
|
|
108
108
|
]);
|
109
109
|
|
110
110
|
export class DOMNode {
|
111
|
-
#
|
111
|
+
#domModel: DOMModel;
|
112
112
|
#agent: ProtocolProxyApi.DOMApi;
|
113
113
|
ownerDocument!: DOMDocument|null;
|
114
|
-
#
|
114
|
+
#isInShadowTree!: boolean;
|
115
115
|
id!: Protocol.DOM.NodeId;
|
116
116
|
index: number|undefined = undefined;
|
117
|
-
#
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
117
|
+
#backendNodeId!: Protocol.DOM.BackendNodeId;
|
118
|
+
#nodeType!: number;
|
119
|
+
#nodeName!: string;
|
120
|
+
#localName!: string;
|
121
121
|
nodeValueInternal!: string;
|
122
|
-
#
|
122
|
+
#pseudoType!: Protocol.DOM.PseudoType|undefined;
|
123
123
|
#pseudoIdentifier?: string;
|
124
|
-
#
|
125
|
-
#
|
124
|
+
#shadowRootType!: Protocol.DOM.ShadowRootType|undefined;
|
125
|
+
#frameOwnerFrameId!: Protocol.Page.FrameId|null;
|
126
126
|
#xmlVersion!: string|undefined;
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
127
|
+
#isSVGNode!: boolean;
|
128
|
+
#isScrollable!: boolean;
|
129
|
+
#creationStackTrace: Promise<Protocol.Runtime.StackTrace|null>|null = null;
|
130
130
|
#pseudoElements = new Map<string, DOMNode[]>();
|
131
|
-
#
|
131
|
+
#distributedNodes: DOMNodeShortcut[] = [];
|
132
132
|
assignedSlot: DOMNodeShortcut|null = null;
|
133
133
|
readonly shadowRootsInternal: DOMNode[] = [];
|
134
|
-
#
|
134
|
+
#attributes = new Map<string, Attribute>();
|
135
135
|
#markers = new Map<string, unknown>();
|
136
136
|
#subtreeMarkerCount = 0;
|
137
137
|
childNodeCountInternal!: number;
|
@@ -144,7 +144,7 @@ export class DOMNode {
|
|
144
144
|
templateContentInternal?: DOMNode;
|
145
145
|
contentDocumentInternal?: DOMDocument;
|
146
146
|
childDocumentPromiseForTesting?: Promise<DOMDocument|null>;
|
147
|
-
#
|
147
|
+
#importedDocument?: DOMNode;
|
148
148
|
publicId?: string;
|
149
149
|
systemId?: string;
|
150
150
|
internalSubset?: string;
|
@@ -161,8 +161,8 @@ export class DOMNode {
|
|
161
161
|
#retainedNodes?: Set<Protocol.DOM.BackendNodeId>;
|
162
162
|
|
163
163
|
constructor(domModel: DOMModel) {
|
164
|
-
this.#
|
165
|
-
this.#agent = this.#
|
164
|
+
this.#domModel = domModel;
|
165
|
+
this.#agent = this.#domModel.getAgent();
|
166
166
|
}
|
167
167
|
|
168
168
|
static create(
|
@@ -176,24 +176,24 @@ export class DOMNode {
|
|
176
176
|
init(
|
177
177
|
doc: DOMDocument|null, isInShadowTree: boolean, payload: Protocol.DOM.Node,
|
178
178
|
retainedNodes?: Set<Protocol.DOM.BackendNodeId>): void {
|
179
|
-
this.#agent = this.#
|
179
|
+
this.#agent = this.#domModel.getAgent();
|
180
180
|
this.ownerDocument = doc;
|
181
|
-
this.#
|
181
|
+
this.#isInShadowTree = isInShadowTree;
|
182
182
|
|
183
183
|
this.id = payload.nodeId;
|
184
|
-
this.#
|
185
|
-
this.#
|
186
|
-
this.#
|
187
|
-
this.#
|
188
|
-
this.#
|
184
|
+
this.#backendNodeId = payload.backendNodeId;
|
185
|
+
this.#domModel.registerNode(this);
|
186
|
+
this.#nodeType = payload.nodeType;
|
187
|
+
this.#nodeName = payload.nodeName;
|
188
|
+
this.#localName = payload.localName;
|
189
189
|
this.nodeValueInternal = payload.nodeValue;
|
190
|
-
this.#
|
190
|
+
this.#pseudoType = payload.pseudoType;
|
191
191
|
this.#pseudoIdentifier = payload.pseudoIdentifier;
|
192
|
-
this.#
|
193
|
-
this.#
|
192
|
+
this.#shadowRootType = payload.shadowRootType;
|
193
|
+
this.#frameOwnerFrameId = payload.frameId || null;
|
194
194
|
this.#xmlVersion = payload.xmlVersion;
|
195
|
-
this.#
|
196
|
-
this.#
|
195
|
+
this.#isSVGNode = Boolean(payload.isSVG);
|
196
|
+
this.#isScrollable = Boolean(payload.isScrollable);
|
197
197
|
this.#retainedNodes = retainedNodes;
|
198
198
|
|
199
199
|
if (this.#retainedNodes?.has(this.backendNodeId())) {
|
@@ -208,7 +208,7 @@ export class DOMNode {
|
|
208
208
|
if (payload.shadowRoots) {
|
209
209
|
for (let i = 0; i < payload.shadowRoots.length; ++i) {
|
210
210
|
const root = payload.shadowRoots[i];
|
211
|
-
const node = DOMNode.create(this.#
|
211
|
+
const node = DOMNode.create(this.#domModel, this.ownerDocument, true, root, retainedNodes);
|
212
212
|
this.shadowRootsInternal.push(node);
|
213
213
|
node.parentNode = this;
|
214
214
|
}
|
@@ -216,26 +216,26 @@ export class DOMNode {
|
|
216
216
|
|
217
217
|
if (payload.templateContent) {
|
218
218
|
this.templateContentInternal =
|
219
|
-
DOMNode.create(this.#
|
219
|
+
DOMNode.create(this.#domModel, this.ownerDocument, true, payload.templateContent, retainedNodes);
|
220
220
|
this.templateContentInternal.parentNode = this;
|
221
221
|
this.childrenInternal = [];
|
222
222
|
}
|
223
223
|
|
224
224
|
const frameOwnerTags = new Set(['EMBED', 'IFRAME', 'OBJECT', 'FENCEDFRAME']);
|
225
225
|
if (payload.contentDocument) {
|
226
|
-
this.contentDocumentInternal = new DOMDocument(this.#
|
226
|
+
this.contentDocumentInternal = new DOMDocument(this.#domModel, payload.contentDocument);
|
227
227
|
this.contentDocumentInternal.parentNode = this;
|
228
228
|
this.childrenInternal = [];
|
229
229
|
} else if (payload.frameId && frameOwnerTags.has(payload.nodeName)) {
|
230
230
|
// At this point we know we are in an OOPIF, otherwise `payload.contentDocument` would have been set.
|
231
|
-
this.childDocumentPromiseForTesting = this.requestChildDocument(payload.frameId, this.#
|
231
|
+
this.childDocumentPromiseForTesting = this.requestChildDocument(payload.frameId, this.#domModel.target());
|
232
232
|
this.childrenInternal = [];
|
233
233
|
}
|
234
234
|
|
235
235
|
if (payload.importedDocument) {
|
236
|
-
this.#
|
237
|
-
DOMNode.create(this.#
|
238
|
-
this.#
|
236
|
+
this.#importedDocument =
|
237
|
+
DOMNode.create(this.#domModel, this.ownerDocument, true, payload.importedDocument, retainedNodes);
|
238
|
+
this.#importedDocument.parentNode = this;
|
239
239
|
this.childrenInternal = [];
|
240
240
|
}
|
241
241
|
|
@@ -253,19 +253,19 @@ export class DOMNode {
|
|
253
253
|
|
254
254
|
this.setPseudoElements(payload.pseudoElements);
|
255
255
|
|
256
|
-
if (this.#
|
256
|
+
if (this.#nodeType === Node.ELEMENT_NODE) {
|
257
257
|
// HTML and BODY from internal iframes should not overwrite top-level ones.
|
258
|
-
if (this.ownerDocument && !this.ownerDocument.documentElement && this.#
|
258
|
+
if (this.ownerDocument && !this.ownerDocument.documentElement && this.#nodeName === 'HTML') {
|
259
259
|
this.ownerDocument.documentElement = this;
|
260
260
|
}
|
261
|
-
if (this.ownerDocument && !this.ownerDocument.body && this.#
|
261
|
+
if (this.ownerDocument && !this.ownerDocument.body && this.#nodeName === 'BODY') {
|
262
262
|
this.ownerDocument.body = this;
|
263
263
|
}
|
264
|
-
} else if (this.#
|
264
|
+
} else if (this.#nodeType === Node.DOCUMENT_TYPE_NODE) {
|
265
265
|
this.publicId = payload.publicId;
|
266
266
|
this.systemId = payload.systemId;
|
267
267
|
this.internalSubset = payload.internalSubset;
|
268
|
-
} else if (this.#
|
268
|
+
} else if (this.#nodeType === Node.ATTRIBUTE_NODE) {
|
269
269
|
this.name = payload.name;
|
270
270
|
this.value = payload.value;
|
271
271
|
}
|
@@ -278,8 +278,8 @@ export class DOMNode {
|
|
278
278
|
}
|
279
279
|
|
280
280
|
isAdFrameNode(): boolean {
|
281
|
-
if (this.isIframe() && this.#
|
282
|
-
const frame = FrameManager.instance().getFrame(this.#
|
281
|
+
if (this.isIframe() && this.#frameOwnerFrameId) {
|
282
|
+
const frame = FrameManager.instance().getFrame(this.#frameOwnerFrameId);
|
283
283
|
if (!frame) {
|
284
284
|
return false;
|
285
285
|
}
|
@@ -289,19 +289,19 @@ export class DOMNode {
|
|
289
289
|
}
|
290
290
|
|
291
291
|
isSVGNode(): boolean {
|
292
|
-
return this.#
|
292
|
+
return this.#isSVGNode;
|
293
293
|
}
|
294
294
|
|
295
295
|
isScrollable(): boolean {
|
296
|
-
return this.#
|
296
|
+
return this.#isScrollable;
|
297
297
|
}
|
298
298
|
|
299
299
|
isMediaNode(): boolean {
|
300
|
-
return this.#
|
300
|
+
return this.#nodeName === 'AUDIO' || this.#nodeName === 'VIDEO';
|
301
301
|
}
|
302
302
|
|
303
303
|
isViewTransitionPseudoNode(): boolean {
|
304
|
-
if (!this.#
|
304
|
+
if (!this.#pseudoType) {
|
305
305
|
return false;
|
306
306
|
}
|
307
307
|
|
@@ -312,17 +312,17 @@ export class DOMNode {
|
|
312
312
|
Protocol.DOM.PseudoType.ViewTransitionImagePair,
|
313
313
|
Protocol.DOM.PseudoType.ViewTransitionOld,
|
314
314
|
Protocol.DOM.PseudoType.ViewTransitionNew,
|
315
|
-
].includes(this.#
|
315
|
+
].includes(this.#pseudoType);
|
316
316
|
}
|
317
317
|
|
318
318
|
creationStackTrace(): Promise<Protocol.Runtime.StackTrace|null> {
|
319
|
-
if (this.#
|
320
|
-
return this.#
|
319
|
+
if (this.#creationStackTrace) {
|
320
|
+
return this.#creationStackTrace;
|
321
321
|
}
|
322
322
|
|
323
323
|
const stackTracesPromise = this.#agent.invoke_getNodeStackTraces({nodeId: this.id});
|
324
|
-
this.#
|
325
|
-
return this.#
|
324
|
+
this.#creationStackTrace = stackTracesPromise.then(res => res.creation || null);
|
325
|
+
return this.#creationStackTrace;
|
326
326
|
}
|
327
327
|
|
328
328
|
get subtreeMarkerCount(): number {
|
@@ -330,11 +330,11 @@ export class DOMNode {
|
|
330
330
|
}
|
331
331
|
|
332
332
|
domModel(): DOMModel {
|
333
|
-
return this.#
|
333
|
+
return this.#domModel;
|
334
334
|
}
|
335
335
|
|
336
336
|
backendNodeId(): Protocol.DOM.BackendNodeId {
|
337
|
-
return this.#
|
337
|
+
return this.#backendNodeId;
|
338
338
|
}
|
339
339
|
|
340
340
|
children(): DOMNode[]|null {
|
@@ -346,11 +346,11 @@ export class DOMNode {
|
|
346
346
|
}
|
347
347
|
|
348
348
|
setIsScrollable(isScrollable: boolean): void {
|
349
|
-
this.#
|
349
|
+
this.#isScrollable = isScrollable;
|
350
350
|
}
|
351
351
|
|
352
352
|
hasAttributes(): boolean {
|
353
|
-
return this.#
|
353
|
+
return this.#attributes.size > 0;
|
354
354
|
}
|
355
355
|
|
356
356
|
childNodeCount(): number {
|
@@ -378,23 +378,23 @@ export class DOMNode {
|
|
378
378
|
}
|
379
379
|
|
380
380
|
isIframe(): boolean {
|
381
|
-
return this.#
|
381
|
+
return this.#nodeName === 'IFRAME';
|
382
382
|
}
|
383
383
|
|
384
384
|
importedDocument(): DOMNode|null {
|
385
|
-
return this.#
|
385
|
+
return this.#importedDocument || null;
|
386
386
|
}
|
387
387
|
|
388
388
|
nodeType(): number {
|
389
|
-
return this.#
|
389
|
+
return this.#nodeType;
|
390
390
|
}
|
391
391
|
|
392
392
|
nodeName(): string {
|
393
|
-
return this.#
|
393
|
+
return this.#nodeName;
|
394
394
|
}
|
395
395
|
|
396
396
|
pseudoType(): string|undefined {
|
397
|
-
return this.#
|
397
|
+
return this.#pseudoType;
|
398
398
|
}
|
399
399
|
|
400
400
|
pseudoIdentifier(): string|undefined {
|
@@ -459,16 +459,15 @@ export class DOMNode {
|
|
459
459
|
|
460
460
|
isInsertionPoint(): boolean {
|
461
461
|
return !this.isXMLNode() &&
|
462
|
-
(this.#
|
463
|
-
this.#nodeNameInternal === 'SLOT');
|
462
|
+
(this.#nodeName === 'SHADOW' || this.#nodeName === 'CONTENT' || this.#nodeName === 'SLOT');
|
464
463
|
}
|
465
464
|
|
466
465
|
distributedNodes(): DOMNodeShortcut[] {
|
467
|
-
return this.#
|
466
|
+
return this.#distributedNodes;
|
468
467
|
}
|
469
468
|
|
470
469
|
isInShadowTree(): boolean {
|
471
|
-
return this.#
|
470
|
+
return this.#isInShadowTree;
|
472
471
|
}
|
473
472
|
|
474
473
|
ancestorShadowHost(): DOMNode|null {
|
@@ -477,7 +476,7 @@ export class DOMNode {
|
|
477
476
|
}
|
478
477
|
|
479
478
|
ancestorShadowRoot(): DOMNode|null {
|
480
|
-
if (!this.#
|
479
|
+
if (!this.#isInShadowTree) {
|
481
480
|
return null;
|
482
481
|
}
|
483
482
|
|
@@ -497,11 +496,11 @@ export class DOMNode {
|
|
497
496
|
}
|
498
497
|
|
499
498
|
isShadowRoot(): boolean {
|
500
|
-
return Boolean(this.#
|
499
|
+
return Boolean(this.#shadowRootType);
|
501
500
|
}
|
502
501
|
|
503
502
|
shadowRootType(): string|null {
|
504
|
-
return this.#
|
503
|
+
return this.#shadowRootType || null;
|
505
504
|
}
|
506
505
|
|
507
506
|
nodeNameInCorrectCase(): string {
|
@@ -527,16 +526,16 @@ export class DOMNode {
|
|
527
526
|
setNodeName(name: string, callback?: ((arg0: string|null, arg1: DOMNode|null) => void)): void {
|
528
527
|
void this.#agent.invoke_setNodeName({nodeId: this.id, name}).then(response => {
|
529
528
|
if (!response.getError()) {
|
530
|
-
this.#
|
529
|
+
this.#domModel.markUndoableState();
|
531
530
|
}
|
532
531
|
if (callback) {
|
533
|
-
callback(response.getError() || null, this.#
|
532
|
+
callback(response.getError() || null, this.#domModel.nodeForId(response.nodeId));
|
534
533
|
}
|
535
534
|
});
|
536
535
|
}
|
537
536
|
|
538
537
|
localName(): string {
|
539
|
-
return this.#
|
538
|
+
return this.#localName;
|
540
539
|
}
|
541
540
|
|
542
541
|
nodeValue(): string {
|
@@ -550,7 +549,7 @@ export class DOMNode {
|
|
550
549
|
setNodeValue(value: string, callback?: ((arg0: string|null) => void)): void {
|
551
550
|
void this.#agent.invoke_setNodeValue({nodeId: this.id, value}).then(response => {
|
552
551
|
if (!response.getError()) {
|
553
|
-
this.#
|
552
|
+
this.#domModel.markUndoableState();
|
554
553
|
}
|
555
554
|
if (callback) {
|
556
555
|
callback(response.getError() || null);
|
@@ -559,14 +558,14 @@ export class DOMNode {
|
|
559
558
|
}
|
560
559
|
|
561
560
|
getAttribute(name: string): string|undefined {
|
562
|
-
const attr = this.#
|
561
|
+
const attr = this.#attributes.get(name);
|
563
562
|
return attr ? attr.value : undefined;
|
564
563
|
}
|
565
564
|
|
566
565
|
setAttribute(name: string, text: string, callback?: ((arg0: string|null) => void)): void {
|
567
566
|
void this.#agent.invoke_setAttributesAsText({nodeId: this.id, text, name}).then(response => {
|
568
567
|
if (!response.getError()) {
|
569
|
-
this.#
|
568
|
+
this.#domModel.markUndoableState();
|
570
569
|
}
|
571
570
|
if (callback) {
|
572
571
|
callback(response.getError() || null);
|
@@ -577,7 +576,7 @@ export class DOMNode {
|
|
577
576
|
setAttributeValue(name: string, value: string, callback?: ((arg0: string|null) => void)): void {
|
578
577
|
void this.#agent.invoke_setAttributeValue({nodeId: this.id, name, value}).then(response => {
|
579
578
|
if (!response.getError()) {
|
580
|
-
this.#
|
579
|
+
this.#domModel.markUndoableState();
|
581
580
|
}
|
582
581
|
if (callback) {
|
583
582
|
callback(response.getError() || null);
|
@@ -590,7 +589,7 @@ export class DOMNode {
|
|
590
589
|
}
|
591
590
|
|
592
591
|
attributes(): Attribute[] {
|
593
|
-
return [...this.#
|
592
|
+
return [...this.#attributes.values()];
|
594
593
|
}
|
595
594
|
|
596
595
|
async removeAttribute(name: string): Promise<void> {
|
@@ -598,8 +597,8 @@ export class DOMNode {
|
|
598
597
|
if (response.getError()) {
|
599
598
|
return;
|
600
599
|
}
|
601
|
-
this.#
|
602
|
-
this.#
|
600
|
+
this.#attributes.delete(name);
|
601
|
+
this.#domModel.markUndoableState();
|
603
602
|
}
|
604
603
|
|
605
604
|
getChildNodesPromise(): Promise<DOMNode[]|null> {
|
@@ -631,7 +630,7 @@ export class DOMNode {
|
|
631
630
|
setOuterHTML(html: string, callback?: ((arg0: string|null) => void)): void {
|
632
631
|
void this.#agent.invoke_setOuterHTML({nodeId: this.id, outerHTML: html}).then(response => {
|
633
632
|
if (!response.getError()) {
|
634
|
-
this.#
|
633
|
+
this.#domModel.markUndoableState();
|
635
634
|
}
|
636
635
|
if (callback) {
|
637
636
|
callback(response.getError() || null);
|
@@ -642,7 +641,7 @@ export class DOMNode {
|
|
642
641
|
removeNode(callback?: ((arg0: string|null, arg1?: Protocol.DOM.NodeId|undefined) => void)): Promise<void> {
|
643
642
|
return this.#agent.invoke_removeNode({nodeId: this.id}).then(response => {
|
644
643
|
if (!response.getError()) {
|
645
|
-
this.#
|
644
|
+
this.#domModel.markUndoableState();
|
646
645
|
}
|
647
646
|
if (callback) {
|
648
647
|
callback(response.getError() || null);
|
@@ -652,7 +651,7 @@ export class DOMNode {
|
|
652
651
|
|
653
652
|
path(): string {
|
654
653
|
function getNodeKey(node: DOMNode): number|'u'|'a'|'d'|null {
|
655
|
-
if (!node.#
|
654
|
+
if (!node.#nodeName.length) {
|
656
655
|
return null;
|
657
656
|
}
|
658
657
|
if (node.index !== undefined) {
|
@@ -678,7 +677,7 @@ export class DOMNode {
|
|
678
677
|
break;
|
679
678
|
}
|
680
679
|
|
681
|
-
path.push([key, node.#
|
680
|
+
path.push([key, node.#nodeName]);
|
682
681
|
node = node.parentNode;
|
683
682
|
}
|
684
683
|
path.reverse();
|
@@ -705,23 +704,22 @@ export class DOMNode {
|
|
705
704
|
}
|
706
705
|
|
707
706
|
frameOwnerFrameId(): Protocol.Page.FrameId|null {
|
708
|
-
return this.#
|
707
|
+
return this.#frameOwnerFrameId;
|
709
708
|
}
|
710
709
|
|
711
710
|
frameId(): Protocol.Page.FrameId|null {
|
712
711
|
let node: DOMNode = this.parentNode || this;
|
713
|
-
while (!node.#
|
712
|
+
while (!node.#frameOwnerFrameId && node.parentNode) {
|
714
713
|
node = node.parentNode;
|
715
714
|
}
|
716
|
-
return node.#
|
715
|
+
return node.#frameOwnerFrameId;
|
717
716
|
}
|
718
717
|
|
719
718
|
setAttributesPayload(attrs: string[]): boolean {
|
720
|
-
let attributesChanged: true|boolean =
|
721
|
-
|
722
|
-
const oldAttributesMap = this.#attributesInternal || new Map();
|
719
|
+
let attributesChanged: true|boolean = !this.#attributes || attrs.length !== this.#attributes.size * 2;
|
720
|
+
const oldAttributesMap = this.#attributes || new Map();
|
723
721
|
|
724
|
-
this.#
|
722
|
+
this.#attributes = new Map();
|
725
723
|
|
726
724
|
for (let i = 0; i < attrs.length; i += 2) {
|
727
725
|
const name = attrs[i];
|
@@ -744,8 +742,7 @@ export class DOMNode {
|
|
744
742
|
if (!this.childrenInternal) {
|
745
743
|
throw new Error('DOMNode._children is expected to not be null.');
|
746
744
|
}
|
747
|
-
const node = DOMNode.create(
|
748
|
-
this.#domModelInternal, this.ownerDocument, this.#isInShadowTreeInternal, payload, this.#retainedNodes);
|
745
|
+
const node = DOMNode.create(this.#domModel, this.ownerDocument, this.#isInShadowTree, payload, this.#retainedNodes);
|
749
746
|
this.childrenInternal.splice(prev ? this.childrenInternal.indexOf(prev) + 1 : 0, 0, node);
|
750
747
|
this.renumber();
|
751
748
|
return node;
|
@@ -777,7 +774,7 @@ export class DOMNode {
|
|
777
774
|
node.parentNode = null;
|
778
775
|
this.#subtreeMarkerCount -= node.#subtreeMarkerCount;
|
779
776
|
if (node.#subtreeMarkerCount) {
|
780
|
-
this.#
|
777
|
+
this.#domModel.dispatchEventToListeners(Events.MarkersChanged, this);
|
781
778
|
}
|
782
779
|
this.renumber();
|
783
780
|
}
|
@@ -786,8 +783,8 @@ export class DOMNode {
|
|
786
783
|
this.childrenInternal = [];
|
787
784
|
for (let i = 0; i < payloads.length; ++i) {
|
788
785
|
const payload = payloads[i];
|
789
|
-
const node =
|
790
|
-
this.#
|
786
|
+
const node =
|
787
|
+
DOMNode.create(this.#domModel, this.ownerDocument, this.#isInShadowTree, payload, this.#retainedNodes);
|
791
788
|
this.childrenInternal.push(node);
|
792
789
|
}
|
793
790
|
this.renumber();
|
@@ -799,8 +796,8 @@ export class DOMNode {
|
|
799
796
|
}
|
800
797
|
|
801
798
|
for (let i = 0; i < payloads.length; ++i) {
|
802
|
-
const node =
|
803
|
-
this.#
|
799
|
+
const node =
|
800
|
+
DOMNode.create(this.#domModel, this.ownerDocument, this.#isInShadowTree, payloads[i], this.#retainedNodes);
|
804
801
|
node.parentNode = this;
|
805
802
|
const pseudoType = node.pseudoType();
|
806
803
|
if (!pseudoType) {
|
@@ -816,16 +813,16 @@ export class DOMNode {
|
|
816
813
|
}
|
817
814
|
|
818
815
|
setDistributedNodePayloads(payloads: Protocol.DOM.BackendNode[]): void {
|
819
|
-
this.#
|
816
|
+
this.#distributedNodes = [];
|
820
817
|
for (const payload of payloads) {
|
821
|
-
this.#
|
822
|
-
this.#
|
818
|
+
this.#distributedNodes.push(
|
819
|
+
new DOMNodeShortcut(this.#domModel.target(), payload.backendNodeId, payload.nodeType, payload.nodeName));
|
823
820
|
}
|
824
821
|
}
|
825
822
|
|
826
823
|
setAssignedSlot(payload: Protocol.DOM.BackendNode): void {
|
827
824
|
this.assignedSlot =
|
828
|
-
new DOMNodeShortcut(this.#
|
825
|
+
new DOMNodeShortcut(this.#domModel.target(), payload.backendNodeId, payload.nodeType, payload.nodeName);
|
829
826
|
}
|
830
827
|
|
831
828
|
private renumber(): void {
|
@@ -851,11 +848,11 @@ export class DOMNode {
|
|
851
848
|
|
852
849
|
private addAttribute(name: string, value: string): void {
|
853
850
|
const attr = {name, value, _node: this};
|
854
|
-
this.#
|
851
|
+
this.#attributes.set(name, attr);
|
855
852
|
}
|
856
853
|
|
857
854
|
setAttributeInternal(name: string, value: string): void {
|
858
|
-
const attr = this.#
|
855
|
+
const attr = this.#attributes.get(name);
|
859
856
|
if (attr) {
|
860
857
|
attr.value = value;
|
861
858
|
} else {
|
@@ -864,7 +861,7 @@ export class DOMNode {
|
|
864
861
|
}
|
865
862
|
|
866
863
|
removeAttributeInternal(name: string): void {
|
867
|
-
this.#
|
864
|
+
this.#attributes.delete(name);
|
868
865
|
}
|
869
866
|
|
870
867
|
copyTo(targetNode: DOMNode, anchorNode: DOMNode|null, callback?: ((arg0: string|null, arg1: DOMNode|null) => void)):
|
@@ -874,9 +871,9 @@ export class DOMNode {
|
|
874
871
|
{nodeId: this.id, targetNodeId: targetNode.id, insertBeforeNodeId: anchorNode ? anchorNode.id : undefined})
|
875
872
|
.then(response => {
|
876
873
|
if (!response.getError()) {
|
877
|
-
this.#
|
874
|
+
this.#domModel.markUndoableState();
|
878
875
|
}
|
879
|
-
const pastedNode = this.#
|
876
|
+
const pastedNode = this.#domModel.nodeForId(response.nodeId);
|
880
877
|
if (pastedNode) {
|
881
878
|
// For every marker in this.#markers, set a marker in the copied node.
|
882
879
|
for (const [name, value] of this.#markers) {
|
@@ -896,10 +893,10 @@ export class DOMNode {
|
|
896
893
|
{nodeId: this.id, targetNodeId: targetNode.id, insertBeforeNodeId: anchorNode ? anchorNode.id : undefined})
|
897
894
|
.then(response => {
|
898
895
|
if (!response.getError()) {
|
899
|
-
this.#
|
896
|
+
this.#domModel.markUndoableState();
|
900
897
|
}
|
901
898
|
if (callback) {
|
902
|
-
callback(response.getError() || null, this.#
|
899
|
+
callback(response.getError() || null, this.#domModel.nodeForId(response.nodeId));
|
903
900
|
}
|
904
901
|
});
|
905
902
|
}
|
@@ -919,7 +916,7 @@ export class DOMNode {
|
|
919
916
|
--node.#subtreeMarkerCount;
|
920
917
|
}
|
921
918
|
for (let node: (DOMNode|null) = this; node; node = node.parentNode) {
|
922
|
-
this.#
|
919
|
+
this.#domModel.dispatchEventToListeners(Events.MarkersChanged, node);
|
923
920
|
}
|
924
921
|
return;
|
925
922
|
}
|
@@ -931,7 +928,7 @@ export class DOMNode {
|
|
931
928
|
}
|
932
929
|
this.#markers.set(name, value);
|
933
930
|
for (let node: (DOMNode|null) = this; node; node = node.parentNode) {
|
934
|
-
this.#
|
931
|
+
this.#domModel.dispatchEventToListeners(Events.MarkersChanged, node);
|
935
932
|
}
|
936
933
|
}
|
937
934
|
|
@@ -975,18 +972,18 @@ export class DOMNode {
|
|
975
972
|
}
|
976
973
|
|
977
974
|
highlight(mode?: string): void {
|
978
|
-
this.#
|
975
|
+
this.#domModel.overlayModel().highlightInOverlay({node: this, selectorList: undefined}, mode);
|
979
976
|
}
|
980
977
|
|
981
978
|
highlightForTwoSeconds(): void {
|
982
|
-
this.#
|
979
|
+
this.#domModel.overlayModel().highlightInOverlayForTwoSeconds({node: this, selectorList: undefined});
|
983
980
|
}
|
984
981
|
|
985
982
|
async resolveToObject(objectGroup?: string, executionContextId?: Protocol.Runtime.ExecutionContextId):
|
986
983
|
Promise<RemoteObject|null> {
|
987
984
|
const {object} = await this.#agent.invoke_resolveNode(
|
988
985
|
{nodeId: this.id, backendNodeId: undefined, executionContextId, objectGroup});
|
989
|
-
return object && this.#
|
986
|
+
return object && this.#domModel.runtimeModelInternal.createRemoteObject(object) || null;
|
990
987
|
}
|
991
988
|
|
992
989
|
async boxModel(): Promise<Protocol.DOM.BoxModel|null> {
|
@@ -1075,7 +1072,7 @@ export class DOMNode {
|
|
1075
1072
|
}
|
1076
1073
|
|
1077
1074
|
node.highlightForTwoSeconds();
|
1078
|
-
await this.#
|
1075
|
+
await this.#domModel.target().pageAgent().invoke_bringToFront();
|
1079
1076
|
|
1080
1077
|
function focusInPage(this: HTMLElement): void {
|
1081
1078
|
this.focus();
|
@@ -1841,6 +1838,9 @@ class DOMDispatcher implements ProtocolProxyApi.DOMDispatcher {
|
|
1841
1838
|
scrollableFlagUpdated({nodeId, isScrollable}: Protocol.DOM.ScrollableFlagUpdatedEvent): void {
|
1842
1839
|
this.#domModel.scrollableFlagUpdated(nodeId, isScrollable);
|
1843
1840
|
}
|
1841
|
+
|
1842
|
+
affectedByStartingStylesFlagUpdated(_: Protocol.DOM.AffectedByStartingStylesFlagUpdatedEvent): void {
|
1843
|
+
}
|
1844
1844
|
}
|
1845
1845
|
|
1846
1846
|
let domModelUndoStackInstance: DOMModelUndoStack|null = null;
|