chrome-devtools-frontend 1.0.1683520 → 1.0.1689415
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/gerrit-cli/SKILL.md +29 -8
- package/.agents/skills/gerrit-cli/references/commands.md +51 -18
- package/.agents/skills/gerrit-cli/references/workflows.md +6 -6
- package/.agents/skills/gerrit-cli/scripts/import_upstream.py +43 -70
- package/AUTHORS +1 -0
- package/config/typescript/tsconfig.base.json +1 -0
- package/config/typescript/tsconfig.eslint.json +9 -0
- package/docs/contributing/issues.md +1 -1
- package/docs/styleguide/ux/writing.md +2 -2
- package/eslint.config.mjs +18 -10
- package/front_end/core/common/Base64.ts +1 -1
- package/front_end/core/common/Color.ts +28 -6
- package/front_end/core/common/ColorConverter.ts +12 -0
- package/front_end/core/common/Console.ts +2 -1
- package/front_end/core/common/Object.ts +2 -2
- package/front_end/core/common/ResourceType.ts +12 -13
- package/front_end/core/common/Revealer.ts +1 -1
- package/front_end/core/common/Settings.ts +2 -2
- package/front_end/core/common/TextDictionary.ts +2 -2
- package/front_end/core/common/Throttler.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -2
- package/front_end/core/host/UserMetrics.ts +51 -37
- package/front_end/core/host/host.ts +1 -1
- package/front_end/core/i18n/i18nImpl.ts +1 -1
- package/front_end/core/platform/HostRuntime.ts +3 -3
- package/front_end/core/platform/KeyboardUtilities.ts +1 -1
- package/front_end/core/protocol_client/InspectorBackend.ts +7 -6
- package/front_end/core/root/Runtime.ts +4 -2
- package/front_end/core/sdk/AnimationModel.ts +1 -1
- package/front_end/core/sdk/CPUThrottlingManager.ts +198 -0
- package/front_end/core/sdk/CSSMetadata.ts +11 -6
- package/front_end/core/sdk/CSSPropertyParser.ts +5 -3
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +90 -59
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +3 -3
- package/front_end/core/sdk/DebuggerModel.ts +1 -1
- package/front_end/core/sdk/EmulationModel.ts +5 -0
- package/front_end/core/sdk/LayerTreeBase.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +1 -1
- package/front_end/core/sdk/README.md +40 -0
- package/front_end/core/sdk/RehydratingConnection.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -2
- package/front_end/core/sdk/SDKModel.ts +1 -1
- package/front_end/core/sdk/SDKSettings.ts +6 -0
- package/front_end/core/sdk/Script.ts +2 -1
- package/front_end/core/sdk/SecurityOrigin.ts +48 -0
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -7
- package/front_end/core/sdk/ServiceWorkerManager.ts +75 -17
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -6
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/core/text_utils/ContentData.ts +1 -1
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +3 -1
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -1
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +2 -2
- package/front_end/entrypoints/formatter_worker/Substitute.ts +1 -1
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +1 -1
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +1 -1
- package/front_end/entrypoints/inspector_main/nodeIcon.css +1 -1
- package/front_end/entrypoints/inspector_main/outermostTargetSelector.css +3 -3
- package/front_end/entrypoints/inspector_main/renderingOptions.css +3 -3
- package/front_end/entrypoints/js_app/js_app.ts +25 -9
- package/front_end/entrypoints/main/MainImpl.ts +2 -1
- package/front_end/entrypoints/main/main-meta.ts +5 -31
- package/front_end/entrypoints/node_app/app/nodeConnectionsPanel.css +5 -5
- package/front_end/entrypoints/node_app/node_app.ts +1 -1
- package/front_end/foundation/Universe.ts +7 -0
- package/front_end/generated/ARIAProperties.ts +39 -1
- package/front_end/generated/InspectorBackendCommands.ts +13 -22
- package/front_end/generated/SupportedCSSProperties.ts +60 -119
- package/front_end/generated/protocol-mapping.d.ts +18 -59
- package/front_end/generated/protocol-proxy-api.d.ts +14 -47
- package/front_end/generated/protocol.ts +104 -331
- package/front_end/models/ai_assistance/AiAgent2.ts +25 -11
- package/front_end/models/ai_assistance/AiConversation.ts +23 -14
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +2 -2
- package/front_end/models/ai_assistance/AiUtils.ts +16 -0
- package/front_end/models/ai_assistance/EvaluateAction.ts +1 -1
- package/front_end/models/ai_assistance/README.md +1 -1
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +2 -3
- package/front_end/models/ai_assistance/agents/AiAgent.ts +40 -25
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +4 -3
- package/front_end/models/ai_assistance/agents/FileAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +13 -11
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -7
- package/front_end/models/ai_assistance/ai_assistance.ts +12 -0
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +16 -1
- package/front_end/models/ai_assistance/contexts/FileContext.ts +6 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +150 -325
- package/front_end/models/ai_assistance/injected.ts +5 -3
- package/front_end/models/ai_assistance/performance/AIContext.ts +1 -1
- package/front_end/models/ai_assistance/skills/README.md +1 -1
- package/front_end/models/ai_assistance/skills/accessibility.md +19 -10
- package/front_end/models/ai_assistance/skills/network.md +13 -7
- package/front_end/models/ai_assistance/skills/performance.md +22 -16
- package/front_end/models/ai_assistance/skills/sources.md +13 -7
- package/front_end/models/ai_assistance/skills/storage.md +19 -18
- package/front_end/models/ai_assistance/skills/styling.md +30 -37
- package/front_end/models/ai_assistance/tools/CookieUtils.ts +120 -0
- package/front_end/models/ai_assistance/tools/DOMStorageUtils.ts +53 -4
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +8 -32
- package/front_end/models/ai_assistance/tools/GetCookieValues.ts +146 -0
- package/front_end/models/ai_assistance/tools/GetDetailedCallTree.ts +11 -9
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +17 -5
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +12 -11
- package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +11 -11
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +15 -8
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +3 -3
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +12 -12
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +3 -2
- package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +132 -0
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +18 -5
- package/front_end/models/ai_assistance/tools/GetStyles.ts +3 -3
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +9 -8
- package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +13 -14
- package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +12 -10
- package/front_end/models/ai_assistance/tools/ListCookies.ts +93 -0
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +15 -6
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +3 -3
- package/front_end/models/ai_assistance/tools/ListSources.ts +5 -3
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +17 -5
- package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +3 -2
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +4 -3
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +14 -17
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +9 -8
- package/front_end/models/ai_assistance/tools/Tool.ts +36 -13
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +41 -8
- package/front_end/models/badges/AiExplorerBadge.ts +3 -3
- package/front_end/models/badges/CodeWhispererBadge.ts +2 -2
- package/front_end/models/badges/DOMDetectiveBadge.ts +3 -3
- package/front_end/models/badges/SpeedsterBadge.ts +3 -3
- package/front_end/models/badges/StarterBadge.ts +4 -4
- package/front_end/models/bindings/CompilerScriptMapping.ts +11 -2
- package/front_end/models/bindings/ContentProviderBasedProject.ts +3 -2
- package/front_end/models/breakpoints/BreakpointManager.ts +1 -1
- package/front_end/models/emulation/EmulatedDevices.ts +2 -2
- package/front_end/models/formatter/FormatterWorkerPool.ts +2 -2
- package/front_end/models/formatter/ScriptFormatter.ts +1 -2
- package/front_end/models/geometry/GeometryImpl.ts +2 -2
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +1 -1
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +3 -2
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -5
- package/front_end/models/issues_manager/DOMIssuesManager.ts +144 -0
- package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +13 -1
- package/front_end/models/issues_manager/GenericIssue.ts +32 -20
- package/front_end/models/issues_manager/IssuesManager.ts +0 -1
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +1 -1
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/{NativeFunctions.js → NativeFunctions.ts} +29 -9
- package/front_end/models/live-metrics/LiveMetrics.ts +9 -3
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +58 -6
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +2 -62
- package/front_end/models/network_time_calculator/RequestTimeRanges.ts +2 -2
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +5 -0
- package/front_end/models/persistence/IsolatedFileSystem.ts +1 -1
- package/front_end/models/persistence/NetworkPersistenceManager.ts +35 -6
- package/front_end/models/stack_trace/StackTraceImpl.ts +2 -2
- package/front_end/models/trace/LanternComputationData.ts +2 -3
- package/front_end/models/trace/extras/StackTraceForEvent.ts +3 -2
- package/front_end/models/trace/extras/ThirdParties.ts +9 -9
- package/front_end/models/trace/handlers/AsyncJSCallsHandler.ts +7 -4
- package/front_end/models/trace/handlers/FramesHandler.ts +3 -3
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +2 -2
- package/front_end/models/trace/handlers/SamplesHandler.ts +4 -2
- package/front_end/models/trace/handlers/UserInteractionsHandler.ts +1 -1
- package/front_end/models/trace/handlers/WarningsHandler.ts +2 -2
- package/front_end/models/trace/helpers/Network.ts +3 -3
- package/front_end/models/trace/helpers/Trace.ts +1 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +2 -1
- package/front_end/models/trace/insights/Cache.ts +3 -1
- package/front_end/models/trace/insights/CharacterSet.ts +3 -1
- package/front_end/models/trace/insights/DOMSize.ts +3 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +3 -1
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +3 -1
- package/front_end/models/trace/insights/FontDisplay.ts +2 -1
- package/front_end/models/trace/insights/ForcedReflow.ts +2 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +3 -1
- package/front_end/models/trace/insights/ImageDelivery.ts +3 -1
- package/front_end/models/trace/insights/LCPBreakdown.ts +3 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +3 -1
- package/front_end/models/trace/insights/LegacyJavaScript.ts +3 -1
- package/front_end/models/trace/insights/ModernHTTP.ts +2 -1
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +5 -4
- package/front_end/models/trace/insights/SlowCSSSelector.ts +3 -1
- package/front_end/models/trace/insights/ThirdParties.ts +5 -3
- package/front_end/models/trace/insights/Viewport.ts +2 -1
- package/front_end/models/trace/lantern/simulation/Constants.ts +34 -2
- package/front_end/models/trace/lantern/simulation/DNSCache.ts +1 -1
- package/front_end/models/trace/types/TraceEvents.ts +8 -3
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +2 -1
- package/front_end/models/workspace/WorkspaceImpl.ts +18 -2
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +686 -2
- package/front_end/panels/accessibility/accessibilityNode.css +4 -4
- package/front_end/panels/accessibility/accessibilityProperties.css +1 -1
- package/front_end/panels/accessibility/accessibilitySidebarView.css +2 -2
- package/front_end/panels/accessibility/axBreadcrumbs.css +13 -13
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +14 -14
- package/front_end/panels/ai_assistance/ExternalHandler.ts +89 -0
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -1
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +3 -2
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -1
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +1 -1
- package/front_end/panels/ai_assistance/components/ExploreWidget.ts +1 -1
- package/front_end/panels/ai_assistance/components/chatInput.css +12 -12
- package/front_end/panels/ai_assistance/components/chatMessage.css +16 -16
- package/front_end/panels/ai_assistance/components/chatView.css +2 -2
- package/front_end/panels/ai_assistance/components/exploreWidget.css +1 -1
- package/front_end/panels/ai_assistance/components/exportForAgentsDialog.css +4 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +6 -6
- package/front_end/panels/animation/animationTimeline.css +62 -62
- package/front_end/panels/application/ApplicationPanelSidebar.ts +6 -1
- package/front_end/panels/application/BackgroundServiceModel.ts +4 -3
- package/front_end/panels/application/BackgroundServiceView.ts +290 -252
- package/front_end/panels/application/IndexedDBModel.ts +0 -7
- package/front_end/panels/application/WebMCPView.ts +15 -7
- package/front_end/panels/application/appManifestView.css +5 -5
- package/front_end/panels/application/backgroundServiceView.css +18 -2
- package/front_end/panels/application/components/AdsView.ts +100 -4
- package/front_end/panels/application/components/adsView.css +8 -5
- package/front_end/panels/application/components/backForwardCacheView.css +5 -5
- package/front_end/panels/application/components/bounceTrackingMitigationsView.css +1 -1
- package/front_end/panels/application/components/endpointsGrid.css +1 -1
- package/front_end/panels/application/components/permissionsPolicySection.css +1 -1
- package/front_end/panels/application/components/protocolHandlersView.css +6 -6
- package/front_end/panels/application/components/reportsGrid.css +1 -1
- package/front_end/panels/application/components/serviceWorkerRouterView.css +4 -4
- package/front_end/panels/application/components/trustTokensView.css +7 -7
- package/front_end/panels/application/cookieItemsView.css +3 -3
- package/front_end/panels/application/deviceBoundSessionsView.css +3 -3
- package/front_end/panels/application/frameDetailsReportView.css +11 -11
- package/front_end/panels/application/indexedDBViews.css +7 -7
- package/front_end/panels/application/originTrialTokenRows.css +2 -2
- package/front_end/panels/application/originTrialTreeView.css +3 -3
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +2 -2
- package/front_end/panels/application/preloading/components/preloadingDetailsReportView.css +1 -1
- package/front_end/panels/application/preloading/components/preloadingDisabledInfobar.css +2 -2
- package/front_end/panels/application/preloading/components/preloadingGrid.css +2 -2
- package/front_end/panels/application/preloading/components/usedPreloadingView.css +7 -7
- package/front_end/panels/application/preloading/preloadingView.css +1 -1
- package/front_end/panels/application/preloading/preloadingViewDropDown.css +3 -3
- package/front_end/panels/application/serviceWorkerCacheViews.css +5 -5
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +12 -12
- package/front_end/panels/application/serviceWorkersView.css +15 -16
- package/front_end/panels/application/storageView.css +5 -5
- package/front_end/panels/application/webMCPView.css +9 -9
- package/front_end/panels/autofill/autofillView.css +4 -4
- package/front_end/panels/browser_debugger/categorizedBreakpointsSidebarPane.css +4 -4
- package/front_end/panels/browser_debugger/domBreakpointsSidebarPane.css +5 -3
- package/front_end/panels/browser_debugger/xhrBreakpointsSidebarPane.css +4 -4
- package/front_end/panels/changes/changesSidebar.css +1 -1
- package/front_end/panels/changes/changesView.css +1 -1
- package/front_end/panels/changes/combinedDiffView.css +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +5 -10
- package/front_end/panels/common/badgeNotification.css +2 -2
- package/front_end/panels/common/domLinkifier.css +1 -1
- package/front_end/panels/common/gdpSignUpDialog.css +3 -3
- package/front_end/panels/common/geminiRebrandPromoDialog.css +1 -1
- package/front_end/panels/console/ConsolePrompt.ts +6 -3
- package/front_end/panels/console/ConsoleView.ts +23 -19
- package/front_end/panels/console/ConsoleViewMessage.ts +7 -2
- package/front_end/panels/console/console-meta.ts +9 -43
- package/front_end/panels/console/consoleContextSelector.css +2 -2
- package/front_end/panels/console/consolePinPane.css +9 -9
- package/front_end/panels/console/consolePrompt.css +5 -5
- package/front_end/panels/console/consoleView.css +39 -39
- package/front_end/panels/coverage/coverageListView.css +2 -2
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +34 -34
- package/front_end/panels/css_overview/cssOverviewProcessingView.css +5 -5
- package/front_end/panels/css_overview/cssOverviewSidebarPanel.css +1 -1
- package/front_end/panels/css_overview/cssOverviewStartView.css +17 -17
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +209 -62
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +4 -4
- package/front_end/panels/elements/DOMTreeContextMenu.ts +59 -54
- package/front_end/panels/elements/ElementIssueUtils.ts +10 -2
- package/front_end/panels/elements/ElementsPanel.ts +5 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +212 -255
- package/front_end/panels/elements/ElementsTreeOutline.ts +1804 -495
- package/front_end/panels/elements/ShortcutTreeElement.ts +6 -3
- package/front_end/panels/elements/StandaloneStylesContainer.ts +5 -11
- package/front_end/panels/elements/StylePropertiesSection.ts +65 -8
- package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -0
- package/front_end/panels/elements/StylesContainer.ts +1 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +317 -159
- package/front_end/panels/elements/classesPaneWidget.css +6 -6
- package/front_end/panels/elements/components/stylePropertyEditor.css +7 -7
- package/front_end/panels/elements/computedStyleWidget.css +1 -1
- package/front_end/panels/elements/elementStatePaneWidget.css +8 -8
- package/front_end/panels/elements/elements-meta.ts +14 -0
- package/front_end/panels/elements/elementsPanel.css +4 -4
- package/front_end/panels/elements/elementsTreeOutline.css +222 -38
- package/front_end/panels/elements/layersWidget.css +4 -4
- package/front_end/panels/elements/layoutPane.css +18 -18
- package/front_end/panels/elements/metricsSidebarPane.css +11 -11
- package/front_end/panels/elements/platformFontsWidget.css +5 -5
- package/front_end/panels/elements/propertiesWidget.css +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +20 -20
- package/front_end/panels/elements/stylesSidebarPane.css +37 -20
- package/front_end/panels/emulation/deviceModeView.css +49 -49
- package/front_end/panels/emulation/mediaQueryInspector.css +18 -18
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/explain/components/consoleInsight.css +29 -29
- package/front_end/panels/issues/components/elementsPanelLink.css +2 -2
- package/front_end/panels/issues/components/hideIssuesMenu.css +1 -1
- package/front_end/panels/issues/issuesPane.css +2 -2
- package/front_end/panels/issues/issuesTree.css +50 -50
- package/front_end/panels/layer_viewer/Layers3DView.ts +9 -10
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/layer_viewer/layerTreeOutline.css +2 -2
- package/front_end/panels/layer_viewer/layers3DView.css +1 -1
- package/front_end/panels/layer_viewer/paintProfiler.css +1 -1
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +2 -2
- package/front_end/panels/media/playerListView.css +9 -9
- package/front_end/panels/media/playerMessagesView.css +8 -8
- package/front_end/panels/media/playerPropertiesView.css +6 -6
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +9 -9
- package/front_end/panels/network/NetworkDataGridNode.ts +1 -0
- package/front_end/panels/network/NetworkPanel.ts +9 -4
- package/front_end/panels/network/RequestConditionsDrawer.ts +12 -12
- package/front_end/panels/network/RequestPayloadView.ts +78 -26
- package/front_end/panels/network/binaryResourceView.css +1 -1
- package/front_end/panels/network/components/EditableSpan.css +3 -3
- package/front_end/panels/network/components/HeaderSectionRow.css +14 -14
- package/front_end/panels/network/components/RequestHeaderSection.css +7 -7
- package/front_end/panels/network/components/RequestHeadersView.css +18 -18
- package/front_end/panels/network/components/RequestTrustTokensView.css +1 -1
- package/front_end/panels/network/network-meta.ts +9 -9
- package/front_end/panels/network/networkConfigView.css +11 -11
- package/front_end/panels/network/networkLogView.css +35 -35
- package/front_end/panels/network/networkManageCustomHeadersView.css +1 -1
- package/front_end/panels/network/networkPanel.css +7 -7
- package/front_end/panels/network/networkTimingTable.css +13 -13
- package/front_end/panels/network/requestConditionsDrawer.css +4 -4
- package/front_end/panels/network/requestCookiesView.css +5 -5
- package/front_end/panels/network/requestDeviceBoundSessionsView.css +1 -1
- package/front_end/panels/network/requestHTMLView.css +1 -1
- package/front_end/panels/network/requestHeadersTree.css +19 -19
- package/front_end/panels/network/requestInitiatorView.css +1 -1
- package/front_end/panels/network/requestInitiatorViewTree.css +3 -3
- package/front_end/panels/network/requestPayloadTree.css +5 -5
- package/front_end/panels/network/requestPayloadView.css +1 -1
- package/front_end/panels/network/resourceChunkView.css +3 -3
- package/front_end/panels/network/signedExchangeInfoTree.css +6 -6
- package/front_end/panels/profiler/heapProfiler.css +15 -15
- package/front_end/panels/profiler/profileLauncherView.css +10 -10
- package/front_end/panels/recorder/RecordingView.ts +1 -1
- package/front_end/panels/recorder/StepEditor.ts +86 -7
- package/front_end/panels/recorder/TimelineSection.ts +2 -1
- package/front_end/panels/recorder/createRecordingView.css +17 -17
- package/front_end/panels/recorder/extensionView.css +5 -5
- package/front_end/panels/recorder/injected/RecordingClient.ts +1 -1
- package/front_end/panels/recorder/models/SchemaUtils.ts +2 -2
- package/front_end/panels/recorder/models/ScreenshotStorage.ts +1 -1
- package/front_end/panels/recorder/recorderPanel.css +7 -7
- package/front_end/panels/recorder/recordingListView.css +12 -12
- package/front_end/panels/recorder/recordingView.css +47 -47
- package/front_end/panels/recorder/stepEditor.css +2 -2
- package/front_end/panels/recorder/stepView.css +20 -20
- package/front_end/panels/recorder/timelineSection.css +9 -9
- package/front_end/panels/screencast/screencastView.css +12 -12
- package/front_end/panels/search/searchResultsPane.css +10 -10
- package/front_end/panels/search/searchView.css +9 -9
- package/front_end/panels/security/SecurityPanel.ts +84 -54
- package/front_end/panels/security/SecurityPanelSidebar.ts +0 -32
- package/front_end/panels/security/mainView.css +26 -26
- package/front_end/panels/security/originView.css +15 -15
- package/front_end/panels/sensors/locationsSettingsTab.css +6 -6
- package/front_end/panels/sensors/sensors.css +28 -28
- package/front_end/panels/settings/KeybindsSettingsTab.ts +5 -2
- package/front_end/panels/settings/components/syncSection.css +5 -5
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +13 -13
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +16 -16
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +2 -2
- package/front_end/panels/settings/keybindsSettingsTab.css +2 -2
- package/front_end/panels/settings/settingsScreen.css +5 -5
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/sources/breakpointEditDialog.css +9 -9
- package/front_end/panels/sources/breakpointsView.css +25 -25
- package/front_end/panels/sources/callStackSidebarPane.css +10 -10
- package/front_end/panels/sources/components/HeadersView.css +6 -6
- package/front_end/panels/sources/debuggerPausedMessage.css +4 -4
- package/front_end/panels/sources/dialog.css +2 -2
- package/front_end/panels/sources/navigatorTree.css +2 -2
- package/front_end/panels/sources/navigatorView.css +2 -2
- package/front_end/panels/sources/scopeChainSidebarPane.css +1 -1
- package/front_end/panels/sources/sourcesNavigator.css +1 -1
- package/front_end/panels/sources/sourcesPanel.css +2 -2
- package/front_end/panels/sources/sourcesView.css +1 -1
- package/front_end/panels/sources/threadsSidebarPane.css +5 -5
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +8 -8
- package/front_end/panels/timeline/TimelineDetailsView.ts +9 -21
- package/front_end/panels/timeline/TimelineFlameChartView.ts +3 -5
- package/front_end/panels/timeline/TimelineMiniMap.ts +3 -3
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +2 -6
- package/front_end/panels/timeline/components/CWVMetrics.ts +9 -10
- package/front_end/panels/timeline/components/DetailsView.ts +12 -16
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +13 -13
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +19 -19
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +7 -9
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +3 -3
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +13 -13
- package/front_end/panels/timeline/components/LiveMetricsView.ts +65 -65
- package/front_end/panels/timeline/components/MetricCard.ts +25 -25
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +22 -22
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +9 -9
- package/front_end/panels/timeline/components/OriginMap.ts +7 -7
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +2 -2
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +19 -20
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
- package/front_end/panels/timeline/components/TimelineSummary.ts +2 -2
- package/front_end/panels/timeline/components/Utils.ts +2 -6
- package/front_end/panels/timeline/components/breadcrumbsUI.css +3 -3
- package/front_end/panels/timeline/components/exportTraceOptions.css +1 -1
- package/front_end/panels/timeline/components/fieldSettingsDialog.css +13 -13
- package/front_end/panels/timeline/components/ignoreListSetting.css +3 -3
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +6 -9
- package/front_end/panels/timeline/components/insights/Checklist.ts +2 -2
- package/front_end/panels/timeline/components/insights/Table.ts +1 -1
- package/front_end/panels/timeline/components/liveMetricsView.css +39 -39
- package/front_end/panels/timeline/components/metricCard.css +20 -20
- package/front_end/panels/timeline/components/networkRequestDetails.css +9 -9
- package/front_end/panels/timeline/components/networkRequestTooltip.css +14 -14
- package/front_end/panels/timeline/components/networkTrackWidget.css +2 -2
- package/front_end/panels/timeline/components/originMap.css +4 -4
- package/front_end/panels/timeline/components/relatedInsightChips.css +1 -1
- package/front_end/panels/timeline/components/sidebarAnnotationsTab.css +4 -4
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +5 -5
- package/front_end/panels/timeline/components/sidebarSingleInsightSet.css +1 -1
- package/front_end/panels/timeline/components/timelineSummary.css +4 -4
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +4 -4
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +6 -6
- package/front_end/panels/timeline/overlays/components/TimeRangeOverlay.ts +1 -1
- package/front_end/panels/timeline/thirdPartyTreeView.css +5 -5
- package/front_end/panels/timeline/timeline-meta.ts +0 -6
- package/front_end/panels/timeline/timelineDetailsView.css +11 -11
- package/front_end/panels/timeline/timelinePanel.css +20 -20
- package/front_end/panels/timeline/timelineTreeView.css +8 -8
- package/front_end/panels/webauthn/webauthnPane.css +6 -6
- package/front_end/panels/whats_new/ReleaseNoteText.ts +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/i18n/i18n-impl.ts +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +42 -8
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +15 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts +14 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js +23 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.js +77 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.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/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +16 -2
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +36 -1
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/Poller.ts +86 -6
- 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/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +22 -7
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +6 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +30 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +14 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +19 -13
- package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +3 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/softNavs.js +3 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +15 -1
- package/front_end/third_party/web-vitals/package/package.json +1 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +9 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +36 -5
- package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +21 -15
- package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/softNavs.ts +4 -1
- package/front_end/third_party/web-vitals/package/src/types/lcp.ts +16 -1
- package/front_end/third_party/web-vitals/rebuild.sh +3 -3
- package/front_end/ui/comments/CommentAnchorResolver.ts +109 -4
- package/front_end/ui/comments/CommentOverlayManager.ts +16 -32
- package/front_end/ui/comments/commentsOverlay.css +6 -5
- package/front_end/ui/components/adorners/Adorner.ts +1 -1
- package/front_end/ui/components/adorners/adorner.css +6 -6
- package/front_end/ui/components/buttons/FloatingButton.ts +1 -1
- package/front_end/ui/components/buttons/button.css +9 -9
- package/front_end/ui/components/buttons/floatingButton.css +2 -2
- package/front_end/ui/components/buttons/textButton.css +12 -12
- package/front_end/ui/components/dialogs/Dialog.ts +1 -1
- package/front_end/ui/components/dialogs/dialog.css +1 -1
- package/front_end/ui/components/diff_view/diffView.css +3 -3
- package/front_end/ui/components/expandable_list/expandableList.css +9 -9
- package/front_end/ui/components/highlighting/HighlightElement.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightManager.ts +4 -0
- package/front_end/ui/components/icon_button/iconButton.css +2 -2
- package/front_end/ui/components/input/checkbox.css +8 -8
- package/front_end/ui/components/input/textInput.css +3 -3
- package/front_end/ui/components/issue_counter/issueLinkIcon.css +2 -2
- package/front_end/ui/components/linkifier/linkifierImpl.css +1 -1
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +1 -1
- package/front_end/ui/components/markdown_view/codeBlock.css +2 -2
- package/front_end/ui/components/markdown_view/markdownView.css +7 -7
- package/front_end/ui/components/menus/menuGroup.css +2 -2
- package/front_end/ui/components/menus/menuItem.css +2 -2
- package/front_end/ui/components/menus/selectMenu.css +2 -2
- package/front_end/ui/components/menus/selectMenuButton.css +4 -4
- package/front_end/ui/components/panel_feedback/panelFeedback.css +15 -15
- package/front_end/ui/components/panel_feedback/previewToggle.css +2 -2
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +7 -7
- package/front_end/ui/components/report_view/report.css +3 -3
- package/front_end/ui/components/report_view/reportSectionDivider.css +1 -1
- package/front_end/ui/components/report_view/reportValue.css +1 -1
- package/front_end/ui/components/request_link_icon/requestLinkIcon.css +2 -2
- package/front_end/ui/components/settings/settingCheckbox.css +6 -6
- package/front_end/ui/components/text_editor/TextEditor.ts +3 -1
- package/front_end/ui/components/text_editor/config.ts +16 -4
- package/front_end/ui/kit/icons/icon.css +4 -4
- package/front_end/ui/kit/link/link.css +1 -1
- package/front_end/ui/legacy/ActionRegistration.ts +23 -23
- package/front_end/ui/legacy/Dialog.ts +1 -1
- package/front_end/ui/legacy/DockController.ts +7 -4
- package/front_end/ui/legacy/EmptyWidget.ts +13 -34
- package/front_end/ui/legacy/FilterBar.ts +4 -4
- package/front_end/ui/legacy/Infobar.ts +2 -2
- package/front_end/ui/legacy/InspectorDrawerView.ts +6 -6
- package/front_end/ui/legacy/InspectorView.ts +22 -27
- package/front_end/ui/legacy/KeyboardShortcut.ts +4 -7
- package/front_end/ui/legacy/ListWidget.ts +7 -7
- package/front_end/ui/legacy/PlusButton.ts +1 -3
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +6 -6
- package/front_end/ui/legacy/SearchableView.ts +18 -17
- package/front_end/ui/legacy/ShortcutRegistry.ts +6 -3
- package/front_end/ui/legacy/SoftContextMenu.ts +8 -8
- package/front_end/ui/legacy/SoftDropDown.ts +1 -1
- package/front_end/ui/legacy/SuggestBox.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +10 -10
- package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -2
- package/front_end/ui/legacy/Toolbar.ts +5 -5
- package/front_end/ui/legacy/Treeoutline.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +90 -26
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/ViewRegistration.ts +7 -7
- package/front_end/ui/legacy/Widget.ts +5 -5
- package/front_end/ui/legacy/checkboxTextLabel.css +3 -3
- package/front_end/ui/legacy/components/color_picker/ColorFormatSpec.ts +16 -0
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +1 -0
- package/front_end/ui/legacy/components/color_picker/spectrum.css +90 -90
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +23 -24
- package/front_end/ui/legacy/components/cookie_table/cookiesTable.css +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +26 -28
- package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +3 -7
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +13 -13
- package/front_end/ui/legacy/components/inline_editor/colorSwatch.css +7 -7
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +5 -5
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +18 -18
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +104 -86
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +8 -6
- package/front_end/ui/legacy/components/object_ui/objectPopover.css +4 -4
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +6 -6
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +28 -11
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +14 -15
- package/front_end/ui/legacy/components/perf_ui/GCActionDelegate.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/NetworkPriorities.ts +5 -5
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +5 -5
- package/front_end/ui/legacy/components/perf_ui/PieChart.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +0 -4
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +4 -4
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +6 -6
- package/front_end/ui/legacy/components/perf_ui/flameChart.css +7 -7
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +11 -11
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +4 -6
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +6 -6
- package/front_end/ui/legacy/components/perf_ui/timelineGrid.css +5 -5
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +3 -3
- package/front_end/ui/legacy/components/source_frame/FontView.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +13 -13
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +15 -18
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/imageView.css +1 -1
- package/front_end/ui/legacy/components/source_frame/jsonView.css +1 -1
- package/front_end/ui/legacy/components/source_frame/resourceSourceFrame.css +1 -1
- package/front_end/ui/legacy/components/source_frame/source_frame-meta.ts +10 -10
- package/front_end/ui/legacy/components/source_frame/xmlTree.css +3 -3
- package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
- package/front_end/ui/legacy/components/utils/jsUtils.css +10 -10
- package/front_end/ui/legacy/dropTarget.css +2 -2
- package/front_end/ui/legacy/emptyWidget.css +6 -0
- package/front_end/ui/legacy/filter.css +19 -19
- package/front_end/ui/legacy/infobar.css +2 -2
- package/front_end/ui/legacy/inspectorCommon.css +67 -67
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +1 -1
- package/front_end/ui/legacy/listWidget.css +5 -5
- package/front_end/ui/legacy/progressIndicator.css +4 -4
- package/front_end/ui/legacy/reportView.css +7 -7
- package/front_end/ui/legacy/searchableView.css +5 -5
- package/front_end/ui/legacy/smallBubble.css +3 -3
- package/front_end/ui/legacy/softContextMenu.css +4 -4
- package/front_end/ui/legacy/softDropDownButton.css +1 -1
- package/front_end/ui/legacy/splitWidget.css +9 -31
- package/front_end/ui/legacy/suggestBox.css +4 -4
- package/front_end/ui/legacy/tabbedPane.css +17 -17
- package/front_end/ui/legacy/textPrompt.css +2 -2
- package/front_end/ui/legacy/toolbar.css +4 -4
- package/front_end/ui/legacy/treeoutline.css +14 -14
- package/front_end/ui/legacy/viewContainers.css +6 -6
- package/front_end/ui/settings/ConsoleSettings.ts +66 -0
- package/front_end/ui/settings/MainSettings.ts +47 -0
- package/front_end/ui/settings/settings.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +12 -0
- package/inspector_overlay/common.ts +12 -12
- package/inspector_overlay/css_grid_label_helpers.ts +16 -17
- package/inspector_overlay/drag_resize_handler.ts +2 -2
- package/inspector_overlay/highlight_common.ts +11 -13
- package/inspector_overlay/highlight_container_query.ts +2 -2
- package/inspector_overlay/highlight_flex_common.ts +6 -7
- package/inspector_overlay/highlight_grid_common.ts +3 -3
- package/inspector_overlay/highlight_isolated_element.ts +12 -3
- package/inspector_overlay/highlight_scroll_snap.ts +2 -2
- package/inspector_overlay/loadCSS.rollup.js +0 -1
- package/inspector_overlay/testing/InspectorOverlayHelpers.ts +13 -13
- package/inspector_overlay/tool_green_dev_anchors.ts +3 -3
- package/inspector_overlay/tool_highlight.ts +9 -9
- package/inspector_overlay/tool_paused.ts +4 -4
- package/inspector_overlay/tool_persistent.ts +11 -11
- package/inspector_overlay/tool_screenshot.ts +7 -7
- package/inspector_overlay/tool_source_order.ts +4 -4
- package/inspector_overlay/tool_viewport_size.ts +3 -3
- package/inspector_overlay/tool_window_controls.ts +4 -4
- package/mcp/mcp.ts +1 -0
- package/package.json +2 -2
- package/front_end/generated/protocol-tsconfig.json +0 -10
- package/front_end/panels/js_timeline/DIR_METADATA +0 -3
- package/front_end/panels/js_timeline/js_timeline-meta.ts +0 -193
- package/front_end/panels/js_timeline/js_timeline.ts +0 -1
- /package/front_end/entrypoints/{formatter_worker/FormatterActions.ts → formatter_actions/formatter_actions.ts} +0 -0
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
6
|
+
|
|
5
7
|
import type * as Common from '../../core/common/common.js';
|
|
6
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
9
|
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
8
10
|
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
9
11
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
10
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
|
+
import * as Lit from '../../ui/lit/lit.js';
|
|
11
14
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
12
15
|
import {PanelUtils} from '../utils/utils.js';
|
|
13
16
|
|
|
14
17
|
import type {EditorHandles} from './ElementsTreeElement.js';
|
|
15
18
|
|
|
19
|
+
const {Directives: {ref}, html, render} = Lit;
|
|
20
|
+
|
|
16
21
|
export class AdoptedStyleSheetSetTreeElement extends UI.TreeOutline.TreeElement {
|
|
17
22
|
constructor(readonly adoptedStyleSheets: SDK.DOMModel.AdoptedStyleSheet[]) {
|
|
18
23
|
super('');
|
|
@@ -70,112 +75,254 @@ export class AdoptedStyleSheetTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
export class AdoptedStyleSheetContentsTreeElement extends UI.TreeOutline.TreeElement {
|
|
73
|
-
|
|
78
|
+
readonly widget: AdoptedStyleSheetContentsWidget;
|
|
79
|
+
private readonly widgetWrapper: HTMLElement;
|
|
74
80
|
|
|
75
|
-
constructor(
|
|
81
|
+
constructor(styleSheetHeader: SDK.CSSStyleSheetHeader.CSSStyleSheetHeader) {
|
|
76
82
|
super('');
|
|
83
|
+
this.widgetWrapper = document.createElement('div');
|
|
84
|
+
this.widgetWrapper.style.display = 'contents';
|
|
85
|
+
this.title = this.widgetWrapper;
|
|
86
|
+
|
|
87
|
+
this.widget = new AdoptedStyleSheetContentsWidget();
|
|
88
|
+
this.widget.styleSheetHeader = styleSheetHeader;
|
|
89
|
+
this.widget.element.classList.remove('vbox', 'flex-auto');
|
|
90
|
+
this.widget.element.style.display = 'contents';
|
|
91
|
+
this.widget.markAsRoot();
|
|
92
|
+
this.widget.show(this.widgetWrapper);
|
|
77
93
|
}
|
|
78
94
|
|
|
79
95
|
override onbind(): void {
|
|
80
|
-
this.
|
|
81
|
-
|
|
82
|
-
|
|
96
|
+
if (!this.widget.isShowing()) {
|
|
97
|
+
this.widget.show(this.widgetWrapper);
|
|
98
|
+
}
|
|
83
99
|
}
|
|
84
100
|
|
|
85
101
|
override onunbind(): void {
|
|
86
|
-
|
|
87
|
-
this.editing.cancel();
|
|
88
|
-
}
|
|
89
|
-
this.styleSheetHeader.cssModel().removeEventListener(
|
|
90
|
-
SDK.CSSModel.Events.StyleSheetChanged, this.onStyleSheetChanged, this);
|
|
102
|
+
this.widget.detach();
|
|
91
103
|
}
|
|
92
104
|
|
|
93
105
|
override async onpopulate(): Promise<void> {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.listItemElement.removeChildren();
|
|
97
|
-
const newNode = this.listItemElement.createChild('span', 'webkit-html-text-node webkit-html-css-node');
|
|
98
|
-
newNode.setAttribute('jslog', `${VisualLogging.value('css-text-node').track({change: true, dblclick: true})}`);
|
|
99
|
-
const text = data.text;
|
|
100
|
-
newNode.textContent = text.replace(/^[\n\r]+|\s+$/g, '');
|
|
101
|
-
void CodeHighlighter.CodeHighlighter.highlightNode(newNode, 'text/css');
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
onStyleSheetChanged({data: {styleSheetId}}: Common.EventTarget.EventTargetEvent<SDK.CSSModel.StyleSheetChangedEvent>):
|
|
106
|
-
void {
|
|
107
|
-
if (styleSheetId === this.styleSheetHeader.id) {
|
|
108
|
-
void this.onpopulate();
|
|
106
|
+
if (!this.widget.text) {
|
|
107
|
+
await this.widget.fetchContent();
|
|
109
108
|
}
|
|
109
|
+
this.widget.requestUpdate();
|
|
110
|
+
await this.widget.updateComplete;
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
override ondblclick(event: Event): boolean {
|
|
113
|
-
if (this.
|
|
114
|
+
if (this.widget.isEditing()) {
|
|
114
115
|
return false;
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
+
this.widget.startEditing(event.target as Element);
|
|
117
118
|
return false;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
override onenter(): boolean {
|
|
121
|
-
if (this.
|
|
122
|
+
if (this.widget.isEditing()) {
|
|
122
123
|
return false;
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
void this.startEditing(target);
|
|
127
|
-
return true;
|
|
128
|
-
}
|
|
129
|
-
return false;
|
|
125
|
+
void this.widget.startEditing();
|
|
126
|
+
return true;
|
|
130
127
|
}
|
|
131
128
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
isEditing(): boolean {
|
|
130
|
+
return this.widget.isEditing();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface AdoptedStyleSheetContentsViewInput {
|
|
135
|
+
text: string;
|
|
136
|
+
isEditing: boolean;
|
|
137
|
+
onDblClick: (event: MouseEvent) => void;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export type AdoptedStyleSheetContentsView =
|
|
141
|
+
(input: AdoptedStyleSheetContentsViewInput, output: undefined, target: HTMLElement) => void;
|
|
142
|
+
|
|
143
|
+
export const DEFAULT_ADOPTED_STYLESHEET_CONTENTS_VIEW: AdoptedStyleSheetContentsView =
|
|
144
|
+
(input: AdoptedStyleSheetContentsViewInput, _output: undefined, target: HTMLElement): void => {
|
|
145
|
+
const highlightNode = ref(el => {
|
|
146
|
+
if (el) {
|
|
147
|
+
el.textContent = input.text;
|
|
148
|
+
void CodeHighlighter.CodeHighlighter.highlightNode(el, 'text/css');
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
// clang-format off
|
|
152
|
+
render(html`
|
|
153
|
+
<span class="webkit-html-text-node webkit-html-css-node"
|
|
154
|
+
jslog=${VisualLogging.value('css-text-node').track({
|
|
155
|
+
change: true,
|
|
156
|
+
dblclick: true,
|
|
157
|
+
})}
|
|
158
|
+
${highlightNode}
|
|
159
|
+
@dblclick=${input.onDblClick}></span>
|
|
160
|
+
`, target);
|
|
161
|
+
// clang-format on
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export class AdoptedStyleSheetContentsWidget extends UI.Widget.Widget {
|
|
165
|
+
#styleSheetHeader?: SDK.CSSStyleSheetHeader.CSSStyleSheetHeader;
|
|
166
|
+
#text = '';
|
|
167
|
+
#fetchContentPromise: Promise<void>|null = null;
|
|
168
|
+
#editing: EditorHandles|null = null;
|
|
169
|
+
#view: AdoptedStyleSheetContentsView;
|
|
170
|
+
|
|
171
|
+
constructor(element?: HTMLElement, view: AdoptedStyleSheetContentsView = DEFAULT_ADOPTED_STYLESHEET_CONTENTS_VIEW) {
|
|
172
|
+
super(element, {useShadowDom: false});
|
|
173
|
+
this.#view = view;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
get text(): string {
|
|
177
|
+
return this.#text;
|
|
178
|
+
}
|
|
136
179
|
|
|
137
|
-
|
|
138
|
-
if (
|
|
180
|
+
set styleSheetHeader(header: SDK.CSSStyleSheetHeader.CSSStyleSheetHeader|undefined) {
|
|
181
|
+
if (this.#styleSheetHeader === header) {
|
|
139
182
|
return;
|
|
140
183
|
}
|
|
184
|
+
if (this.#styleSheetHeader) {
|
|
185
|
+
this.#styleSheetHeader.cssModel().removeEventListener(SDK.CSSModel.Events.StyleSheetChanged,
|
|
186
|
+
this.#onStyleSheetChanged, this);
|
|
187
|
+
}
|
|
188
|
+
this.#styleSheetHeader = header;
|
|
189
|
+
this.#text = '';
|
|
190
|
+
if (this.isShowing() && this.#styleSheetHeader) {
|
|
191
|
+
this.#styleSheetHeader.cssModel().addEventListener(SDK.CSSModel.Events.StyleSheetChanged,
|
|
192
|
+
this.#onStyleSheetChanged, this);
|
|
193
|
+
void this.fetchContent();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
141
196
|
|
|
142
|
-
|
|
143
|
-
|
|
197
|
+
get styleSheetHeader(): SDK.CSSStyleSheetHeader.CSSStyleSheetHeader|undefined {
|
|
198
|
+
return this.#styleSheetHeader;
|
|
199
|
+
}
|
|
144
200
|
|
|
145
|
-
|
|
146
|
-
|
|
201
|
+
override wasShown(): void {
|
|
202
|
+
super.wasShown();
|
|
203
|
+
if (this.#styleSheetHeader) {
|
|
204
|
+
this.#styleSheetHeader.cssModel().addEventListener(SDK.CSSModel.Events.StyleSheetChanged,
|
|
205
|
+
this.#onStyleSheetChanged, this);
|
|
206
|
+
if (!this.#text) {
|
|
207
|
+
void this.fetchContent();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
147
211
|
|
|
148
|
-
|
|
149
|
-
|
|
212
|
+
override willHide(): void {
|
|
213
|
+
super.willHide();
|
|
214
|
+
if (this.#editing) {
|
|
215
|
+
this.#editing.cancel();
|
|
216
|
+
this.#editing = null;
|
|
217
|
+
}
|
|
218
|
+
if (this.#styleSheetHeader) {
|
|
219
|
+
this.#styleSheetHeader.cssModel().removeEventListener(SDK.CSSModel.Events.StyleSheetChanged,
|
|
220
|
+
this.#onStyleSheetChanged, this);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
async fetchContent(): Promise<void> {
|
|
225
|
+
const header = this.#styleSheetHeader;
|
|
226
|
+
if (!header) {
|
|
150
227
|
return;
|
|
151
228
|
}
|
|
229
|
+
if (this.#fetchContentPromise) {
|
|
230
|
+
return await this.#fetchContentPromise;
|
|
231
|
+
}
|
|
232
|
+
this.#fetchContentPromise = (async () => {
|
|
233
|
+
try {
|
|
234
|
+
const data = await header.requestContentData();
|
|
235
|
+
if (!TextUtils.ContentData.ContentData.isError(data) && data.isTextContent) {
|
|
236
|
+
this.#text = data.text.replace(/^[\n\r]+|\s+$/g, '');
|
|
237
|
+
this.requestUpdate();
|
|
238
|
+
}
|
|
239
|
+
} finally {
|
|
240
|
+
this.#fetchContentPromise = null;
|
|
241
|
+
}
|
|
242
|
+
})();
|
|
243
|
+
return await this.#fetchContentPromise;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
#onStyleSheetChanged({data: {styleSheetId}}:
|
|
247
|
+
Common.EventTarget.EventTargetEvent<SDK.CSSModel.StyleSheetChangedEvent>): void {
|
|
248
|
+
if (styleSheetId === this.#styleSheetHeader?.id) {
|
|
249
|
+
void this.fetchContent();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
152
252
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
253
|
+
startEditing(target?: Element): void {
|
|
254
|
+
if (this.#editing || !this.#styleSheetHeader) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
const textNode = (target ? (target as HTMLElement).enclosingNodeOrSelfWithClass('webkit-html-text-node') : null) ??
|
|
258
|
+
this.contentElement.querySelector('.webkit-html-text-node');
|
|
259
|
+
if (!textNode || UI.UIUtils.isBeingEdited(textNode)) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const dummyEditorHandles: EditorHandles = {
|
|
263
|
+
commit: () => {},
|
|
264
|
+
cancel: () => {},
|
|
156
265
|
resize: () => {},
|
|
157
266
|
};
|
|
267
|
+
this.#editing = dummyEditorHandles;
|
|
158
268
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
269
|
+
void (async () => {
|
|
270
|
+
if (!this.#styleSheetHeader) {
|
|
271
|
+
this.#editing = null;
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const data = await this.#styleSheetHeader.requestContentData();
|
|
275
|
+
textNode.textContent = (TextUtils.ContentData.ContentData.isError(data) || !data.isTextContent) ? '' : data.text;
|
|
162
276
|
|
|
163
|
-
|
|
164
|
-
|
|
277
|
+
const config = new UI.InplaceEditor.Config(
|
|
278
|
+
(element, newText, oldText) => this.#editingCommitted(element, newText, oldText),
|
|
279
|
+
() => this.#editingCancelled(),
|
|
280
|
+
undefined,
|
|
281
|
+
);
|
|
282
|
+
const editorHandles = UI.InplaceEditor.InplaceEditor.startEditing(textNode, config);
|
|
283
|
+
if (!editorHandles) {
|
|
284
|
+
this.#editing = null;
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
this.#editing = {
|
|
288
|
+
commit: editorHandles.commit,
|
|
289
|
+
cancel: editorHandles.cancel,
|
|
290
|
+
resize: () => {},
|
|
291
|
+
};
|
|
292
|
+
const selection = this.contentElement.getComponentSelection();
|
|
293
|
+
selection?.selectAllChildren(textNode);
|
|
294
|
+
})();
|
|
295
|
+
}
|
|
165
296
|
|
|
166
|
-
|
|
167
|
-
|
|
297
|
+
async #editingCommitted(_element: Element, newText: string, oldText: string|null): Promise<void> {
|
|
298
|
+
this.#editing = null;
|
|
299
|
+
if (newText !== oldText && this.#styleSheetHeader) {
|
|
300
|
+
await this.#styleSheetHeader.cssModel().setStyleSheetText(this.#styleSheetHeader.id, newText, false);
|
|
168
301
|
}
|
|
169
|
-
|
|
170
|
-
this.editingCancelled();
|
|
302
|
+
this.#editingCancelled();
|
|
171
303
|
}
|
|
172
304
|
|
|
173
|
-
|
|
174
|
-
this
|
|
175
|
-
void this.
|
|
305
|
+
#editingCancelled(): void {
|
|
306
|
+
this.#editing = null;
|
|
307
|
+
void this.fetchContent();
|
|
176
308
|
}
|
|
177
309
|
|
|
178
310
|
isEditing(): boolean {
|
|
179
|
-
return this
|
|
311
|
+
return this.#editing !== null;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
override performUpdate(): void {
|
|
315
|
+
if (this.isEditing()) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
this.#view({
|
|
319
|
+
text: this.#text,
|
|
320
|
+
isEditing: this.isEditing(),
|
|
321
|
+
onDblClick: (event: MouseEvent) => {
|
|
322
|
+
event.stopPropagation();
|
|
323
|
+
this.startEditing(event.target as Element);
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
undefined, this.contentElement);
|
|
180
327
|
}
|
|
181
328
|
}
|
|
@@ -260,10 +260,10 @@ export class ColorSwatchPopoverIcon extends Common.ObjectWrapper.ObjectWrapper<C
|
|
|
260
260
|
return new Common.Color.Oklab(color.l, color.a, color.b, color.alpha, customProperty);
|
|
261
261
|
}
|
|
262
262
|
if (color.is(Common.Color.Format.SRGB) || color.is(Common.Color.Format.SRGB_LINEAR) ||
|
|
263
|
-
color.is(Common.Color.Format.DISPLAY_P3) || color.is(Common.Color.Format.
|
|
264
|
-
color.is(Common.Color.Format.
|
|
265
|
-
color.is(Common.Color.Format.
|
|
266
|
-
color.is(Common.Color.Format.XYZ_D65)) {
|
|
263
|
+
color.is(Common.Color.Format.DISPLAY_P3) || color.is(Common.Color.Format.DISPLAY_P3_LINEAR) ||
|
|
264
|
+
color.is(Common.Color.Format.A98_RGB) || color.is(Common.Color.Format.PROPHOTO_RGB) ||
|
|
265
|
+
color.is(Common.Color.Format.REC_2020) || color.is(Common.Color.Format.XYZ) ||
|
|
266
|
+
color.is(Common.Color.Format.XYZ_D50) || color.is(Common.Color.Format.XYZ_D65)) {
|
|
267
267
|
return new Common.Color.ColorFunction(
|
|
268
268
|
color.colorSpace, color.p0, color.p1, color.p2, color.alpha, customProperty);
|
|
269
269
|
}
|
|
@@ -10,8 +10,8 @@ import * as Emulation from '../emulation/emulation.js';
|
|
|
10
10
|
|
|
11
11
|
import {canGetJSPath} from './DOMPath.js';
|
|
12
12
|
import {ElementsPanel} from './ElementsPanel.js';
|
|
13
|
-
import {ElementsTreeElement} from './ElementsTreeElement.js';
|
|
14
|
-
import type {
|
|
13
|
+
import {ElementsTreeElement, type ElementsTreeWidget} from './ElementsTreeElement.js';
|
|
14
|
+
import type {DOMTreeWidget} from './ElementsTreeOutline.js';
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
17
17
|
/**
|
|
@@ -194,12 +194,16 @@ const UIStrings = {
|
|
|
194
194
|
const str_ = i18n.i18n.registerUIStrings('panels/elements/DOMTreeContextMenu.ts', UIStrings);
|
|
195
195
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
196
196
|
|
|
197
|
-
export async function populateNodeContextMenu(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
197
|
+
export async function populateNodeContextMenu(
|
|
198
|
+
contextMenu: UI.ContextMenu.ContextMenu,
|
|
199
|
+
domTreeWidget: DOMTreeWidget,
|
|
200
|
+
domNode: SDK.DOMModel.DOMNode,
|
|
201
|
+
targetWidget?: ElementsTreeWidget,
|
|
202
|
+
): Promise<void> {
|
|
203
|
+
const isEditable = !domNode.isShadowRoot() && !domNode.ancestorUserAgentShadowRoot();
|
|
204
|
+
if (isEditable && !targetWidget?.isEditing) {
|
|
205
|
+
contextMenu.editSection().appendItem(i18nString(UIStrings.editAsHtml),
|
|
206
|
+
() => domTreeWidget.toggleEditAsHTML(domNode),
|
|
203
207
|
{jslogContext: 'elements.edit-as-html'});
|
|
204
208
|
}
|
|
205
209
|
const isShadowRoot = domNode.isShadowRoot();
|
|
@@ -352,37 +356,37 @@ export async function populateNodeContextMenu(contextMenu: UI.ContextMenu.Contex
|
|
|
352
356
|
}
|
|
353
357
|
}
|
|
354
358
|
|
|
355
|
-
const outline = treeElement.treeOutline as ElementsTreeOutline | null;
|
|
356
|
-
|
|
357
359
|
menuItem = contextMenu.clipboardSection().appendItem(i18nString(UIStrings.cut),
|
|
358
|
-
() =>
|
|
359
|
-
{disabled: !
|
|
360
|
+
() => domTreeWidget.performCopyOrCut(true, domNode),
|
|
361
|
+
{disabled: !isEditable, jslogContext: 'cut'});
|
|
360
362
|
menuItem.setShortcut(createShortcut('X', modifier));
|
|
361
363
|
|
|
362
364
|
// Place it here so that all "Copy"-ing items stick together.
|
|
363
365
|
const copyMenu = contextMenu.clipboardSection().appendSubMenuItem(i18nString(UIStrings.copy), false, 'copy');
|
|
364
366
|
const section = copyMenu.section();
|
|
365
367
|
if (!isShadowRoot) {
|
|
366
|
-
menuItem =
|
|
367
|
-
|
|
368
|
+
menuItem =
|
|
369
|
+
section.appendItem(i18nString(UIStrings.copyOuterhtml), () => domTreeWidget.performCopyOrCut(false, domNode),
|
|
370
|
+
{jslogContext: 'copy-outer-html'});
|
|
368
371
|
menuItem.setShortcut(createShortcut('V', modifier));
|
|
369
372
|
}
|
|
370
373
|
if (domNode.nodeType() === Node.ELEMENT_NODE) {
|
|
371
|
-
section.appendItem(i18nString(UIStrings.copySelector), () =>
|
|
374
|
+
section.appendItem(i18nString(UIStrings.copySelector), () => domTreeWidget.copyCSSPath(domNode),
|
|
372
375
|
{jslogContext: 'copy-selector'});
|
|
373
|
-
section.appendItem(i18nString(UIStrings.copyJsPath), () =>
|
|
376
|
+
section.appendItem(i18nString(UIStrings.copyJsPath), () => domTreeWidget.copyJSPath(domNode),
|
|
374
377
|
{disabled: !canGetJSPath(domNode), jslogContext: 'copy-js-path'});
|
|
375
|
-
section.appendItem(i18nString(UIStrings.copyStyles), () => void
|
|
378
|
+
section.appendItem(i18nString(UIStrings.copyStyles), () => void domTreeWidget.copyStyles(domNode),
|
|
376
379
|
{jslogContext: 'elements.copy-styles'});
|
|
377
380
|
}
|
|
378
381
|
if (!isShadowRoot) {
|
|
379
|
-
section.appendItem(i18nString(UIStrings.copyXpath), () =>
|
|
380
|
-
|
|
382
|
+
section.appendItem(i18nString(UIStrings.copyXpath), () => domTreeWidget.copyXPath(domNode),
|
|
383
|
+
{jslogContext: 'copy-xpath'});
|
|
384
|
+
section.appendItem(i18nString(UIStrings.copyFullXpath), () => domTreeWidget.copyFullXPath(domNode),
|
|
381
385
|
{jslogContext: 'copy-full-xpath'});
|
|
382
386
|
}
|
|
383
387
|
|
|
384
388
|
menuItem = copyMenu.clipboardSection().appendItem(i18nString(UIStrings.copyElement),
|
|
385
|
-
() =>
|
|
389
|
+
() => domTreeWidget.performCopyOrCut(false, domNode, true),
|
|
386
390
|
{jslogContext: 'copy-element'});
|
|
387
391
|
menuItem.setShortcut(createShortcut('C', modifier));
|
|
388
392
|
|
|
@@ -390,33 +394,36 @@ export async function populateNodeContextMenu(contextMenu: UI.ContextMenu.Contex
|
|
|
390
394
|
// Duplicate element, disabled on root element and ShadowDOM.
|
|
391
395
|
const isRootElement = !domNode.parentNode || domNode.parentNode.nodeName() === '#document';
|
|
392
396
|
menuItem = contextMenu.editSection().appendItem(i18nString(UIStrings.duplicateElement),
|
|
393
|
-
() =>
|
|
397
|
+
() => domTreeWidget.duplicateNode(domNode), {
|
|
394
398
|
disabled: (domNode.isInShadowTree() || isRootElement),
|
|
395
399
|
jslogContext: 'elements.duplicate-element',
|
|
396
400
|
});
|
|
397
401
|
}
|
|
398
402
|
|
|
399
|
-
menuItem =
|
|
400
|
-
|
|
403
|
+
menuItem =
|
|
404
|
+
contextMenu.clipboardSection().appendItem(i18nString(UIStrings.paste), () => domTreeWidget.pasteNode(domNode),
|
|
405
|
+
{disabled: !domTreeWidget.canPaste(domNode), jslogContext: 'paste'});
|
|
401
406
|
menuItem.setShortcut(createShortcut('V', modifier));
|
|
402
407
|
|
|
403
408
|
menuItem = contextMenu.debugSection().appendCheckboxItem(i18nString(UIStrings.hideElement),
|
|
404
|
-
() =>
|
|
405
|
-
checked: Boolean(
|
|
409
|
+
() => domTreeWidget.toggleHideElement(domNode), {
|
|
410
|
+
checked: Boolean(domTreeWidget.isToggledToHidden(domNode)),
|
|
406
411
|
jslogContext: 'elements.hide-element',
|
|
407
412
|
});
|
|
408
413
|
menuItem.setShortcut(
|
|
409
414
|
UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutTitleForAction('elements.hide-element') || '');
|
|
410
415
|
|
|
411
416
|
if (isEditable) {
|
|
412
|
-
contextMenu.editSection().appendItem(i18nString(UIStrings.deleteElement),
|
|
417
|
+
contextMenu.editSection().appendItem(i18nString(UIStrings.deleteElement),
|
|
418
|
+
() => void domTreeWidget.removeNode(domNode),
|
|
413
419
|
{jslogContext: 'delete-element'});
|
|
414
420
|
}
|
|
415
421
|
|
|
416
422
|
contextMenu.viewSection().appendItem(i18nString(UIStrings.expandRecursively),
|
|
417
|
-
() => void
|
|
423
|
+
() => void domTreeWidget.expandRecursively(domNode),
|
|
418
424
|
{jslogContext: 'expand-recursively'});
|
|
419
|
-
contextMenu.viewSection().appendItem(i18nString(UIStrings.collapseChildren),
|
|
425
|
+
contextMenu.viewSection().appendItem(i18nString(UIStrings.collapseChildren),
|
|
426
|
+
() => domTreeWidget.collapseChildren(domNode),
|
|
420
427
|
{jslogContext: 'collapse-children'});
|
|
421
428
|
contextMenu.viewSection().appendItem(i18nString(UIStrings.switchToAccessibilityTree),
|
|
422
429
|
() => ElementsPanel.instance().toggleAccessibilityTree(),
|
|
@@ -438,15 +445,16 @@ export async function populateNodeContextMenu(contextMenu: UI.ContextMenu.Contex
|
|
|
438
445
|
}
|
|
439
446
|
|
|
440
447
|
export async function showContextMenu(
|
|
441
|
-
|
|
448
|
+
domTreeWidget: DOMTreeWidget,
|
|
449
|
+
domNode: SDK.DOMModel.DOMNode,
|
|
442
450
|
event: Event,
|
|
451
|
+
targetWidget?: ElementsTreeWidget,
|
|
443
452
|
): Promise<UI.ContextMenu.ContextMenu|undefined> {
|
|
444
453
|
if (UI.UIUtils.isEditing()) {
|
|
445
454
|
return;
|
|
446
455
|
}
|
|
447
456
|
|
|
448
|
-
|
|
449
|
-
if (outline && !outline.enableContextMenu) {
|
|
457
|
+
if (!domTreeWidget.enableContextMenu) {
|
|
450
458
|
return;
|
|
451
459
|
}
|
|
452
460
|
|
|
@@ -462,7 +470,6 @@ export async function showContextMenu(
|
|
|
462
470
|
event.preventDefault();
|
|
463
471
|
|
|
464
472
|
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
465
|
-
const domNode = treeElement.node();
|
|
466
473
|
const isPseudoElement = Boolean(domNode.pseudoType());
|
|
467
474
|
const isTag = domNode.nodeType() === Node.ELEMENT_NODE && !isPseudoElement;
|
|
468
475
|
|
|
@@ -475,19 +482,17 @@ export async function showContextMenu(
|
|
|
475
482
|
() => void domNode.saveNodeToTempVariable(),
|
|
476
483
|
{jslogContext: 'store-as-global-variable'});
|
|
477
484
|
if (textNode) {
|
|
478
|
-
if (!
|
|
485
|
+
if (!targetWidget?.isEditing) {
|
|
479
486
|
contextMenu.editSection().appendItem(i18nString(UIStrings.editText),
|
|
480
|
-
() =>
|
|
487
|
+
() => targetWidget?.startEditingTextNode(textNode as Element),
|
|
481
488
|
{jslogContext: 'edit-text'});
|
|
482
489
|
}
|
|
483
|
-
await populateNodeContextMenu(contextMenu,
|
|
490
|
+
await populateNodeContextMenu(contextMenu, domTreeWidget, domNode, targetWidget);
|
|
484
491
|
} else if (isTag) {
|
|
485
|
-
const
|
|
486
|
-
(
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
if (targetWidget) {
|
|
490
|
-
contextMenu.editSection().appendItem(i18nString(UIStrings.addAttribute), () => targetWidget.addNewAttribute(),
|
|
492
|
+
const startTagWidget =
|
|
493
|
+
targetWidget?.isClosingTag ? (targetWidget.findStartTagWidget?.() ?? targetWidget) : targetWidget;
|
|
494
|
+
if (startTagWidget) {
|
|
495
|
+
contextMenu.editSection().appendItem(i18nString(UIStrings.addAttribute), () => startTagWidget.addNewAttribute(),
|
|
491
496
|
{jslogContext: 'add-attribute'});
|
|
492
497
|
}
|
|
493
498
|
|
|
@@ -496,10 +501,10 @@ export async function showContextMenu(
|
|
|
496
501
|
const newAttribute = target.enclosingNodeOrSelfWithClass?.('add-attribute');
|
|
497
502
|
if (attribute && !newAttribute) {
|
|
498
503
|
contextMenu.editSection().appendItem(i18nString(UIStrings.editAttribute),
|
|
499
|
-
() =>
|
|
504
|
+
() => startTagWidget?.startEditingAttribute(attribute, target),
|
|
500
505
|
{jslogContext: 'edit-attribute'});
|
|
501
506
|
}
|
|
502
|
-
await populateNodeContextMenu(contextMenu,
|
|
507
|
+
await populateNodeContextMenu(contextMenu, domTreeWidget, domNode, startTagWidget);
|
|
503
508
|
ElementsTreeElement.populateForcedPseudoStateItems(contextMenu, domNode);
|
|
504
509
|
contextMenu.viewSection().appendItem(i18nString(UIStrings.scrollIntoView), () => domNode.scrollIntoView(),
|
|
505
510
|
{jslogContext: 'scroll-into-view'});
|
|
@@ -507,26 +512,26 @@ export async function showContextMenu(
|
|
|
507
512
|
await domNode.focus();
|
|
508
513
|
}, {jslogContext: 'focus'});
|
|
509
514
|
} else if (commentNode) {
|
|
510
|
-
await populateNodeContextMenu(contextMenu,
|
|
515
|
+
await populateNodeContextMenu(contextMenu, domTreeWidget, domNode, targetWidget);
|
|
511
516
|
} else if (isPseudoElement) {
|
|
512
|
-
if (
|
|
517
|
+
if (domNode.childNodeCount() !== 0 || domNode.hasPseudoElements()) {
|
|
513
518
|
contextMenu.viewSection().appendItem(i18nString(UIStrings.expandRecursively),
|
|
514
|
-
() => void
|
|
519
|
+
() => void domTreeWidget.expandRecursively(domNode),
|
|
515
520
|
{jslogContext: 'expand-recursively'});
|
|
516
521
|
}
|
|
517
522
|
contextMenu.viewSection().appendItem(i18nString(UIStrings.scrollIntoView), () => domNode.scrollIntoView(),
|
|
518
523
|
{jslogContext: 'scroll-into-view'});
|
|
519
524
|
} else if (domNode.nodeType() === Node.PROCESSING_INSTRUCTION_NODE) {
|
|
520
525
|
contextMenu.editSection().appendItem(i18nString(UIStrings.editData),
|
|
521
|
-
() =>
|
|
526
|
+
() => targetWidget?.startEditingProcessingInstructionValue(),
|
|
522
527
|
{jslogContext: 'elements.edit-data'});
|
|
523
|
-
contextMenu.editSection().appendItem(
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
528
|
+
contextMenu.editSection().appendItem(i18nString(UIStrings.duplicateElement),
|
|
529
|
+
() => domTreeWidget.duplicateNode(domNode), {
|
|
530
|
+
disabled: domNode.isInShadowTree(),
|
|
531
|
+
jslogContext: 'elements.duplicate-element',
|
|
532
|
+
});
|
|
533
|
+
contextMenu.editSection().appendItem(i18nString(UIStrings.deleteElement),
|
|
534
|
+
() => void domTreeWidget.removeNode(domNode),
|
|
530
535
|
{jslogContext: 'delete-element'});
|
|
531
536
|
}
|
|
532
537
|
|
|
@@ -89,8 +89,12 @@ export interface ElementIssueDetails {
|
|
|
89
89
|
export function getElementIssueDetails(issue: IssuesManager.Issue.Issue): ElementIssueDetails|undefined {
|
|
90
90
|
if (issue instanceof IssuesManager.GenericIssue.GenericIssue) {
|
|
91
91
|
const issueDetails = issue.details();
|
|
92
|
+
const tooltip = getTooltipFromGenericIssue(issueDetails.errorType);
|
|
93
|
+
if (!tooltip) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
92
96
|
return {
|
|
93
|
-
tooltip
|
|
97
|
+
tooltip,
|
|
94
98
|
nodeId: issueDetails.violatingNodeId,
|
|
95
99
|
attribute: issueDetails.violatingNodeAttribute,
|
|
96
100
|
};
|
|
@@ -103,8 +107,12 @@ export function getElementIssueDetails(issue: IssuesManager.Issue.Issue): Elemen
|
|
|
103
107
|
nodeId: issueDetails.nodeId,
|
|
104
108
|
};
|
|
105
109
|
}
|
|
110
|
+
const tooltip = getTooltipFromElementAccessibilityIssue(issueDetails.elementAccessibilityIssueReason);
|
|
111
|
+
if (!tooltip) {
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
106
114
|
return {
|
|
107
|
-
tooltip
|
|
115
|
+
tooltip,
|
|
108
116
|
nodeId: issueDetails.nodeId,
|
|
109
117
|
};
|
|
110
118
|
}
|
|
@@ -228,7 +228,10 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
228
228
|
return this.#domTreeWidget.getTreeOutlineForTesting();
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
constructor(
|
|
231
|
+
constructor(
|
|
232
|
+
targetManager?: SDK.TargetManager.TargetManager,
|
|
233
|
+
settings?: Common.Settings.Settings,
|
|
234
|
+
) {
|
|
232
235
|
super('elements');
|
|
233
236
|
this.#targetManager = targetManager ?? SDK.TargetManager.TargetManager.instance();
|
|
234
237
|
this.#settings = settings ?? Common.Settings.Settings.instance();
|
|
@@ -1309,7 +1312,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
1309
1312
|
}
|
|
1310
1313
|
|
|
1311
1314
|
copyStyles(node: SDK.DOMModel.DOMNode): void {
|
|
1312
|
-
this.#domTreeWidget.copyStyles(node);
|
|
1315
|
+
void this.#domTreeWidget.copyStyles(node);
|
|
1313
1316
|
}
|
|
1314
1317
|
|
|
1315
1318
|
protected static firstInspectElementCompletedForTest = function(): void {};
|