chrome-devtools-frontend 1.0.1738725 → 1.0.1739869
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/.stylelintrc.json +3 -1
- package/eslint.config.mjs +127 -0
- package/front_end/application_tokens.css +0 -30
- package/front_end/core/sdk/SourceMap.ts +30 -3
- package/front_end/core/sdk/SourceMapRangeMappings.ts +57 -0
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +5 -9
- package/front_end/generated/SupportedCSSProperties.ts +16 -0
- package/front_end/models/trace/extras/TraceFilter.ts +16 -8
- package/front_end/models/trace/extras/TraceTree.ts +104 -67
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -5
- 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/helpers/Extensions.ts +1 -3
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +155 -87
- package/front_end/models/trace/helpers/Trace.ts +15 -12
- 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/panels/ai_assistance/components/chatView.css +0 -180
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +66 -3
- package/front_end/panels/application/components/backForwardCacheView.css +1 -1
- package/front_end/panels/application/resourcesPanel.css +0 -48
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -9
- package/front_end/panels/elements/StylePropertyTreeElement.ts +52 -34
- package/front_end/panels/elements/classesPaneWidget.css +3 -7
- package/front_end/panels/elements/components/CSSQuery.ts +6 -5
- package/front_end/panels/elements/metricsSidebarPane.css +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +0 -6
- package/front_end/panels/elements/stylesSidebarPane.css +0 -1
- package/front_end/panels/explain/components/consoleInsight.css +1 -6
- 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 +7 -0
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/lighthouse/lighthousePanel.css +0 -9
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +2 -2
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +2 -2
- package/front_end/panels/network/NetworkLogView.ts +9 -2
- package/front_end/panels/network/RequestTimingView.ts +16 -2
- package/front_end/panels/network/networkConfigView.css +2 -2
- package/front_end/panels/network/networkLogView.css +2 -15
- package/front_end/panels/network/networkPanel.css +0 -2
- package/front_end/panels/network/networkTimingTable.css +11 -26
- package/front_end/panels/profiler/profilesPanel.css +0 -11
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecordingView.ts +22 -1
- package/front_end/panels/recorder/StepView.ts +26 -1
- package/front_end/panels/recorder/TimelineSection.ts +22 -6
- package/front_end/panels/recorder/controlButton.css +2 -9
- package/front_end/panels/recorder/recorderPanel.css +0 -1
- package/front_end/panels/recorder/recordingView.css +32 -32
- package/front_end/panels/recorder/replaySection.css +2 -0
- package/front_end/panels/recorder/stepView.css +18 -14
- package/front_end/panels/recorder/timelineSection.css +60 -84
- package/front_end/panels/search/searchView.css +1 -1
- package/front_end/panels/sensors/SensorsView.ts +6 -21
- package/front_end/panels/sources/breakpointsView.css +3 -2
- package/front_end/panels/sources/sourcesView.css +2 -1
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +18 -5
- 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/TimelineTreeView.ts +25 -9
- package/front_end/panels/timeline/components/DetailsView.ts +7 -14
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +5 -1
- package/front_end/panels/timeline/components/interactionBreakdown.css +1 -0
- package/front_end/panels/timeline/components/networkRequestDetails.css +1 -0
- package/front_end/panels/timeline/components/networkTrackWidget.css +1 -1
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -0
- package/front_end/panels/timeline/docs/profile_calls.md +7 -9
- package/front_end/panels/timeline/timelineDetailsView.css +2 -2
- package/front_end/panels/webauthn/webauthnPane.css +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/diff_view/diffView.css +0 -2
- package/front_end/ui/components/tooltips/Tooltip.ts +29 -0
- package/front_end/ui/components/tree_outline/treeOutline.css +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +34 -20
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +41 -14
- package/front_end/ui/legacy/components/source_frame/imageView.css +2 -2
- package/front_end/ui/legacy/filter.css +6 -2
- package/front_end/ui/legacy/inspectorCommon.css +1 -53
- package/front_end/ui/legacy/listWidget.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +0 -8
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/inspector_overlay/tool_highlight.css +0 -7
- package/inspector_overlay/tool_highlight.ts +0 -1
- package/package.json +1 -1
|
@@ -29,12 +29,6 @@
|
|
|
29
29
|
container-name: --chat-ui-container;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.chat-cancel-context-button {
|
|
33
|
-
padding-bottom: 3px;
|
|
34
|
-
padding-right: var(--sys-size-3);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
32
|
.messages-container {
|
|
39
33
|
flex-grow: 1;
|
|
40
34
|
width: 100%;
|
|
@@ -50,10 +44,6 @@
|
|
|
50
44
|
}
|
|
51
45
|
}
|
|
52
46
|
|
|
53
|
-
.select-an-element-text {
|
|
54
|
-
margin-left: var(--sys-size-2);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
47
|
main {
|
|
58
48
|
overflow: hidden auto;
|
|
59
49
|
display: flex;
|
|
@@ -133,176 +123,6 @@ main {
|
|
|
133
123
|
}
|
|
134
124
|
}
|
|
135
125
|
|
|
136
|
-
.change-summary {
|
|
137
|
-
background-color: var(--sys-color-surface3);
|
|
138
|
-
border-radius: var(--sys-shape-corner-medium-small);
|
|
139
|
-
position: relative;
|
|
140
|
-
margin: 0 var(--sys-size-5) var(--sys-size-7) var(--sys-size-5);
|
|
141
|
-
padding: 0 var(--sys-size-5);
|
|
142
|
-
|
|
143
|
-
&.saved-to-disk {
|
|
144
|
-
pointer-events: none;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
& .header-container {
|
|
148
|
-
display: flex;
|
|
149
|
-
align-items: center;
|
|
150
|
-
gap: var(--sys-size-3);
|
|
151
|
-
height: var(--sys-size-14);
|
|
152
|
-
padding-left: var(--sys-size-3);
|
|
153
|
-
|
|
154
|
-
devtools-spinner {
|
|
155
|
-
width: var(--sys-size-6);
|
|
156
|
-
height: var(--sys-size-6);
|
|
157
|
-
margin-left: var(--sys-size-3);
|
|
158
|
-
margin-right: var(--sys-size-3);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
& devtools-icon.summary-badge {
|
|
162
|
-
width: var(--sys-size-8);
|
|
163
|
-
height: var(--sys-size-8);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
& .green-bright-icon {
|
|
167
|
-
color: var(--sys-color-green-bright);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
& .on-tonal-icon {
|
|
171
|
-
color: var(--sys-color-on-tonal-container);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
& .header-text {
|
|
175
|
-
font: var(--sys-typescale-body4);
|
|
176
|
-
color: var(--sys-color-on-surface);
|
|
177
|
-
white-space: nowrap;
|
|
178
|
-
overflow-x: hidden;
|
|
179
|
-
text-overflow: ellipsis;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
& .arrow {
|
|
183
|
-
margin-left: auto;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
&::marker {
|
|
187
|
-
content: '';
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
&:not(.saved-to-disk, &[open]):hover::after {
|
|
192
|
-
content: '';
|
|
193
|
-
height: 100%;
|
|
194
|
-
width: 100%;
|
|
195
|
-
border-radius: inherit;
|
|
196
|
-
position: absolute;
|
|
197
|
-
top: 0;
|
|
198
|
-
left: 0;
|
|
199
|
-
pointer-events: none;
|
|
200
|
-
background-color: var(--sys-color-state-hover-on-subtle);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
&[open]:not(.saved-to-disk) {
|
|
204
|
-
&::details-content {
|
|
205
|
-
height: fit-content;
|
|
206
|
-
padding: var(--sys-size-2) 0;
|
|
207
|
-
border-radius: inherit;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
summary .arrow {
|
|
211
|
-
transform: rotate(180deg);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
devtools-code-block {
|
|
216
|
-
margin-bottom: var(--sys-size-5);
|
|
217
|
-
|
|
218
|
-
--code-block-background-color: var(--sys-color-surface1);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.error-container {
|
|
222
|
-
display: flex;
|
|
223
|
-
align-items: center;
|
|
224
|
-
gap: var(--sys-size-3);
|
|
225
|
-
color: var(--sys-color-error);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.footer {
|
|
229
|
-
display: flex;
|
|
230
|
-
flex-flow: row wrap;
|
|
231
|
-
justify-content: space-between;
|
|
232
|
-
margin: var(--sys-size-5) 0 var(--sys-size-5) var(--sys-size-2);
|
|
233
|
-
gap: var(--sys-size-6) var(--sys-size-5);
|
|
234
|
-
|
|
235
|
-
.disclaimer-link {
|
|
236
|
-
align-self: center;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.left-side {
|
|
240
|
-
flex-grow: 1;
|
|
241
|
-
display: flex;
|
|
242
|
-
align-self: center;
|
|
243
|
-
gap: var(--sys-size-3);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.save-or-discard-buttons {
|
|
247
|
-
flex-grow: 1;
|
|
248
|
-
display: flex;
|
|
249
|
-
justify-content: flex-end;
|
|
250
|
-
gap: var(--sys-size-3);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.change-workspace {
|
|
254
|
-
display: flex;
|
|
255
|
-
flex-direction: row;
|
|
256
|
-
align-items: center;
|
|
257
|
-
gap: var(--sys-size-3);
|
|
258
|
-
min-width: var(--sys-size-22);
|
|
259
|
-
flex: 1 1 40%;
|
|
260
|
-
|
|
261
|
-
.folder-name {
|
|
262
|
-
white-space: nowrap;
|
|
263
|
-
overflow-x: hidden;
|
|
264
|
-
text-overflow: ellipsis;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.loading-text-container {
|
|
269
|
-
margin-right: var(--sys-size-3);
|
|
270
|
-
display: flex;
|
|
271
|
-
justify-content: center;
|
|
272
|
-
align-items: center;
|
|
273
|
-
gap: var(--sys-size-3);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.apply-to-workspace-container {
|
|
277
|
-
display: flex;
|
|
278
|
-
align-items: center;
|
|
279
|
-
gap: var(--sys-size-3);
|
|
280
|
-
min-width: fit-content;
|
|
281
|
-
justify-content: flex-end;
|
|
282
|
-
flex-grow: 1;
|
|
283
|
-
flex-shrink: 1;
|
|
284
|
-
|
|
285
|
-
devtools-icon {
|
|
286
|
-
/* var(--sys-size-8) is too small and var(--sys-size-9) is too big. */
|
|
287
|
-
width: 18px;
|
|
288
|
-
height: 18px;
|
|
289
|
-
margin-left: var(--sys-size-2);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
@keyframes reveal {
|
|
296
|
-
0%,
|
|
297
|
-
99% {
|
|
298
|
-
opacity: 100%;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
100% {
|
|
302
|
-
opacity: 0%;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
126
|
.sticky {
|
|
307
127
|
position: sticky;
|
|
308
128
|
bottom: 0;
|
|
@@ -119,6 +119,7 @@ export class ExpandableApplicationPanelTreeElement extends ApplicationPanelTreeE
|
|
|
119
119
|
protected emptyCategoryHeadline: string;
|
|
120
120
|
protected categoryDescription: string;
|
|
121
121
|
protected readonly settingsKey: string;
|
|
122
|
+
private wasDescendantSelected = false;
|
|
122
123
|
|
|
123
124
|
constructor(
|
|
124
125
|
resourcesPanel: ResourcesPanel, categoryName: string, emptyCategoryHeadline: string, categoryDescription: string,
|
|
@@ -164,22 +165,84 @@ export class ExpandableApplicationPanelTreeElement extends ApplicationPanelTreeE
|
|
|
164
165
|
this.categoryLink = link;
|
|
165
166
|
}
|
|
166
167
|
|
|
168
|
+
override select(omitFocus?: boolean, selectedByUser?: boolean): boolean {
|
|
169
|
+
if (this.selected && selectedByUser && !this.expanded && this.childCount() > 0) {
|
|
170
|
+
this.expand();
|
|
171
|
+
const childToSelect = this.findChildToAutoSelect();
|
|
172
|
+
if (childToSelect) {
|
|
173
|
+
childToSelect.select(omitFocus, true);
|
|
174
|
+
}
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const previousSelected = this.treeOutline?.selectedTreeElement ?? null;
|
|
179
|
+
this.wasDescendantSelected = Boolean(previousSelected?.hasAncestor(this));
|
|
180
|
+
try {
|
|
181
|
+
return super.select(omitFocus, selectedByUser);
|
|
182
|
+
} finally {
|
|
183
|
+
this.wasDescendantSelected = false;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
167
187
|
override onselect(selectedByUser: boolean|undefined): boolean {
|
|
168
188
|
super.onselect(selectedByUser);
|
|
189
|
+
if (selectedByUser && !this.wasDescendantSelected && this.childCount() > 0) {
|
|
190
|
+
if (!this.expanded) {
|
|
191
|
+
this.expand();
|
|
192
|
+
}
|
|
193
|
+
const childToSelect = this.findChildToAutoSelect();
|
|
194
|
+
if (childToSelect) {
|
|
195
|
+
childToSelect.select(/* omitFocus= */ false, /* selectedByUser= */ true);
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
169
199
|
this.updateCategoryView();
|
|
170
200
|
const item = this.createGenericStorageAiContext();
|
|
171
201
|
UI.Context.Context.instance().setFlavor(AiAssistance.StorageItem.StorageItem, item);
|
|
172
202
|
return false;
|
|
173
203
|
}
|
|
174
204
|
|
|
205
|
+
private isOriginStorageCategory(): boolean {
|
|
206
|
+
return this.settingsKey === 'cookies' || this.settingsKey === 'local-storage' ||
|
|
207
|
+
this.settingsKey === 'session-storage';
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
private getMainPageOrigin(): string {
|
|
211
|
+
const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
|
|
212
|
+
if (!target) {
|
|
213
|
+
return '';
|
|
214
|
+
}
|
|
215
|
+
const mainFrame = target.model(SDK.ResourceTreeModel.ResourceTreeModel)?.mainFrame;
|
|
216
|
+
const url = mainFrame?.unreachableUrl() || mainFrame?.url || target.inspectedURL();
|
|
217
|
+
return url ? Common.ParsedURL.ParsedURL.extractOrigin(url) : '';
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
private findChildToAutoSelect(): UI.TreeOutline.TreeElement|null {
|
|
221
|
+
if (!this.isOriginStorageCategory()) {
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
const selectableChildren = this.children().filter(child => child.selectable && !child.isExpandable());
|
|
225
|
+
if (selectableChildren.length === 0) {
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
const mainPageOrigin = this.getMainPageOrigin();
|
|
229
|
+
if (mainPageOrigin) {
|
|
230
|
+
const matchingChild = selectableChildren.find(child => child.titleAsText() === mainPageOrigin);
|
|
231
|
+
if (matchingChild) {
|
|
232
|
+
return matchingChild;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return selectableChildren.length === 1 ? selectableChildren[0] : null;
|
|
236
|
+
}
|
|
237
|
+
|
|
175
238
|
private updateCategoryView(): void {
|
|
176
239
|
const headline = this.childCount() === 0 ? this.emptyCategoryHeadline : this.categoryName;
|
|
177
240
|
this.resourcesPanel.showCategoryView(this.categoryName, headline, this.categoryDescription, this.categoryLink);
|
|
178
241
|
}
|
|
179
242
|
|
|
180
|
-
override appendChild(
|
|
181
|
-
|
|
182
|
-
|
|
243
|
+
override appendChild(child: UI.TreeOutline.TreeElement,
|
|
244
|
+
comparator?: ((arg0: UI.TreeOutline.TreeElement, arg1: UI.TreeOutline.TreeElement) => number)|
|
|
245
|
+
undefined): void {
|
|
183
246
|
super.appendChild(child, comparator);
|
|
184
247
|
// Only update if relevant (changing from 0 to 1 child).
|
|
185
248
|
if (this.selected && this.childCount() === 1) {
|
|
@@ -65,54 +65,6 @@
|
|
|
65
65
|
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.database-query-group-messages {
|
|
69
|
-
overflow-y: auto;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.database-query-prompt-container {
|
|
73
|
-
position: relative;
|
|
74
|
-
padding: var(--sys-size-1) var(--sys-size-10) var(--sys-size-1) var(--sys-size-11);
|
|
75
|
-
min-height: var(--sys-size-8);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.database-query-prompt {
|
|
79
|
-
white-space: pre-wrap;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.database-query-prompt-container .prompt-icon {
|
|
83
|
-
top: var(--sys-size-4);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.database-user-query {
|
|
87
|
-
position: relative;
|
|
88
|
-
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
|
|
89
|
-
padding: var(--sys-size-1) var(--sys-size-10) var(--sys-size-1) var(--sys-size-11);
|
|
90
|
-
min-height: var(--sys-size-8);
|
|
91
|
-
flex-shrink: 0;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.database-user-query:focus-visible {
|
|
95
|
-
background-color: var(--sys-color-state-focus-highlight);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.database-query-text {
|
|
99
|
-
color: var(--sys-color-primary-bright);
|
|
100
|
-
user-select: text;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.database-query-result {
|
|
104
|
-
position: relative;
|
|
105
|
-
padding: var(--sys-size-1) var(--sys-size-10);
|
|
106
|
-
min-height: var(--sys-size-8);
|
|
107
|
-
margin-left: calc(-1 * var(--sys-size-10));
|
|
108
|
-
padding-right: 0;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.database-query-result.error {
|
|
112
|
-
color: var(--sys-color-token-property-special);
|
|
113
|
-
user-select: text;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
68
|
.resources-sidebar {
|
|
117
69
|
padding: 0;
|
|
118
70
|
overflow-x: auto;
|
|
@@ -191,9 +191,7 @@ export class StylePropertiesSection {
|
|
|
191
191
|
|
|
192
192
|
#customHeaderText: string|undefined;
|
|
193
193
|
readonly #specificityTooltips: HTMLSpanElement;
|
|
194
|
-
|
|
195
|
-
static #nextSectionTooltipIdPrefix = 0;
|
|
196
|
-
readonly sectionTooltipIdPrefix: number = StylePropertiesSection.#nextSectionTooltipIdPrefix++;
|
|
194
|
+
readonly sectionTooltipIdFactory: Tooltips.Tooltip.IdFactory = new Tooltips.Tooltip.IdFactory();
|
|
197
195
|
|
|
198
196
|
private ghostStyleTreeElements: GhostStylePropertyTreeElement[] = [];
|
|
199
197
|
#activeAiSuggestion?: ActiveAiSuggestion;
|
|
@@ -1113,7 +1111,7 @@ export class StylePropertiesSection {
|
|
|
1113
1111
|
jslogContext: 'container-query',
|
|
1114
1112
|
};
|
|
1115
1113
|
if (style) {
|
|
1116
|
-
const tooltipPrefix =
|
|
1114
|
+
const tooltipPrefix = this.sectionTooltipIdFactory.subfactory('container', this.nestingLevel);
|
|
1117
1115
|
void containerQuery.getContainerForNode(this.matchedStyles.node().id).then(container => {
|
|
1118
1116
|
if (container) {
|
|
1119
1117
|
containerQueryElement.parseStyleQueries(this.matchedStyles, style, container.containerNode, tooltipPrefix);
|
|
@@ -1547,10 +1545,6 @@ export class StylePropertiesSection {
|
|
|
1547
1545
|
this.markSelectorHighlights();
|
|
1548
1546
|
}
|
|
1549
1547
|
|
|
1550
|
-
static getNextSpecificityTooltipId(): string {
|
|
1551
|
-
return `specificity-tooltip-${this.#nextSpecificityTooltipId++}`;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
1548
|
renderSelectors(
|
|
1555
1549
|
selectors: Array<{text: string, specificity?: Protocol.CSS.Specificity}>, matchingSelectors: boolean[],
|
|
1556
1550
|
elementToSelectorIndex: WeakMap<Element, number>): void {
|
|
@@ -1567,7 +1561,8 @@ export class StylePropertiesSection {
|
|
|
1567
1561
|
if (i > 0) {
|
|
1568
1562
|
targetElement.append(', ');
|
|
1569
1563
|
}
|
|
1570
|
-
const specificityTooltipId =
|
|
1564
|
+
const specificityTooltipId =
|
|
1565
|
+
selector.specificity ? this.sectionTooltipIdFactory.keyed('specificity-tooltip') : null;
|
|
1571
1566
|
const span = targetElement.createChild('span', 'simple-selector');
|
|
1572
1567
|
span.classList.toggle('selector-matches', matchingSelectors[i]);
|
|
1573
1568
|
elementToSelectorIndex.set(span, i);
|
|
@@ -421,9 +421,9 @@ export class VariableRenderer extends VariableRendererBase {
|
|
|
421
421
|
|
|
422
422
|
const renderedFallback = match.fallback ? Renderer.render(match.fallback, context) : undefined;
|
|
423
423
|
|
|
424
|
-
const varCall = this.#treeElement?.getTracingTooltip(
|
|
425
|
-
|
|
426
|
-
const tooltipId = this.#treeElement
|
|
424
|
+
const varCall = this.#treeElement?.getTracingTooltip('var', match.node, this.#matchedStyles, this.#computedStyles,
|
|
425
|
+
this.#computedStyleExtraFields, context);
|
|
426
|
+
const tooltipId = getTooltipId(this.#treeElement, 'custom-property-var');
|
|
427
427
|
const tooltip = tooltipId ? {tooltipId} : undefined;
|
|
428
428
|
// clang-format off
|
|
429
429
|
const varSwatch = html`<span
|
|
@@ -494,7 +494,7 @@ export class VariableNameRenderer extends VariableNameRendererBase {
|
|
|
494
494
|
const onLinkActivate = (name: string): void =>
|
|
495
495
|
handleVarDefinitionActivate(declaration ?? name, this.#stylesContainer);
|
|
496
496
|
|
|
497
|
-
const tooltipId = this.#treeElement
|
|
497
|
+
const tooltipId = getTooltipId(this.#treeElement, 'custom-property-var');
|
|
498
498
|
const tooltip = tooltipId ? {tooltipId} : undefined;
|
|
499
499
|
// clang-format off
|
|
500
500
|
return html`<devtools-link-swatch class=css-var-link .data=${{
|
|
@@ -580,9 +580,9 @@ export class AttributeRenderer extends AttributeRendererBase {
|
|
|
580
580
|
|
|
581
581
|
const renderedFallback = match.fallback ? Renderer.render(match.fallback, context) : undefined;
|
|
582
582
|
|
|
583
|
-
const attrCall = this.#treeElement?.getTracingTooltip(
|
|
584
|
-
|
|
585
|
-
const tooltipId = attributeMissing ? undefined : this.#treeElement
|
|
583
|
+
const attrCall = this.#treeElement?.getTracingTooltip('attr', match.node, this.#matchedStyles, this.#computedStyles,
|
|
584
|
+
this.#computedStyleExtraFields, context);
|
|
585
|
+
const tooltipId = attributeMissing ? undefined : getTooltipId(this.#treeElement, 'custom-attribute');
|
|
586
586
|
const tooltip = tooltipId ? {tooltipId} : undefined;
|
|
587
587
|
// clang-format off
|
|
588
588
|
const varSwatch = html`<span
|
|
@@ -690,7 +690,7 @@ export class RelativeColorChannelRenderer extends RelativeColorChannelRendererBa
|
|
|
690
690
|
return evaluation;
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
-
const tooltipId = this.#treeElement
|
|
693
|
+
const tooltipId = getTooltipId(this.#treeElement, 'relative-color-channel');
|
|
694
694
|
if (!tooltipId) {
|
|
695
695
|
return html`<span>${match.text}</span>`;
|
|
696
696
|
}
|
|
@@ -1087,7 +1087,7 @@ export class ColorMixRenderer extends ColorMixRendererBase {
|
|
|
1087
1087
|
return html`${swatch}${contentChild}`;
|
|
1088
1088
|
}
|
|
1089
1089
|
|
|
1090
|
-
const tooltipId = this.#treeElement
|
|
1090
|
+
const tooltipId = getTooltipId(this.#treeElement, 'color-mix');
|
|
1091
1091
|
if (!tooltipId) {
|
|
1092
1092
|
return html`${swatch}${contentChild}`;
|
|
1093
1093
|
}
|
|
@@ -1865,7 +1865,7 @@ export class LengthRenderer extends LengthRendererBase {
|
|
|
1865
1865
|
template,
|
|
1866
1866
|
asyncEvalCallback: () => this.getTooltipValue(match, context),
|
|
1867
1867
|
}));
|
|
1868
|
-
const tooltipId = this.#treeElement
|
|
1868
|
+
const tooltipId = getTooltipId(this.#treeElement, 'length');
|
|
1869
1869
|
if (evaluation || !tooltipId) {
|
|
1870
1870
|
return html`<span tabindex=-1>${evaluation ?? template}</span>`;
|
|
1871
1871
|
}
|
|
@@ -2396,6 +2396,35 @@ export class PositionTryRenderer extends PositionTryRendererBase {
|
|
|
2396
2396
|
}
|
|
2397
2397
|
}
|
|
2398
2398
|
|
|
2399
|
+
// Returns an id for <devtools-tooltips> that's stable across re-rendering of property values but unique across
|
|
2400
|
+
// sections and across switches between different nodes.
|
|
2401
|
+
function getTooltipId(treeElement: StylePropertyTreeElement|null, key: string): string|undefined;
|
|
2402
|
+
function getTooltipId(tooltipIdFactory: Tooltips.Tooltip.IdFactory, key: string, property: SDK.CSSProperty.CSSProperty,
|
|
2403
|
+
shorthandName?: string): string;
|
|
2404
|
+
function getTooltipId(tooltipIdFactoryOrTreeElement: Tooltips.Tooltip.IdFactory|StylePropertyTreeElement|null,
|
|
2405
|
+
key: string, property?: SDK.CSSProperty.CSSProperty, shorthandName?: string): string|undefined {
|
|
2406
|
+
if (!tooltipIdFactoryOrTreeElement) {
|
|
2407
|
+
return undefined;
|
|
2408
|
+
}
|
|
2409
|
+
if (tooltipIdFactoryOrTreeElement instanceof StylePropertyTreeElement) {
|
|
2410
|
+
const treeElement = tooltipIdFactoryOrTreeElement;
|
|
2411
|
+
return getTooltipId(treeElement.tooltipIdFactory, key, treeElement.property, treeElement.getLonghand()?.name);
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
if (!property) {
|
|
2415
|
+
return undefined;
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
// Longhands expanded from a shorthand also count preceding occurrences of the shorthand.
|
|
2419
|
+
const propertyNameForCounting = shorthandName ?? property.name;
|
|
2420
|
+
const ownIndex = property.ownerStyle.allProperties().indexOf(property);
|
|
2421
|
+
const propertyCount = property.ownerStyle.allProperties().reduce<number>(
|
|
2422
|
+
(value, other, index) =>
|
|
2423
|
+
index < ownIndex && (other.name === property.name || other.name === propertyNameForCounting) ? value + 1 :
|
|
2424
|
+
value,
|
|
2425
|
+
0);
|
|
2426
|
+
return tooltipIdFactoryOrTreeElement.keyed(key, propertyCount);
|
|
2427
|
+
}
|
|
2399
2428
|
export function getPropertyRenderers(
|
|
2400
2429
|
propertyName: string, style: SDK.CSSStyleDeclaration.CSSStyleDeclaration, stylesContainer: StylesContainer,
|
|
2401
2430
|
matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, treeElement: StylePropertyTreeElement|null,
|
|
@@ -2459,7 +2488,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2459
2488
|
private computedStyleExtraFields: Protocol.CSS.ComputedStyleExtraFields|null = null;
|
|
2460
2489
|
private contextForTest!: Context|undefined;
|
|
2461
2490
|
#gridNames: Set<string>|undefined = undefined;
|
|
2462
|
-
|
|
2491
|
+
readonly tooltipIdFactory: Tooltips.Tooltip.IdFactory;
|
|
2463
2492
|
// The changes that renderers made to the text of the value since it was rendered. Only available if the value was
|
|
2464
2493
|
// parsed.
|
|
2465
2494
|
#edits: ValueUpdateTracking|undefined;
|
|
@@ -2484,6 +2513,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2484
2513
|
this.selectable = false;
|
|
2485
2514
|
this.#stylesContainer = stylesContainer;
|
|
2486
2515
|
this.#parentSection = section;
|
|
2516
|
+
this.tooltipIdFactory = section.sectionTooltipIdFactory.subfactory('swatch-tooltip', this.name);
|
|
2487
2517
|
this.isShorthand = isShorthand;
|
|
2488
2518
|
this.newProperty = newProperty;
|
|
2489
2519
|
this.#lastCommittedProperty = {
|
|
@@ -2894,7 +2924,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2894
2924
|
}
|
|
2895
2925
|
|
|
2896
2926
|
#updateTitle(): void {
|
|
2897
|
-
this
|
|
2927
|
+
this.tooltipIdFactory.clearKeys();
|
|
2898
2928
|
this.updateState();
|
|
2899
2929
|
if (this.isExpandable()) {
|
|
2900
2930
|
this.expandElement = createIcon('triangle-right', 'expand-icon');
|
|
@@ -2937,7 +2967,8 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2937
2967
|
contents.variableName = this.property.name;
|
|
2938
2968
|
contents.value = this.#matchedStyles.computeCSSVariable(this.style, this.property.name)?.value;
|
|
2939
2969
|
contents.details = this.#stylesContainer.getRegisteredPropertyDetails(this.matchedStyles(), this.property.name);
|
|
2940
|
-
const tooltipId =
|
|
2970
|
+
const tooltipId =
|
|
2971
|
+
getTooltipId(this.tooltipIdFactory, 'custom-property-decl', this.property, this.getLonghand()?.name);
|
|
2941
2972
|
this.nameElement.setAttribute('aria-details', tooltipId);
|
|
2942
2973
|
const tooltip = new Tooltips.Tooltip.Tooltip(
|
|
2943
2974
|
{anchor: this.nameElement, variant: 'rich', id: tooltipId, jslogContext: 'elements.css-var'});
|
|
@@ -2951,7 +2982,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2951
2982
|
} else if (Common.Settings.Settings.instance()
|
|
2952
2983
|
.resolve(SettingsUI.ElementsSettings.showCSSPropertyDocumentationOnHoverSettingDescriptor)
|
|
2953
2984
|
.get()) {
|
|
2954
|
-
const tooltipId = this.
|
|
2985
|
+
const tooltipId = getTooltipId(this.tooltipIdFactory, 'property-doc', this.property, this.getLonghand()?.name);
|
|
2955
2986
|
this.nameElement.setAttribute('aria-details', tooltipId);
|
|
2956
2987
|
const tooltip = new Tooltips.Tooltip.Tooltip({
|
|
2957
2988
|
anchor: this.nameElement,
|
|
@@ -3079,7 +3110,8 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3079
3110
|
if (title === null) {
|
|
3080
3111
|
UI.Tooltip.Tooltip.install(exclamationElement, invalidMessage);
|
|
3081
3112
|
} else {
|
|
3082
|
-
const tooltipId =
|
|
3113
|
+
const tooltipId =
|
|
3114
|
+
getTooltipId(this.tooltipIdFactory, 'property-warning', this.property, this.getLonghand()?.name);
|
|
3083
3115
|
exclamationElement.setAttribute('aria-describedby', tooltipId);
|
|
3084
3116
|
const tooltip = new Tooltips.Tooltip.Tooltip({
|
|
3085
3117
|
anchor: exclamationElement,
|
|
@@ -3136,7 +3168,8 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3136
3168
|
const shorthandPositionOffset = context.matchedResult.getComputedLonghandName(node);
|
|
3137
3169
|
const {property} = context;
|
|
3138
3170
|
const stylesContainer = this.stylesContainer();
|
|
3139
|
-
const tooltipId =
|
|
3171
|
+
const tooltipId =
|
|
3172
|
+
getTooltipId(this.tooltipIdFactory, `${functionName}-trace`, this.property, this.getLonghand()?.name);
|
|
3140
3173
|
// clang-format off
|
|
3141
3174
|
return html`
|
|
3142
3175
|
<span tabIndex=-1 class=tracing-anchor aria-details=${tooltipId}>${functionName.startsWith('--') ? this.#getLinkableFunction(functionName, matchedStyles, context.property) : functionName}</span>
|
|
@@ -3181,22 +3214,6 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3181
3214
|
// clang-format on
|
|
3182
3215
|
}
|
|
3183
3216
|
|
|
3184
|
-
// Returns an id for <devtools-tooltips> that's stable across re-rendering of property values but unique across
|
|
3185
|
-
// sections and across switches between different nodes.
|
|
3186
|
-
getTooltipId(key: string): string {
|
|
3187
|
-
const sectionId = this.section().sectionTooltipIdPrefix;
|
|
3188
|
-
const tooltipKeyCount = this.#tooltipKeyCounts.get(key) ?? 0;
|
|
3189
|
-
this.#tooltipKeyCounts.set(key, tooltipKeyCount + 1);
|
|
3190
|
-
const propertyNameForCounting = this.getLonghand()?.name ?? this.name;
|
|
3191
|
-
const ownIndex = this.style.allProperties().indexOf(this.property);
|
|
3192
|
-
const propertyCount = this.style.allProperties().reduce<number>(
|
|
3193
|
-
(value, property, index) =>
|
|
3194
|
-
index < ownIndex && (property.name === this.name || property.name === propertyNameForCounting) ? value + 1 :
|
|
3195
|
-
value,
|
|
3196
|
-
0);
|
|
3197
|
-
return `swatch-tooltip-${sectionId}-${this.name}-${propertyCount}-${key}-${tooltipKeyCount}`;
|
|
3198
|
-
}
|
|
3199
|
-
|
|
3200
3217
|
updateAuthoringHint(): void {
|
|
3201
3218
|
this.listItemElement.classList.remove('inactive-property');
|
|
3202
3219
|
const existingElement = this.listItemElement.querySelector('.hint');
|
|
@@ -3232,7 +3249,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3232
3249
|
wrapper.append(hintIcon);
|
|
3233
3250
|
this.listItemElement.append(wrapper);
|
|
3234
3251
|
this.listItemElement.classList.add('inactive-property');
|
|
3235
|
-
const tooltipId = this.
|
|
3252
|
+
const tooltipId = getTooltipId(this.tooltipIdFactory, 'css-hint', this.property, this.getLonghand()?.name);
|
|
3236
3253
|
hintIcon.setAttribute('aria-details', tooltipId);
|
|
3237
3254
|
const tooltip = new Tooltips.Tooltip.Tooltip(
|
|
3238
3255
|
{anchor: hintIcon, variant: 'rich', padding: 'large', id: tooltipId, jslogContext: 'elements.css-hint'});
|
|
@@ -3269,7 +3286,8 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3269
3286
|
wrapper.append(hintIcon);
|
|
3270
3287
|
this.listItemElement.append(wrapper);
|
|
3271
3288
|
|
|
3272
|
-
const tooltipId =
|
|
3289
|
+
const tooltipId =
|
|
3290
|
+
getTooltipId(this.tooltipIdFactory, 'animation-override-hint', this.property, this.getLonghand()?.name);
|
|
3273
3291
|
hintIcon.setAttribute('aria-details', tooltipId);
|
|
3274
3292
|
|
|
3275
3293
|
const tooltip = new Tooltips.Tooltip.Tooltip({
|
|
@@ -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;
|