chrome-devtools-frontend 1.0.1721762 → 1.0.1726686
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/review-ui-widgets/SKILL.md +7 -7
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +12 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +3 -3
- package/.agents/skills/ui-widgets/SKILL.md +2 -1
- package/docs/cookbook/dependencies.md +57 -11
- package/docs/get_the_code.md +15 -0
- package/front_end/core/i18n/collect-ui-strings.js +58 -12
- package/front_end/core/i18n/i18nImpl.ts +1 -1
- package/front_end/core/root/Runtime.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +16 -0
- package/front_end/core/sdk/WebAuthnModel.ts +17 -10
- package/front_end/entrypoints/js_app/js_app.ts +2 -5
- package/front_end/entrypoints/node_app/node_app.ts +2 -3
- package/front_end/generated/InspectorBackendCommands.ts +3 -3
- package/front_end/generated/protocol.ts +17 -0
- package/front_end/models/ai_assistance/skills/lighthouse.md +2 -1
- package/front_end/models/ai_assistance/skills/network.md +1 -0
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +26 -2
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +2 -7
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +2 -2
- package/front_end/models/comment_manager/CD4ABridge.ts +4 -0
- package/front_end/models/comment_manager/CommentManager.ts +0 -6
- package/front_end/models/comment_manager/CommentThread.ts +39 -19
- package/front_end/models/elements/StyleChanges.ts +66 -0
- package/front_end/models/trace/EventsSerializer.ts +2 -7
- package/front_end/models/trace/ModelImpl.ts +0 -2
- package/front_end/models/trace/handlers/FlowsHandler.ts +37 -29
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +13 -6
- package/front_end/models/trace/helpers/SyntheticEvents.ts +10 -37
- package/front_end/models/trace/insights/RenderBlocking.ts +3 -1
- package/front_end/models/trace/lantern/simulation/Simulator.ts +4 -0
- package/front_end/models/trace/lantern/types/Lantern.ts +1 -0
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +92 -0
- package/front_end/panels/accessibility/SourceOrderView.ts +1 -1
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingListView.css +3 -1
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingView.css +12 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +90 -0
- package/front_end/panels/application/StorageView.ts +348 -254
- package/front_end/panels/application/SubAppsView.ts +159 -0
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/preloading/PreloadingView.ts +360 -336
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +3 -3
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +6 -3
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +17 -17
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/application/preloading/preloadingView.css +12 -4
- package/front_end/panels/application/preloading/preloadingViewDropDown.css +1 -1
- package/front_end/panels/application/storageView.css +16 -21
- package/front_end/panels/application/subAppsView.css +21 -0
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -2
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +6 -8
- package/front_end/panels/comments/CommentsPane.ts +26 -9
- package/front_end/panels/comments/commentsPane.css +25 -6
- package/front_end/panels/common/CommentThreadWidget.ts +2 -2
- package/front_end/panels/common/CommentsOverlayWidget.ts +94 -35
- package/front_end/panels/common/commentThreadWidget.css +17 -0
- package/front_end/panels/common/commentsOverlay.css +5 -10
- package/front_end/panels/common/common-meta.ts +11 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +133 -89
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +7 -33
- package/front_end/panels/elements/DOMTreeElementWidget.ts +3 -1
- package/front_end/panels/elements/DOMTreeWidget.ts +19 -3
- package/front_end/panels/elements/ElementStatePaneWidget.ts +11 -1
- package/front_end/panels/elements/PropertyRenderer.ts +3 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +87 -39
- package/front_end/panels/elements/StylePropertiesSection.ts +32 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +227 -162
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -0
- package/front_end/panels/event_listeners/EventListenersView.ts +11 -8
- package/front_end/panels/layer_viewer/Layers3DView.ts +21 -37
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/network/NetworkConfigView.ts +12 -10
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +12 -5
- package/front_end/panels/network/networkConfigView.css +8 -8
- package/front_end/panels/profiler/HeapProfileView.ts +28 -6
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +7 -3
- package/front_end/panels/protocol_monitor/JSONEditor.ts +0 -1
- package/front_end/panels/recorder/RecorderPanel.ts +2 -2
- package/front_end/panels/screencast/ScreencastView.ts +3 -6
- package/front_end/panels/security/SecurityPanelSidebar.ts +0 -31
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +9 -16
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +358 -345
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +136 -121
- package/front_end/panels/sources/NavigatorView.ts +105 -45
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +8 -5
- package/front_end/panels/sources/SourcesNavigator.ts +421 -213
- package/front_end/panels/sources/SourcesPanel.ts +9 -5
- package/front_end/panels/sources/TabbedEditorContainer.ts +41 -18
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -5
- package/front_end/panels/sources/sources-meta.ts +4 -15
- package/front_end/panels/sources/sourcesNavigator.css +5 -0
- package/front_end/panels/timeline/ModificationsManager.ts +0 -2
- package/front_end/panels/timeline/README.md +2 -0
- package/front_end/panels/timeline/TimelineCommentContext.ts +171 -0
- package/front_end/panels/timeline/TimelineCommentController.ts +168 -30
- package/front_end/panels/timeline/TimelinePanel.ts +4 -0
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/timeline.ts +2 -0
- package/front_end/panels/timeline/utils/Treemap.ts +8 -0
- package/front_end/panels/webauthn/WebauthnPane.ts +15 -13
- 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 +113 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +21311 -20981
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +36 -0
- 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 +22 -0
- 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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +20 -18
- 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 +20 -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 +2 -2
- 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/Page.d.ts +40 -1
- 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 +3 -1
- 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 +2 -0
- 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 +41 -5
- 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/HTTPRequest.d.ts +2 -1
- 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 +23 -2
- 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/Input.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +3 -2
- 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 +13 -1
- 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/core/Request.d.ts +1 -0
- 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 +18 -11
- 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/Accessibility.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +24 -12
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js +13 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts +22 -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 +75 -9
- 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/NetworkEventManager.d.ts +18 -4
- 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 +8 -4
- 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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +65 -26
- 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 +19 -0
- 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/ScreenRecording.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts +1 -0
- 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 +4 -0
- 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/TargetManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js +95 -8
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts +0 -8
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +8 -24
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +5 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +9 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/WaitTask.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/WaitTask.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/WaitTask.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts +10 -0
- 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 +30 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.js +33 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.js.map +1 -1
- 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 +1 -2
- 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/NodeWebSocketTransport.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/encoding.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/encoding.d.ts.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 +113 -3
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +42 -0
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +25 -22
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +22 -2
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +45 -2
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +79 -32
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +32 -12
- package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +18 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/Request.ts +21 -13
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +12 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +37 -16
- package/front_end/third_party/puppeteer/package/src/cdp/EmulationManager.ts +14 -11
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +7 -1
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +101 -14
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkEventManager.ts +26 -6
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +111 -29
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +37 -1
- package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +5 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +122 -7
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +13 -33
- package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +10 -5
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +10 -0
- package/front_end/third_party/puppeteer/package/src/common/WaitTask.ts +12 -0
- package/front_end/third_party/puppeteer/package/src/common/util.ts +39 -5
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/Poller.ts +35 -3
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +4 -2
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/encoding.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +3 -0
- package/front_end/ui/comments/CommentOverlayManager.ts +2 -4
- package/front_end/ui/components/lists/List.ts +14 -1
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +23 -14
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +3 -0
- package/front_end/ui/helpers/OpenInNewTab.ts +8 -0
- package/front_end/ui/legacy/LinkContextMenuProvider.ts +1 -1
- package/front_end/ui/legacy/ListWidget.ts +14 -18
- package/front_end/ui/legacy/TabbedPane.ts +46 -3
- package/front_end/ui/legacy/Toolbar.ts +0 -1
- package/front_end/ui/legacy/Treeoutline.ts +10 -3
- package/front_end/ui/legacy/UIUtils.ts +5 -2
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +19 -6
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +20 -11
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +27 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
- package/package.json +1 -1
|
@@ -277,6 +277,9 @@ function getElementLoggingConfig(element: Element): VisualLogging.LoggingConfig|
|
|
|
277
277
|
export function hasDisallowedCommentAncestor(element: Element): boolean {
|
|
278
278
|
let current: Element|null = element;
|
|
279
279
|
while (current) {
|
|
280
|
+
if (current.classList.contains('comments-overlay-container')) {
|
|
281
|
+
return true;
|
|
282
|
+
}
|
|
280
283
|
const config = getElementLoggingConfig(current);
|
|
281
284
|
if (config && (DISALLOWED_COMMENT_ANCESTORS.has(config.ve) || config.context === 'comments')) {
|
|
282
285
|
return true;
|
|
@@ -37,7 +37,6 @@ export interface PinPositionData {
|
|
|
37
37
|
top: number;
|
|
38
38
|
left: number;
|
|
39
39
|
visible: boolean;
|
|
40
|
-
index: number;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
export interface HighlightRectData {
|
|
@@ -238,8 +237,8 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
238
237
|
return this.#pinPositions;
|
|
239
238
|
}
|
|
240
239
|
|
|
241
|
-
|
|
242
|
-
return this.#highlightRects;
|
|
240
|
+
getHighlight(threadId: string): HighlightRectData|undefined {
|
|
241
|
+
return this.#highlightRects.find(h => h.id === threadId);
|
|
243
242
|
}
|
|
244
243
|
|
|
245
244
|
getAnchorElement(thread: CommentThread): Element|undefined {
|
|
@@ -490,7 +489,6 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
490
489
|
top: scrollY + visibleRect.top - 12 + offsetY,
|
|
491
490
|
left: scrollX + visibleRect.right - 12,
|
|
492
491
|
visible: true,
|
|
493
|
-
index: thread.index,
|
|
494
492
|
});
|
|
495
493
|
|
|
496
494
|
newHighlights.push({
|
|
@@ -107,7 +107,10 @@ export class List extends HTMLElement {
|
|
|
107
107
|
|
|
108
108
|
createSlottedListItem(index: number): TemplateResult {
|
|
109
109
|
return html`
|
|
110
|
-
<li
|
|
110
|
+
<li
|
|
111
|
+
role='listitem'
|
|
112
|
+
tabindex=${this.#disableListItemFocus ? '-1' : '0'}
|
|
113
|
+
@keydown=${this.#deletable ? this.#dispatchRemoveOnDelete.bind(this, index) : nothing}>
|
|
111
114
|
<slot name='slot-${index}'></slot>
|
|
112
115
|
<div class='controls-container'>
|
|
113
116
|
<div class='controls-gradient'></div>
|
|
@@ -166,6 +169,16 @@ export class List extends HTMLElement {
|
|
|
166
169
|
this.dispatchEvent(new ItemRemoveEvent({index}));
|
|
167
170
|
}
|
|
168
171
|
|
|
172
|
+
#dispatchRemoveOnDelete(index: number, event: KeyboardEvent): void {
|
|
173
|
+
if (!this.#deletable || event.target !== event.currentTarget ||
|
|
174
|
+
(event.key !== 'Delete' && event.key !== 'Backspace')) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
this.#dispatchRemove(index);
|
|
180
|
+
}
|
|
181
|
+
|
|
169
182
|
#dispatchEdit(index: number): void {
|
|
170
183
|
this.dispatchEvent(new ItemEditEvent({index}));
|
|
171
184
|
}
|
|
@@ -68,7 +68,7 @@ export class PreviewToggle extends HTMLElement {
|
|
|
68
68
|
<style>${previewToggleStyles}</style>
|
|
69
69
|
<div class="container">
|
|
70
70
|
<devtools-checkbox
|
|
71
|
-
|
|
71
|
+
.checked=${Boolean(checked)}
|
|
72
72
|
@change=${this.#checkboxChanged}
|
|
73
73
|
aria-label=${this.#name} >
|
|
74
74
|
<devtools-icon name="experiment" class="medium">
|
|
@@ -246,24 +246,33 @@ export class AiCodeCompletionProvider {
|
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
key: 'Tab',
|
|
249
|
-
run: ()
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
if (!accepted) {
|
|
255
|
-
return false;
|
|
256
|
-
}
|
|
257
|
-
if (suggestion?.rpcGlobalId) {
|
|
258
|
-
this.#aiCodeCompletion?.registerUserAcceptance(suggestion.rpcGlobalId, suggestion.sampleId);
|
|
259
|
-
}
|
|
260
|
-
this.#aiCodeCompletionConfig?.onSuggestionAccepted(this.#aiCodeCompletionCitations);
|
|
261
|
-
return true;
|
|
262
|
-
},
|
|
249
|
+
run: this.#acceptAiSuggestion.bind(this),
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
key: 'Enter',
|
|
253
|
+
run: this.#acceptAiSuggestion.bind(this),
|
|
263
254
|
},
|
|
264
255
|
];
|
|
265
256
|
}
|
|
266
257
|
|
|
258
|
+
#acceptAiSuggestion(): boolean {
|
|
259
|
+
if (!this.#aiCodeCompletion || !this.#editor || !hasActiveAiSuggestion(this.#editor.state)) {
|
|
260
|
+
return false;
|
|
261
|
+
}
|
|
262
|
+
if (this.#editor.state.field(aiAutoCompleteSuggestionState)?.source !== AiSuggestionSource.COMPLETION) {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
const {accepted, suggestion} = acceptAiAutoCompleteSuggestion(this.#editor.editor);
|
|
266
|
+
if (!accepted) {
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
if (suggestion?.rpcGlobalId) {
|
|
270
|
+
this.#aiCodeCompletion?.registerUserAcceptance(suggestion.rpcGlobalId, suggestion.sampleId);
|
|
271
|
+
}
|
|
272
|
+
this.#aiCodeCompletionConfig?.onSuggestionAccepted(this.#aiCodeCompletionCitations);
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
|
|
267
276
|
#detachTeaser(): void {
|
|
268
277
|
if (!this.#teaser) {
|
|
269
278
|
return;
|
|
@@ -270,6 +270,9 @@ export class AiCodeGenerationProvider {
|
|
|
270
270
|
if (!this.#aiCodeGeneration || !this.#editor || !hasActiveAiSuggestion(this.#editor.state)) {
|
|
271
271
|
return false;
|
|
272
272
|
}
|
|
273
|
+
if (this.#editor.state.field(aiAutoCompleteSuggestionState)?.source !== AiSuggestionSource.GENERATION) {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
273
276
|
const {accepted, suggestion} = acceptAiAutoCompleteSuggestion(this.#editor.editor);
|
|
274
277
|
if (!accepted) {
|
|
275
278
|
return false;
|
|
@@ -57,6 +57,8 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
57
57
|
* Chrome ("stable", "beta", "dev", or "canary").
|
|
58
58
|
*
|
|
59
59
|
* @param url the URL to open in a new tab.
|
|
60
|
+
* @param allowPrivileged whether to also open URLs with privileged or other non-web-safe schemes. By default,
|
|
61
|
+
* only URLs with web-safe schemes (see `Common.ParsedURL.hasWebSafeScheme`) are opened.
|
|
60
62
|
* @throws TypeError if `url` is not a valid URL.
|
|
61
63
|
* @see https://en.wikipedia.org/wiki/UTM_parameters
|
|
62
64
|
*/
|
|
@@ -66,6 +68,12 @@ export function openInNewTab(url: URL|string, allowPrivileged?: boolean): void {
|
|
|
66
68
|
return;
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
// Only open URLs with privileged or other non-web-safe schemes (such as `chrome:`, `devtools:`, or `file:`)
|
|
72
|
+
// when the caller explicitly allows it.
|
|
73
|
+
if (!allowPrivileged && !Common.ParsedURL.hasWebSafeScheme(url)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
69
77
|
// Navigating to a chrome:// link via a normal anchor doesn't work, so we "navigate"
|
|
70
78
|
// there using CDP if explicitly requested.
|
|
71
79
|
if (allowPrivileged && Common.ParsedURL.schemeIs(url, 'chrome:')) {
|
|
@@ -28,7 +28,7 @@ export class LinkContextMenuProvider implements Provider<Node> {
|
|
|
28
28
|
const node: Link = targetNode;
|
|
29
29
|
contextMenu.revealSection().appendItem(openLinkExternallyLabel(), () => {
|
|
30
30
|
if (node.href) {
|
|
31
|
-
UIHelpers.openInNewTab(node.href);
|
|
31
|
+
UIHelpers.openInNewTab(node.href, node.allowPrivileged);
|
|
32
32
|
}
|
|
33
33
|
}, {jslogContext: 'open-in-new-tab'});
|
|
34
34
|
contextMenu.revealSection().appendItem(copyLinkAddressLabel(), () => {
|
|
@@ -351,12 +351,7 @@ export interface Delegate<T> {
|
|
|
351
351
|
commitEdit(item: T, editor: Editor<T>, isNew: boolean): void;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
export
|
|
355
|
-
value: T;
|
|
356
|
-
validate: () => ValidatorResult;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
export type EditorControl<T = string> = (HTMLInputElement|HTMLSelectElement|CustomEditorControl<T>);
|
|
354
|
+
export type EditorControl = HTMLInputElement|HTMLSelectElement;
|
|
360
355
|
|
|
361
356
|
export class Editor<T> {
|
|
362
357
|
element: HTMLDivElement;
|
|
@@ -364,9 +359,9 @@ export class Editor<T> {
|
|
|
364
359
|
private commitButton: Buttons.Button.Button;
|
|
365
360
|
private readonly cancelButton: Buttons.Button.Button;
|
|
366
361
|
private errorMessageContainer: HTMLElement;
|
|
367
|
-
private readonly controls:
|
|
362
|
+
private readonly controls: HTMLElement[] = [];
|
|
368
363
|
private readonly controlByName = new Map<string, EditorControl>();
|
|
369
|
-
private readonly validators: Array<(
|
|
364
|
+
private readonly validators: Array<(item: T, index: number) => ValidatorResult> = [];
|
|
370
365
|
private commit: (() => void)|null = null;
|
|
371
366
|
private cancel: (() => void)|null = null;
|
|
372
367
|
private item: T|null = null;
|
|
@@ -429,7 +424,7 @@ export class Editor<T> {
|
|
|
429
424
|
ARIAUtils.setLabel(input, title);
|
|
430
425
|
this.controlByName.set(name, input);
|
|
431
426
|
this.controls.push(input);
|
|
432
|
-
this.validators.push(validator);
|
|
427
|
+
this.validators.push((item, index) => validator(item, index, input));
|
|
433
428
|
return input;
|
|
434
429
|
}
|
|
435
430
|
|
|
@@ -453,18 +448,19 @@ export class Editor<T> {
|
|
|
453
448
|
select.addEventListener('blur', this.validateControls.bind(this, false), false);
|
|
454
449
|
this.controlByName.set(name, select);
|
|
455
450
|
this.controls.push(select);
|
|
456
|
-
this.validators.push(validator);
|
|
451
|
+
this.validators.push((item, index) => validator(item, index, select));
|
|
457
452
|
return select;
|
|
458
453
|
}
|
|
459
454
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
455
|
+
/**
|
|
456
|
+
* Adds an existing element, for example the element of a widget, as an
|
|
457
|
+
* editor control. The editor marks the element as invalid when the
|
|
458
|
+
* validator fails. The caller keeps its own reference to the control to
|
|
459
|
+
* read and write its value.
|
|
460
|
+
*/
|
|
461
|
+
addCustomControl(element: HTMLElement, validator: (item: T, index: number) => ValidatorResult): void {
|
|
462
|
+
this.controls.push(element);
|
|
466
463
|
this.validators.push(validator);
|
|
467
|
-
return control;
|
|
468
464
|
}
|
|
469
465
|
|
|
470
466
|
control(name: string): EditorControl {
|
|
@@ -480,7 +476,7 @@ export class Editor<T> {
|
|
|
480
476
|
this.errorMessageContainer.textContent = '';
|
|
481
477
|
for (let index = 0; index < this.controls.length; ++index) {
|
|
482
478
|
const input = this.controls[index];
|
|
483
|
-
const {valid, errorMessage} = this.validators[index].call(null, (this.item as T), this.index
|
|
479
|
+
const {valid, errorMessage} = this.validators[index].call(null, (this.item as T), this.index);
|
|
484
480
|
|
|
485
481
|
input.classList.toggle('error-input', !valid && !forceValid);
|
|
486
482
|
if (valid || forceValid) {
|
|
@@ -816,7 +816,10 @@ export class TabbedPane extends TabbedPaneBase {
|
|
|
816
816
|
if (this.tabsElement.children[i] !== tab.tabElement) {
|
|
817
817
|
this.tabsElement.insertBefore(tab.tabElement, this.tabsElement.children[i] ?? null);
|
|
818
818
|
}
|
|
819
|
-
tab.shown
|
|
819
|
+
if (!tab.shown) {
|
|
820
|
+
tab.shown = true;
|
|
821
|
+
tab.slotsAttached();
|
|
822
|
+
}
|
|
820
823
|
}
|
|
821
824
|
|
|
822
825
|
this.maybeShowDropDown(tabsToShowIndexes.length !== this.#tabs.length);
|
|
@@ -1429,13 +1432,53 @@ export class TabbedPaneTab {
|
|
|
1429
1432
|
// next slot assignment recalc, so anything retained by the <slot> stays
|
|
1430
1433
|
// alive after the tab is closed if no recalc follows.
|
|
1431
1434
|
container.addEventListener('slotchange', () => {
|
|
1432
|
-
|
|
1433
|
-
|
|
1435
|
+
// A detached <slot> has no assigned nodes, so `slotchange` also fires
|
|
1436
|
+
// when the tab header is removed from the DOM (e.g. moved into the
|
|
1437
|
+
// overflow drop-down). That doesn't reflect a change to the slotted
|
|
1438
|
+
// content, so keep the current state (and the cached width) so that
|
|
1439
|
+
// the tab keeps measuring the same while hidden. The state is synced
|
|
1440
|
+
// again in `slotsAttached` once the header is re-attached.
|
|
1441
|
+
if (!slot.isConnected) {
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1444
|
+
this.#updateSlottedContent(kind, container, slot);
|
|
1434
1445
|
delete this.measuredWidth;
|
|
1435
1446
|
this.tabbedPane.requestUpdate();
|
|
1436
1447
|
});
|
|
1437
1448
|
}
|
|
1438
1449
|
|
|
1450
|
+
#updateSlottedContent(kind: 'icon'|'suffix', container: HTMLElement, slot: HTMLSlotElement): boolean {
|
|
1451
|
+
const hasSlottedContent = slot.assignedElements().length > 0;
|
|
1452
|
+
if (hasSlottedContent === this.#hasSlottedContent[kind]) {
|
|
1453
|
+
return false;
|
|
1454
|
+
}
|
|
1455
|
+
this.#hasSlottedContent[kind] = hasSlottedContent;
|
|
1456
|
+
container.style.display = hasSlottedContent ? '' : 'none';
|
|
1457
|
+
return true;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* Called when the tab header is (re-)attached to the DOM. If the slotted
|
|
1462
|
+
* content changed while the header was detached, no `slotchange` fires
|
|
1463
|
+
* on re-attachment when the slot is still empty afterwards (its assigned
|
|
1464
|
+
* nodes were already cleared on detach), so sync the state explicitly.
|
|
1465
|
+
*/
|
|
1466
|
+
slotsAttached(): void {
|
|
1467
|
+
let changed = false;
|
|
1468
|
+
for (const kind of ['icon', 'suffix'] as const) {
|
|
1469
|
+
const container = this.#slotContainers[kind];
|
|
1470
|
+
const slot = container?.querySelector('slot');
|
|
1471
|
+
if (container && slot?.isConnected) {
|
|
1472
|
+
const updated = this.#updateSlottedContent(kind, container, slot);
|
|
1473
|
+
changed = updated || changed;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
if (changed) {
|
|
1477
|
+
delete this.measuredWidth;
|
|
1478
|
+
this.tabbedPane.requestUpdate();
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1439
1482
|
clearSlots(): void {
|
|
1440
1483
|
// Detach the <slot> elements from the tab header so that Blink's
|
|
1441
1484
|
// SlotAssignment cache cannot retain the tab element (and through its
|
|
@@ -1381,7 +1381,6 @@ export interface ToolbarItemRegistration {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
|
|
1383
1383
|
export const enum ToolbarItemLocation {
|
|
1384
|
-
FILES_NAVIGATION_TOOLBAR = 'files-navigator-toolbar',
|
|
1385
1384
|
MAIN_TOOLBAR_RIGHT = 'main-toolbar-right',
|
|
1386
1385
|
MAIN_TOOLBAR_LEFT = 'main-toolbar-left',
|
|
1387
1386
|
STYLES_SIDEBARPANE_TOOLBAR = 'styles-sidebarpane-toolbar',
|
|
@@ -1242,7 +1242,9 @@ export class TreeElement {
|
|
|
1242
1242
|
select(omitFocus?: boolean, selectedByUser?: boolean): boolean {
|
|
1243
1243
|
omitFocus = omitFocus || this.disableSelectFocus;
|
|
1244
1244
|
if (!this.treeOutline || !this.selectable || this.selected) {
|
|
1245
|
-
|
|
1245
|
+
// An inline editor or other interactive child may already hold the focus
|
|
1246
|
+
// inside this row; re-selecting must not take it away from them.
|
|
1247
|
+
if (!omitFocus && !this.listItemElement.hasFocus()) {
|
|
1246
1248
|
this.listItemElement.focus();
|
|
1247
1249
|
}
|
|
1248
1250
|
return false;
|
|
@@ -1728,6 +1730,11 @@ class TreeViewTreeElement extends TreeElement {
|
|
|
1728
1730
|
return super.onselect(selectedByUser);
|
|
1729
1731
|
}
|
|
1730
1732
|
|
|
1733
|
+
override async expandRecursively(maxDepth?: number): Promise<void> {
|
|
1734
|
+
await super.expandRecursively(maxDepth);
|
|
1735
|
+
this.listItemElement.dispatchEvent(new TreeViewElement.ExpandEvent({expanded: true, recursively: true}));
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1731
1738
|
override onenter(): boolean {
|
|
1732
1739
|
const enterEvent = new TreeViewElement.EnterEvent();
|
|
1733
1740
|
const shouldExpand = this.listItemElement.dispatchEvent(enterEvent);
|
|
@@ -2127,8 +2134,8 @@ export namespace TreeViewElement {
|
|
|
2127
2134
|
}
|
|
2128
2135
|
}
|
|
2129
2136
|
|
|
2130
|
-
export class ExpandEvent extends CustomEvent<{expanded: boolean}> {
|
|
2131
|
-
constructor(detail: {expanded: boolean}) {
|
|
2137
|
+
export class ExpandEvent extends CustomEvent<{expanded: boolean, recursively?: boolean}> {
|
|
2138
|
+
constructor(detail: {expanded: boolean, recursively?: boolean}) {
|
|
2132
2139
|
super('expand', {detail});
|
|
2133
2140
|
}
|
|
2134
2141
|
}
|
|
@@ -345,7 +345,7 @@ export function isBeingEdited(node?: Node|null): boolean {
|
|
|
345
345
|
|
|
346
346
|
let currentElement: (Element|null)|Element = element;
|
|
347
347
|
while (currentElement) {
|
|
348
|
-
if (elementsBeingEdited.has(
|
|
348
|
+
if (elementsBeingEdited.has(currentElement)) {
|
|
349
349
|
return true;
|
|
350
350
|
}
|
|
351
351
|
currentElement = currentElement.parentElementOrShadowHost();
|
|
@@ -1244,7 +1244,10 @@ export class CheckboxLabel extends HTMLElement {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
|
|
1246
1246
|
set checked(checked: boolean) {
|
|
1247
|
-
|
|
1247
|
+
// Coerce explicitly: `toggleAttribute(name, undefined)` toggles the
|
|
1248
|
+
// attribute instead of removing it, which would flip the state when a
|
|
1249
|
+
// Lit `.checked=${...}` binding receives `undefined`.
|
|
1250
|
+
this.toggleAttribute('checked', Boolean(checked));
|
|
1248
1251
|
}
|
|
1249
1252
|
|
|
1250
1253
|
get small(): boolean {
|
|
@@ -6,33 +6,46 @@
|
|
|
6
6
|
import '../../../kit/kit.js';
|
|
7
7
|
|
|
8
8
|
import type {Icon} from '../../../kit/kit.js';
|
|
9
|
-
import {html, render} from '../../../lit/lit.js';
|
|
9
|
+
import {Directives, html, render} from '../../../lit/lit.js';
|
|
10
10
|
|
|
11
11
|
import type {CSSShadowModel} from './CSSShadowEditor.js';
|
|
12
12
|
import cssShadowSwatchStyles from './cssShadowSwatch.css.js';
|
|
13
13
|
|
|
14
14
|
export class CSSShadowSwatch extends HTMLElement {
|
|
15
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
15
16
|
readonly #icon: Icon;
|
|
16
|
-
|
|
17
|
+
#model?: CSSShadowModel;
|
|
17
18
|
|
|
18
|
-
constructor(model
|
|
19
|
+
constructor(model?: CSSShadowModel) {
|
|
19
20
|
super();
|
|
20
21
|
this.#model = model;
|
|
22
|
+
const icon = Directives.createRef<Icon>();
|
|
21
23
|
|
|
22
24
|
// clang-format off
|
|
23
25
|
render(html`
|
|
24
26
|
<style>${cssShadowSwatchStyles}</style>
|
|
25
|
-
<devtools-icon tabindex=-1 name="shadow" class="shadow-swatch-icon"></devtools-icon>`,
|
|
26
|
-
this, {host: this});
|
|
27
|
+
<devtools-icon ${Directives.ref(icon)} tabindex=-1 name="shadow" class="shadow-swatch-icon"></devtools-icon>`,
|
|
28
|
+
this.#shadow, {host: this});
|
|
27
29
|
// clang-format on
|
|
28
30
|
|
|
29
|
-
this.#icon =
|
|
31
|
+
this.#icon = icon.value as Icon;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
model(): CSSShadowModel {
|
|
35
|
+
return this.cssShadowModel;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get cssShadowModel(): CSSShadowModel {
|
|
39
|
+
if (!this.#model) {
|
|
40
|
+
throw new Error('No model set on CSSShadowSwatch');
|
|
41
|
+
}
|
|
33
42
|
return this.#model;
|
|
34
43
|
}
|
|
35
44
|
|
|
45
|
+
set cssShadowModel(model: CSSShadowModel) {
|
|
46
|
+
this.#model = model;
|
|
47
|
+
}
|
|
48
|
+
|
|
36
49
|
iconElement(): Icon {
|
|
37
50
|
return this.#icon;
|
|
38
51
|
}
|
|
@@ -613,7 +613,7 @@ export abstract class ObjectTreeNodeBase extends Common.ObjectWrapper.ObjectWrap
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
async expandRecursively(maxDepth
|
|
616
|
+
async expandRecursively(maxDepth = 3): Promise<void> {
|
|
617
617
|
for (const node of this.#walk(maxDepth, n => n.canExpandRecursively)) {
|
|
618
618
|
await node.populateChildrenIfNeeded();
|
|
619
619
|
node.expanded = true;
|
|
@@ -1313,10 +1313,15 @@ export class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
|
|
|
1313
1313
|
this.requestUpdate();
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
|
-
onExpand = (expanded: boolean): void => {
|
|
1317
|
-
if (this.#root) {
|
|
1318
|
-
|
|
1316
|
+
onExpand = (expanded: boolean, recursively = false): void => {
|
|
1317
|
+
if (!this.#root) {
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
if (expanded && recursively) {
|
|
1321
|
+
void this.#root.expandRecursively();
|
|
1322
|
+
return;
|
|
1319
1323
|
}
|
|
1324
|
+
this.#root.expanded = expanded;
|
|
1320
1325
|
};
|
|
1321
1326
|
override performUpdate(): void {
|
|
1322
1327
|
if (!this.#root) {
|
|
@@ -1442,7 +1447,7 @@ export function populateObjectTreeContextMenu(contextMenu: UI.ContextMenu.Contex
|
|
|
1442
1447
|
|
|
1443
1448
|
interface ObjectTreeViewInput extends ContextMenuHandlers {
|
|
1444
1449
|
onShowAllProperties: (node: ObjectTreeNode) => void;
|
|
1445
|
-
onExpand: (node: ObjectTreeNodeBase, expanded: boolean) => void;
|
|
1450
|
+
onExpand: (node: ObjectTreeNodeBase, expanded: boolean, recursively?: boolean) => void;
|
|
1446
1451
|
renderAsSubtree: boolean;
|
|
1447
1452
|
objectTree?: ObjectTree;
|
|
1448
1453
|
linkifier?: Components.Linkifier.Linkifier;
|
|
@@ -1466,7 +1471,7 @@ const OBJECT_TREE_DEFAULT_VIEW: ObjectTreeView = (input, output, target) => {
|
|
|
1466
1471
|
};
|
|
1467
1472
|
|
|
1468
1473
|
const onExpand = (e: UI.TreeOutline.TreeViewElement.ExpandEvent): void => {
|
|
1469
|
-
input.onExpand(property, e.detail.expanded);
|
|
1474
|
+
input.onExpand(property, e.detail.expanded, e.detail.recursively);
|
|
1470
1475
|
e.consume(true);
|
|
1471
1476
|
};
|
|
1472
1477
|
const childCount = (property.children?.properties?.length ?? 0) +
|
|
@@ -1510,7 +1515,7 @@ const OBJECT_TREE_DEFAULT_VIEW: ObjectTreeView = (input, output, target) => {
|
|
|
1510
1515
|
|
|
1511
1516
|
function renderArrayGroup(child: ArrayGroupTreeNode): LitTemplate {
|
|
1512
1517
|
const onExpand = (e: UI.TreeOutline.TreeViewElement.ExpandEvent): void => {
|
|
1513
|
-
input.onExpand(child, e.detail.expanded);
|
|
1518
|
+
input.onExpand(child, e.detail.expanded, e.detail.recursively);
|
|
1514
1519
|
e.consume(true);
|
|
1515
1520
|
};
|
|
1516
1521
|
|
|
@@ -1684,7 +1689,11 @@ export class ObjectTreeWidget extends UI.Widget.Widget {
|
|
|
1684
1689
|
}
|
|
1685
1690
|
}
|
|
1686
1691
|
|
|
1687
|
-
onExpand = (node: ObjectTreeNodeBase, expanded: boolean): void => {
|
|
1692
|
+
onExpand = (node: ObjectTreeNodeBase, expanded: boolean, recursively = false): void => {
|
|
1693
|
+
if (expanded && recursively) {
|
|
1694
|
+
void node.expandRecursively().then(() => this.requestUpdate());
|
|
1695
|
+
return;
|
|
1696
|
+
}
|
|
1688
1697
|
if (node.expanded !== expanded) {
|
|
1689
1698
|
node.expanded = expanded;
|
|
1690
1699
|
this.requestUpdate();
|
|
@@ -1822,7 +1831,7 @@ interface ObjectPropertiesSectionViewInput {
|
|
|
1822
1831
|
skipProto: boolean;
|
|
1823
1832
|
showOverflow: boolean;
|
|
1824
1833
|
onRootItemContextMenu: (menu: UI.ContextMenu.ContextMenu) => void;
|
|
1825
|
-
onExpand: (expanded: boolean) => void;
|
|
1834
|
+
onExpand: (expanded: boolean, recursively?: boolean) => void;
|
|
1826
1835
|
}
|
|
1827
1836
|
|
|
1828
1837
|
type ObjectPropertiesSectionView = (input: ObjectPropertiesSectionViewInput, output: object, target: HTMLElement) =>
|
|
@@ -1849,8 +1858,8 @@ export const OBJECT_PROPERTIES_SECTION_DEFAULT_VIEW: ObjectPropertiesSectionView
|
|
|
1849
1858
|
<style>${objectPropertiesSectionStyles}</style>
|
|
1850
1859
|
<li role="treeitem" class="object-properties-section-root-element" toggle-on-click ?open=${
|
|
1851
1860
|
input.objectTree.expanded} @expand=${
|
|
1852
|
-
(e:
|
|
1853
|
-
|
|
1861
|
+
(e: UI.TreeOutline.TreeViewElement.ExpandEvent) => input.onExpand(
|
|
1862
|
+
e.detail.expanded, e.detail.recursively)} @contextmenu=${onRootItemContextMenuHandler}>
|
|
1854
1863
|
${input.title}
|
|
1855
1864
|
<ul role="group" ${widget(ObjectTreeWidget, {
|
|
1856
1865
|
objectTree: input.objectTree,
|
|
@@ -23,7 +23,6 @@ const UIStrings = {
|
|
|
23
23
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/source_frame/XMLView.ts', UIStrings);
|
|
24
24
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
25
25
|
const {render, html} = Lit;
|
|
26
|
-
const {ifExpanded} = UI.TreeOutline;
|
|
27
26
|
|
|
28
27
|
function* attributes(element: Element): Generator<Attr> {
|
|
29
28
|
for (let i = 0; i < element.attributes.length; ++i) {
|
|
@@ -111,7 +110,7 @@ function htmlView(treeNode: XMLTreeViewNode): Lit.LitTemplate {
|
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
interface ViewInput {
|
|
114
|
-
onExpand(node: XMLTreeViewNode, expanded: boolean): void;
|
|
113
|
+
onExpand(node: XMLTreeViewNode, expanded: boolean, recursively?: boolean): void;
|
|
115
114
|
xml: XMLTreeViewNode;
|
|
116
115
|
search: UI.TreeOutline.TreeSearch<XMLTreeViewNode, SearchResult>|undefined;
|
|
117
116
|
jumpToNextSearchResult: SearchResult|undefined;
|
|
@@ -140,7 +139,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
140
139
|
|
|
141
140
|
function layOutNode(node: XMLTreeViewNode): Lit.LitTemplate {
|
|
142
141
|
const onExpand = (event: UI.TreeOutline.TreeViewElement.ExpandEvent): void =>
|
|
143
|
-
input.onExpand(node, event.detail.expanded);
|
|
142
|
+
input.onExpand(node, event.detail.expanded, event.detail.recursively);
|
|
144
143
|
const {highlights, selected} = highlight(node, /* closeTag=*/ false);
|
|
145
144
|
|
|
146
145
|
const containsSearchResult = (node: XMLTreeViewNode): boolean => {
|
|
@@ -155,18 +154,20 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
155
154
|
return false;
|
|
156
155
|
};
|
|
157
156
|
|
|
157
|
+
const isExpanded = node.expanded || containsSearchResult(node);
|
|
158
|
+
|
|
158
159
|
// clang-format off
|
|
159
160
|
return html`
|
|
160
161
|
<li role="treeitem"
|
|
161
162
|
?selected=${input.jumpToNextSearchResult?.node === node}
|
|
162
163
|
@expand=${onExpand}
|
|
163
|
-
?open=${
|
|
164
|
+
?open=${isExpanded}>
|
|
164
165
|
<devtools-highlight ranges=${highlights} current-range=${selected}>
|
|
165
166
|
${htmlView(node)}
|
|
166
167
|
</devtools-highlight>
|
|
167
168
|
${node.children().length ? html`
|
|
168
169
|
<ul role="group">
|
|
169
|
-
${
|
|
170
|
+
${isExpanded ? subtree(node) : Lit.nothing}
|
|
170
171
|
</ul>` : Lit.nothing}
|
|
171
172
|
</li>`;
|
|
172
173
|
// clang-format on
|
|
@@ -253,6 +254,18 @@ export class XMLTreeViewNode {
|
|
|
253
254
|
return this.children();
|
|
254
255
|
}
|
|
255
256
|
|
|
257
|
+
expandRecursively(maxDepth = 3): void {
|
|
258
|
+
this.expanded = true;
|
|
259
|
+
if (maxDepth <= 1) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
for (const child of this.children()) {
|
|
263
|
+
if (child.children().length > 0) {
|
|
264
|
+
child.expandRecursively(maxDepth - 1);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
256
269
|
match(regex: RegExp, closeTag: boolean): RegExpStringIterator<RegExpExecArray> {
|
|
257
270
|
return textView(this, closeTag).matchAll(regex);
|
|
258
271
|
}
|
|
@@ -294,8 +307,15 @@ export class XMLView extends UI.Widget.Widget implements UI.SearchableView.Searc
|
|
|
294
307
|
|
|
295
308
|
override performUpdate(): void {
|
|
296
309
|
if (this.#treeViewModel) {
|
|
297
|
-
const onExpand = (node: XMLTreeViewNode, expanded: boolean): void => {
|
|
298
|
-
node.expanded
|
|
310
|
+
const onExpand = (node: XMLTreeViewNode, expanded: boolean, recursively = false): void => {
|
|
311
|
+
if (node.expanded === expanded && !recursively) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
if (expanded && recursively) {
|
|
315
|
+
node.expandRecursively();
|
|
316
|
+
} else {
|
|
317
|
+
node.expanded = expanded;
|
|
318
|
+
}
|
|
299
319
|
this.requestUpdate();
|
|
300
320
|
};
|
|
301
321
|
this.#view(
|
|
@@ -284,6 +284,7 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
284
284
|
'accept-execute-code',
|
|
285
285
|
'access-control-allow-origin',
|
|
286
286
|
'accessibility-announcements.filter-by-type',
|
|
287
|
+
'accessibility-announcements.resizer',
|
|
287
288
|
'accessibility-default',
|
|
288
289
|
'accessibility-tree',
|
|
289
290
|
'accessibility.clear-announcements',
|
|
@@ -773,6 +774,7 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
773
774
|
'browserLanguage',
|
|
774
775
|
'bs',
|
|
775
776
|
'buffered-rendering',
|
|
777
|
+
'buffering',
|
|
776
778
|
'button',
|
|
777
779
|
'bypass-service-worker',
|
|
778
780
|
'ca',
|
|
@@ -2817,6 +2819,8 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
2817
2819
|
'manage-settings',
|
|
2818
2820
|
'manager-custom-headers',
|
|
2819
2821
|
'manifest',
|
|
2822
|
+
'manifest-id',
|
|
2823
|
+
'manifest-id-start-url',
|
|
2820
2824
|
'manifest.copy-id',
|
|
2821
2825
|
'margin',
|
|
2822
2826
|
'margin-block',
|
|
@@ -4173,6 +4177,7 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
4173
4177
|
'stylesheet',
|
|
4174
4178
|
'styling',
|
|
4175
4179
|
'styling-default',
|
|
4180
|
+
'sub-apps',
|
|
4176
4181
|
'subdomain',
|
|
4177
4182
|
'subgrid',
|
|
4178
4183
|
'subgrid-how',
|
package/package.json
CHANGED