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
|
@@ -5,7 +5,7 @@ import '../../ui/kit/kit.js';
|
|
|
5
5
|
|
|
6
6
|
import * as Elements from '../../models/elements/elements.js';
|
|
7
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
8
|
-
import {Directives, html, type LitTemplate, render} from '../../ui/lit/lit.js';
|
|
8
|
+
import {Directives, html, type LitTemplate, nothing, render} from '../../ui/lit/lit.js';
|
|
9
9
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
10
10
|
|
|
11
11
|
import type * as ElementsComponents from './components/components.js';
|
|
@@ -13,36 +13,42 @@ import type {StylePropertiesSection} from './StylePropertiesSection.js';
|
|
|
13
13
|
import {StylePropertyTreeElement} from './StylePropertyTreeElement.js';
|
|
14
14
|
import type {StylesContainer} from './StylesContainer.js';
|
|
15
15
|
|
|
16
|
-
const {ref} = Directives;
|
|
17
|
-
type PropertySelectedEvent = ElementsComponents.StylePropertyEditor.PropertySelectedEvent;
|
|
18
|
-
type PropertyDeselectedEvent = ElementsComponents.StylePropertyEditor.PropertyDeselectedEvent;
|
|
16
|
+
const {ref, repeat} = Directives;
|
|
19
17
|
|
|
20
18
|
let instance: StyleEditorWidget|null = null;
|
|
21
|
-
export interface Editor extends HTMLElement {
|
|
22
|
-
data: {
|
|
23
|
-
authoredProperties: Map<String, String>,
|
|
24
|
-
computedProperties: Map<String, String>,
|
|
25
|
-
};
|
|
26
|
-
getEditableProperties(): Array<{propertyName: string}>;
|
|
27
|
-
jslogContext: string;
|
|
28
|
-
}
|
|
29
19
|
|
|
30
20
|
export interface ViewInput {
|
|
31
|
-
|
|
21
|
+
editorClass?: typeof ElementsComponents.StylePropertyEditor.StylePropertyEditor;
|
|
32
22
|
authoredProperties: Map<string, string>;
|
|
33
23
|
computedProperties: Map<string, string>;
|
|
24
|
+
onPropertySelected: (event: ElementsComponents.StylePropertyEditor.PropertySelectedEvent) => void;
|
|
25
|
+
onPropertyDeselected: (event: ElementsComponents.StylePropertyEditor.PropertyDeselectedEvent) => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ViewOutput {
|
|
29
|
+
waitForEditorUpdate?: () => Promise<void>;
|
|
34
30
|
}
|
|
35
31
|
|
|
36
|
-
export type View = (input: ViewInput, output:
|
|
32
|
+
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
37
33
|
|
|
38
|
-
export const DEFAULT_VIEW: View = (input,
|
|
39
|
-
input.editor.data = {
|
|
40
|
-
authoredProperties: input.authoredProperties,
|
|
41
|
-
computedProperties: input.computedProperties,
|
|
42
|
-
};
|
|
34
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
43
35
|
// clang-format off
|
|
44
36
|
render(
|
|
45
|
-
html`<div tabindex="0" autofocus>${input.
|
|
37
|
+
html`<div tabindex="0" autofocus>${input.editorClass ? repeat(
|
|
38
|
+
[input.editorClass],
|
|
39
|
+
editorClass => editorClass,
|
|
40
|
+
editorClass => html`<devtools-widget
|
|
41
|
+
${UI.Widget.widget(editorClass, {
|
|
42
|
+
authoredProperties: input.authoredProperties,
|
|
43
|
+
computedProperties: input.computedProperties,
|
|
44
|
+
})}
|
|
45
|
+
${UI.Widget.widgetRef(editorClass, editor => {
|
|
46
|
+
output.waitForEditorUpdate = () => editor.updateComplete;
|
|
47
|
+
})}
|
|
48
|
+
@propertyselected=${input.onPropertySelected}
|
|
49
|
+
@propertydeselected=${input.onPropertyDeselected}
|
|
50
|
+
></devtools-widget>`,
|
|
51
|
+
) : nothing}</div>`,
|
|
46
52
|
target, {container: {classes: ['with-padding']}});
|
|
47
53
|
// clang-format on
|
|
48
54
|
};
|
|
@@ -51,54 +57,59 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
51
57
|
* Thin UI.Widget wrapper around style editors to allow using it as a popover.
|
|
52
58
|
*/
|
|
53
59
|
export class StyleEditorWidget extends UI.Widget.VBox {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
#editorClass?: typeof ElementsComponents.StylePropertyEditor.StylePropertyEditor;
|
|
61
|
+
#stylesContainer?: StylesContainer;
|
|
62
|
+
#section?: StylePropertiesSection;
|
|
57
63
|
readonly #view: View;
|
|
64
|
+
readonly #viewOutput: ViewOutput = {};
|
|
58
65
|
|
|
59
66
|
#triggerKey: string|undefined;
|
|
60
67
|
#initialProperties: Map<string, string>|null = null;
|
|
61
68
|
|
|
62
69
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
63
|
-
super(element
|
|
70
|
+
super(element);
|
|
64
71
|
this.#view = view;
|
|
65
|
-
this.onPropertySelected = this.onPropertySelected.bind(this);
|
|
66
|
-
this.onPropertyDeselected = this.onPropertyDeselected.bind(this);
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
getSection(): StylePropertiesSection|undefined {
|
|
70
|
-
return this
|
|
75
|
+
return this.#section;
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
async onPropertySelected(event: PropertySelectedEvent): Promise<void> {
|
|
74
|
-
if (!this
|
|
78
|
+
async onPropertySelected(event: ElementsComponents.StylePropertyEditor.PropertySelectedEvent): Promise<void> {
|
|
79
|
+
if (!this.#section) {
|
|
75
80
|
return;
|
|
76
81
|
}
|
|
77
|
-
const
|
|
78
|
-
target
|
|
82
|
+
const {name, value} = event.data;
|
|
83
|
+
const target = ensureTreeElementForProperty(this.#section, name);
|
|
84
|
+
target.property.value = value;
|
|
79
85
|
target.updateTitle();
|
|
80
86
|
await target.applyStyleText(target.renderedPropertyText(), false);
|
|
87
|
+
if (this.#section) {
|
|
88
|
+
this.#stylesContainer?.refreshUpdate(this.#section, target, true);
|
|
89
|
+
}
|
|
81
90
|
this.requestUpdate();
|
|
82
91
|
}
|
|
83
92
|
|
|
84
|
-
async onPropertyDeselected(event: PropertyDeselectedEvent): Promise<void> {
|
|
85
|
-
if (!this
|
|
93
|
+
async onPropertyDeselected(event: ElementsComponents.StylePropertyEditor.PropertyDeselectedEvent): Promise<void> {
|
|
94
|
+
if (!this.#section) {
|
|
86
95
|
return;
|
|
87
96
|
}
|
|
88
|
-
const
|
|
97
|
+
const {name} = event.data;
|
|
98
|
+
const target = ensureTreeElementForProperty(this.#section, name);
|
|
89
99
|
await target.applyStyleText('', false);
|
|
100
|
+
if (this.#section) {
|
|
101
|
+
this.#stylesContainer?.refreshUpdate(this.#section, target, true);
|
|
102
|
+
}
|
|
90
103
|
this.requestUpdate();
|
|
91
104
|
}
|
|
92
105
|
|
|
93
106
|
bindContext(stylesContainer: StylesContainer, section: StylePropertiesSection): void {
|
|
94
|
-
this
|
|
95
|
-
this
|
|
107
|
+
this.#stylesContainer = stylesContainer;
|
|
108
|
+
this.#section = section;
|
|
96
109
|
if (!this.#initialProperties) {
|
|
97
110
|
this.#initialProperties =
|
|
98
|
-
this
|
|
111
|
+
this.#editorClass ? getAuthoredStyles(section, this.#editorClass.editableProperties) : new Map();
|
|
99
112
|
}
|
|
100
|
-
this.editor?.addEventListener('propertyselected', this.onPropertySelected);
|
|
101
|
-
this.editor?.addEventListener('propertydeselected', this.onPropertyDeselected);
|
|
102
113
|
}
|
|
103
114
|
|
|
104
115
|
setTriggerKey(value: string): void {
|
|
@@ -110,25 +121,36 @@ export class StyleEditorWidget extends UI.Widget.VBox {
|
|
|
110
121
|
}
|
|
111
122
|
|
|
112
123
|
unbindContext(): void {
|
|
113
|
-
this
|
|
114
|
-
this
|
|
115
|
-
|
|
116
|
-
|
|
124
|
+
this.#stylesContainer = undefined;
|
|
125
|
+
this.#section = undefined;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
#clearEditor(): void {
|
|
129
|
+
this.#editorClass = undefined;
|
|
130
|
+
this.#initialProperties = null;
|
|
131
|
+
this.#viewOutput.waitForEditorUpdate = undefined;
|
|
132
|
+
this.#view({
|
|
133
|
+
authoredProperties: new Map(),
|
|
134
|
+
computedProperties: new Map(),
|
|
135
|
+
onPropertySelected: this.onPropertySelected.bind(this),
|
|
136
|
+
onPropertyDeselected: this.onPropertyDeselected.bind(this),
|
|
137
|
+
},
|
|
138
|
+
this.#viewOutput, this.contentElement);
|
|
117
139
|
}
|
|
118
140
|
|
|
119
141
|
#trackChanges(): void {
|
|
120
142
|
const initialProperties = this.#initialProperties;
|
|
121
143
|
this.#initialProperties = null;
|
|
122
|
-
if (!this
|
|
144
|
+
if (!this.#editorClass || !this.#section || !this.#stylesContainer || !initialProperties) {
|
|
123
145
|
return;
|
|
124
146
|
}
|
|
125
|
-
const finalProperties = getAuthoredStyles(this
|
|
126
|
-
const node = this
|
|
127
|
-
const ruleHeader = this
|
|
128
|
-
for (const {propertyName} of this.
|
|
147
|
+
const finalProperties = getAuthoredStyles(this.#section, this.#editorClass.editableProperties);
|
|
148
|
+
const node = this.#stylesContainer.node() ?? this.#section.matchedStyles.node();
|
|
149
|
+
const ruleHeader = this.#section.headerText();
|
|
150
|
+
for (const {propertyName} of this.#editorClass.editableProperties) {
|
|
129
151
|
const oldValue = initialProperties.get(propertyName) ?? '';
|
|
130
152
|
const newValue = finalProperties.get(propertyName) ?? '';
|
|
131
|
-
Elements.StyleChanges.trackStylePropertyEdit(this
|
|
153
|
+
Elements.StyleChanges.trackStylePropertyEdit(this.#stylesContainer.changeTracker, node, {
|
|
132
154
|
ruleHeader,
|
|
133
155
|
oldName: oldValue ? propertyName : '',
|
|
134
156
|
oldValue,
|
|
@@ -137,21 +159,32 @@ export class StyleEditorWidget extends UI.Widget.VBox {
|
|
|
137
159
|
});
|
|
138
160
|
}
|
|
139
161
|
}
|
|
162
|
+
|
|
140
163
|
async render(): Promise<void> {
|
|
141
|
-
if (!this
|
|
164
|
+
if (!this.#editorClass) {
|
|
142
165
|
return;
|
|
143
166
|
}
|
|
167
|
+
const computedProperties = this.#stylesContainer ? await fetchComputedStyles(this.#stylesContainer) : new Map();
|
|
168
|
+
if (!this.#editorClass) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const authoredProperties =
|
|
172
|
+
this.#section ? getAuthoredStyles(this.#section, this.#editorClass.editableProperties) : new Map();
|
|
144
173
|
this.#view({
|
|
145
|
-
|
|
146
|
-
authoredProperties
|
|
147
|
-
|
|
148
|
-
|
|
174
|
+
editorClass: this.#editorClass,
|
|
175
|
+
authoredProperties,
|
|
176
|
+
computedProperties,
|
|
177
|
+
onPropertySelected: this.onPropertySelected.bind(this),
|
|
178
|
+
onPropertyDeselected: this.onPropertyDeselected.bind(this),
|
|
149
179
|
},
|
|
150
|
-
|
|
180
|
+
this.#viewOutput, this.contentElement);
|
|
181
|
+
await this.#viewOutput.waitForEditorUpdate?.();
|
|
182
|
+
if (this.#stylesContainer?.swatchPopoverHelper().isShowing(this)) {
|
|
183
|
+
this.#stylesContainer.swatchPopoverHelper().reposition();
|
|
184
|
+
}
|
|
151
185
|
}
|
|
152
186
|
|
|
153
187
|
override async performUpdate(): Promise<void> {
|
|
154
|
-
await super.performUpdate();
|
|
155
188
|
await this.render();
|
|
156
189
|
}
|
|
157
190
|
|
|
@@ -162,15 +195,14 @@ export class StyleEditorWidget extends UI.Widget.VBox {
|
|
|
162
195
|
return instance;
|
|
163
196
|
}
|
|
164
197
|
|
|
165
|
-
setEditor(editorClass:
|
|
166
|
-
|
|
167
|
-
this.editor = new editorClass();
|
|
168
|
-
}
|
|
198
|
+
setEditor(editorClass: typeof ElementsComponents.StylePropertyEditor.StylePropertyEditor): void {
|
|
199
|
+
this.#editorClass = editorClass;
|
|
169
200
|
}
|
|
170
201
|
|
|
171
202
|
static createTriggerButton(stylesContainer: StylesContainer, section: StylePropertiesSection,
|
|
172
|
-
editorClass:
|
|
173
|
-
|
|
203
|
+
editorClass: typeof ElementsComponents.StylePropertyEditor.StylePropertyEditor,
|
|
204
|
+
buttonTitle: string, triggerKey: string, jslogContext: string,
|
|
205
|
+
onClick?: () => void): LitTemplate {
|
|
174
206
|
const popoverHelper = stylesContainer.swatchPopoverHelper();
|
|
175
207
|
let triggerButton: Element|undefined;
|
|
176
208
|
// clang-format off
|
|
@@ -195,20 +227,34 @@ export class StyleEditorWidget extends UI.Widget.VBox {
|
|
|
195
227
|
return;
|
|
196
228
|
}
|
|
197
229
|
const widget = StyleEditorWidget.instance();
|
|
230
|
+
if (popoverHelper.isShowing()) {
|
|
231
|
+
const isSameTrigger = popoverHelper.isShowing(widget) && widget.getTriggerKey() === triggerKey;
|
|
232
|
+
popoverHelper.hide(true);
|
|
233
|
+
if (isSameTrigger) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
198
237
|
widget.setEditor(editorClass);
|
|
199
238
|
widget.bindContext(stylesContainer, section);
|
|
200
239
|
widget.setTriggerKey(triggerKey);
|
|
201
240
|
await widget.render();
|
|
202
|
-
|
|
241
|
+
if (!triggerButton.isConnected) {
|
|
242
|
+
widget.unbindContext();
|
|
243
|
+
widget.#clearEditor();
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
203
246
|
const scrollerElement = triggerButton.enclosingNodeOrSelfWithClass('style-panes-wrapper');
|
|
204
247
|
const onScroll = (): void => {
|
|
205
248
|
popoverHelper.hide(true);
|
|
206
249
|
};
|
|
207
250
|
const onStylesUpdateCompleted = widget.requestUpdate.bind(widget);
|
|
208
251
|
stylesContainer.addStyleUpdateListener(onStylesUpdateCompleted);
|
|
252
|
+
stylesContainer.setEditingStyle(true);
|
|
209
253
|
popoverHelper.show(widget, triggerButton, () => {
|
|
254
|
+
stylesContainer.setEditingStyle(false);
|
|
210
255
|
widget.#trackChanges();
|
|
211
256
|
widget.unbindContext();
|
|
257
|
+
widget.#clearEditor();
|
|
212
258
|
if (scrollerElement) {
|
|
213
259
|
scrollerElement.removeEventListener('scroll', onScroll);
|
|
214
260
|
}
|
|
@@ -218,6 +264,7 @@ export class StyleEditorWidget extends UI.Widget.VBox {
|
|
|
218
264
|
scrollerElement.addEventListener('scroll', onScroll);
|
|
219
265
|
}
|
|
220
266
|
}}
|
|
267
|
+
@mousedown=${(event: Event) => event.consume()}
|
|
221
268
|
@mouseup=${(event: Event) => {
|
|
222
269
|
// Stop propagation to prevent the property editor from being activated.
|
|
223
270
|
event.stopPropagation();
|
|
@@ -63,6 +63,7 @@ import {
|
|
|
63
63
|
type Context,
|
|
64
64
|
GhostStylePropertyTreeElement,
|
|
65
65
|
handleVarDefinitionActivate,
|
|
66
|
+
type StylePropertyData,
|
|
66
67
|
StylePropertyTreeElement,
|
|
67
68
|
} from './StylePropertyTreeElement.js';
|
|
68
69
|
import type {StylesContainer} from './StylesContainer.js';
|
|
@@ -191,9 +192,7 @@ export class StylePropertiesSection {
|
|
|
191
192
|
|
|
192
193
|
#customHeaderText: string|undefined;
|
|
193
194
|
readonly #specificityTooltips: HTMLSpanElement;
|
|
194
|
-
|
|
195
|
-
static #nextSectionTooltipIdPrefix = 0;
|
|
196
|
-
readonly sectionTooltipIdPrefix: number = StylePropertiesSection.#nextSectionTooltipIdPrefix++;
|
|
195
|
+
readonly sectionTooltipIdFactory: Tooltips.Tooltip.IdFactory = new Tooltips.Tooltip.IdFactory();
|
|
197
196
|
|
|
198
197
|
private ghostStyleTreeElements: GhostStylePropertyTreeElement[] = [];
|
|
199
198
|
#activeAiSuggestion?: ActiveAiSuggestion;
|
|
@@ -1113,7 +1112,7 @@ export class StylePropertiesSection {
|
|
|
1113
1112
|
jslogContext: 'container-query',
|
|
1114
1113
|
};
|
|
1115
1114
|
if (style) {
|
|
1116
|
-
const tooltipPrefix =
|
|
1115
|
+
const tooltipPrefix = this.sectionTooltipIdFactory.subfactory('container', this.nestingLevel);
|
|
1117
1116
|
void containerQuery.getContainerForNode(this.matchedStyles.node().id).then(container => {
|
|
1118
1117
|
if (container) {
|
|
1119
1118
|
containerQueryElement.parseStyleQueries(this.matchedStyles, style, container.containerNode, tooltipPrefix);
|
|
@@ -1268,6 +1267,7 @@ export class StylePropertiesSection {
|
|
|
1268
1267
|
if (lastAncestor && this.#collapseIcon && this.#statusElement) {
|
|
1269
1268
|
this.#collapseIcon.slot = 'indent';
|
|
1270
1269
|
lastAncestor.append(this.#collapseIcon, this.#statusElement);
|
|
1270
|
+
lastAncestor.classList.add('has-collapse-icon');
|
|
1271
1271
|
}
|
|
1272
1272
|
this.#ancestorClosingBracesElement.firstElementChild?.classList.add('sidebar-pane-closing-brace');
|
|
1273
1273
|
}
|
|
@@ -1314,17 +1314,24 @@ export class StylePropertiesSection {
|
|
|
1314
1314
|
return (curSection?.editable) ? curSection : null;
|
|
1315
1315
|
}
|
|
1316
1316
|
|
|
1317
|
-
|
|
1318
|
-
this.
|
|
1317
|
+
findProperty(propertyOrName: SDK.CSSProperty.CSSProperty|string): StylePropertyData|undefined {
|
|
1318
|
+
return this.propertiesTreeOutline.rootElement().children().findLast(
|
|
1319
|
+
(child): child is StylePropertyTreeElement => child instanceof StylePropertyTreeElement &&
|
|
1320
|
+
(typeof propertyOrName === 'string' ? child.property.name === propertyOrName :
|
|
1321
|
+
child.property === propertyOrName));
|
|
1319
1322
|
}
|
|
1320
1323
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1324
|
+
refreshUpdate(editedProperty: StylePropertyData): void {
|
|
1325
|
+
this.stylesContainer.refreshUpdate(this, editedProperty);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
updateVarFunctions(editedProperty: StylePropertyData): void {
|
|
1329
|
+
if (!editedProperty.property.name.startsWith('--')) {
|
|
1323
1330
|
return;
|
|
1324
1331
|
}
|
|
1325
1332
|
let child = this.propertiesTreeOutline.firstChild();
|
|
1326
1333
|
while (child) {
|
|
1327
|
-
if (child
|
|
1334
|
+
if (child instanceof StylePropertyTreeElement && child !== editedProperty) {
|
|
1328
1335
|
child.refreshIfComputedValueChanged();
|
|
1329
1336
|
}
|
|
1330
1337
|
child = child.traverseNextTreeElement(false /* skipUnrevealed */, null /* stayWithin */, true /* dontPopulate */);
|
|
@@ -1547,10 +1554,6 @@ export class StylePropertiesSection {
|
|
|
1547
1554
|
this.markSelectorHighlights();
|
|
1548
1555
|
}
|
|
1549
1556
|
|
|
1550
|
-
static getNextSpecificityTooltipId(): string {
|
|
1551
|
-
return `specificity-tooltip-${this.#nextSpecificityTooltipId++}`;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
1557
|
renderSelectors(
|
|
1555
1558
|
selectors: Array<{text: string, specificity?: Protocol.CSS.Specificity}>, matchingSelectors: boolean[],
|
|
1556
1559
|
elementToSelectorIndex: WeakMap<Element, number>): void {
|
|
@@ -1567,7 +1570,8 @@ export class StylePropertiesSection {
|
|
|
1567
1570
|
if (i > 0) {
|
|
1568
1571
|
targetElement.append(', ');
|
|
1569
1572
|
}
|
|
1570
|
-
const specificityTooltipId =
|
|
1573
|
+
const specificityTooltipId =
|
|
1574
|
+
selector.specificity ? this.sectionTooltipIdFactory.keyed('specificity-tooltip') : null;
|
|
1571
1575
|
const span = targetElement.createChild('span', 'simple-selector');
|
|
1572
1576
|
span.classList.toggle('selector-matches', matchingSelectors[i]);
|
|
1573
1577
|
elementToSelectorIndex.set(span, i);
|