chrome-devtools-frontend 1.0.1738725 → 1.0.1742811
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/rules/ui-and-widgets/ui-accessibility-and-semantic-html.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +44 -7
- package/.agents/rules/ui-and-widgets/ui-lit-declarative-templates-and-directives.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-view-output-and-callback-contracts.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-widget-dom-and-listener-lifecycle.md +1 -1
- package/.agents/skills/code-review/SKILL.md +23 -6
- package/.agents/skills/devtools-verification/SKILL.md +2 -1
- package/.agents/skills/migrate-chromium-test/SKILL.md +1 -0
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +27 -11
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +41 -23
- package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +12 -7
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +3 -0
- package/.agents/skills/ui-widgets/SKILL.md +22 -7
- package/.agents/skills/version-control/SKILL.md +10 -1
- package/.agents/skills/visual-regression-audit/SKILL.md +88 -0
- package/.gitallowed +2 -1
- package/.stylelintignore +1 -0
- package/.stylelintrc.json +5 -1
- package/AUTHORS +1 -0
- package/DIR_METADATA +2 -1
- package/PRESUBMIT_test.py +143 -0
- package/config/owner/INFRA_OWNERS +0 -1
- package/docs/contributing/infrastructure.md +2 -2
- package/docs/ui_engineering.md +14 -4
- package/eslint.config.mjs +119 -9
- package/front_end/application_tokens.css +0 -65
- package/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/AidaClientTypes.ts +2 -0
- package/front_end/core/host/AidaErrors.ts +3 -3
- package/front_end/core/host/AidaGcaTranslation.ts +39 -0
- package/front_end/core/host/GcaClient.ts +32 -20
- package/front_end/core/host/GcaTypes.ts +4 -2
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/i18n/DevToolsLocale.ts +0 -1
- package/front_end/core/sdk/DebuggerModel.ts +25 -13
- package/front_end/core/sdk/PreloadingModel.ts +2 -2
- package/front_end/core/sdk/RehydratingConnection.ts +59 -30
- package/front_end/core/sdk/SourceMap.ts +30 -3
- package/front_end/core/sdk/SourceMapRangeMappings.ts +57 -0
- package/front_end/core/sdk/StorageKeyManager.ts +0 -1
- package/front_end/core/sdk/Target.ts +6 -0
- package/front_end/core/sdk/TargetManager.ts +10 -4
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +5 -9
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +12 -2
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +159 -52
- package/front_end/entrypoints/inspector_main/outermostTargetSelector.css +77 -25
- package/front_end/entrypoints/main/MainImpl.ts +32 -15
- package/front_end/models/ai_assistance/AiAgent2.ts +95 -46
- package/front_end/models/ai_assistance/AiConversation.ts +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -2
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +3 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +5 -4
- package/front_end/models/ai_assistance/performance/AICallTree.ts +7 -9
- package/front_end/models/ai_assistance/performance/AIQueries.ts +4 -8
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +11 -1
- package/front_end/models/ai_assistance/skills/lighthouse.md +1 -0
- package/front_end/models/ai_assistance/skills/network.md +3 -4
- package/front_end/models/ai_assistance/skills/sources.md +1 -2
- package/front_end/models/ai_assistance/skills/styling.md +3 -4
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +11 -3
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +84 -23
- package/front_end/models/ai_assistance/tools/ListSources.ts +41 -13
- package/front_end/models/badges/Badge.ts +0 -1
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/bindings/ResourceScriptMapping.ts +1 -1
- package/front_end/models/breakpoints/BreakpointManager.ts +2 -4
- package/front_end/models/breakpoints/RecurringPauseDetector.ts +140 -0
- package/front_end/models/breakpoints/breakpoints.ts +2 -1
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +2 -2
- package/front_end/models/persistence/Automapping.ts +0 -1
- package/front_end/models/trace/Processor.ts +16 -7
- package/front_end/models/trace/README.md +17 -1
- package/front_end/models/trace/extras/ThirdParties.ts +4 -6
- package/front_end/models/trace/extras/TraceFilter.ts +16 -8
- package/front_end/models/trace/extras/TraceTree.ts +159 -125
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -5
- package/front_end/models/trace/handlers/MetaHandler.ts +3 -0
- package/front_end/models/trace/handlers/RendererHandler.ts +7 -6
- package/front_end/models/trace/handlers/SamplesHandler.ts +1 -1
- package/front_end/models/trace/handlers/types.ts +15 -0
- package/front_end/models/trace/helpers/Extensions.ts +1 -3
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +155 -87
- package/front_end/models/trace/helpers/Trace.ts +19 -14
- package/front_end/models/trace/helpers/TreeHelpers.ts +38 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +3 -3
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +19 -4
- package/front_end/models/trace/lantern/simulation/Simulator.ts +4 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +19 -9
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +30 -3
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +2 -4
- package/front_end/panels/ai_assistance/components/chatMessage.css +1 -22
- package/front_end/panels/ai_assistance/components/chatView.css +0 -180
- package/front_end/panels/ai_assistance/components/exploreWidget.css +1 -19
- package/front_end/panels/ai_assistance/components/optInChangeDialog.css +1 -1
- package/front_end/panels/ai_assistance/components/walkthroughView.css +0 -13
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +3 -2
- package/front_end/panels/animation/AnimationTimeline.ts +5 -3
- package/front_end/panels/animation/animationTimeline.css +10 -8
- package/front_end/panels/application/ApplicationPanelSidebar.ts +14 -11
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +66 -3
- package/front_end/panels/application/ReportingApiView.ts +0 -1
- package/front_end/panels/application/SubAppsView.ts +0 -1
- package/front_end/panels/application/WebMCPTreeElement.ts +3 -6
- package/front_end/panels/application/WebMCPView.ts +30 -0
- package/front_end/panels/application/components/ReportsGrid.ts +0 -1
- package/front_end/panels/application/components/backForwardCacheView.css +1 -8
- package/front_end/panels/application/components/permissionsPolicySection.css +2 -2
- package/front_end/panels/application/components/protocolHandlersView.css +46 -39
- package/front_end/panels/application/components/trustTokensView.css +0 -4
- package/front_end/panels/application/cookieItemsView.css +0 -7
- package/front_end/panels/application/indexedDBViews.css +0 -6
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +0 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +0 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -5
- package/front_end/panels/application/preloading/components/preloadingGrid.css +0 -9
- package/front_end/panels/application/resourcesPanel.css +0 -48
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +2 -9
- package/front_end/panels/application/serviceWorkersView.css +5 -4
- package/front_end/panels/application/storageView.css +0 -5
- package/front_end/panels/application/webMCPView.css +17 -0
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +15 -20
- package/front_end/panels/changes/changesView.css +0 -5
- package/front_end/panels/common/ExtensionServer.ts +80 -10
- package/front_end/panels/console/ConsolePanel.ts +92 -18
- package/front_end/panels/console/consoleContextSelector.css +1 -8
- package/front_end/panels/console/consoleInsightTeaser.css +10 -17
- package/front_end/panels/console/consolePinPane.css +3 -1
- package/front_end/panels/console/consoleView.css +14 -18
- package/front_end/panels/coverage/coverageListView.css +0 -4
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +0 -22
- package/front_end/panels/css_overview/cssOverviewStartView.css +0 -43
- package/front_end/panels/developer_resources/developerResourcesListView.css +0 -4
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +52 -45
- package/front_end/panels/elements/LayoutPane.ts +1 -3
- package/front_end/panels/elements/PropertiesWidget.ts +26 -8
- package/front_end/panels/elements/PropertyRenderer.ts +45 -21
- package/front_end/panels/elements/StandaloneStylesContainer.ts +6 -7
- package/front_end/panels/elements/StyleEditorWidget.ts +110 -63
- package/front_end/panels/elements/StylePropertiesSection.ts +18 -14
- package/front_end/panels/elements/StylePropertyTreeElement.ts +556 -527
- package/front_end/panels/elements/StylesContainer.ts +5 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -15
- package/front_end/panels/elements/classesPaneWidget.css +3 -7
- package/front_end/panels/elements/components/CSSQuery.ts +6 -5
- package/front_end/panels/elements/components/CSSVariableValueView.ts +17 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +178 -140
- package/front_end/panels/elements/components/cssQuery.css +1 -1
- package/front_end/panels/elements/components/stylePropertyEditor.css +60 -56
- package/front_end/panels/elements/layoutPane.css +2 -2
- package/front_end/panels/elements/metricsSidebarPane.css +7 -8
- package/front_end/panels/elements/platformFontsWidget.css +1 -1
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +1 -12
- package/front_end/panels/elements/stylesSidebarPane.css +3 -5
- package/front_end/panels/emulation/deviceModeView.css +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +9 -2
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/explain/components/consoleInsight.css +1 -7
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +88 -46
- package/front_end/panels/issues/AffectedHeavyAdView.ts +72 -43
- package/front_end/panels/issues/AffectedResourcesView.ts +81 -13
- package/front_end/panels/issues/GenericIssueDetailsView.ts +112 -32
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/issues/issuesTree.css +13 -43
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +1 -1
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/layer_viewer/paintProfiler.css +4 -3
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +1 -6
- package/front_end/panels/lighthouse/lighthousePanel.css +0 -9
- package/front_end/panels/lighthouse/lighthouseStartView.css +5 -16
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +0 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +1 -1
- package/front_end/panels/media/playerListView.css +1 -2
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +4 -4
- package/front_end/panels/network/NetworkLogView.ts +603 -582
- package/front_end/panels/network/RequestCookiesView.ts +0 -1
- package/front_end/panels/network/RequestTimingView.ts +16 -2
- package/front_end/panels/network/networkConfigView.css +3 -4
- package/front_end/panels/network/networkLogView.css +363 -377
- package/front_end/panels/network/networkPanel.css +1 -7
- package/front_end/panels/network/networkTimingTable.css +12 -27
- package/front_end/panels/network/networkWaterfallColumn.css +1 -1
- package/front_end/panels/network/requestConditionsDrawer.css +0 -4
- package/front_end/panels/network/requestCookiesView.css +7 -1
- package/front_end/panels/network/requestPayloadTree.css +0 -4
- package/front_end/panels/profiler/HeapProfileView.ts +1 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +0 -7
- package/front_end/panels/profiler/profilesPanel.css +0 -11
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecorderPanel.ts +1 -1
- package/front_end/panels/recorder/RecordingView.ts +32 -11
- package/front_end/panels/recorder/StepView.ts +31 -5
- package/front_end/panels/recorder/TimelineSection.ts +22 -6
- package/front_end/panels/recorder/controlButton.css +2 -9
- package/front_end/panels/recorder/createRecordingView.css +1 -1
- package/front_end/panels/recorder/recorderPanel.css +0 -9
- package/front_end/panels/recorder/recordingListView.css +4 -4
- package/front_end/panels/recorder/recordingView.css +44 -52
- package/front_end/panels/recorder/replaySection.css +2 -0
- package/front_end/panels/recorder/stepEditor.css +4 -4
- package/front_end/panels/recorder/stepView.css +47 -21
- package/front_end/panels/recorder/timelineSection.css +63 -83
- package/front_end/panels/screencast/ScreencastApp.ts +0 -1
- package/front_end/panels/search/searchView.css +1 -1
- package/front_end/panels/security/mainView.css +1 -1
- package/front_end/panels/security/originView.css +2 -2
- package/front_end/panels/sensors/SensorsView.ts +273 -361
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +0 -1
- package/front_end/panels/settings/backendLinkingSettingsTab.css +7 -7
- package/front_end/panels/settings/components/syncSection.css +0 -1
- package/front_end/panels/settings/workspaceSettingsTab.css +0 -5
- package/front_end/panels/sources/CSSPlugin.ts +177 -98
- package/front_end/panels/sources/DebuggerPausedMessage.ts +100 -27
- package/front_end/panels/sources/NavigatorView.ts +926 -946
- package/front_end/panels/sources/SourcesPanel.ts +9 -2
- package/front_end/panels/sources/breakpointsView.css +6 -28
- package/front_end/panels/sources/components/HeadersView.css +2 -2
- package/front_end/panels/sources/debuggerPausedMessage.css +7 -0
- package/front_end/panels/sources/navigatorTree.css +7 -2
- package/front_end/panels/sources/sourcesNavigator.css +0 -9
- package/front_end/panels/sources/sourcesView.css +2 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +0 -10
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +3 -0
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +18 -5
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +0 -10
- package/front_end/panels/timeline/ModificationsManager.ts +0 -1
- package/front_end/panels/timeline/ThreadAppender.ts +2 -6
- package/front_end/panels/timeline/TimelineController.ts +30 -26
- package/front_end/panels/timeline/TimelineDetailsView.ts +10 -9
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +4 -16
- package/front_end/panels/timeline/TimelineMiniMap.ts +132 -54
- package/front_end/panels/timeline/TimelinePanel.ts +2 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +63 -50
- package/front_end/panels/timeline/TimelineUIUtils.ts +8 -10
- package/front_end/panels/timeline/components/DetailsView.ts +7 -14
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +0 -2
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +5 -1
- package/front_end/panels/timeline/components/fieldSettingsDialog.css +1 -6
- package/front_end/panels/timeline/components/insights/baseInsightComponent.css +0 -12
- package/front_end/panels/timeline/components/interactionBreakdown.css +1 -1
- package/front_end/panels/timeline/components/layoutShiftDetails.css +2 -9
- package/front_end/panels/timeline/components/liveMetricsView.css +0 -16
- package/front_end/panels/timeline/components/metricCard.css +1 -5
- package/front_end/panels/timeline/components/networkRequestDetails.css +3 -3
- package/front_end/panels/timeline/components/networkRequestTooltip.css +6 -4
- package/front_end/panels/timeline/components/networkTrackWidget.css +1 -1
- package/front_end/panels/timeline/components/sidebarAnnotationsTab.css +1 -1
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -1
- package/front_end/panels/timeline/docs/profile_calls.md +7 -9
- package/front_end/panels/timeline/timelineDetailsView.css +1 -12
- package/front_end/panels/timeline/timelineFlamechartPopover.css +0 -4
- package/front_end/panels/timeline/timelineMiniMap.css +1 -4
- package/front_end/panels/timeline/timelinePanel.css +0 -4
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/panels/timeline/timelineTreeView.css +0 -12
- package/front_end/panels/timeline/utils/EntryNodes.ts +1 -1
- package/front_end/panels/webauthn/webauthnPane.css +2 -8
- package/front_end/panels/whats_new/ReleaseNoteText.ts +1 -1
- package/front_end/third_party/axe-core/README.chromium +2 -3
- package/front_end/third_party/chromium/README.chromium +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 +328 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +907 -588
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +119 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts +120 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +23 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +21 -14
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +158 -67
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js +28 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js +19 -11
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +17 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js +62 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts +29 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js +60 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +24 -9
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js +16 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js +37 -20
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +10 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js +18 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js +24 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js +6 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js +30 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js +12 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +40 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts +23 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js +37 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +74 -16
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +34 -23
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.d.ts +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js +94 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js +29 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js +6 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +34 -15
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +11 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +10 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.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/util/decorators.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 +328 -11
- package/front_end/third_party/puppeteer/package/package.json +10 -8
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +118 -0
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +119 -0
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +25 -2
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +28 -0
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +65 -38
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +27 -7
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +43 -7
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +38 -8
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +27 -12
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +19 -6
- package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +72 -5
- package/front_end/third_party/puppeteer/package/src/bidi/NetworkEvents.ts +82 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +37 -13
- package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +26 -14
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +43 -22
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -5
- package/front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts +21 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Request.ts +27 -5
- package/front_end/third_party/puppeteer/package/src/cdp/Binding.ts +6 -4
- package/front_end/third_party/puppeteer/package/src/cdp/ExtensionTransport.ts +31 -6
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +18 -1
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +48 -0
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkEventManager.ts +58 -5
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +94 -14
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +50 -28
- package/front_end/third_party/puppeteer/package/src/cdp/ResponseBodyStream.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +38 -3
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +6 -5
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +17 -8
- package/front_end/third_party/puppeteer/package/src/common/util.ts +32 -15
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +21 -13
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +10 -10
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/decorators.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -0
- package/front_end/ui/components/adorners/adorner.css +1 -1
- package/front_end/ui/components/buttons/button.css +0 -28
- package/front_end/ui/components/buttons/textButton.css +1 -45
- package/front_end/ui/components/diff_view/diffView.css +0 -2
- package/front_end/ui/components/input/checkbox.css +3 -3
- package/front_end/ui/components/issue_counter/issueLinkIcon.css +2 -2
- package/front_end/ui/components/menus/Menu.ts +14 -0
- package/front_end/ui/components/menus/menu.css +2 -14
- package/front_end/ui/components/menus/menuItem.css +0 -4
- package/front_end/ui/components/request_link_icon/requestLinkIcon.css +2 -2
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/survey_link/surveyLink.css +3 -3
- package/front_end/ui/components/switch/switch.css +3 -2
- package/front_end/ui/components/text_editor/theme.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +29 -0
- package/front_end/ui/components/tree_outline/treeOutline.css +1 -24
- package/front_end/ui/legacy/ContextMenu.ts +5 -5
- package/front_end/ui/legacy/SoftContextMenu.ts +24 -8
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +31 -78
- package/front_end/ui/legacy/UIUtils.ts +9 -17
- package/front_end/ui/legacy/checkboxTextLabel.css +2 -44
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +39 -27
- package/front_end/ui/legacy/components/color_picker/spectrum.css +2 -10
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +2 -6
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +34 -26
- package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/swatchPopover.css +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +83 -21
- package/front_end/ui/legacy/components/object_ui/objectPopover.css +0 -4
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +41 -14
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +1 -9
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +2 -1
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +0 -5
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +6 -3
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +95 -1
- package/front_end/ui/legacy/components/source_frame/imageView.css +2 -2
- package/front_end/ui/legacy/filter.css +7 -3
- package/front_end/ui/legacy/inspectorCommon.css +7 -81
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +1 -1
- package/front_end/ui/legacy/listWidget.css +2 -2
- package/front_end/ui/legacy/progressIndicator.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +6 -10
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/front_end/ui/visual_logging/LoggingDriver.ts +4 -0
- package/front_end/ui/visual_logging/visual_logging.ts +1 -1
- package/inspector_overlay/common.ts +0 -3
- package/inspector_overlay/main.ts +1 -3
- package/inspector_overlay/tool_highlight.css +0 -7
- package/inspector_overlay/tool_highlight.ts +0 -1
- package/inspector_overlay/tool_source_order.css +0 -4
- package/package.json +1 -1
- package/front_end/generated/SupportedCSSProperties.ts +0 -9689
|
@@ -11,7 +11,7 @@ import type * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
|
11
11
|
|
|
12
12
|
import type * as ElementsComponents from './components/components.js';
|
|
13
13
|
import type {StylePropertiesSection} from './StylePropertiesSection.js';
|
|
14
|
-
import type {
|
|
14
|
+
import type {StylePropertyData} from './StylePropertyTreeElement.js';
|
|
15
15
|
import type {WebCustomData} from './WebCustomData.js';
|
|
16
16
|
|
|
17
17
|
export interface StylesContainer {
|
|
@@ -27,8 +27,7 @@ export interface StylesContainer {
|
|
|
27
27
|
node(): SDK.DOMModel.DOMNode|null;
|
|
28
28
|
cssModel(): SDK.CSSModel.CSSModel|null;
|
|
29
29
|
computedStyleModel(): ComputedStyle.ComputedStyleModel.ComputedStyleModel;
|
|
30
|
-
refreshUpdate(editedSection: StylePropertiesSection,
|
|
31
|
-
force?: boolean): void;
|
|
30
|
+
refreshUpdate(editedSection: StylePropertiesSection, editedProperty?: StylePropertyData, force?: boolean): void;
|
|
32
31
|
filterRegex(): RegExp|null;
|
|
33
32
|
setEditingStyle(editing: boolean): void;
|
|
34
33
|
setUserOperation(userOperation: boolean): void;
|
|
@@ -38,8 +37,8 @@ export interface StylesContainer {
|
|
|
38
37
|
|
|
39
38
|
getRegisteredPropertyDetails(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, variableName: string):
|
|
40
39
|
ElementsComponents.CSSVariableValueView.RegisteredPropertyDetails|undefined;
|
|
41
|
-
getVariableParserError(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
42
|
-
|
|
40
|
+
getVariableParserError(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
41
|
+
variableName: string): ElementsComponents.CSSVariableValueView.RegisteredPropertyDetails|null;
|
|
43
42
|
jumpToFunctionDefinition(functionName: string, treeScopeDistance: number): void;
|
|
44
43
|
continueEditingElement(sectionIndex: number, propertyIndex: number): void;
|
|
45
44
|
revealProperty(cssProperty: SDK.CSSProperty.CSSProperty): void;
|
|
@@ -57,7 +56,7 @@ export interface StylesContainer {
|
|
|
57
56
|
jumpToFontPaletteDefinition(paletteName: string): void;
|
|
58
57
|
jumpToCounterStyleDefinition(counterStyleName: string): void;
|
|
59
58
|
jumpToDeclaration(valueSource: SDK.CSSMatchedStyles.CSSValueSource): void;
|
|
60
|
-
setActiveProperty(
|
|
59
|
+
setActiveProperty(propertyData: StylePropertyData|null): void;
|
|
61
60
|
addStyleUpdateListener(listener: () => void): void;
|
|
62
61
|
removeStyleUpdateListener(listener: () => void): void;
|
|
63
62
|
trackForLazyRendering(element: Element, callback: () => void): void;
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
StylePropertiesSection,
|
|
78
78
|
} from './StylePropertiesSection.js';
|
|
79
79
|
import {StylePropertyHighlighter} from './StylePropertyHighlighter.js';
|
|
80
|
-
import type {StylePropertyTreeElement} from './StylePropertyTreeElement.js';
|
|
80
|
+
import type {StylePropertyData, StylePropertyTreeElement} from './StylePropertyTreeElement.js';
|
|
81
81
|
import * as StylesAiCodeCompletionProvider from './StylesAiCodeCompletionProvider.js';
|
|
82
82
|
import type {StylesContainer} from './StylesContainer.js';
|
|
83
83
|
import stylesSidebarPaneStyles from './stylesSidebarPane.css.js';
|
|
@@ -612,14 +612,13 @@ export class StylesSidebarPane extends StylesSidebarPaneBase implements StylesCo
|
|
|
612
612
|
}, FILTER_IDLE_PERIOD);
|
|
613
613
|
}
|
|
614
614
|
|
|
615
|
-
refreshUpdate(editedSection: StylePropertiesSection,
|
|
616
|
-
|
|
617
|
-
if (editedTreeElement) {
|
|
615
|
+
refreshUpdate(editedSection: StylePropertiesSection, editedProperty?: StylePropertyData, force = false): void {
|
|
616
|
+
if (editedProperty) {
|
|
618
617
|
for (const section of this.allSections()) {
|
|
619
618
|
if (section instanceof BlankStylePropertiesSection && section.isBlank) {
|
|
620
619
|
continue;
|
|
621
620
|
}
|
|
622
|
-
section.updateVarFunctions(
|
|
621
|
+
section.updateVarFunctions(editedProperty);
|
|
623
622
|
}
|
|
624
623
|
}
|
|
625
624
|
|
|
@@ -722,11 +721,8 @@ export class StylesSidebarPane extends StylesSidebarPaneBase implements StylesCo
|
|
|
722
721
|
}
|
|
723
722
|
|
|
724
723
|
getVariableParserError(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
725
|
-
variableName: string): ElementsComponents.CSSVariableValueView.
|
|
726
|
-
|
|
727
|
-
return registrationDetails ?
|
|
728
|
-
new ElementsComponents.CSSVariableValueView.CSSVariableParserError(registrationDetails) :
|
|
729
|
-
null;
|
|
724
|
+
variableName: string): ElementsComponents.CSSVariableValueView.RegisteredPropertyDetails|null {
|
|
725
|
+
return this.getRegisteredPropertyDetails(matchedStyles, variableName) ?? null;
|
|
730
726
|
}
|
|
731
727
|
|
|
732
728
|
private async fetchComputedStylesFor(nodeId: Protocol.DOM.NodeId|undefined): Promise<Map<string, string>|null> {
|
|
@@ -796,7 +792,7 @@ export class StylesSidebarPane extends StylesSidebarPaneBase implements StylesCo
|
|
|
796
792
|
}
|
|
797
793
|
}
|
|
798
794
|
|
|
799
|
-
setActiveProperty(
|
|
795
|
+
setActiveProperty(propertyData: StylePropertyData|null): void {
|
|
800
796
|
if (this.isEditingStyle) {
|
|
801
797
|
return;
|
|
802
798
|
}
|
|
@@ -810,14 +806,14 @@ export class StylesSidebarPane extends StylesSidebarPaneBase implements StylesCo
|
|
|
810
806
|
return;
|
|
811
807
|
}
|
|
812
808
|
|
|
813
|
-
if (!
|
|
809
|
+
if (!propertyData || propertyData.overloaded() || propertyData.inherited()) {
|
|
814
810
|
return;
|
|
815
811
|
}
|
|
816
812
|
|
|
817
|
-
const rule =
|
|
813
|
+
const rule = propertyData.property.ownerStyle.parentRule;
|
|
818
814
|
const selectorList = (rule instanceof SDK.CSSRule.CSSStyleRule) ? rule.selectorText() : undefined;
|
|
819
815
|
for (const {properties, mode} of HIGHLIGHTABLE_PROPERTIES) {
|
|
820
|
-
if (!properties.includes(
|
|
816
|
+
if (!properties.includes(propertyData.property.name)) {
|
|
821
817
|
continue;
|
|
822
818
|
}
|
|
823
819
|
node.domModel().overlayModel().highlightInOverlay({node, selectorList}, mode);
|
|
@@ -825,7 +821,8 @@ export class StylesSidebarPane extends StylesSidebarPaneBase implements StylesCo
|
|
|
825
821
|
return;
|
|
826
822
|
}
|
|
827
823
|
|
|
828
|
-
|
|
824
|
+
const value = propertyData.property.value;
|
|
825
|
+
if (value.includes('anchor(') || value.includes('anchor-size(')) {
|
|
829
826
|
node.domModel().overlayModel().highlightInOverlay({node, selectorList}, 'anchor-positioning');
|
|
830
827
|
this.isActivePropertyHighlighted = true;
|
|
831
828
|
}
|
|
@@ -11,13 +11,9 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.styles-element-classes-container {
|
|
14
|
-
display:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.styles-element-classes-pane devtools-checkbox {
|
|
20
|
-
margin-right: 15px;
|
|
14
|
+
display: grid;
|
|
15
|
+
column-gap: var(--sys-size-6);
|
|
16
|
+
grid-template-columns: repeat(2, 1fr);
|
|
21
17
|
}
|
|
22
18
|
|
|
23
19
|
.styles-element-classes-pane .title-container {
|
|
@@ -6,6 +6,7 @@ import '../../../ui/components/tooltips/tooltips.js';
|
|
|
6
6
|
import '../../../ui/legacy/components/inline_editor/inline_editor.js';
|
|
7
7
|
|
|
8
8
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
9
|
+
import type * as Tooltips from '../../../ui/components/tooltips/tooltips.js';
|
|
9
10
|
import type * as InlineEditor from '../../../ui/legacy/components/inline_editor/inline_editor.js';
|
|
10
11
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
11
12
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
@@ -43,7 +44,7 @@ export interface ViewInput {
|
|
|
43
44
|
matchedStyles?: SDK.CSSMatchedStyles.CSSMatchedStyles;
|
|
44
45
|
style?: SDK.CSSStyleDeclaration.CSSStyleDeclaration;
|
|
45
46
|
containerNode?: SDK.DOMModel.DOMNode;
|
|
46
|
-
tooltipPrefix
|
|
47
|
+
tooltipPrefix?: Tooltips.Tooltip.IdFactory;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
export type View = (input: ViewInput, output: undefined, target: HTMLElement|DocumentFragment) => void;
|
|
@@ -67,7 +68,8 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
67
68
|
input.onLinkActivate(variable ? variable.declaration : variableName);
|
|
68
69
|
}
|
|
69
70
|
};
|
|
70
|
-
const tooltipId =
|
|
71
|
+
const tooltipId =
|
|
72
|
+
input.tooltipPrefix ? input.tooltipPrefix.get(index, variableName) : `css-query-${index}-${variableName}`;
|
|
71
73
|
const tooltip = {tooltipId};
|
|
72
74
|
return html`
|
|
73
75
|
<devtools-link-swatch class="css-var-link" .data=${{
|
|
@@ -121,13 +123,12 @@ export class CSSQuery extends UI.Widget.Widget<ShadowRoot> {
|
|
|
121
123
|
#matchedStyles?: SDK.CSSMatchedStyles.CSSMatchedStyles;
|
|
122
124
|
#style?: SDK.CSSStyleDeclaration.CSSStyleDeclaration;
|
|
123
125
|
#containerNode?: SDK.DOMModel.DOMNode;
|
|
124
|
-
#tooltipPrefix
|
|
126
|
+
#tooltipPrefix?: Tooltips.Tooltip.IdFactory;
|
|
125
127
|
|
|
126
128
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
127
129
|
super(element, {useShadowDom: 'pure'});
|
|
128
130
|
this.#view = view;
|
|
129
131
|
}
|
|
130
|
-
|
|
131
132
|
set data(data: CSSQueryData) {
|
|
132
133
|
this.#queryPrefix = data.queryPrefix;
|
|
133
134
|
this.#queryName = data.queryName;
|
|
@@ -148,7 +149,7 @@ export class CSSQuery extends UI.Widget.Widget<ShadowRoot> {
|
|
|
148
149
|
matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
149
150
|
style: SDK.CSSStyleDeclaration.CSSStyleDeclaration,
|
|
150
151
|
containerNode: SDK.DOMModel.DOMNode,
|
|
151
|
-
tooltipPrefix:
|
|
152
|
+
tooltipPrefix: Tooltips.Tooltip.IdFactory,
|
|
152
153
|
): void {
|
|
153
154
|
this.#matchedStyles = matchedStyles;
|
|
154
155
|
this.#style = style;
|
|
@@ -65,13 +65,23 @@ export const DEFAULT_PARSER_ERROR_VIEW: ParserErrorView = (input, _output, targe
|
|
|
65
65
|
|
|
66
66
|
export class CSSVariableParserError extends UI.Widget.Widget {
|
|
67
67
|
#view: ParserErrorView;
|
|
68
|
-
|
|
68
|
+
#details?: RegisteredPropertyDetails;
|
|
69
69
|
|
|
70
|
-
constructor(
|
|
71
|
-
super();
|
|
70
|
+
constructor(element?: HTMLElement, view: ParserErrorView = DEFAULT_PARSER_ERROR_VIEW) {
|
|
71
|
+
super(element);
|
|
72
72
|
this.#view = view;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
get details(): RegisteredPropertyDetails|undefined {
|
|
76
|
+
return this.#details;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
set details(details: RegisteredPropertyDetails|undefined) {
|
|
80
|
+
if (this.#details === details) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
73
83
|
this.#details = details;
|
|
74
|
-
this.
|
|
84
|
+
this.requestUpdate();
|
|
75
85
|
}
|
|
76
86
|
|
|
77
87
|
override wasShown(): void {
|
|
@@ -80,6 +90,9 @@ export class CSSVariableParserError extends UI.Widget.Widget {
|
|
|
80
90
|
}
|
|
81
91
|
|
|
82
92
|
override performUpdate(): void {
|
|
93
|
+
if (!this.#details) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
83
96
|
this.#view({details: this.#details}, undefined, this.contentElement);
|
|
84
97
|
}
|
|
85
98
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
// Copyright 2021 The Chromium Authors
|
|
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
|
-
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
4
|
|
|
6
5
|
import '../../../ui/kit/kit.js';
|
|
7
|
-
import '../../../ui/legacy/legacy.js';
|
|
8
6
|
|
|
9
7
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
10
|
-
import * as
|
|
11
|
-
import
|
|
8
|
+
import * as UI from '../../../ui/legacy/legacy.js';
|
|
9
|
+
import {Directives, html, type LitTemplate, render} from '../../../ui/lit/lit.js';
|
|
12
10
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
13
11
|
|
|
14
12
|
import {findFlexContainerIcon, findGridContainerIcon, type IconInfo} from './CSSPropertyIconResolver.js';
|
|
@@ -35,7 +33,7 @@ const UIStrings = {
|
|
|
35
33
|
const str_ = i18n.i18n.registerUIStrings('panels/elements/components/StylePropertyEditor.ts', UIStrings);
|
|
36
34
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
37
35
|
|
|
38
|
-
const {
|
|
36
|
+
const {classMap} = Directives;
|
|
39
37
|
|
|
40
38
|
declare global {
|
|
41
39
|
interface HTMLElementEventMap {
|
|
@@ -44,12 +42,7 @@ declare global {
|
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
interface
|
|
48
|
-
authoredProperties: Map<string, string>;
|
|
49
|
-
computedProperties: Map<string, string>;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
interface EditableProperty {
|
|
45
|
+
export interface EditableProperty {
|
|
53
46
|
propertyName: string;
|
|
54
47
|
propertyValues: string[];
|
|
55
48
|
}
|
|
@@ -74,89 +67,174 @@ export class PropertyDeselectedEvent extends Event {
|
|
|
74
67
|
}
|
|
75
68
|
}
|
|
76
69
|
|
|
77
|
-
export
|
|
78
|
-
|
|
70
|
+
export interface ViewInput {
|
|
71
|
+
authoredProperties: Map<string, string>;
|
|
72
|
+
computedProperties: Map<string, string>;
|
|
73
|
+
editableProperties: EditableProperty[];
|
|
74
|
+
containerClass?: string;
|
|
75
|
+
findIcon: (query: string) => IconInfo | null;
|
|
76
|
+
onButtonClick: (propertyName: string, propertyValue: string, selected: boolean) => void;
|
|
77
|
+
onDenseCheckboxChange: (checked: boolean, isRow: boolean, isColumn: boolean) => void;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
81
|
+
|
|
82
|
+
function renderButton(
|
|
83
|
+
input: ViewInput,
|
|
84
|
+
propertyValue: string,
|
|
85
|
+
propertyName: string,
|
|
86
|
+
selected = false,
|
|
87
|
+
): LitTemplate {
|
|
88
|
+
const query = `${propertyName}: ${propertyValue}`;
|
|
89
|
+
const iconInfo = input.findIcon(query);
|
|
90
|
+
if (!iconInfo) {
|
|
91
|
+
throw new Error(`Icon for ${query} is not found`);
|
|
92
|
+
}
|
|
93
|
+
const transform = `transform: rotate(${iconInfo.rotate}deg) scale(${iconInfo.scaleX}, ${iconInfo.scaleY})`;
|
|
94
|
+
const classes = classMap({
|
|
95
|
+
button: true,
|
|
96
|
+
selected,
|
|
97
|
+
});
|
|
98
|
+
const values = {propertyName, propertyValue};
|
|
99
|
+
const title = selected ? i18nString(UIStrings.deselectButton, values) : i18nString(UIStrings.selectButton, values);
|
|
100
|
+
return html`
|
|
101
|
+
<button title=${title}
|
|
102
|
+
class=${classes}
|
|
103
|
+
jslog=${VisualLogging.item().track({click: true, resize: true}).context(`${propertyName}-${propertyValue}`)}
|
|
104
|
+
@click=${() => input.onButtonClick(propertyName, propertyValue, selected)}>
|
|
105
|
+
<devtools-icon style=${transform} name=${iconInfo.iconName}>
|
|
106
|
+
</devtools-icon>
|
|
107
|
+
</button>
|
|
108
|
+
`;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function renderGridAutoFlowProperty(
|
|
112
|
+
input: ViewInput,
|
|
113
|
+
prop: EditableProperty,
|
|
114
|
+
shownValue: string|undefined,
|
|
115
|
+
classes: ReturnType<typeof classMap>,
|
|
116
|
+
): LitTemplate {
|
|
117
|
+
const authoredValue = input.authoredProperties.get(prop.propertyName);
|
|
118
|
+
|
|
119
|
+
const isDense = authoredValue === 'dense' || authoredValue === 'row dense' || authoredValue === 'column dense';
|
|
120
|
+
const isRow = authoredValue === 'row' || authoredValue === 'row dense';
|
|
121
|
+
const isColumn = authoredValue === 'column' || authoredValue === 'column dense';
|
|
122
|
+
|
|
123
|
+
return html`<div class="row">
|
|
124
|
+
<div class="property">
|
|
125
|
+
<span class="property-name">${prop.propertyName}</span>: <span class=${classes}>${shownValue}</span>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="buttons">
|
|
128
|
+
${renderButton(input, 'row', prop.propertyName, isRow)}
|
|
129
|
+
${renderButton(input, 'column', prop.propertyName, isColumn)}
|
|
130
|
+
<devtools-checkbox
|
|
131
|
+
.checked=${isDense}
|
|
132
|
+
@change=${
|
|
133
|
+
(e: Event) => input.onDenseCheckboxChange((e.target as UI.UIUtils.CheckboxLabel).checked, isRow, isColumn)}
|
|
134
|
+
>
|
|
135
|
+
${i18nString(UIStrings.denseLabel)}
|
|
136
|
+
</devtools-checkbox>
|
|
137
|
+
</div>
|
|
138
|
+
</div>`;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function renderProperty(input: ViewInput, prop: EditableProperty): LitTemplate {
|
|
142
|
+
const authoredValue = input.authoredProperties.get(prop.propertyName);
|
|
143
|
+
const notAuthored = !authoredValue;
|
|
144
|
+
const shownValue = authoredValue || input.computedProperties.get(prop.propertyName);
|
|
145
|
+
const classes = classMap({
|
|
146
|
+
'property-value': true,
|
|
147
|
+
'not-authored': notAuthored,
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// Special handling for grid-auto-flow with dense checkbox
|
|
151
|
+
if (prop.propertyName === 'grid-auto-flow') {
|
|
152
|
+
return renderGridAutoFlowProperty(input, prop, shownValue, classes);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return html`<div class="row">
|
|
156
|
+
<div class="property">
|
|
157
|
+
<span class="property-name">${prop.propertyName}</span>: <span class=${classes}>${shownValue}</span>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="buttons">
|
|
160
|
+
${prop.propertyValues.map(value => renderButton(input, value, prop.propertyName, value === authoredValue))}
|
|
161
|
+
</div>
|
|
162
|
+
</div>`;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export const DEFAULT_VIEW: View = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
|
|
166
|
+
// clang-format off
|
|
167
|
+
render(html`
|
|
168
|
+
<style>${stylePropertyEditorStyles}</style>
|
|
169
|
+
<div class="container">
|
|
170
|
+
${input.editableProperties.map(prop => renderProperty(input, prop))}
|
|
171
|
+
</div>
|
|
172
|
+
`, target, {container: {classes: input.containerClass ? [input.containerClass] : []}});
|
|
173
|
+
// clang-format on
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export class StylePropertyEditor extends UI.Widget.VBox {
|
|
177
|
+
static get editableProperties(): EditableProperty[] {
|
|
178
|
+
return [];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
protected readonly containerClass: string = '';
|
|
182
|
+
readonly #view: View;
|
|
79
183
|
#authoredProperties = new Map<string, string>();
|
|
80
184
|
#computedProperties = new Map<string, string>();
|
|
81
|
-
|
|
185
|
+
|
|
186
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
187
|
+
super(element);
|
|
188
|
+
this.#view = view;
|
|
189
|
+
}
|
|
82
190
|
|
|
83
191
|
getEditableProperties(): EditableProperty[] {
|
|
84
|
-
return this.editableProperties;
|
|
192
|
+
return (this.constructor as typeof StylePropertyEditor).editableProperties;
|
|
85
193
|
}
|
|
86
194
|
|
|
87
|
-
|
|
88
|
-
this.#authoredProperties
|
|
89
|
-
this.#computedProperties = data.computedProperties;
|
|
90
|
-
this.#render();
|
|
195
|
+
get authoredProperties(): Map<string, string> {
|
|
196
|
+
return this.#authoredProperties;
|
|
91
197
|
}
|
|
92
198
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<div class="container">
|
|
100
|
-
${this.editableProperties.map(prop => this.#renderProperty(prop))}
|
|
101
|
-
</div>
|
|
102
|
-
`, this.#shadow, {
|
|
103
|
-
host: this,
|
|
104
|
-
});
|
|
105
|
-
// clang-format on
|
|
199
|
+
set authoredProperties(authoredProperties: Map<string, string>) {
|
|
200
|
+
if (this.#authoredProperties === authoredProperties) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
this.#authoredProperties = authoredProperties;
|
|
204
|
+
this.requestUpdate();
|
|
106
205
|
}
|
|
107
206
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
// Special handling for grid-auto-flow with dense checkbox
|
|
118
|
-
if (prop.propertyName === 'grid-auto-flow') {
|
|
119
|
-
return this.#renderGridAutoFlowProperty(prop, shownValue, classes);
|
|
207
|
+
get computedProperties(): Map<string, string> {
|
|
208
|
+
return this.#computedProperties;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
set computedProperties(computedProperties: Map<string, string>) {
|
|
212
|
+
if (this.#computedProperties === computedProperties) {
|
|
213
|
+
return;
|
|
120
214
|
}
|
|
215
|
+
this.#computedProperties = computedProperties;
|
|
216
|
+
this.requestUpdate();
|
|
217
|
+
}
|
|
121
218
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
</div>
|
|
126
|
-
<div class="buttons">
|
|
127
|
-
${prop.propertyValues.map(value => this.#renderButton(value, prop.propertyName, value === authoredValue))}
|
|
128
|
-
</div>
|
|
129
|
-
</div>`;
|
|
219
|
+
override wasShown(): void {
|
|
220
|
+
super.wasShown();
|
|
221
|
+
this.requestUpdate();
|
|
130
222
|
}
|
|
131
223
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<span class="property-name">${prop.propertyName}</span>: <span class=${classes}>${shownValue}</span>
|
|
144
|
-
</div>
|
|
145
|
-
<div class="buttons">
|
|
146
|
-
${this.#renderButton('row', prop.propertyName, isRow)}
|
|
147
|
-
${this.#renderButton('column', prop.propertyName, isColumn)}
|
|
148
|
-
<devtools-checkbox
|
|
149
|
-
.checked=${isDense}
|
|
150
|
-
@change=${(e: Event) => this.#onDenseCheckboxChange(e, isRow, isColumn)}
|
|
151
|
-
>
|
|
152
|
-
${i18nString(UIStrings.denseLabel)}
|
|
153
|
-
</devtools-checkbox>
|
|
154
|
-
</div>
|
|
155
|
-
</div>`;
|
|
224
|
+
override performUpdate(): void {
|
|
225
|
+
const viewInput: ViewInput = {
|
|
226
|
+
authoredProperties: this.#authoredProperties,
|
|
227
|
+
computedProperties: this.#computedProperties,
|
|
228
|
+
editableProperties: this.getEditableProperties(),
|
|
229
|
+
containerClass: this.containerClass,
|
|
230
|
+
findIcon: (query: string) => this.findIcon(query, this.#computedProperties),
|
|
231
|
+
onButtonClick: this.#onButtonClick.bind(this),
|
|
232
|
+
onDenseCheckboxChange: this.#onDenseCheckboxChange.bind(this),
|
|
233
|
+
};
|
|
234
|
+
this.#view(viewInput, undefined, this.contentElement);
|
|
156
235
|
}
|
|
157
236
|
|
|
158
|
-
#onDenseCheckboxChange(
|
|
159
|
-
const checked = (e.target as HTMLInputElement).checked;
|
|
237
|
+
#onDenseCheckboxChange(checked: boolean, isRow: boolean, isColumn: boolean): void {
|
|
160
238
|
const propertyName = 'grid-auto-flow';
|
|
161
239
|
const currentValue = this.#authoredProperties.get(propertyName);
|
|
162
240
|
|
|
@@ -170,37 +248,12 @@ export class StylePropertyEditor extends HTMLElement {
|
|
|
170
248
|
}
|
|
171
249
|
|
|
172
250
|
if (currentValue) {
|
|
173
|
-
this.dispatchEvent(new PropertyDeselectedEvent(propertyName, currentValue));
|
|
251
|
+
this.element.dispatchEvent(new PropertyDeselectedEvent(propertyName, currentValue));
|
|
174
252
|
}
|
|
175
253
|
|
|
176
254
|
if (newValue) {
|
|
177
|
-
this.dispatchEvent(new PropertySelectedEvent(propertyName, newValue));
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
#renderButton(propertyValue: string, propertyName: string, selected = false): Lit.TemplateResult {
|
|
182
|
-
const query = `${propertyName}: ${propertyValue}`;
|
|
183
|
-
const iconInfo = this.findIcon(query, this.#computedProperties);
|
|
184
|
-
if (!iconInfo) {
|
|
185
|
-
throw new Error(`Icon for ${query} is not found`);
|
|
255
|
+
this.element.dispatchEvent(new PropertySelectedEvent(propertyName, newValue));
|
|
186
256
|
}
|
|
187
|
-
const transform = `transform: rotate(${iconInfo.rotate}deg) scale(${iconInfo.scaleX}, ${iconInfo.scaleY})`;
|
|
188
|
-
const classes = Directives.classMap({
|
|
189
|
-
button: true,
|
|
190
|
-
selected,
|
|
191
|
-
});
|
|
192
|
-
const values = {propertyName, propertyValue};
|
|
193
|
-
const title = selected ? i18nString(UIStrings.deselectButton, values) : i18nString(UIStrings.selectButton, values);
|
|
194
|
-
return html`
|
|
195
|
-
<button title=${title}
|
|
196
|
-
class=${classes}
|
|
197
|
-
jslog=${
|
|
198
|
-
VisualLogging.item().track({click: true, resize: true}).context(`${propertyName}-${propertyValue}`)}
|
|
199
|
-
@click=${() => this.#onButtonClick(propertyName, propertyValue, selected)}>
|
|
200
|
-
<devtools-icon style=${transform} name=${iconInfo.iconName}>
|
|
201
|
-
</devtools-icon>
|
|
202
|
-
</button>
|
|
203
|
-
`;
|
|
204
257
|
}
|
|
205
258
|
|
|
206
259
|
#onButtonClick(propertyName: string, propertyValue: string, selected: boolean): void {
|
|
@@ -212,84 +265,69 @@ export class StylePropertyEditor extends HTMLElement {
|
|
|
212
265
|
const newValue = isDense ? 'dense' : '';
|
|
213
266
|
|
|
214
267
|
if (currentValue) {
|
|
215
|
-
this.dispatchEvent(new PropertyDeselectedEvent(propertyName, currentValue));
|
|
268
|
+
this.element.dispatchEvent(new PropertyDeselectedEvent(propertyName, currentValue));
|
|
216
269
|
}
|
|
217
270
|
|
|
218
271
|
if (newValue) {
|
|
219
|
-
this.dispatchEvent(new PropertySelectedEvent(propertyName, newValue));
|
|
272
|
+
this.element.dispatchEvent(new PropertySelectedEvent(propertyName, newValue));
|
|
220
273
|
}
|
|
221
274
|
} else {
|
|
222
275
|
const newValue = isDense ? `${propertyValue} dense` : propertyValue;
|
|
223
276
|
|
|
224
277
|
if (currentValue) {
|
|
225
|
-
this.dispatchEvent(new PropertyDeselectedEvent(propertyName, currentValue));
|
|
278
|
+
this.element.dispatchEvent(new PropertyDeselectedEvent(propertyName, currentValue));
|
|
226
279
|
}
|
|
227
280
|
|
|
228
|
-
this.dispatchEvent(new PropertySelectedEvent(propertyName, newValue));
|
|
281
|
+
this.element.dispatchEvent(new PropertySelectedEvent(propertyName, newValue));
|
|
229
282
|
}
|
|
230
283
|
} else if (selected) {
|
|
231
|
-
this.dispatchEvent(new PropertyDeselectedEvent(propertyName, propertyValue));
|
|
284
|
+
this.element.dispatchEvent(new PropertyDeselectedEvent(propertyName, propertyValue));
|
|
232
285
|
} else {
|
|
233
|
-
this.dispatchEvent(new PropertySelectedEvent(propertyName, propertyValue));
|
|
286
|
+
this.element.dispatchEvent(new PropertySelectedEvent(propertyName, propertyValue));
|
|
234
287
|
}
|
|
235
288
|
}
|
|
236
289
|
|
|
237
290
|
protected findIcon(_query: string, _computedProperties: Map<string, string>): IconInfo|null {
|
|
238
|
-
|
|
291
|
+
return null;
|
|
239
292
|
}
|
|
240
293
|
}
|
|
241
294
|
|
|
242
295
|
export class FlexboxEditor extends StylePropertyEditor {
|
|
243
|
-
|
|
244
|
-
|
|
296
|
+
static override get editableProperties(): EditableProperty[] {
|
|
297
|
+
return FlexboxEditableProperties;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
protected override readonly containerClass = 'flexbox-editor';
|
|
245
301
|
|
|
246
302
|
protected override findIcon(query: string, computedProperties: Map<string, string>): IconInfo|null {
|
|
247
303
|
return findFlexContainerIcon(query, computedProperties);
|
|
248
304
|
}
|
|
249
305
|
}
|
|
250
306
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
interface HTMLElementTagNameMap {
|
|
255
|
-
'devtools-flexbox-editor': FlexboxEditor;
|
|
307
|
+
export class GridEditor extends StylePropertyEditor {
|
|
308
|
+
static override get editableProperties(): EditableProperty[] {
|
|
309
|
+
return GridEditableProperties;
|
|
256
310
|
}
|
|
257
|
-
}
|
|
258
311
|
|
|
259
|
-
|
|
260
|
-
readonly jslogContext = 'cssGridEditor';
|
|
261
|
-
protected override readonly editableProperties: EditableProperty[] = GridEditableProperties;
|
|
312
|
+
protected override readonly containerClass = 'grid-editor';
|
|
262
313
|
|
|
263
314
|
protected override findIcon(query: string, computedProperties: Map<string, string>): IconInfo|null {
|
|
264
315
|
return findGridContainerIcon(query, computedProperties);
|
|
265
316
|
}
|
|
266
317
|
}
|
|
267
318
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
interface HTMLElementTagNameMap {
|
|
272
|
-
'devtools-grid-editor': GridEditor;
|
|
319
|
+
export class GridLanesEditor extends StylePropertyEditor {
|
|
320
|
+
static override get editableProperties(): EditableProperty[] {
|
|
321
|
+
return GridLanesEditableProperties;
|
|
273
322
|
}
|
|
274
|
-
}
|
|
275
323
|
|
|
276
|
-
|
|
277
|
-
readonly jslogContext = 'cssGridLanesEditor';
|
|
278
|
-
protected override readonly editableProperties: EditableProperty[] = GridLanesEditableProperties;
|
|
324
|
+
protected override readonly containerClass = 'grid-lanes-editor';
|
|
279
325
|
|
|
280
326
|
protected override findIcon(query: string, computedProperties: Map<string, string>): IconInfo|null {
|
|
281
327
|
return findGridContainerIcon(query, computedProperties);
|
|
282
328
|
}
|
|
283
329
|
}
|
|
284
330
|
|
|
285
|
-
customElements.define('devtools-grid-lanes-editor', GridLanesEditor);
|
|
286
|
-
|
|
287
|
-
declare global {
|
|
288
|
-
interface HTMLElementTagNameMap {
|
|
289
|
-
'devtools-grid-lanes-editor': GridLanesEditor;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
331
|
export const FlexboxEditableProperties: Array<{
|
|
294
332
|
propertyName: string,
|
|
295
333
|
propertyValues: string[],
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
cursor: var(--override-styles-section-text-hover-cursor);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
:host-context(.collapsed):host(
|
|
20
|
+
:host-context(.collapsed):host(.has-collapse-icon) .sidebar-pane-open-brace::after {
|
|
21
21
|
content: "}";
|
|
22
22
|
}
|