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
|
@@ -210,9 +210,12 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
210
210
|
private isActivePropertyHighlighted = false;
|
|
211
211
|
private initialUpdateCompleted = false;
|
|
212
212
|
hasMatchedStyles = false;
|
|
213
|
-
|
|
213
|
+
sectionBlocks: SectionBlock[] = [];
|
|
214
|
+
#allKnownBlocks = new Map<string, SectionBlock>();
|
|
215
|
+
#lastNode: SDK.DOMModel.DOMNode|null = null;
|
|
214
216
|
private idleCallbackManager: IdleCallbackManager|null = null;
|
|
215
217
|
private needsForceUpdate = false;
|
|
218
|
+
private isSuppressingResets = false;
|
|
216
219
|
private readonly resizeThrottler = new Common.Throttler.Throttler(100);
|
|
217
220
|
private readonly resetUpdateThrottler = new Common.Throttler.Throttler(500);
|
|
218
221
|
private readonly computedStyleUpdateThrottler = new Common.Throttler.Throttler(500);
|
|
@@ -231,6 +234,7 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
231
234
|
aiCodeCompletionProvider?: StylesAiCodeCompletionProvider.StylesAiCodeCompletionProvider;
|
|
232
235
|
#aiCodeCompletionSummaryToolbarContainer?: HTMLElement;
|
|
233
236
|
#aiCodeCompletionSummaryToolbar?: PanelsCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar;
|
|
237
|
+
#aiCodeCompletionEnabled = false;
|
|
234
238
|
#shouldRenderLazily = false;
|
|
235
239
|
#lazyRenderObserver?: IntersectionObserver;
|
|
236
240
|
#lazyRenderCallbacks = new WeakMap<Element, () => void>();
|
|
@@ -245,6 +249,9 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
245
249
|
Common.Settings.Settings.instance()
|
|
246
250
|
.moduleSetting('collapse-non-contributing-css-rules')
|
|
247
251
|
.addChangeListener(this.updateCollapsedSectionsSetting, this);
|
|
252
|
+
Common.Settings.Settings.instance()
|
|
253
|
+
.moduleSetting('show-inactive-css-rules')
|
|
254
|
+
.addChangeListener(this.requestUpdate, this);
|
|
248
255
|
this.toolbarPaneElement = this.createStylesSidebarToolbar();
|
|
249
256
|
this.noMatchesElement = this.contentElement.createChild('div', 'gray-info-message hidden');
|
|
250
257
|
this.noMatchesElement.textContent = i18nString(UIStrings.noMatchingSelectorOrStyle);
|
|
@@ -252,13 +259,13 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
252
259
|
this.sectionsContainer.show(this.contentElement);
|
|
253
260
|
UI.ARIAUtils.markAsList(this.sectionsContainer.contentElement);
|
|
254
261
|
this.sectionsContainer.contentElement.addEventListener('keydown', this.sectionsContainerKeyDown.bind(this), false);
|
|
255
|
-
this.sectionsContainer.contentElement.addEventListener(
|
|
256
|
-
|
|
257
|
-
this.sectionsContainer.contentElement.addEventListener(
|
|
258
|
-
|
|
262
|
+
this.sectionsContainer.contentElement.addEventListener('focusin', this.sectionsContainerFocusChanged.bind(this),
|
|
263
|
+
false);
|
|
264
|
+
this.sectionsContainer.contentElement.addEventListener('focusout', this.sectionsContainerFocusChanged.bind(this),
|
|
265
|
+
false);
|
|
259
266
|
|
|
260
|
-
this.#swatchPopoverHelper.addEventListener(
|
|
261
|
-
|
|
267
|
+
this.#swatchPopoverHelper.addEventListener(InlineEditor.SwatchPopoverHelper.Events.WILL_SHOW_POPOVER,
|
|
268
|
+
this.hideAllPopovers, this);
|
|
262
269
|
this.decorator = new StylePropertyHighlighter(this);
|
|
263
270
|
this.contentElement.classList.add('styles-pane');
|
|
264
271
|
|
|
@@ -266,19 +273,19 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
266
273
|
this.contentElement.addEventListener('copy', this.clipboardCopy.bind(this));
|
|
267
274
|
|
|
268
275
|
this.boundOnScroll = this.onScroll.bind(this);
|
|
269
|
-
this.imagePreviewPopover =
|
|
270
|
-
this.contentElement,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
276
|
+
this.imagePreviewPopover =
|
|
277
|
+
new ImagePreviewPopover(this.contentElement,
|
|
278
|
+
event => {
|
|
279
|
+
const link = event.composedPath()[0];
|
|
280
|
+
if (link instanceof Element) {
|
|
281
|
+
return link;
|
|
282
|
+
}
|
|
283
|
+
return null;
|
|
284
|
+
},
|
|
285
|
+
async () => {
|
|
286
|
+
const features = await Components.ImagePreview.loadPrecomputedFeatures(this.node());
|
|
287
|
+
return features;
|
|
288
|
+
});
|
|
282
289
|
|
|
283
290
|
UI.ViewManager.ViewManager.instance().addEventListener(UI.ViewManager.Events.VIEW_VISIBILITY_CHANGED, event => {
|
|
284
291
|
if (event.data.revealedViewId === 'animations' || event.data.hiddenViewId === 'animations') {
|
|
@@ -291,9 +298,11 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
291
298
|
completionContext: {},
|
|
292
299
|
generationContext: {},
|
|
293
300
|
onFeatureEnabled: () => {
|
|
301
|
+
this.#aiCodeCompletionEnabled = true;
|
|
294
302
|
this.#createAiCodeCompletionSummaryToolbar();
|
|
295
303
|
},
|
|
296
304
|
onFeatureDisabled: () => {
|
|
305
|
+
this.#aiCodeCompletionEnabled = false;
|
|
297
306
|
this.#cleanupAiCodeCompletion();
|
|
298
307
|
},
|
|
299
308
|
onSuggestionAccepted: this.#onAiCodeCompletionSuggestionAccepted.bind(this),
|
|
@@ -325,6 +334,9 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
325
334
|
}
|
|
326
335
|
|
|
327
336
|
setUserOperation(userOperation: boolean): void {
|
|
337
|
+
if (userOperation) {
|
|
338
|
+
this.isSuppressingResets = false;
|
|
339
|
+
}
|
|
328
340
|
this.userOperation = userOperation;
|
|
329
341
|
}
|
|
330
342
|
|
|
@@ -465,23 +477,22 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
465
477
|
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
466
478
|
for (let i = 0; i < contextMenuDescriptors.length; ++i) {
|
|
467
479
|
const descriptor = contextMenuDescriptors[i];
|
|
468
|
-
contextMenu.defaultSection().appendItem(
|
|
469
|
-
|
|
480
|
+
contextMenu.defaultSection().appendItem(descriptor.text, descriptor.handler,
|
|
481
|
+
{jslogContext: 'style-sheet-header'});
|
|
470
482
|
}
|
|
471
|
-
contextMenu.footerSection().appendItem(
|
|
472
|
-
|
|
473
|
-
|
|
483
|
+
contextMenu.footerSection().appendItem('inspector-stylesheet',
|
|
484
|
+
this.createNewRuleInViaInspectorStyleSheet.bind(this),
|
|
485
|
+
{jslogContext: 'inspector-stylesheet'});
|
|
474
486
|
void contextMenu.show();
|
|
475
487
|
|
|
476
|
-
function compareDescriptors(
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}): number {
|
|
488
|
+
function compareDescriptors(descriptor1: {
|
|
489
|
+
text: string,
|
|
490
|
+
handler: () => Promise<void>,
|
|
491
|
+
},
|
|
492
|
+
descriptor2: {
|
|
493
|
+
text: string,
|
|
494
|
+
handler: () => Promise<void>,
|
|
495
|
+
}): number {
|
|
485
496
|
return Platform.StringUtilities.naturalOrderComparator(descriptor1.text, descriptor2.text);
|
|
486
497
|
}
|
|
487
498
|
|
|
@@ -523,9 +534,9 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
523
534
|
if (this.lastFilterChange) {
|
|
524
535
|
const stillTyping = Date.now() - this.lastFilterChange < FILTER_IDLE_PERIOD;
|
|
525
536
|
if (!stillTyping) {
|
|
526
|
-
UI.ARIAUtils.LiveAnnouncer.alert(
|
|
527
|
-
|
|
528
|
-
|
|
537
|
+
UI.ARIAUtils.LiveAnnouncer.alert(this.visibleSections ?
|
|
538
|
+
i18nString(UIStrings.visibleSelectors, {n: this.visibleSections}) :
|
|
539
|
+
i18nString(UIStrings.noMatchingSelectorOrStyle));
|
|
529
540
|
}
|
|
530
541
|
}
|
|
531
542
|
}, FILTER_IDLE_PERIOD);
|
|
@@ -556,6 +567,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
556
567
|
section.update(section === editedSection);
|
|
557
568
|
}
|
|
558
569
|
|
|
570
|
+
this.#performSyncViewportCheck();
|
|
571
|
+
|
|
559
572
|
if (this.#filterRegex) {
|
|
560
573
|
this.updateFilter();
|
|
561
574
|
}
|
|
@@ -608,8 +621,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
608
621
|
|
|
609
622
|
signal?.throwIfAborted();
|
|
610
623
|
|
|
611
|
-
await this.innerRebuildUpdate(
|
|
612
|
-
|
|
624
|
+
await this.innerRebuildUpdate(signal, this.matchedStyles, computedStyles, parentsComputedStyles,
|
|
625
|
+
computedStyleExtraFields);
|
|
613
626
|
|
|
614
627
|
signal?.throwIfAborted();
|
|
615
628
|
|
|
@@ -637,17 +650,16 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
637
650
|
return registration ? {registration, goToDefinition} : undefined;
|
|
638
651
|
}
|
|
639
652
|
|
|
640
|
-
getVariableParserError(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
641
|
-
|
|
653
|
+
getVariableParserError(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
654
|
+
variableName: string): ElementsComponents.CSSVariableValueView.CSSVariableParserError|null {
|
|
642
655
|
const registrationDetails = this.#getRegisteredPropertyDetails(matchedStyles, variableName);
|
|
643
656
|
return registrationDetails ?
|
|
644
657
|
new ElementsComponents.CSSVariableValueView.CSSVariableParserError(registrationDetails) :
|
|
645
658
|
null;
|
|
646
659
|
}
|
|
647
660
|
|
|
648
|
-
getVariablePopoverContents(
|
|
649
|
-
|
|
650
|
-
computedValue: string|null): ElementsComponents.CSSVariableValueView.CSSVariableValueView {
|
|
661
|
+
getVariablePopoverContents(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, variableName: string,
|
|
662
|
+
computedValue: string|null): ElementsComponents.CSSVariableValueView.CSSVariableValueView {
|
|
651
663
|
return new ElementsComponents.CSSVariableValueView.CSSVariableValueView({
|
|
652
664
|
variableName,
|
|
653
665
|
value: computedValue ?? undefined,
|
|
@@ -663,8 +675,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
663
675
|
return await node.domModel().cssModel().getComputedStyle(nodeId);
|
|
664
676
|
}
|
|
665
677
|
|
|
666
|
-
private async fetchComputedStyleExtraFieldsFor(nodeId: Protocol.DOM.NodeId|
|
|
667
|
-
|
|
678
|
+
private async fetchComputedStyleExtraFieldsFor(nodeId: Protocol.DOM.NodeId|
|
|
679
|
+
undefined): Promise<Protocol.CSS.ComputedStyleExtraFields|null> {
|
|
668
680
|
const node = this.node();
|
|
669
681
|
if (node === null || nodeId === undefined) {
|
|
670
682
|
return null;
|
|
@@ -686,6 +698,7 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
686
698
|
}
|
|
687
699
|
|
|
688
700
|
private resetCache(): void {
|
|
701
|
+
this.isSuppressingResets = false;
|
|
689
702
|
const cssModel = this.cssModel();
|
|
690
703
|
if (cssModel) {
|
|
691
704
|
cssModel.discardCachedMatchedCascade();
|
|
@@ -711,6 +724,9 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
711
724
|
}
|
|
712
725
|
|
|
713
726
|
setEditingStyle(editing: boolean): void {
|
|
727
|
+
if (editing) {
|
|
728
|
+
this.isSuppressingResets = false;
|
|
729
|
+
}
|
|
714
730
|
if (this.isEditingStyle === editing) {
|
|
715
731
|
return;
|
|
716
732
|
}
|
|
@@ -743,8 +759,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
743
759
|
if (!node) {
|
|
744
760
|
continue;
|
|
745
761
|
}
|
|
746
|
-
node.domModel().overlayModel().highlightInOverlay(
|
|
747
|
-
|
|
762
|
+
node.domModel().overlayModel().highlightInOverlay({node: (this.node() as SDK.DOMModel.DOMNode), selectorList},
|
|
763
|
+
mode);
|
|
748
764
|
this.isActivePropertyHighlighted = true;
|
|
749
765
|
break;
|
|
750
766
|
}
|
|
@@ -788,9 +804,17 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
788
804
|
this.requestUpdate();
|
|
789
805
|
}
|
|
790
806
|
|
|
807
|
+
suppressResets(): void {
|
|
808
|
+
this.isSuppressingResets = true;
|
|
809
|
+
}
|
|
810
|
+
|
|
791
811
|
#scheduleResetUpdateIfNotEditing(): void {
|
|
792
812
|
this.scheduleResetUpdateIfNotEditingCalledForTest();
|
|
793
813
|
|
|
814
|
+
if (this.isSuppressingResets) {
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
|
|
794
818
|
// Don't schedule if editing; the edit completion will handle the update.
|
|
795
819
|
if (this.userOperation || this.isEditingStyle) {
|
|
796
820
|
return;
|
|
@@ -805,10 +829,9 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
805
829
|
}
|
|
806
830
|
|
|
807
831
|
#hasAnimatedStyles(animatedStyles: Protocol.CSS.GetAnimatedStylesForNodeResponse): boolean {
|
|
808
|
-
return Boolean(
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
inherited => inherited.animationStyles?.length || inherited.transitionsStyle?.cssProperties.length));
|
|
832
|
+
return Boolean(animatedStyles.animationStyles?.length || animatedStyles.transitionsStyle?.cssProperties.length ||
|
|
833
|
+
animatedStyles.inherited?.some(inherited => inherited.animationStyles?.length ||
|
|
834
|
+
inherited.transitionsStyle?.cssProperties.length));
|
|
812
835
|
}
|
|
813
836
|
|
|
814
837
|
async #updateAnimatedStyles(): Promise<void> {
|
|
@@ -828,8 +851,9 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
828
851
|
|
|
829
852
|
if (!this.#hasAnimatedStyles(animatedStyles)) {
|
|
830
853
|
// A computed style change that doesn't correspond to any animation is
|
|
831
|
-
// likely to be a change in the matched styles
|
|
832
|
-
// update
|
|
854
|
+
// likely to be a change in the matched styles, which is already handled
|
|
855
|
+
// by CSSModelChanged events. We still schedule a reset update here for
|
|
856
|
+
// DevTools garbage collection purposes.
|
|
833
857
|
this.#scheduleResetUpdateIfNotEditing();
|
|
834
858
|
return;
|
|
835
859
|
}
|
|
@@ -838,40 +862,39 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
838
862
|
return;
|
|
839
863
|
}
|
|
840
864
|
|
|
841
|
-
const updateStyleSection =
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
};
|
|
865
|
+
const updateStyleSection = (currentStyle: SDK.CSSStyleDeclaration.CSSStyleDeclaration|null,
|
|
866
|
+
newStyle: Protocol.CSS.CSSStyle|null): void => {
|
|
867
|
+
// The newly fetched matched styles contain a new style.
|
|
868
|
+
if (newStyle) {
|
|
869
|
+
// If the number of CSS properties in the new style
|
|
870
|
+
// differs from the current style, it indicates a potential change
|
|
871
|
+
// in property overrides. In this case, re-fetch the entire style
|
|
872
|
+
// cascade to ensure accurate updates.
|
|
873
|
+
if (currentStyle?.allProperties().length !== newStyle.cssProperties.length) {
|
|
874
|
+
this.#scheduleResetUpdateIfNotEditing();
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
// If the number of properties remains the same, update the
|
|
879
|
+
// existing style properties with the new values from the
|
|
880
|
+
// fetched style.
|
|
881
|
+
currentStyle.allProperties().forEach((property, index) => {
|
|
882
|
+
const newProperty = newStyle.cssProperties[index];
|
|
883
|
+
if (!newProperty) {
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
property.setLocalValue(newProperty.value);
|
|
888
|
+
});
|
|
889
|
+
} else if (currentStyle) {
|
|
890
|
+
// If no new style is fetched while a current style exists,
|
|
891
|
+
// it implies the style has been removed (e.g., animation or
|
|
892
|
+
// transition ended). Trigger a reset and update the UI to
|
|
893
|
+
// reflect this change.
|
|
894
|
+
this.#scheduleResetUpdateIfNotEditing();
|
|
895
|
+
return;
|
|
896
|
+
}
|
|
897
|
+
};
|
|
875
898
|
|
|
876
899
|
updateStyleSection(this.matchedStyles.transitionsStyle() ?? null, animatedStyles.transitionsStyle ?? null);
|
|
877
900
|
|
|
@@ -894,9 +917,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
894
917
|
inheritedStyles.filter(style => style.type === SDK.CSSStyleDeclaration.Type.Transition);
|
|
895
918
|
const newInheritedTransitionsStyles =
|
|
896
919
|
animatedStyles.inherited?.map(inherited => inherited.transitionsStyle)
|
|
897
|
-
.filter(
|
|
898
|
-
|
|
899
|
-
cssProperty => SDK.CSSMetadata.cssMetadata().isPropertyInherited(cssProperty.name))) ??
|
|
920
|
+
.filter(style => style?.cssProperties.some(
|
|
921
|
+
cssProperty => SDK.CSSMetadata.cssMetadata().isPropertyInherited(cssProperty.name))) ??
|
|
900
922
|
[];
|
|
901
923
|
if (currentInheritedTransitionsStyles.length !== newInheritedTransitionsStyles.length) {
|
|
902
924
|
this.#scheduleResetUpdateIfNotEditing();
|
|
@@ -913,9 +935,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
913
935
|
inheritedStyles.filter(style => style.type === SDK.CSSStyleDeclaration.Type.Animation);
|
|
914
936
|
const newInheritedAnimationsStyles =
|
|
915
937
|
animatedStyles.inherited?.flatMap(inherited => inherited.animationStyles)
|
|
916
|
-
.filter(
|
|
917
|
-
|
|
918
|
-
cssProperty => SDK.CSSMetadata.cssMetadata().isPropertyInherited(cssProperty.name))) ??
|
|
938
|
+
.filter(animationStyle => animationStyle?.style.cssProperties.some(
|
|
939
|
+
cssProperty => SDK.CSSMetadata.cssMetadata().isPropertyInherited(cssProperty.name))) ??
|
|
919
940
|
[];
|
|
920
941
|
if (currentInheritedAnimationsStyles.length !== newInheritedAnimationsStyles.length) {
|
|
921
942
|
this.#scheduleResetUpdateIfNotEditing();
|
|
@@ -976,10 +997,12 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
976
997
|
}
|
|
977
998
|
}
|
|
978
999
|
|
|
979
|
-
private async innerRebuildUpdate(
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1000
|
+
private async innerRebuildUpdate(signal: AbortSignal|undefined,
|
|
1001
|
+
matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles|null,
|
|
1002
|
+
computedStyles: Map<string, string>|null,
|
|
1003
|
+
parentsComputedStyles: Map<string, string>|null,
|
|
1004
|
+
computedStyleExtraFields: Protocol.CSS.ComputedStyleExtraFields|
|
|
1005
|
+
null): Promise<void> {
|
|
983
1006
|
// ElementsSidebarPane's throttler schedules this method. Usually,
|
|
984
1007
|
// rebuild is suppressed while editing (see onCSSModelChanged()), but we need a
|
|
985
1008
|
// 'force' flag since the currently running throttler process cannot be canceled.
|
|
@@ -993,9 +1016,15 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
993
1016
|
|
|
994
1017
|
this.#elementsForSyncViewportCheck = [];
|
|
995
1018
|
this.linkifier.reset();
|
|
1019
|
+
const node = this.node();
|
|
1020
|
+
if (this.#lastNode !== node) {
|
|
1021
|
+
// Clear inactive styles when a different node is selected.
|
|
1022
|
+
this.#allKnownBlocks.clear();
|
|
1023
|
+
this.#lastNode = node;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
996
1026
|
const prevSections = this.sectionBlocks.map(block => block.sections).flat();
|
|
997
1027
|
|
|
998
|
-
const node = this.node();
|
|
999
1028
|
this.hasMatchedStyles = matchedStyles !== null && node !== null;
|
|
1000
1029
|
if (!this.hasMatchedStyles) {
|
|
1001
1030
|
this.sectionBlocks = [];
|
|
@@ -1005,9 +1034,9 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1005
1034
|
return;
|
|
1006
1035
|
}
|
|
1007
1036
|
|
|
1008
|
-
const blocks =
|
|
1009
|
-
signal, (matchedStyles as SDK.CSSMatchedStyles.CSSMatchedStyles),
|
|
1010
|
-
|
|
1037
|
+
const blocks =
|
|
1038
|
+
await this.rebuildSectionsForMatchedStyleRules(signal, (matchedStyles as SDK.CSSMatchedStyles.CSSMatchedStyles),
|
|
1039
|
+
computedStyles, parentsComputedStyles, computedStyleExtraFields);
|
|
1011
1040
|
|
|
1012
1041
|
signal?.throwIfAborted();
|
|
1013
1042
|
|
|
@@ -1087,18 +1116,51 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1087
1116
|
this.matchedStyles = matchedStyles;
|
|
1088
1117
|
}
|
|
1089
1118
|
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1119
|
+
setNodeForTest(node: SDK.DOMModel.DOMNode): void {
|
|
1120
|
+
if (this.#lastNode !== node) {
|
|
1121
|
+
this.#allKnownBlocks.clear();
|
|
1122
|
+
this.#lastNode = node;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
private getStyleId(style: SDK.CSSStyleDeclaration.CSSStyleDeclaration): string {
|
|
1127
|
+
if (style.range) {
|
|
1128
|
+
return `${style.styleSheetId || ''}:${style.range.toString()}`;
|
|
1129
|
+
}
|
|
1130
|
+
if (style.type === SDK.CSSStyleDeclaration.Type.Inline || style.type === SDK.CSSStyleDeclaration.Type.Attributes) {
|
|
1131
|
+
return style.type;
|
|
1132
|
+
}
|
|
1133
|
+
if (style.type === SDK.CSSStyleDeclaration.Type.Animation) {
|
|
1134
|
+
return `${style.type}:${style.animationName() || ''}:${style.cssText}`;
|
|
1135
|
+
}
|
|
1136
|
+
const parentRule = style.parentRule;
|
|
1137
|
+
if (parentRule instanceof SDK.CSSRule.CSSStyleRule) {
|
|
1138
|
+
return `${style.type}:${parentRule.selectorText()}`;
|
|
1139
|
+
}
|
|
1140
|
+
if (parentRule instanceof SDK.CSSRule.CSSKeyframeRule) {
|
|
1141
|
+
return `${style.type}:${parentRule.parentRuleName()}:${parentRule.key().text}`;
|
|
1142
|
+
}
|
|
1143
|
+
if (parentRule instanceof SDK.CSSRule.CSSPropertyRule) {
|
|
1144
|
+
return `${style.type}:${parentRule.propertyName().text}`;
|
|
1145
|
+
}
|
|
1146
|
+
return `${style.type}:${style.cssText}`;
|
|
1096
1147
|
}
|
|
1097
1148
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1149
|
+
rebuildSectionsForMatchedStyleRulesForTest(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
1150
|
+
computedStyles: Map<string, string>|null,
|
|
1151
|
+
parentsComputedStyles: Map<string, string>|null,
|
|
1152
|
+
computedStyleExtraFields: Protocol.CSS.ComputedStyleExtraFields|
|
|
1153
|
+
null): Promise<SectionBlock[]> {
|
|
1154
|
+
return this.rebuildSectionsForMatchedStyleRules(undefined, matchedStyles, computedStyles, parentsComputedStyles,
|
|
1155
|
+
computedStyleExtraFields);
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
private async rebuildSectionsForMatchedStyleRules(signal: AbortSignal|undefined,
|
|
1159
|
+
matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
1160
|
+
computedStyles: Map<string, string>|null,
|
|
1161
|
+
parentsComputedStyles: Map<string, string>|null,
|
|
1162
|
+
computedStyleExtraFields: Protocol.CSS.ComputedStyleExtraFields|
|
|
1163
|
+
null): Promise<SectionBlock[]> {
|
|
1102
1164
|
if (this.idleCallbackManager) {
|
|
1103
1165
|
this.idleCallbackManager.discard();
|
|
1104
1166
|
}
|
|
@@ -1109,7 +1171,7 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1109
1171
|
let sectionIdx = 0;
|
|
1110
1172
|
let lastParentNode: SDK.DOMModel.DOMNode|null = null;
|
|
1111
1173
|
|
|
1112
|
-
let lastLayerParent: SectionBlock|undefined;
|
|
1174
|
+
let lastLayerParent: SectionBlock|undefined = blocks[0];
|
|
1113
1175
|
let lastLayers: SDK.CSSLayer.CSSLayer[]|null = null;
|
|
1114
1176
|
let sawLayers = false;
|
|
1115
1177
|
|
|
@@ -1141,12 +1203,15 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1141
1203
|
// Always render eagerly for layout tests.
|
|
1142
1204
|
this.#shouldRenderLazily = !Host.InspectorFrontendHost.isUnderTest() && totalProperties > LAZY_RENDER_THRESHOLD;
|
|
1143
1205
|
|
|
1144
|
-
|
|
1206
|
+
const activeStyles = matchedStyles.nodeStyles().filter(style => {
|
|
1207
|
+
const isTransitionOrAnimationStyle = style.type === SDK.CSSStyleDeclaration.Type.Transition ||
|
|
1208
|
+
style.type === SDK.CSSStyleDeclaration.Type.Animation;
|
|
1209
|
+
return !isTransitionOrAnimationStyle || animationsPanelVisible || !cssAnimationsOnlyWhenAnimationsTabOpen;
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
for (const style of activeStyles) {
|
|
1145
1213
|
const isTransitionOrAnimationStyle = style.type === SDK.CSSStyleDeclaration.Type.Transition ||
|
|
1146
1214
|
style.type === SDK.CSSStyleDeclaration.Type.Animation;
|
|
1147
|
-
if (isTransitionOrAnimationStyle && cssAnimationsOnlyWhenAnimationsTabOpen && !animationsPanelVisible) {
|
|
1148
|
-
continue;
|
|
1149
|
-
}
|
|
1150
1215
|
|
|
1151
1216
|
const parentNode = matchedStyles.isInherited(style) ? matchedStyles.nodeForStyle(style) : null;
|
|
1152
1217
|
if (parentNode && parentNode !== lastParentNode) {
|
|
@@ -1164,8 +1229,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1164
1229
|
if (signal?.aborted) {
|
|
1165
1230
|
return;
|
|
1166
1231
|
}
|
|
1167
|
-
const section = new StylePropertiesSection(
|
|
1168
|
-
|
|
1232
|
+
const section = new StylePropertiesSection(this, matchedStyles, style, sectionIdx, computedStyles,
|
|
1233
|
+
parentsComputedStyles, computedStyleExtraFields);
|
|
1169
1234
|
sectionIdx++;
|
|
1170
1235
|
lastBlock.sections.push(section);
|
|
1171
1236
|
});
|
|
@@ -1284,8 +1349,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1284
1349
|
if (signal?.aborted) {
|
|
1285
1350
|
return;
|
|
1286
1351
|
}
|
|
1287
|
-
block.sections.push(new PositionTryRuleSection(
|
|
1288
|
-
|
|
1352
|
+
block.sections.push(new PositionTryRuleSection(this, matchedStyles, positionTryRule.style, sectionIdx,
|
|
1353
|
+
positionTryRule.active()));
|
|
1289
1354
|
sectionIdx++;
|
|
1290
1355
|
});
|
|
1291
1356
|
blocks.push(block);
|
|
@@ -1299,8 +1364,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1299
1364
|
if (signal?.aborted) {
|
|
1300
1365
|
return;
|
|
1301
1366
|
}
|
|
1302
|
-
block.sections.push(new RegisteredPropertiesSection(
|
|
1303
|
-
|
|
1367
|
+
block.sections.push(new RegisteredPropertiesSection(this, matchedStyles, propertyRule.style(), sectionIdx,
|
|
1368
|
+
propertyRule.propertyName(), expandedByDefault));
|
|
1304
1369
|
sectionIdx++;
|
|
1305
1370
|
});
|
|
1306
1371
|
}
|
|
@@ -1315,9 +1380,9 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1315
1380
|
if (signal?.aborted) {
|
|
1316
1381
|
return;
|
|
1317
1382
|
}
|
|
1318
|
-
block.sections.push(new FunctionRuleSection(
|
|
1319
|
-
|
|
1320
|
-
|
|
1383
|
+
block.sections.push(new FunctionRuleSection(this, matchedStyles, functionRule.style, functionRule.children(),
|
|
1384
|
+
sectionIdx, functionRule.nameWithParameters(),
|
|
1385
|
+
expandedByDefault));
|
|
1321
1386
|
sectionIdx++;
|
|
1322
1387
|
});
|
|
1323
1388
|
}
|
|
@@ -1336,7 +1401,59 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1336
1401
|
|
|
1337
1402
|
await this.idleCallbackManager.awaitDone();
|
|
1338
1403
|
|
|
1339
|
-
|
|
1404
|
+
const showInactiveCSSRules = Common.Settings.Settings.instance().moduleSetting('show-inactive-css-rules').get();
|
|
1405
|
+
if (!showInactiveCSSRules) {
|
|
1406
|
+
return blocks;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
return this.mergeInactiveStyles(blocks);
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
private computeBlockIds(blocks: SectionBlock[]): Map<SectionBlock, string> {
|
|
1413
|
+
let nullBlockCounter = 0;
|
|
1414
|
+
const blockIds = new Map<SectionBlock, string>();
|
|
1415
|
+
for (const block of blocks) {
|
|
1416
|
+
blockIds.set(block, block.titleElement()?.textContent || `MAIN_BLOCK_NULL_${nullBlockCounter++}`);
|
|
1417
|
+
}
|
|
1418
|
+
return blockIds;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
private mergeInactiveStyles(blocks: SectionBlock[]): SectionBlock[] {
|
|
1422
|
+
const blockIds = this.computeBlockIds(blocks);
|
|
1423
|
+
for (const [id, block] of this.#allKnownBlocks) {
|
|
1424
|
+
if (!blockIds.has(block)) {
|
|
1425
|
+
blockIds.set(block, id);
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
const getBlockId = (block: SectionBlock): string => blockIds.get(block) || 'UNKNOWN_BLOCK';
|
|
1429
|
+
|
|
1430
|
+
for (const block of blocks) {
|
|
1431
|
+
const bid = getBlockId(block);
|
|
1432
|
+
const knownBlock = this.#allKnownBlocks.get(bid);
|
|
1433
|
+
if (knownBlock) {
|
|
1434
|
+
block.sections = mergeOrderedItems(
|
|
1435
|
+
knownBlock.sections,
|
|
1436
|
+
block.sections,
|
|
1437
|
+
section => this.getStyleId(section.styleInternal),
|
|
1438
|
+
section => section.setInactive(true),
|
|
1439
|
+
);
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
const oldBlocks = Array.from(this.#allKnownBlocks.values());
|
|
1444
|
+
const finalBlocks = mergeOrderedItems(
|
|
1445
|
+
oldBlocks,
|
|
1446
|
+
blocks,
|
|
1447
|
+
getBlockId,
|
|
1448
|
+
block => block.sections.forEach(section => section.setInactive(true)),
|
|
1449
|
+
);
|
|
1450
|
+
|
|
1451
|
+
this.#allKnownBlocks.clear();
|
|
1452
|
+
for (const block of finalBlocks) {
|
|
1453
|
+
this.#allKnownBlocks.set(getBlockId(block), block);
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
return finalBlocks;
|
|
1340
1457
|
}
|
|
1341
1458
|
|
|
1342
1459
|
async createNewRuleInViaInspectorStyleSheet(): Promise<void> {
|
|
@@ -1353,8 +1470,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1353
1470
|
await this.createNewRuleInStyleSheet(styleSheetHeader);
|
|
1354
1471
|
}
|
|
1355
1472
|
|
|
1356
|
-
private async createNewRuleInStyleSheet(styleSheetHeader: SDK.CSSStyleSheetHeader.CSSStyleSheetHeader|
|
|
1357
|
-
|
|
1473
|
+
private async createNewRuleInStyleSheet(styleSheetHeader: SDK.CSSStyleSheetHeader.CSSStyleSheetHeader|
|
|
1474
|
+
null): Promise<void> {
|
|
1358
1475
|
if (!styleSheetHeader) {
|
|
1359
1476
|
return;
|
|
1360
1477
|
}
|
|
@@ -1368,13 +1485,13 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1368
1485
|
}
|
|
1369
1486
|
}
|
|
1370
1487
|
|
|
1371
|
-
addBlankSection(
|
|
1372
|
-
|
|
1373
|
-
|
|
1488
|
+
addBlankSection(insertAfterSection: StylePropertiesSection,
|
|
1489
|
+
styleSheetHeader: SDK.CSSStyleSheetHeader.CSSStyleSheetHeader,
|
|
1490
|
+
ruleLocation: TextUtils.TextRange.TextRange): void {
|
|
1374
1491
|
const node = this.node();
|
|
1375
|
-
const blankSection =
|
|
1376
|
-
this, insertAfterSection.matchedStyles, node ? node.simpleSelector() : '',
|
|
1377
|
-
|
|
1492
|
+
const blankSection =
|
|
1493
|
+
new BlankStylePropertiesSection(this, insertAfterSection.matchedStyles, node ? node.simpleSelector() : '',
|
|
1494
|
+
styleSheetHeader, ruleLocation, insertAfterSection.style(), 0);
|
|
1378
1495
|
|
|
1379
1496
|
this.sectionsContainer.contentElement.insertBefore(blankSection.element, insertAfterSection.element.nextSibling);
|
|
1380
1497
|
|
|
@@ -1425,6 +1542,9 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1425
1542
|
override wasShown(): void {
|
|
1426
1543
|
UI.Context.Context.instance().setFlavor(StylesSidebarPane, this);
|
|
1427
1544
|
super.wasShown();
|
|
1545
|
+
if (this.#aiCodeCompletionEnabled && !this.#aiCodeCompletionSummaryToolbar) {
|
|
1546
|
+
this.#createAiCodeCompletionSummaryToolbar();
|
|
1547
|
+
}
|
|
1428
1548
|
}
|
|
1429
1549
|
|
|
1430
1550
|
override willHide(): void {
|
|
@@ -1464,9 +1584,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1464
1584
|
const hbox = container.createChild('div', 'hbox styles-sidebar-pane-toolbar');
|
|
1465
1585
|
const toolbar = hbox.createChild('devtools-toolbar', 'styles-pane-toolbar');
|
|
1466
1586
|
toolbar.role = 'presentation';
|
|
1467
|
-
const filterInput = new UI.Toolbar.ToolbarFilter(
|
|
1468
|
-
|
|
1469
|
-
this.onRegexToggled.bind(this));
|
|
1587
|
+
const filterInput = new UI.Toolbar.ToolbarFilter(undefined, 1, 1, undefined, undefined, false, undefined, undefined,
|
|
1588
|
+
/* showRegexToggle=*/ true, this.onRegexToggled.bind(this));
|
|
1470
1589
|
filterInput.addEventListener(UI.Toolbar.ToolbarInput.Event.TEXT_CHANGED, this.onFilterChanged, this);
|
|
1471
1590
|
toolbar.appendToolbarItem(filterInput);
|
|
1472
1591
|
void toolbar.appendItemsAtLocation('styles-sidebarpane-toolbar');
|
|
@@ -1565,8 +1684,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1565
1684
|
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.emulateAutoDarkModeSettingDescriptor);
|
|
1566
1685
|
const decorateStatus = (condition: boolean, title: string): string => `${condition ? '✓ ' : ''}${title}`;
|
|
1567
1686
|
|
|
1568
|
-
const button = new UI.Toolbar.ToolbarToggle(
|
|
1569
|
-
|
|
1687
|
+
const button = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.toggleRenderingEmulations), 'brush',
|
|
1688
|
+
'brush-filled', undefined, false);
|
|
1570
1689
|
button.element.setAttribute('jslog', `${VisualLogging.dropDown('rendering-emulations').track({click: true})}`);
|
|
1571
1690
|
button.element.addEventListener('click', event => {
|
|
1572
1691
|
const boundingRect = button.element.getBoundingClientRect();
|
|
@@ -1611,7 +1730,12 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1611
1730
|
}
|
|
1612
1731
|
|
|
1613
1732
|
#createAiCodeCompletionSummaryToolbar(): void {
|
|
1614
|
-
if (this.#aiCodeCompletionSummaryToolbar) {
|
|
1733
|
+
if (!this.#aiCodeCompletionEnabled || this.#aiCodeCompletionSummaryToolbar) {
|
|
1734
|
+
return;
|
|
1735
|
+
}
|
|
1736
|
+
const containingPane =
|
|
1737
|
+
this.contentElement.enclosingNodeOrSelfWithClass('style-panes-wrapper') as HTMLElement | null;
|
|
1738
|
+
if (!containingPane) {
|
|
1615
1739
|
return;
|
|
1616
1740
|
}
|
|
1617
1741
|
this.#aiCodeCompletionSummaryToolbar =
|
|
@@ -1621,7 +1745,6 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1621
1745
|
spinnerTooltipId: SPINNER_TOOLTIP_ID,
|
|
1622
1746
|
disclaimerTextVariant: 'styles',
|
|
1623
1747
|
});
|
|
1624
|
-
const containingPane = this.contentElement.enclosingNodeOrSelfWithClass('style-panes-wrapper') as HTMLElement;
|
|
1625
1748
|
this.#aiCodeCompletionSummaryToolbarContainer =
|
|
1626
1749
|
containingPane.createChild('div', 'ai-code-completion-summary-toolbar-container');
|
|
1627
1750
|
this.#aiCodeCompletionSummaryToolbarContainer.role = 'toolbar';
|
|
@@ -1782,9 +1905,8 @@ export class SectionBlock {
|
|
|
1782
1905
|
return new SectionBlock(separatorElement);
|
|
1783
1906
|
}
|
|
1784
1907
|
|
|
1785
|
-
static async createInheritedPseudoTypeBlock(
|
|
1786
|
-
|
|
1787
|
-
node: SDK.DOMModel.DOMNode): Promise<SectionBlock> {
|
|
1908
|
+
static async createInheritedPseudoTypeBlock(pseudoType: Protocol.DOM.PseudoType, pseudoArgument: string|null,
|
|
1909
|
+
node: SDK.DOMModel.DOMNode): Promise<SectionBlock> {
|
|
1788
1910
|
const separatorElement = document.createElement('div');
|
|
1789
1911
|
separatorElement.className = 'sidebar-separator';
|
|
1790
1912
|
separatorElement.setAttribute('jslog', `${VisualLogging.sectionHeader('inherited-pseudotype')}`);
|
|
@@ -2141,9 +2263,8 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
2141
2263
|
|
|
2142
2264
|
// Handle numeric value increment/decrement only at this point.
|
|
2143
2265
|
if (!this.isEditingName && this.treeElement.valueElement &&
|
|
2144
|
-
UI.UIUtils.handleElementValueModifications(
|
|
2145
|
-
|
|
2146
|
-
customNumberHandler.bind(this))) {
|
|
2266
|
+
UI.UIUtils.handleElementValueModifications(event, this.treeElement.valueElement, finishHandler.bind(this),
|
|
2267
|
+
this.isValueSuggestion.bind(this), customNumberHandler.bind(this))) {
|
|
2147
2268
|
return true;
|
|
2148
2269
|
}
|
|
2149
2270
|
|
|
@@ -2158,8 +2279,8 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
2158
2279
|
return this.cssCompletions.indexOf(word) !== -1 || word.startsWith('--');
|
|
2159
2280
|
}
|
|
2160
2281
|
|
|
2161
|
-
private async buildPropertyCompletions(expression: string, query: string,
|
|
2162
|
-
|
|
2282
|
+
private async buildPropertyCompletions(expression: string, query: string,
|
|
2283
|
+
force?: boolean): Promise<UI.SuggestBox.Suggestions> {
|
|
2163
2284
|
const lowerQuery = query.toLowerCase();
|
|
2164
2285
|
const editingVariable = !this.isEditingName && expression.trim().endsWith('var(');
|
|
2165
2286
|
if (this.isEditingName && expression) {
|
|
@@ -2204,8 +2325,8 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
2204
2325
|
const node = this.treeElement.node();
|
|
2205
2326
|
if (this.isEditingName && node) {
|
|
2206
2327
|
const nameValuePresets = SDK.CSSMetadata.cssMetadata().nameValuePresets(node.isSVGNode());
|
|
2207
|
-
nameValuePresets.forEach(
|
|
2208
|
-
|
|
2328
|
+
nameValuePresets.forEach(preset =>
|
|
2329
|
+
filterCompletions.call(this, preset, false /* variable */, true /* nameValue */));
|
|
2209
2330
|
}
|
|
2210
2331
|
if (this.isEditingName || editingVariable) {
|
|
2211
2332
|
this.cssVariables.forEach(variable => filterCompletions.call(this, variable, true /* variable */));
|
|
@@ -2285,8 +2406,8 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
2285
2406
|
}
|
|
2286
2407
|
return await Promise.resolve(results);
|
|
2287
2408
|
|
|
2288
|
-
function filterCompletions(
|
|
2289
|
-
|
|
2409
|
+
function filterCompletions(this: CSSPropertyPrompt, completion: string, variable: boolean,
|
|
2410
|
+
nameValue?: boolean): void {
|
|
2290
2411
|
const index = completion.toLowerCase().indexOf(lowerQuery);
|
|
2291
2412
|
const result: CompletionResult = {
|
|
2292
2413
|
text: completion,
|
|
@@ -2377,8 +2498,8 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
2377
2498
|
if (!cssModel) {
|
|
2378
2499
|
return;
|
|
2379
2500
|
}
|
|
2380
|
-
await this.aiCodeCompletionProvider.triggerAiCodeCompletion(
|
|
2381
|
-
|
|
2501
|
+
await this.aiCodeCompletionProvider.triggerAiCodeCompletion(userInput, range.endOffset, this.isEditingName,
|
|
2502
|
+
this.treeElement.property, cssModel);
|
|
2382
2503
|
}
|
|
2383
2504
|
|
|
2384
2505
|
private setAiAutoCompletion(args: {
|
|
@@ -2521,9 +2642,9 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
2521
2642
|
const suggestionText = this.treeElement.section().activeAiSuggestion?.text;
|
|
2522
2643
|
await this.treeElement.section().commitActiveAiSuggestion();
|
|
2523
2644
|
if (this.activeAiSuggestionInfo) {
|
|
2524
|
-
this.aiCodeCompletionProvider?.onSuggestionAccepted(
|
|
2525
|
-
|
|
2526
|
-
|
|
2645
|
+
this.aiCodeCompletionProvider?.onSuggestionAccepted(this.activeAiSuggestionInfo.citations,
|
|
2646
|
+
this.activeAiSuggestionInfo.rpcGlobalId,
|
|
2647
|
+
this.activeAiSuggestionInfo.sampleId);
|
|
2527
2648
|
}
|
|
2528
2649
|
if (suggestionText) {
|
|
2529
2650
|
UI.ARIAUtils.LiveAnnouncer.status(i18nString(UIStrings.aiSuggestionAccepted, {PH1: suggestionText}));
|
|
@@ -2569,6 +2690,43 @@ export function escapeUrlAsCssComment(urlText: string): string {
|
|
|
2569
2690
|
return url.toString();
|
|
2570
2691
|
}
|
|
2571
2692
|
|
|
2693
|
+
/**
|
|
2694
|
+
* Merges a newly active list of items with an existing (previously known) list of items,
|
|
2695
|
+
* preserving the relative order of inactive items while updating and inserting active items.
|
|
2696
|
+
*/
|
|
2697
|
+
export function mergeOrderedItems<T>(
|
|
2698
|
+
oldItems: T[],
|
|
2699
|
+
newItems: T[],
|
|
2700
|
+
getId: (item: T) => string,
|
|
2701
|
+
markInactive: (item: T) => void,
|
|
2702
|
+
): T[] {
|
|
2703
|
+
const newIds = new Set(newItems.map(getId));
|
|
2704
|
+
const merged: T[] = [];
|
|
2705
|
+
let newIdx = 0;
|
|
2706
|
+
|
|
2707
|
+
for (const oldItem of oldItems) {
|
|
2708
|
+
const oldId = getId(oldItem);
|
|
2709
|
+
if (newIds.has(oldId)) {
|
|
2710
|
+
while (newIdx < newItems.length) {
|
|
2711
|
+
const newItem = newItems[newIdx++];
|
|
2712
|
+
merged.push(newItem);
|
|
2713
|
+
if (getId(newItem) === oldId) {
|
|
2714
|
+
break;
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
} else {
|
|
2718
|
+
markInactive(oldItem);
|
|
2719
|
+
merged.push(oldItem);
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
while (newIdx < newItems.length) {
|
|
2724
|
+
merged.push(newItems[newIdx++]);
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
return merged;
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2572
2730
|
export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
2573
2731
|
handleAction(_context: UI.Context.Context, actionId: string): boolean {
|
|
2574
2732
|
switch (actionId) {
|