chrome-devtools-frontend 1.0.1690531 → 1.0.1695017
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/devtools-model-management/SKILL.md +3 -3
- package/.agents/skills/foundation-test-migration/SKILL.md +2 -2
- package/.agents/skills/merging-devtools-module/SKILL.md +5 -5
- package/.gitmodules +0 -4
- package/AUTHORS +3 -0
- package/config/typescript/tsconfig.base.json +1 -0
- package/docs/get_the_code.md +4 -9
- package/front_end/Images/src/comment-mode-cursor.svg +23 -0
- package/front_end/Tests.js +1 -1
- package/front_end/application_tokens.css +5 -0
- package/front_end/core/common/ColorConverter.ts +3 -3
- package/front_end/core/host/UserMetrics.ts +27 -0
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +0 -46
- package/front_end/core/protocol_client/InspectorBackend.ts +6 -6
- package/front_end/core/sdk/CSSLocation.ts +32 -0
- package/front_end/core/sdk/CSSModel.ts +2 -22
- package/front_end/core/sdk/CSSQuery.ts +2 -1
- package/front_end/core/sdk/CSSRule.ts +29 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -1
- package/front_end/core/sdk/NetworkManager.ts +2 -0
- package/front_end/core/sdk/NetworkRequest.ts +14 -1
- package/front_end/core/sdk/NetworkRequestAccess.ts +41 -22
- package/front_end/core/sdk/ResourceTreeModel.ts +72 -23
- package/front_end/core/sdk/SecurityOrigin.ts +89 -29
- package/front_end/core/sdk/Target.ts +18 -0
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/main/MainImpl.ts +8 -1
- package/front_end/foundation/Universe.ts +14 -11
- package/front_end/generated/Deprecation.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +9 -8
- package/front_end/generated/SupportedCSSProperties.ts +13 -3
- package/front_end/generated/protocol.ts +24 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +42 -9
- package/front_end/models/ai_assistance/AiConversation.ts +6 -6
- package/front_end/models/ai_assistance/README.md +5 -3
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +28 -34
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +13 -17
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +5 -3
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +16 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -4
- package/front_end/models/ai_assistance/ai_assistance.ts +0 -2
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +11 -2
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +17 -5
- package/front_end/models/ai_assistance/contexts/FileContext.ts +13 -6
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +52 -25
- package/front_end/models/ai_assistance/contexts/RequestContext.ts +18 -34
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +14 -3
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +2 -5
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +135 -58
- package/front_end/models/ai_assistance/tools/CookieUtils.ts +25 -35
- package/front_end/models/ai_assistance/tools/DOMStorageUtils.ts +6 -3
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +9 -2
- package/front_end/models/ai_assistance/tools/GetCookieValues.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +3 -2
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +3 -5
- package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +8 -11
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +2 -4
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +6 -13
- package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +9 -9
- package/front_end/models/ai_assistance/tools/GetStyles.ts +3 -2
- package/front_end/models/ai_assistance/tools/ListCookies.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +6 -14
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +10 -15
- package/front_end/models/ai_assistance/tools/ListSources.ts +5 -7
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +9 -9
- package/front_end/models/ai_assistance/tools/README.md +4 -2
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +3 -2
- package/front_end/models/ai_assistance/tools/Tool.ts +27 -3
- package/front_end/models/comment_manager/CD4ABridge.ts +128 -0
- package/front_end/models/comment_manager/CommentManager.ts +50 -8
- package/front_end/models/comment_manager/comment_manager.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +37 -47
- package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -1
- package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +9 -7
- package/front_end/models/trace/ModelImpl.ts +2 -0
- package/front_end/models/trace/Processor.ts +6 -4
- package/front_end/models/trace/handlers/LayerTreeHandler.ts +3 -3
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -1
- package/front_end/models/trace/helpers/SyntheticEvents.ts +23 -1
- package/front_end/models/trace/types/Configuration.ts +7 -0
- package/front_end/models/trace/types/TraceEvents.ts +20 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -0
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingListView.ts +177 -0
- package/front_end/panels/accessibility/accessibility.ts +2 -0
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingListView.css +33 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -15
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +6 -35
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +4 -3
- package/front_end/panels/animation/AnimationTimeline.ts +1 -0
- package/front_end/panels/application/CrashReportContextView.ts +0 -1
- package/front_end/panels/application/FrameDetailsView.ts +5 -4
- package/front_end/panels/application/IndexedDBViews.ts +4 -4
- package/front_end/panels/application/indexedDBViews.css +0 -14
- package/front_end/panels/console/ConsoleContextSelector.ts +12 -5
- package/front_end/panels/console/ConsoleViewMessage.ts +12 -8
- package/front_end/panels/coverage/coverageView.css +8 -8
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +4 -5
- package/front_end/panels/developer_resources/developerResourcesView.css +3 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +39 -12
- package/front_end/panels/elements/ElementsTreeOutline.ts +183 -107
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -34
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +5 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -0
- package/front_end/panels/elements/components/computedStyleProperty.css +5 -5
- package/front_end/panels/elements/components/computedStyleTrace.css +5 -5
- package/front_end/panels/elements/components/cssHintDetailsView.css +1 -1
- package/front_end/panels/elements/components/cssPropertyDocsView.css +3 -3
- package/front_end/panels/elements/components/cssVariableValueView.css +4 -4
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +3 -3
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -5
- package/front_end/panels/elements/components/queryContainer.css +2 -2
- package/front_end/panels/elements/elementsTreeOutline.css +20 -4
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/issues/AffectedElementsView.ts +3 -0
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +12 -10
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -0
- package/front_end/panels/layer_viewer/Layers3DView.ts +13 -11
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspectorUtils.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +11 -11
- package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
- package/front_end/panels/media/TickingFlameChart.ts +3 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +2 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +5 -2
- package/front_end/panels/network/RequestHeadersView.ts +46 -10
- package/front_end/panels/network/components/RequestHeadersView.css +12 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
- package/front_end/panels/recorder/RecordingListView.ts +0 -6
- package/front_end/panels/recorder/RecordingView.ts +0 -6
- package/front_end/panels/recorder/controlButton.css +10 -10
- package/front_end/panels/recorder/startView.css +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +4 -2
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +46 -35
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -32
- package/front_end/panels/timeline/TimelinePanel.ts +0 -17
- package/front_end/panels/timeline/components/cwvMetrics.css +2 -2
- package/front_end/panels/timeline/components/insights/checklist.css +1 -1
- package/front_end/panels/timeline/components/insights/table.css +3 -3
- package/front_end/panels/timeline/overlays/components/entriesLinkOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +2 -2
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +4 -4
- package/front_end/panels/timeline/timelinePanel.css +0 -74
- package/front_end/panels/web_audio/webAudio.css +5 -5
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/csp_evaluator/package/tsconfig.json +1 -0
- package/front_end/third_party/diff/DiffWrapper.ts +1 -8
- 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 +183 -4
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +708 -122
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +85 -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 +84 -11
- 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/ScreenRecording.d.ts +75 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js +102 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +6 -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 +7 -0
- 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/ScreenRecording.d.ts +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js +138 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +6 -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 +23 -0
- 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/cdp/Page.d.ts +6 -1
- 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 +7 -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 +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +131 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -0
- 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/common/BrowserConnector.js +7 -4
- 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 +4 -1
- 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 -1
- 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 +42 -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/Device.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js +265 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +4 -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 +24 -3
- 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 +23 -2
- 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 +49 -3
- 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/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +183 -4
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +143 -11
- package/front_end/third_party/puppeteer/package/src/api/ScreenRecording.ts +145 -0
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/bidi/ScreenRecording.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/bidi/bidi.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +41 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +101 -0
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +17 -9
- package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +46 -0
- package/front_end/third_party/puppeteer/package/src/common/Device.ts +287 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +30 -1
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +73 -2
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +194 -0
- package/front_end/tsconfig.json +1 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +8 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +53 -12
- package/front_end/ui/comments/CommentsOverlayWidget.ts +3 -3
- package/front_end/ui/comments/CommentsStatusBarPill.ts +96 -0
- package/front_end/ui/comments/comments-meta.ts +21 -0
- package/front_end/ui/comments/comments.ts +2 -0
- package/front_end/ui/comments/commentsOverlay.css +22 -3
- package/front_end/ui/components/markdown_view/MarkdownView.ts +31 -1
- package/front_end/ui/kit/icons/Icon.ts +0 -1
- package/front_end/ui/kit/link/Link.ts +8 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -1
- package/front_end/ui/legacy/SplitWidget.ts +16 -2
- package/front_end/ui/legacy/StatusBar.ts +78 -0
- package/front_end/ui/legacy/Toolbar.ts +4 -0
- package/front_end/ui/legacy/Treeoutline.ts +78 -11
- package/front_end/ui/legacy/UIUtils.ts +2 -1
- package/front_end/ui/legacy/ViewRegistration.ts +1 -0
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +23 -23
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.docs.ts +83 -0
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +600 -0
- package/front_end/ui/legacy/components/inline_editor/animationNameSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/colorMixSwatch.css +4 -4
- package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +3 -3
- package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +2 -0
- package/front_end/ui/legacy/components/inline_editor/linkSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +154 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +113 -51
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +10 -7
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +16 -97
- package/front_end/ui/legacy/components/object_ui/customPreviewComponent.css +7 -3
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -66
- package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
- package/front_end/ui/legacy/inspectorCommon.css +30 -6
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/legacy/statusBar.css +18 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/inspector_overlay/main.ts +8 -8
- package/mcp/mcp.ts +5 -0
- package/package.json +2 -9
- package/front_end/Images/generate-css-vars.js +0 -52
- package/front_end/Images/rollup.config.mjs +0 -36
- package/front_end/models/ai_assistance/AiOrigins.ts +0 -107
- package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +0 -20
- package/front_end/panels/recorder/injected/rollup.config.mjs +0 -20
- package/front_end/panels/timeline/EasterEgg.d.ts +0 -6
- package/front_end/panels/timeline/easter-egg-tsconfig.json +0 -8
- package/front_end/panels/timeline/enable-easter-egg.js +0 -20
- package/front_end/third_party/puppeteer-replay/puppeteer-replay-tsconfig.json +0 -8
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +0 -606
- package/inspector_overlay/loadCSS.rollup.js +0 -29
|
@@ -7,7 +7,7 @@ import './CodeBlock.js';
|
|
|
7
7
|
import './MarkdownImage.js';
|
|
8
8
|
import '../../kit/kit.js';
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import * as Marked from '../../../third_party/marked/marked.js';
|
|
11
11
|
import * as Lit from '../../lit/lit.js';
|
|
12
12
|
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
13
13
|
|
|
@@ -433,3 +433,33 @@ export class MarkdownInsightRenderer extends MarkdownLitRenderer {
|
|
|
433
433
|
return super.templateForToken(token as Marked.Marked.MarkedToken);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
+
|
|
437
|
+
export function renderTextAsMarkdown(text: string, markdownRenderer: MarkdownLitRenderer = new MarkdownLitRenderer(),
|
|
438
|
+
{animate, ref: refFn}: {
|
|
439
|
+
animate?: boolean,
|
|
440
|
+
ref?: (element?: Element) => void,
|
|
441
|
+
} = {}): Lit.TemplateResult {
|
|
442
|
+
let tokens = [];
|
|
443
|
+
try {
|
|
444
|
+
tokens = Marked.Marked.lexer(text);
|
|
445
|
+
for (const token of tokens) {
|
|
446
|
+
// Try to render all the tokens to make sure that
|
|
447
|
+
// they all have a template defined for them. If there
|
|
448
|
+
// isn't any template defined for a token, we'll fallback
|
|
449
|
+
// to rendering the text as plain text instead of markdown.
|
|
450
|
+
markdownRenderer.renderToken(token);
|
|
451
|
+
}
|
|
452
|
+
} catch {
|
|
453
|
+
// The tokens were not parsed correctly or
|
|
454
|
+
// one of the tokens are not supported, so we
|
|
455
|
+
// continue to render this as text.
|
|
456
|
+
return html`${text}`;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// clang-format off
|
|
460
|
+
return html`<devtools-markdown-view
|
|
461
|
+
.data=${{tokens, renderer: markdownRenderer, animationEnabled: animate} as MarkdownViewData}
|
|
462
|
+
${refFn ? Lit.Directives.ref(refFn) : Lit.nothing}>
|
|
463
|
+
</devtools-markdown-view>`;
|
|
464
|
+
// clang-format on
|
|
465
|
+
}
|
|
@@ -129,9 +129,16 @@ export class Link extends HTMLElement {
|
|
|
129
129
|
};
|
|
130
130
|
|
|
131
131
|
#onKeyDown = (event: KeyboardEvent): void => {
|
|
132
|
-
if (Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {
|
|
132
|
+
if (!Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (this.href) {
|
|
133
136
|
this.#handleOpeningLink(event);
|
|
137
|
+
return;
|
|
134
138
|
}
|
|
139
|
+
|
|
140
|
+
event.consume(true);
|
|
141
|
+
this.click();
|
|
135
142
|
};
|
|
136
143
|
|
|
137
144
|
#render(): void {
|
|
@@ -10,6 +10,7 @@ import * as Root from '../../core/root/root.js';
|
|
|
10
10
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
11
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
12
12
|
import {createIcon, type Icon} from '../kit/kit.js';
|
|
13
|
+
import * as Lit from '../lit/lit.js';
|
|
13
14
|
import * as SettingsUI from '../settings/settings.js';
|
|
14
15
|
import * as VisualLogging from '../visual_logging/visual_logging.js';
|
|
15
16
|
|
|
@@ -26,12 +27,15 @@ import {InspectorDrawerView} from './InspectorDrawerView.js';
|
|
|
26
27
|
import {KeyboardShortcut} from './KeyboardShortcut.js';
|
|
27
28
|
import type {Panel} from './Panel.js';
|
|
28
29
|
import {type ShowMode, SplitWidget} from './SplitWidget.js';
|
|
30
|
+
import {StatusBarWidget} from './StatusBar.js';
|
|
29
31
|
import {type EventData, Events as TabbedPaneEvents, type TabbedPane, type TabbedPaneTabDelegate} from './TabbedPane.js';
|
|
30
32
|
import {Tooltip} from './Tooltip.js';
|
|
31
33
|
import {UIUserMetrics} from './UIUserMetrics.js';
|
|
32
34
|
import type {TabbedViewLocation, View, ViewLocation, ViewLocationResolver} from './View.js';
|
|
33
35
|
import {ViewManager} from './ViewManager.js';
|
|
34
|
-
import {VBox, type Widget, WidgetFocusRestorer} from './Widget.js';
|
|
36
|
+
import {VBox, type Widget, widget, WidgetFocusRestorer} from './Widget.js';
|
|
37
|
+
|
|
38
|
+
const {html} = Lit;
|
|
35
39
|
|
|
36
40
|
const UIStrings = {
|
|
37
41
|
/**
|
|
@@ -166,6 +170,7 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
166
170
|
#resizeObserver: ResizeObserver;
|
|
167
171
|
#drawerShowModeBeforeDockSideChange: ShowMode|null = null;
|
|
168
172
|
#drawerMinimizedBeforeDockSideChange: boolean|null = null;
|
|
173
|
+
#statusBarContainer?: HTMLDivElement;
|
|
169
174
|
|
|
170
175
|
constructor() {
|
|
171
176
|
super();
|
|
@@ -848,6 +853,17 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
848
853
|
}
|
|
849
854
|
}
|
|
850
855
|
|
|
856
|
+
renderStatusBar(): void {
|
|
857
|
+
if (!this.#statusBarContainer) {
|
|
858
|
+
this.#statusBarContainer = document.createElement('div');
|
|
859
|
+
this.#statusBarContainer.style.display = 'contents';
|
|
860
|
+
this.element.appendChild(this.#statusBarContainer);
|
|
861
|
+
}
|
|
862
|
+
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
863
|
+
Lit.render(html`<devtools-widget class="flex-none" ${widget(StatusBarWidget)}></devtools-widget>`,
|
|
864
|
+
this.#statusBarContainer);
|
|
865
|
+
}
|
|
866
|
+
|
|
851
867
|
private createInfoBarDiv(): void {
|
|
852
868
|
if (!this.infoBarDiv) {
|
|
853
869
|
this.infoBarDiv = document.createElement('div');
|
|
@@ -81,7 +81,14 @@ export class SplitWidget extends SplitWidgetBase {
|
|
|
81
81
|
const mainSlot = this.#mainElement.createChild('slot');
|
|
82
82
|
mainSlot.name = 'main';
|
|
83
83
|
mainSlot.addEventListener('slotchange', (_: Event) => {
|
|
84
|
-
const assignedNode = mainSlot.assignedNodes()
|
|
84
|
+
const assignedNode = mainSlot.assignedNodes().find(node => {
|
|
85
|
+
const widget = node instanceof HTMLElement ? Widget.get(node) : null;
|
|
86
|
+
if (widget) {
|
|
87
|
+
return widget === this.#mainWidget || widget.isShowing();
|
|
88
|
+
}
|
|
89
|
+
return node instanceof HTMLElement && !node.classList.contains('hidden');
|
|
90
|
+
}) ??
|
|
91
|
+
mainSlot.assignedNodes()[0];
|
|
85
92
|
const widget = assignedNode instanceof HTMLElement ? Widget.getOrCreateWidget(assignedNode) : null;
|
|
86
93
|
if (widget && widget !== this.#mainWidget) {
|
|
87
94
|
this.setMainWidget(widget);
|
|
@@ -90,7 +97,14 @@ export class SplitWidget extends SplitWidgetBase {
|
|
|
90
97
|
const sidebarSlot = this.#sidebarElement.createChild('slot');
|
|
91
98
|
sidebarSlot.name = 'sidebar';
|
|
92
99
|
sidebarSlot.addEventListener('slotchange', (_: Event) => {
|
|
93
|
-
const assignedNode = sidebarSlot.assignedNodes()
|
|
100
|
+
const assignedNode = sidebarSlot.assignedNodes().find(node => {
|
|
101
|
+
const widget = node instanceof HTMLElement ? Widget.get(node) : null;
|
|
102
|
+
if (widget) {
|
|
103
|
+
return widget === this.#sidebarWidget || widget.isShowing();
|
|
104
|
+
}
|
|
105
|
+
return node instanceof HTMLElement && !node.classList.contains('hidden');
|
|
106
|
+
}) ??
|
|
107
|
+
sidebarSlot.assignedNodes()[0];
|
|
94
108
|
const widget = assignedNode instanceof HTMLElement ? Widget.getOrCreateWidget(assignedNode) : null;
|
|
95
109
|
if (widget && widget !== this.#sidebarWidget) {
|
|
96
110
|
this.setSidebarWidget(widget);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Lit from '../lit/lit.js';
|
|
6
|
+
|
|
7
|
+
import statusBarStyles from './statusBar.css.js';
|
|
8
|
+
import {ViewManager} from './ViewManager.js';
|
|
9
|
+
import {ViewLocationValues} from './ViewRegistration.js';
|
|
10
|
+
import {type AnyWidget, Widget} from './Widget.js';
|
|
11
|
+
|
|
12
|
+
const {html, render} = Lit;
|
|
13
|
+
|
|
14
|
+
export const DEFAULT_VIEW = (_input: undefined, _output: undefined, target: HTMLElement): void => {
|
|
15
|
+
// clang-format off
|
|
16
|
+
render(html`
|
|
17
|
+
<style>${statusBarStyles}</style>
|
|
18
|
+
<div class="status-bar"></div>
|
|
19
|
+
`, target);
|
|
20
|
+
// clang-format on
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type View = typeof DEFAULT_VIEW;
|
|
24
|
+
|
|
25
|
+
export class StatusBarWidget extends Widget {
|
|
26
|
+
readonly #view: View;
|
|
27
|
+
#containerElement?: HTMLElement;
|
|
28
|
+
readonly #widgets: AnyWidget[] = [];
|
|
29
|
+
#viewsLoadedPromise?: Promise<void>;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
element: HTMLElement|undefined,
|
|
33
|
+
view: View = DEFAULT_VIEW,
|
|
34
|
+
) {
|
|
35
|
+
super(element);
|
|
36
|
+
this.#view = view;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
viewsLoadedForTest(): Promise<void> {
|
|
40
|
+
return this.#viewsLoadedPromise ?? Promise.resolve();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#attachWidgets(): void {
|
|
44
|
+
if (!this.#containerElement) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
for (const widget of this.#widgets) {
|
|
48
|
+
if (!widget.isShowing()) {
|
|
49
|
+
widget.show(this.#containerElement);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async #loadViews(): Promise<void> {
|
|
55
|
+
const views = ViewManager.instance().viewsForLocation(
|
|
56
|
+
ViewLocationValues.STATUS_BAR,
|
|
57
|
+
);
|
|
58
|
+
for (const view of views) {
|
|
59
|
+
const widget = await view.widget();
|
|
60
|
+
if (widget instanceof Widget && !this.#widgets.includes(widget)) {
|
|
61
|
+
this.#widgets.push(widget);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
this.#attachWidgets();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
override wasShown(): void {
|
|
68
|
+
super.wasShown();
|
|
69
|
+
this.requestUpdate();
|
|
70
|
+
this.#viewsLoadedPromise = this.#loadViews();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
override performUpdate(): void {
|
|
74
|
+
this.#view(undefined, undefined, this.contentElement);
|
|
75
|
+
this.#containerElement = this.contentElement.querySelector('.status-bar') ?? undefined;
|
|
76
|
+
this.#attachWidgets();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -873,11 +873,15 @@ export class ToolbarFilter extends ToolbarInput {
|
|
|
873
873
|
toggledIconName: regexIconName,
|
|
874
874
|
toggleType: Buttons.Button.ToggleType.PRIMARY,
|
|
875
875
|
toggled: false,
|
|
876
|
+
checked: false,
|
|
876
877
|
title: i18nString(UIStrings.useRegularExpression),
|
|
877
878
|
jslogContext: regexIconName,
|
|
878
879
|
};
|
|
880
|
+
regexButton.style.setProperty('--dot-toggle-top', 'calc(100% - var(--sys-size-3) - var(--sys-size-1))');
|
|
881
|
+
regexButton.style.setProperty('--dot-toggle-left', 'calc(100% - var(--sys-size-3) - var(--sys-size-1))');
|
|
879
882
|
ARIAUtils.setLabel(regexButton, i18nString(UIStrings.useRegularExpression));
|
|
880
883
|
regexButton.addEventListener('click', () => {
|
|
884
|
+
regexButton.checked = regexButton.toggled;
|
|
881
885
|
onRegexToggle?.();
|
|
882
886
|
});
|
|
883
887
|
this.insertTrailingElement(regexButton);
|
|
@@ -459,6 +459,19 @@ export class TreeOutlineInShadow extends TreeOutline {
|
|
|
459
459
|
this.contentElement.classList.toggle('tree-outline-dense', dense);
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
+
setDisclosureClass(disclosureClass: string): void {
|
|
463
|
+
const isHideOverflow = this.disclosureElement.classList.contains('tree-outline-disclosure-hide-overflow');
|
|
464
|
+
this.disclosureElement.className = 'tree-outline-disclosure';
|
|
465
|
+
if (isHideOverflow) {
|
|
466
|
+
this.disclosureElement.classList.add('tree-outline-disclosure-hide-overflow');
|
|
467
|
+
}
|
|
468
|
+
for (const cls of disclosureClass.split(/\s+/)) {
|
|
469
|
+
if (cls) {
|
|
470
|
+
this.disclosureElement.classList.add(cls);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
462
475
|
override onStartedEditingTitle(treeElement: TreeElement): void {
|
|
463
476
|
const selection = this.shadowRoot.getSelection();
|
|
464
477
|
if (selection) {
|
|
@@ -663,6 +676,7 @@ export class TreeElement {
|
|
|
663
676
|
for (let current = child.firstChild(); this.treeOutline && current;
|
|
664
677
|
current = current.traverseNextTreeElement(false, child, true)) {
|
|
665
678
|
this.treeOutline.bindTreeElement(current);
|
|
679
|
+
current.ensureSelection();
|
|
666
680
|
}
|
|
667
681
|
child.onattach();
|
|
668
682
|
child.ensureSelection();
|
|
@@ -945,7 +959,7 @@ export class TreeElement {
|
|
|
945
959
|
}
|
|
946
960
|
}
|
|
947
961
|
|
|
948
|
-
|
|
962
|
+
protected ensureSelection(): void {
|
|
949
963
|
if (!this.treeOutline?.renderSelection) {
|
|
950
964
|
return;
|
|
951
965
|
}
|
|
@@ -1001,12 +1015,17 @@ export class TreeElement {
|
|
|
1001
1015
|
return;
|
|
1002
1016
|
}
|
|
1003
1017
|
|
|
1018
|
+
if (event.defaultPrevented) {
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1004
1022
|
const handled = this.ondblclick(event);
|
|
1005
1023
|
if (handled) {
|
|
1006
1024
|
return;
|
|
1007
1025
|
}
|
|
1008
1026
|
if (this.expandable && !this.expanded) {
|
|
1009
1027
|
void this.#setExpandedFromUser(true, false);
|
|
1028
|
+
this.listItemElement.focus();
|
|
1010
1029
|
}
|
|
1011
1030
|
}
|
|
1012
1031
|
|
|
@@ -1591,7 +1610,7 @@ export namespace TreeSearch {
|
|
|
1591
1610
|
}
|
|
1592
1611
|
|
|
1593
1612
|
class TreeViewTreeElement extends TreeElement {
|
|
1594
|
-
static readonly CLONED_ATTRIBUTES = SDK.DOMModel.ARIA_ATTRIBUTES.union(new Set(['jslog', 'draggable']));
|
|
1613
|
+
static readonly CLONED_ATTRIBUTES = SDK.DOMModel.ARIA_ATTRIBUTES.union(new Set(['jslog', 'draggable', 'style']));
|
|
1595
1614
|
#clonedAttributes = new Set<string>();
|
|
1596
1615
|
#clonedClasses = new Set<string>();
|
|
1597
1616
|
#previousOpenAttributeValue?: string|null;
|
|
@@ -1655,6 +1674,7 @@ class TreeViewTreeElement extends TreeElement {
|
|
|
1655
1674
|
}
|
|
1656
1675
|
|
|
1657
1676
|
refresh(): void {
|
|
1677
|
+
const hadFocus = this.listItemElement.hasFocus();
|
|
1658
1678
|
this.titleElement.textContent = '';
|
|
1659
1679
|
this.updateAttributes();
|
|
1660
1680
|
const childUl = this.configElement.querySelector(':scope > ul[role="group"]');
|
|
@@ -1673,12 +1693,29 @@ class TreeViewTreeElement extends TreeElement {
|
|
|
1673
1693
|
this.updateExpansionFromAttribute();
|
|
1674
1694
|
|
|
1675
1695
|
Highlighting.HighlightManager.HighlightManager.instance().apply(this.titleElement);
|
|
1696
|
+
if (hadFocus) {
|
|
1697
|
+
this.listItemElement.focus();
|
|
1698
|
+
}
|
|
1676
1699
|
}
|
|
1677
1700
|
|
|
1678
1701
|
static get(configElement: Node|undefined): TreeViewTreeElement|undefined {
|
|
1679
1702
|
return configElement && TreeViewTreeElement.#elementToTreeElement.get(configElement);
|
|
1680
1703
|
}
|
|
1681
1704
|
|
|
1705
|
+
override onselect(selectedByUser?: boolean): boolean {
|
|
1706
|
+
this.listItemElement.dispatchEvent(new TreeViewElement.SelectEvent({selectedByUser: Boolean(selectedByUser)}));
|
|
1707
|
+
return super.onselect(selectedByUser);
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
override onenter(): boolean {
|
|
1711
|
+
const enterEvent = new TreeViewElement.EnterEvent();
|
|
1712
|
+
const shouldExpand = this.listItemElement.dispatchEvent(enterEvent);
|
|
1713
|
+
if (!shouldExpand) {
|
|
1714
|
+
return false;
|
|
1715
|
+
}
|
|
1716
|
+
return super.onenter();
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1682
1719
|
remove(): void {
|
|
1683
1720
|
removeNode(this,
|
|
1684
1721
|
Boolean(this.parent &&
|
|
@@ -1804,11 +1841,19 @@ function removeNode(node: TreeElement, preserveParentExpandable = false): void {
|
|
|
1804
1841
|
*/
|
|
1805
1842
|
export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
1806
1843
|
static readonly observedAttributes: string[] =
|
|
1807
|
-
['navigation-variant', 'hide-overflow', 'dense', 'show-selection-on-keyboard-focus'];
|
|
1844
|
+
['navigation-variant', 'hide-overflow', 'dense', 'show-selection-on-keyboard-focus', 'disclosure-class'];
|
|
1808
1845
|
readonly #treeOutline = new TreeOutlineInShadow(undefined, this, true);
|
|
1846
|
+
readonly #syncedTreeClasses = new Set<string>();
|
|
1809
1847
|
|
|
1810
1848
|
constructor() {
|
|
1811
1849
|
super();
|
|
1850
|
+
this.#treeOutline.contentElement.removeAttribute('jslog');
|
|
1851
|
+
if (!this.hasAttribute('jslog')) {
|
|
1852
|
+
this.setAttribute('jslog', `${VisualLogging.tree()}`);
|
|
1853
|
+
}
|
|
1854
|
+
if (this.hasAttribute('disclosure-class')) {
|
|
1855
|
+
this.#treeOutline.setDisclosureClass(this.getAttribute('disclosure-class') ?? '');
|
|
1856
|
+
}
|
|
1812
1857
|
this.addEventListener('focusin', (event: Event) => {
|
|
1813
1858
|
const actualTarget = event.composedPath()[0];
|
|
1814
1859
|
if (actualTarget === this.#treeOutline.contentElement && !this.#treeOutline.selectedTreeElement &&
|
|
@@ -1816,11 +1861,6 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1816
1861
|
this.#treeOutline.firstChild()?.select(/* omitFocus */ true, /* selectedByUser */ false);
|
|
1817
1862
|
}
|
|
1818
1863
|
});
|
|
1819
|
-
this.#treeOutline.addEventListener(Events.ElementSelected, event => {
|
|
1820
|
-
if (event.data instanceof TreeViewTreeElement) {
|
|
1821
|
-
event.data.listItemElement.dispatchEvent(new TreeViewElement.SelectEvent());
|
|
1822
|
-
}
|
|
1823
|
-
});
|
|
1824
1864
|
this.#treeOutline.addEventListener(Events.ElementExpanded, event => {
|
|
1825
1865
|
// TODO(crbug.com/1166669): This is a stopgap. We can remove the global event once devtools-tree-wrapper is no longer needed.
|
|
1826
1866
|
this.dispatchEvent(new TreeViewElement.TreeElementExpandEvent(event.data, true));
|
|
@@ -1874,6 +1914,24 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1874
1914
|
}
|
|
1875
1915
|
|
|
1876
1916
|
protected override updateNode(node: Node, attributeName: string|null): void {
|
|
1917
|
+
if (node instanceof HTMLUListElement && node.role === 'tree') {
|
|
1918
|
+
if (attributeName === null || attributeName === 'class') {
|
|
1919
|
+
for (const cls of this.#syncedTreeClasses) {
|
|
1920
|
+
if (!node.classList.contains(cls)) {
|
|
1921
|
+
this.#treeOutline.contentElement.classList.remove(cls);
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
this.#syncedTreeClasses.clear();
|
|
1925
|
+
for (const cls of node.classList) {
|
|
1926
|
+
if (cls) {
|
|
1927
|
+
this.#syncedTreeClasses.add(cls);
|
|
1928
|
+
this.#treeOutline.contentElement.classList.add(cls);
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
this.#treeOutline.contentElement.classList.add('tree-outline');
|
|
1932
|
+
}
|
|
1933
|
+
return;
|
|
1934
|
+
}
|
|
1877
1935
|
let current: Node|null = node;
|
|
1878
1936
|
while (current?.parentNode && !(current instanceof HTMLElement)) {
|
|
1879
1937
|
current = current.parentNode;
|
|
@@ -2014,14 +2072,17 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
2014
2072
|
case 'show-selection-on-keyboard-focus':
|
|
2015
2073
|
this.#treeOutline.setShowSelectionOnKeyboardFocus(booleanValueIsTrue);
|
|
2016
2074
|
break;
|
|
2075
|
+
case 'disclosure-class':
|
|
2076
|
+
this.#treeOutline.setDisclosureClass(newValue ?? '');
|
|
2077
|
+
break;
|
|
2017
2078
|
}
|
|
2018
2079
|
}
|
|
2019
2080
|
}
|
|
2020
2081
|
|
|
2021
2082
|
export namespace TreeViewElement {
|
|
2022
|
-
export class SelectEvent extends CustomEvent<
|
|
2023
|
-
constructor() {
|
|
2024
|
-
super('select');
|
|
2083
|
+
export class SelectEvent extends CustomEvent<{selectedByUser?: boolean}> {
|
|
2084
|
+
constructor(detail?: {selectedByUser?: boolean}) {
|
|
2085
|
+
super('select', {detail});
|
|
2025
2086
|
}
|
|
2026
2087
|
}
|
|
2027
2088
|
|
|
@@ -2031,6 +2092,12 @@ export namespace TreeViewElement {
|
|
|
2031
2092
|
}
|
|
2032
2093
|
}
|
|
2033
2094
|
|
|
2095
|
+
export class EnterEvent extends CustomEvent<void> {
|
|
2096
|
+
constructor() {
|
|
2097
|
+
super('enter', {bubbles: true, cancelable: true, composed: true});
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2034
2101
|
/**
|
|
2035
2102
|
* @deprecated
|
|
2036
2103
|
*/
|
|
@@ -2083,7 +2083,8 @@ export class HTMLElementWithLightDOMTemplate extends HTMLElement {
|
|
|
2083
2083
|
const clones: Node[] = [];
|
|
2084
2084
|
for (const cloneRef of cloneSet) {
|
|
2085
2085
|
const clone = cloneRef.deref();
|
|
2086
|
-
|
|
2086
|
+
const root = clone?.getRootNode();
|
|
2087
|
+
if (clone && (root instanceof Document || root instanceof DocumentFragment)) {
|
|
2087
2088
|
clones.push(clone);
|
|
2088
2089
|
} else {
|
|
2089
2090
|
cloneSet.delete(cloneRef);
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
.data-grid {
|
|
8
8
|
position: relative;
|
|
9
|
-
border:
|
|
9
|
+
border: var(--sys-size-1) solid var(--sys-color-divider) !important; /* stylelint-disable-line declaration-no-important */
|
|
10
10
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
11
11
|
line-height: 120%;
|
|
12
12
|
|
|
13
13
|
:focus-visible {
|
|
14
|
-
outline:
|
|
15
|
-
outline-offset: -
|
|
14
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
15
|
+
outline-offset: calc(-1 * var(--sys-size-2));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.data-grid .aria-live-label {
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
43
|
+
width: var(--sys-size-1);
|
|
44
|
+
height: var(--sys-size-1);
|
|
45
45
|
overflow: hidden;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.data-grid .corner {
|
|
53
|
-
width:
|
|
53
|
+
width: var(--sys-size-7);
|
|
54
54
|
padding-right: 0;
|
|
55
55
|
padding-left: 0;
|
|
56
56
|
border-left: 0 none transparent !important; /* stylelint-disable-line declaration-no-important */
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
|
|
84
84
|
.data-grid tbody tr {
|
|
85
85
|
display: none;
|
|
86
|
-
height:
|
|
86
|
+
height: var(--sys-size-9);
|
|
87
87
|
|
|
88
88
|
&:has(td.show-more) {
|
|
89
89
|
height: var(--sys-size-13);
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
overflow: hidden;
|
|
107
107
|
line-height: 18px;
|
|
108
108
|
height: 18px;
|
|
109
|
-
border-left:
|
|
110
|
-
padding:
|
|
109
|
+
border-left: var(--sys-size-1) solid var(--sys-color-divider);
|
|
110
|
+
padding: var(--sys-size-1) var(--sys-size-3);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.data-grid.auto-row-height tbody tr {
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.data-grid th {
|
|
137
|
-
border-bottom:
|
|
137
|
+
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
|
|
138
138
|
text-align: left;
|
|
139
139
|
font-weight: normal;
|
|
140
140
|
vertical-align: middle;
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
white-space: nowrap;
|
|
156
156
|
text-overflow: ellipsis;
|
|
157
157
|
overflow: hidden;
|
|
158
|
-
min-width:
|
|
158
|
+
min-width: var(--sys-size-5);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
.data-grid td.editing > div {
|
|
@@ -177,18 +177,18 @@
|
|
|
177
177
|
.data-grid th .sort-order-icon-container {
|
|
178
178
|
min-width: 0;
|
|
179
179
|
position: absolute;
|
|
180
|
-
top:
|
|
180
|
+
top: var(--sys-size-1);
|
|
181
181
|
right: 0;
|
|
182
|
-
bottom:
|
|
182
|
+
bottom: var(--sys-size-1);
|
|
183
183
|
display: flex;
|
|
184
184
|
align-items: center;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
.data-grid th .sort-order-icon {
|
|
188
|
-
margin-right:
|
|
189
|
-
margin-bottom: -
|
|
190
|
-
width:
|
|
191
|
-
height:
|
|
188
|
+
margin-right: var(--sys-size-3);
|
|
189
|
+
margin-bottom: calc(-1 * var(--sys-size-2));
|
|
190
|
+
width: var(--sys-size-7);
|
|
191
|
+
height: var(--sys-size-7);
|
|
192
192
|
display: none;
|
|
193
193
|
background-color: var(--icon-default);
|
|
194
194
|
}
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
|
|
206
206
|
.data-grid th.sort-ascending,
|
|
207
207
|
.data-grid th.sort-descending {
|
|
208
|
-
padding-right:
|
|
208
|
+
padding-right: var(--sys-size-7);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
.data-grid th.sortable:hover,
|
|
@@ -227,9 +227,9 @@
|
|
|
227
227
|
user-select: none;
|
|
228
228
|
mask-image: var(--image-file-triangle-right);
|
|
229
229
|
float: left;
|
|
230
|
-
width:
|
|
231
|
-
height:
|
|
232
|
-
margin-right:
|
|
230
|
+
width: var(--sys-size-7);
|
|
231
|
+
height: var(--sys-size-7);
|
|
232
|
+
margin-right: var(--sys-size-2);
|
|
233
233
|
content: "";
|
|
234
234
|
position: relative;
|
|
235
235
|
top: 3px;
|
|
@@ -268,8 +268,8 @@
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
.data-grid.no-selection:focus-visible {
|
|
271
|
-
outline:
|
|
272
|
-
outline-offset: -
|
|
271
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
272
|
+
outline-offset: calc(-1 * var(--sys-size-2));
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.data-grid:focus tbody tr.selected {
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Lit from '../../../../ui/lit/lit.js';
|
|
6
|
+
import * as UI from '../../legacy.js';
|
|
7
|
+
|
|
8
|
+
import * as InlineEditor from './inline_editor.js';
|
|
9
|
+
|
|
10
|
+
const {html} = Lit;
|
|
11
|
+
let text = 'top span-left';
|
|
12
|
+
|
|
13
|
+
export function render(container: HTMLElement): void {
|
|
14
|
+
const area = InlineEditor.PositionAreaEditor.parsePositionArea(text) ?? undefined;
|
|
15
|
+
|
|
16
|
+
function onPositionAreaChanged(event: CustomEvent<InlineEditor.PositionAreaEditor.Area>): void {
|
|
17
|
+
text = InlineEditor.PositionAreaEditor.stringifyPositionArea(event.detail);
|
|
18
|
+
render(container);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function onInput(event: Event): void {
|
|
22
|
+
const input = event.target as HTMLInputElement;
|
|
23
|
+
text = input.value;
|
|
24
|
+
render(container);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Lit.render(html`
|
|
28
|
+
<style>
|
|
29
|
+
.wrapper {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
align-items: flex-start;
|
|
33
|
+
gap: var(--sys-size-5);
|
|
34
|
+
padding: var(--sys-size-8);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.input-container {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: var(--sys-size-3);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.input-label {
|
|
44
|
+
font-family: var(--source-code-font-family);
|
|
45
|
+
font-size: var(--sys-typescale-body4-size);
|
|
46
|
+
color: var(--sys-color-token-property-special);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.property-input {
|
|
50
|
+
font-family: var(--source-code-font-family);
|
|
51
|
+
font-size: var(--sys-typescale-body4-size);
|
|
52
|
+
padding: var(--sys-size-2) var(--sys-size-3);
|
|
53
|
+
width: 200px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.editor-container {
|
|
57
|
+
border: 1px solid var(--sys-color-neutral-outline);
|
|
58
|
+
border-radius: var(--sys-shape-corner-small);
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
width: fit-content;
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
63
|
+
<div class="wrapper">
|
|
64
|
+
<div class="input-container">
|
|
65
|
+
<label class="input-label" for="position-area-input">position-area:</label>
|
|
66
|
+
<input
|
|
67
|
+
id="position-area-input"
|
|
68
|
+
class="property-input"
|
|
69
|
+
type="text"
|
|
70
|
+
.value=${text}
|
|
71
|
+
@input=${onInput}
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="editor-container">
|
|
75
|
+
<devtools-widget
|
|
76
|
+
${UI.Widget.widget(InlineEditor.PositionAreaEditor.PositionAreaEditor, {area})}
|
|
77
|
+
@positionAreaChanged=${onPositionAreaChanged}>
|
|
78
|
+
</devtools-widget>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
`,
|
|
82
|
+
container);
|
|
83
|
+
}
|