chrome-devtools-frontend 1.0.1684555 → 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/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/ServiceWorkerManager.ts +75 -17
- 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/node_app/app/nodeConnectionsPanel.css +5 -5
- package/front_end/entrypoints/node_app/node_app.ts +1 -1
- package/front_end/generated/ARIAProperties.ts +39 -1
- package/front_end/generated/InspectorBackendCommands.ts +2 -1
- package/front_end/generated/SupportedCSSProperties.ts +60 -119
- package/front_end/generated/protocol-mapping.d.ts +9 -0
- package/front_end/generated/protocol-proxy-api.d.ts +7 -0
- package/front_end/generated/protocol.ts +12 -2
- package/front_end/models/ai_assistance/AiAgent2.ts +13 -7
- package/front_end/models/ai_assistance/AiConversation.ts +8 -17
- 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 +29 -6
- 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 +7 -5
- 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 +8 -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 +3 -2
- 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 +17 -4
- 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 +16 -4
- 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 +9 -9
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +9 -8
- package/front_end/models/ai_assistance/tools/Tool.ts +21 -11
- 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/GenericIssue.ts +18 -18
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +1 -1
- package/front_end/models/javascript_metadata/{NativeFunctions.js → NativeFunctions.ts} +25 -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 +1 -1
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -1
- 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/BackgroundServiceView.ts +290 -252
- 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 +6 -3
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -1
- package/front_end/panels/console/console-meta.ts +5 -24
- 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/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +130 -94
- package/front_end/panels/elements/ElementsTreeOutline.ts +1751 -363
- package/front_end/panels/elements/ShortcutTreeElement.ts +6 -3
- package/front_end/panels/elements/StylePropertiesSection.ts +65 -8
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +143 -8
- 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/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/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/LiveMetricsView.ts +1 -1
- 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/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 +15 -4
- 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 +3 -3
- 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 +19 -26
- 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 +16 -16
- 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 +80 -20
- 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.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/ChartViewport.ts +28 -11
- 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/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/ResourceSourceFrame.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/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 +34 -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
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
.overview-completed-view {
|
|
9
9
|
overflow: auto;
|
|
10
10
|
|
|
11
|
-
--overview-default-padding:
|
|
12
|
-
--overview-icon-padding:
|
|
11
|
+
--overview-default-padding: var(--sys-size-12);
|
|
12
|
+
--overview-icon-padding: var(--sys-size-13);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.overview-completed-view .summary ul,
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
.overview-completed-view .summary ul {
|
|
25
25
|
display: grid;
|
|
26
26
|
grid-template-columns: repeat(auto-fill, 140px);
|
|
27
|
-
gap:
|
|
27
|
+
gap: var(--sys-size-8);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.overview-completed-view .colors ul li {
|
|
31
31
|
display: inline-block;
|
|
32
|
-
margin: 0 0
|
|
33
|
-
padding: 0
|
|
32
|
+
margin: 0 0 var(--sys-size-8);
|
|
33
|
+
padding: 0 var(--sys-size-5) 0 0;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.overview-completed-view .summary ul li {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.overview-completed-view li .label {
|
|
43
|
-
font-size:
|
|
44
|
-
padding-bottom:
|
|
43
|
+
font-size: var(--sys-typescale-body4-size);
|
|
44
|
+
padding-bottom: var(--sys-size-2);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.overview-completed-view li .value {
|
|
@@ -85,17 +85,17 @@
|
|
|
85
85
|
width: 65px;
|
|
86
86
|
height: 25px;
|
|
87
87
|
border-radius: 3px;
|
|
88
|
-
margin-right:
|
|
88
|
+
margin-right: var(--sys-size-8);
|
|
89
89
|
|
|
90
90
|
&:focus-visible {
|
|
91
|
-
outline:
|
|
92
|
-
outline-offset:
|
|
91
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
92
|
+
outline-offset: var(--sys-size-2);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
.block-title {
|
|
97
|
-
padding-top:
|
|
98
|
-
font-size:
|
|
97
|
+
padding-top: var(--sys-size-3);
|
|
98
|
+
font-size: var(--sys-typescale-body4-size);
|
|
99
99
|
color: var(--sys-color-on-surface);
|
|
100
100
|
letter-spacing: 0;
|
|
101
101
|
text-transform: uppercase;
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
|
|
114
114
|
.results-section {
|
|
115
115
|
flex-shrink: 0;
|
|
116
|
-
border-bottom:
|
|
116
|
+
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
|
|
117
117
|
padding: var(--overview-default-padding) 0 var(--overview-default-padding) 0;
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
font-size: 15px;
|
|
127
127
|
font-weight: normal;
|
|
128
128
|
padding: 0;
|
|
129
|
-
margin: 0 0
|
|
129
|
+
margin: 0 0 var(--sys-size-9);
|
|
130
130
|
padding-left: calc(var(--overview-default-padding) + var(--overview-icon-padding));
|
|
131
131
|
position: relative;
|
|
132
132
|
height: 26px;
|
|
@@ -179,8 +179,8 @@
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
.results-section.colors h2 {
|
|
182
|
-
margin-top:
|
|
183
|
-
font-size:
|
|
182
|
+
margin-top: var(--sys-size-9);
|
|
183
|
+
font-size: var(--sys-typescale-body3-size);
|
|
184
184
|
font-weight: normal;
|
|
185
185
|
}
|
|
186
186
|
|
|
@@ -198,8 +198,8 @@
|
|
|
198
198
|
.overview-completed-view .unused-declarations ul li {
|
|
199
199
|
display: grid;
|
|
200
200
|
grid-template-columns: 2fr 3fr;
|
|
201
|
-
gap:
|
|
202
|
-
margin-bottom:
|
|
201
|
+
gap: var(--sys-size-6);
|
|
202
|
+
margin-bottom: var(--sys-size-3);
|
|
203
203
|
align-items: center;
|
|
204
204
|
}
|
|
205
205
|
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
.overview-completed-view .unused-declarations button .details {
|
|
209
209
|
min-width: 100px;
|
|
210
210
|
text-align: right;
|
|
211
|
-
margin-right:
|
|
211
|
+
margin-right: var(--sys-size-5);
|
|
212
212
|
color: var(--sys-color-primary);
|
|
213
213
|
pointer-events: none;
|
|
214
214
|
}
|
|
@@ -223,10 +223,10 @@
|
|
|
223
223
|
.overview-completed-view .font-info button .bar,
|
|
224
224
|
.overview-completed-view .media-queries button .bar,
|
|
225
225
|
.overview-completed-view .unused-declarations button .bar {
|
|
226
|
-
height:
|
|
226
|
+
height: var(--sys-size-5);
|
|
227
227
|
background: var(--sys-color-primary-bright);
|
|
228
|
-
border-radius:
|
|
229
|
-
min-width:
|
|
228
|
+
border-radius: var(--sys-size-2);
|
|
229
|
+
min-width: var(--sys-size-2);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
.overview-completed-view .font-info button,
|
|
@@ -238,17 +238,17 @@
|
|
|
238
238
|
margin: 0;
|
|
239
239
|
display: flex;
|
|
240
240
|
align-items: center;
|
|
241
|
-
border-radius:
|
|
241
|
+
border-radius: var(--sys-size-2);
|
|
242
242
|
cursor: pointer;
|
|
243
|
-
height:
|
|
243
|
+
height: var(--sys-size-12);
|
|
244
244
|
background: none;
|
|
245
245
|
|
|
246
246
|
&:focus-visible {
|
|
247
|
-
outline:
|
|
247
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
&:hover {
|
|
251
|
-
border-radius:
|
|
251
|
+
border-radius: var(--sys-shape-corner-medium-small);
|
|
252
252
|
background: var(--sys-color-state-hover-on-subtle);
|
|
253
253
|
}
|
|
254
254
|
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
.overview-completed-view .font-info .font-metric {
|
|
268
268
|
display: grid;
|
|
269
269
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
270
|
-
gap:
|
|
270
|
+
gap: var(--sys-size-6);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
.overview-completed-view .font-info ul {
|
|
@@ -279,13 +279,13 @@
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
.overview-completed-view .font-info h2 {
|
|
282
|
-
font-size:
|
|
282
|
+
font-size: var(--sys-typescale-body2-size);
|
|
283
283
|
font-weight: bold;
|
|
284
284
|
margin: 0 0 1em;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
.overview-completed-view .font-info h3 {
|
|
288
|
-
font-size:
|
|
288
|
+
font-size: var(--sys-typescale-body3-size);
|
|
289
289
|
font-weight: normal;
|
|
290
290
|
font-style: italic;
|
|
291
291
|
margin: 0 0 0.5em;
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
.contrast-warning {
|
|
311
311
|
display: flex;
|
|
312
312
|
align-items: center;
|
|
313
|
-
margin-top:
|
|
313
|
+
margin-top: var(--sys-size-2);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
.contrast-warning .threshold-label {
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
.contrast-warning devtools-icon {
|
|
322
|
-
margin-left:
|
|
322
|
+
margin-left: var(--sys-size-2);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
.contrast-preview {
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
|
|
339
339
|
::part(node-id-column) {
|
|
340
340
|
align-items: center;
|
|
341
|
-
height:
|
|
341
|
+
height: var(--sys-size-9);
|
|
342
342
|
|
|
343
343
|
--show-element-display: none;
|
|
344
344
|
}
|
|
@@ -350,8 +350,8 @@
|
|
|
350
350
|
|
|
351
351
|
::part(show-element) {
|
|
352
352
|
display: var(--show-element-display);
|
|
353
|
-
height:
|
|
354
|
-
width:
|
|
353
|
+
height: var(--sys-size-8);
|
|
354
|
+
width: var(--sys-size-8);
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
.results-section.colors {
|
|
@@ -6,24 +6,24 @@
|
|
|
6
6
|
|
|
7
7
|
.overview-processing-view {
|
|
8
8
|
overflow: hidden;
|
|
9
|
-
padding:
|
|
9
|
+
padding: var(--sys-size-8);
|
|
10
10
|
justify-content: center;
|
|
11
11
|
align-items: center;
|
|
12
12
|
height: 100%;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.overview-processing-view h1 {
|
|
16
|
-
font-size:
|
|
16
|
+
font-size: var(--sys-typescale-body1-size);
|
|
17
17
|
text-align: center;
|
|
18
18
|
font-weight: normal;
|
|
19
19
|
margin: 0;
|
|
20
|
-
padding:
|
|
20
|
+
padding: var(--sys-size-5);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.overview-processing-view h2 {
|
|
24
|
-
font-size:
|
|
24
|
+
font-size: var(--sys-typescale-body4-size);
|
|
25
25
|
text-align: center;
|
|
26
26
|
font-weight: normal;
|
|
27
27
|
margin: 0;
|
|
28
|
-
padding-top:
|
|
28
|
+
padding-top: var(--sys-size-13);
|
|
29
29
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.css-overview-start-view {
|
|
13
|
-
padding:
|
|
13
|
+
padding: var(--sys-size-11);
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
16
|
background-color: var(--sys-color-cdt-base-container);
|
|
@@ -22,22 +22,22 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.preview-feature {
|
|
25
|
-
padding:
|
|
26
|
-
border:
|
|
25
|
+
padding: var(--sys-size-6) var(--sys-size-8);
|
|
26
|
+
border: var(--sys-size-1) solid var(--sys-color-neutral-outline);
|
|
27
27
|
color: var(--sys-color-on-surface);
|
|
28
|
-
font-size:
|
|
29
|
-
line-height:
|
|
30
|
-
border-radius:
|
|
28
|
+
font-size: var(--sys-typescale-body3-size);
|
|
29
|
+
line-height: var(--sys-typescale-body3-line-height);
|
|
30
|
+
border-radius: var(--sys-shape-corner-medium-small);
|
|
31
31
|
margin: 42px 0;
|
|
32
32
|
letter-spacing: 0.01em;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.preview-header {
|
|
36
36
|
color: var(--sys-color-primary);
|
|
37
|
-
font-size:
|
|
38
|
-
line-height:
|
|
37
|
+
font-size: var(--sys-typescale-body3-size);
|
|
38
|
+
line-height: var(--sys-typescale-body3-line-height);
|
|
39
39
|
letter-spacing: 0.01em;
|
|
40
|
-
margin: 9px 0
|
|
40
|
+
margin: 9px 0 var(--sys-size-7);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.preview-icon {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.feedback-prompt {
|
|
48
|
-
margin-bottom:
|
|
48
|
+
margin-bottom: var(--sys-size-11);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.feedback-prompt .devtools-link {
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.thumbnail-wrapper {
|
|
63
|
-
width:
|
|
63
|
+
width: var(--sys-size-22);
|
|
64
64
|
height: 92px;
|
|
65
|
-
margin-right:
|
|
65
|
+
margin-right: var(--sys-size-9);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.video-doc-header {
|
|
69
|
-
font-size:
|
|
70
|
-
line-height:
|
|
69
|
+
font-size: var(--sys-typescale-body3-size);
|
|
70
|
+
line-height: var(--sys-typescale-body3-line-height);
|
|
71
71
|
letter-spacing: 0.04em;
|
|
72
72
|
color: var(--sys-color-on-surface);
|
|
73
|
-
margin-bottom:
|
|
73
|
+
margin-bottom: var(--sys-size-2);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
devtools-feedback-button {
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.resources .devtools-link {
|
|
81
|
-
font-size:
|
|
82
|
-
line-height:
|
|
81
|
+
font-size: var(--sys-typescale-body2-size);
|
|
82
|
+
line-height: var(--sys-size-10);
|
|
83
83
|
letter-spacing: 0.04em;
|
|
84
84
|
text-decoration-line: underline;
|
|
85
85
|
color: var(--sys-color-primary);
|
|
@@ -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
|
}
|