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
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 The Chromium Authors
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@scope to (devtools-widget > *) {
|
|
8
|
+
:scope {
|
|
9
|
+
padding: var(--sys-size-7);
|
|
10
|
+
width: min-content;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.property {
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: var(--sys-size-2);
|
|
16
|
+
line-height: 16px;
|
|
17
|
+
height: 32px;
|
|
18
|
+
padding-bottom: var(--sys-size-3);
|
|
19
|
+
overflow-wrap: break-word;
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.property-name,
|
|
24
|
+
.property-keyword {
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.property-name {
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
color: var(--sys-color-token-property-special);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.property-value {
|
|
34
|
+
color: var(--sys-color-on-surface);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.position-area-builder {
|
|
38
|
+
--x-start: attr(data-x-start type(<number>));
|
|
39
|
+
--x-end: attr(data-x-end type(<number>));
|
|
40
|
+
--y-start: attr(data-y-start type(<number>));
|
|
41
|
+
--y-end: attr(data-y-end type(<number>));
|
|
42
|
+
--box-size: 28px;
|
|
43
|
+
|
|
44
|
+
position: relative;
|
|
45
|
+
display: grid;
|
|
46
|
+
grid-template-columns: repeat(3, var(--box-size));
|
|
47
|
+
grid-template-rows: repeat(3, var(--box-size));
|
|
48
|
+
gap: 4px;
|
|
49
|
+
margin: var(--sys-size-6) auto var(--sys-size-9);
|
|
50
|
+
touch-action: none;
|
|
51
|
+
user-select: none;
|
|
52
|
+
flex-shrink: 0;
|
|
53
|
+
|
|
54
|
+
div {
|
|
55
|
+
background-color: if(
|
|
56
|
+
style(
|
|
57
|
+
(--x-start <= attr(data-x type(<number>))) and
|
|
58
|
+
(--x-end >= attr(data-x type(<number>))) and
|
|
59
|
+
(--y-start <= attr(data-y type(<number>))) and
|
|
60
|
+
(--y-end >= attr(data-y type(<number>)))
|
|
61
|
+
): var(--sys-color-tonal-container);
|
|
62
|
+
else: transparent
|
|
63
|
+
);
|
|
64
|
+
min-width: var(--box-size);
|
|
65
|
+
min-height: var(--box-size);
|
|
66
|
+
outline: 1px solid var(--sys-color-neutral-outline);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::after {
|
|
70
|
+
content: '';
|
|
71
|
+
position: absolute;
|
|
72
|
+
inset: -2px;
|
|
73
|
+
grid-column: calc(var(--x-start) + 1) / calc(var(--x-end) + 2);
|
|
74
|
+
grid-row: calc(var(--y-start) + 1) / calc(var(--y-end) + 2);
|
|
75
|
+
border: 2px solid var(--sys-color-primary);
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
z-index: 1;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.position-area-controls {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
gap: var(--sys-size-5);
|
|
85
|
+
flex-shrink: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.axis-section {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
gap: var(--sys-size-1);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.axis-header {
|
|
95
|
+
display: flex;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
align-items: center;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.self-checkbox-label {
|
|
101
|
+
padding-inline-end: var(--sys-size-2);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.axis-title {
|
|
105
|
+
font-size: var(--sys-typescale-body4-size);
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
color: var(--sys-color-on-surface-subtle);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.chip-radio-group {
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
gap: var(--sys-size-3);
|
|
113
|
+
border: none;
|
|
114
|
+
padding: 0;
|
|
115
|
+
margin: 0;
|
|
116
|
+
|
|
117
|
+
& > input[type='radio'] {
|
|
118
|
+
position: absolute;
|
|
119
|
+
opacity: 0%;
|
|
120
|
+
width: 0;
|
|
121
|
+
height: 0;
|
|
122
|
+
pointer-events: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
& > label {
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
display: inline-block;
|
|
128
|
+
padding: 3px var(--sys-size-4);
|
|
129
|
+
border-radius: var(--sys-shape-corner-extra-small);
|
|
130
|
+
outline: var(--sys-size-1) solid var(--sys-color-neutral-outline);
|
|
131
|
+
outline-offset: calc(-1 * var(--sys-size-1));
|
|
132
|
+
background: transparent;
|
|
133
|
+
color: var(--sys-color-on-surface);
|
|
134
|
+
font-size: var(--sys-typescale-body5-size);
|
|
135
|
+
font-weight: 500;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
user-select: none;
|
|
138
|
+
|
|
139
|
+
&:hover {
|
|
140
|
+
background-color: var(--sys-color-state-hover-on-subtle);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
& > input[type='radio']:checked + label {
|
|
145
|
+
background-color: var(--sys-color-tonal-container);
|
|
146
|
+
color: var(--sys-color-on-tonal-container);
|
|
147
|
+
outline: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
& > input[type='radio']:focus-visible + label {
|
|
151
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2014 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
import * as Common from '../../../../core/common/common.js';
|
|
7
6
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
@@ -30,7 +29,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
30
29
|
|
|
31
30
|
export class CustomPreviewSection extends UI.Widget.Widget {
|
|
32
31
|
#object?: SDK.RemoteObject.RemoteObject;
|
|
33
|
-
|
|
32
|
+
#expanded = false;
|
|
34
33
|
private cachedContent?: unknown|ObjectTree;
|
|
35
34
|
private headerJsonML?: unknown;
|
|
36
35
|
private readonly view: View;
|
|
@@ -51,13 +50,27 @@ export class CustomPreviewSection extends UI.Widget.Widget {
|
|
|
51
50
|
this.#object = object;
|
|
52
51
|
this.headerJsonML = undefined;
|
|
53
52
|
this.cachedContent = undefined;
|
|
54
|
-
this
|
|
53
|
+
this.#expanded = false;
|
|
55
54
|
this.parseHeader();
|
|
56
55
|
// CustomPreviewComponent is used synchronously by ConsoleViewMessage. We must render synchronously
|
|
57
56
|
// so ConsoleViewport can measure the true row height upon insertion.
|
|
58
57
|
this.performUpdate();
|
|
59
58
|
}
|
|
60
59
|
|
|
60
|
+
get expanded(): boolean {
|
|
61
|
+
return this.#expanded;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
set expanded(expanded: boolean) {
|
|
65
|
+
if (this.#expanded === expanded) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.#expanded = expanded;
|
|
69
|
+
if (this.#expanded && !this.cachedContent) {
|
|
70
|
+
void this.loadBody();
|
|
71
|
+
}
|
|
72
|
+
this.performUpdate();
|
|
73
|
+
}
|
|
61
74
|
private parseHeader(): void {
|
|
62
75
|
const customPreview = this.#object?.customPreview();
|
|
63
76
|
if (!customPreview) {
|
|
@@ -75,27 +88,17 @@ export class CustomPreviewSection extends UI.Widget.Widget {
|
|
|
75
88
|
this.view({
|
|
76
89
|
object: this.#object,
|
|
77
90
|
headerJsonML: this.headerJsonML,
|
|
78
|
-
expanded: this
|
|
91
|
+
expanded: this.#expanded,
|
|
79
92
|
cachedContent: this.cachedContent,
|
|
80
93
|
toggleExpanded: this.toggleExpanded,
|
|
81
94
|
},
|
|
82
95
|
undefined, this.contentElement);
|
|
83
96
|
}
|
|
84
|
-
|
|
85
97
|
private toggleExpanded = (): void => {
|
|
86
|
-
if (this.cachedContent !== undefined) {
|
|
87
|
-
this.toggleExpand();
|
|
88
|
-
} else {
|
|
89
|
-
void this.loadBody();
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
private toggleExpand(): void {
|
|
94
98
|
this.expanded = !this.expanded;
|
|
95
|
-
|
|
96
|
-
}
|
|
99
|
+
};
|
|
97
100
|
|
|
98
|
-
async loadBody(): Promise<void> {
|
|
101
|
+
private async loadBody(): Promise<void> {
|
|
99
102
|
const customPreview = this.#object?.customPreview();
|
|
100
103
|
if (!this.#object || !customPreview?.bodyGetterId) {
|
|
101
104
|
return;
|
|
@@ -116,7 +119,6 @@ export class CustomPreviewSection extends UI.Widget.Widget {
|
|
|
116
119
|
this.cachedContent = bodyJsonML;
|
|
117
120
|
}
|
|
118
121
|
|
|
119
|
-
this.expanded = true;
|
|
120
122
|
this.performUpdate();
|
|
121
123
|
}
|
|
122
124
|
}
|
|
@@ -131,6 +133,8 @@ export interface ViewInput {
|
|
|
131
133
|
toggleExpanded: () => void;
|
|
132
134
|
}
|
|
133
135
|
|
|
136
|
+
const remoteObjectCache = new WeakMap<object, SDK.RemoteObject.RemoteObject>();
|
|
137
|
+
|
|
134
138
|
export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
|
|
135
139
|
const renderJSONMLTag = (object: SDK.RemoteObject.RemoteObject, jsonML: unknown): LitTemplate => {
|
|
136
140
|
if (!Array.isArray(jsonML)) {
|
|
@@ -205,8 +209,15 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
205
209
|
const layoutObjectTag = (object: SDK.RemoteObject.RemoteObject, objectTag: unknown[]): LitTemplate => {
|
|
206
210
|
const it = objectTag[Symbol.iterator]();
|
|
207
211
|
it.next(); // skip 'object'
|
|
208
|
-
const attributes = it.next().value;
|
|
209
|
-
|
|
212
|
+
const attributes = it.next().value as Protocol.Runtime.RemoteObject;
|
|
213
|
+
let remoteObject =
|
|
214
|
+
typeof attributes === 'object' && attributes !== null ? remoteObjectCache.get(attributes) : undefined;
|
|
215
|
+
if (!remoteObject) {
|
|
216
|
+
remoteObject = object.runtimeModel().createRemoteObject(attributes);
|
|
217
|
+
if (typeof attributes === 'object' && attributes !== null) {
|
|
218
|
+
remoteObjectCache.set(attributes, remoteObject);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
210
221
|
if (remoteObject.customPreview()) {
|
|
211
222
|
return html`${UI.Widget.widget(CustomPreviewSection, {object: remoteObject})}`;
|
|
212
223
|
}
|
|
@@ -260,47 +271,98 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
260
271
|
|
|
261
272
|
export type View = typeof DEFAULT_VIEW;
|
|
262
273
|
|
|
263
|
-
export
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
export interface CustomPreviewComponentViewInput {
|
|
275
|
+
object?: SDK.RemoteObject.RemoteObject;
|
|
276
|
+
expanded: boolean;
|
|
277
|
+
disassembled: boolean;
|
|
278
|
+
onContextMenu: (event: Event) => void;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export const CUSTOM_PREVIEW_COMPONENT_DEFAULT_VIEW =
|
|
282
|
+
(input: CustomPreviewComponentViewInput, _output: undefined, target: HTMLElement|DocumentFragment): void => {
|
|
283
|
+
if (!input.object) {
|
|
284
|
+
render(nothing, target);
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
render(html`<style>${customPreviewComponentStyles}</style>${
|
|
288
|
+
input.disassembled ?
|
|
289
|
+
defaultObjectPresentation(input.object) :
|
|
290
|
+
UI.Widget.widget(CustomPreviewSection, {object: input.object, expanded: input.expanded})}`,
|
|
291
|
+
target, {
|
|
292
|
+
container: {
|
|
293
|
+
classes: ['source-code'],
|
|
294
|
+
listeners: {contextmenu: input.onContextMenu},
|
|
295
|
+
},
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
export type CustomPreviewComponentView = typeof CUSTOM_PREVIEW_COMPONENT_DEFAULT_VIEW;
|
|
300
|
+
|
|
301
|
+
export class CustomPreviewComponent extends UI.Widget.Widget<DocumentFragment> {
|
|
302
|
+
#object?: SDK.RemoteObject.RemoteObject;
|
|
303
|
+
#expanded = false;
|
|
304
|
+
#disassembled = false;
|
|
305
|
+
readonly #view: CustomPreviewComponentView;
|
|
306
|
+
|
|
307
|
+
constructor(element?: HTMLElement, view: CustomPreviewComponentView = CUSTOM_PREVIEW_COMPONENT_DEFAULT_VIEW) {
|
|
308
|
+
super(element, {useShadowDom: 'pure'});
|
|
309
|
+
this.#view = view;
|
|
276
310
|
}
|
|
277
311
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
312
|
+
get object(): SDK.RemoteObject.RemoteObject|undefined {
|
|
313
|
+
return this.#object;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
set object(object: SDK.RemoteObject.RemoteObject|undefined) {
|
|
317
|
+
if (this.#object === object) {
|
|
318
|
+
return;
|
|
282
319
|
}
|
|
320
|
+
this.#object = object;
|
|
321
|
+
this.#disassembled = false;
|
|
322
|
+
this.performUpdate();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
get expanded(): boolean {
|
|
326
|
+
return this.#expanded;
|
|
283
327
|
}
|
|
284
328
|
|
|
285
|
-
|
|
329
|
+
set expanded(expanded: boolean) {
|
|
330
|
+
if (this.#expanded === expanded) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
this.#expanded = expanded;
|
|
334
|
+
this.performUpdate();
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
override wasShown(): void {
|
|
338
|
+
super.wasShown();
|
|
339
|
+
this.requestUpdate();
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
override performUpdate(): void {
|
|
343
|
+
this.#view({
|
|
344
|
+
object: this.#object,
|
|
345
|
+
expanded: this.#expanded,
|
|
346
|
+
disassembled: this.#disassembled,
|
|
347
|
+
onContextMenu: this.#onContextMenu,
|
|
348
|
+
},
|
|
349
|
+
undefined, this.contentElement);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
#onContextMenu = (event: Event): void => {
|
|
286
353
|
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
287
|
-
if (this
|
|
288
|
-
contextMenu.revealSection().appendItem(i18nString(UIStrings.showAsJavascriptObject), this
|
|
354
|
+
if (!this.#disassembled) {
|
|
355
|
+
contextMenu.revealSection().appendItem(i18nString(UIStrings.showAsJavascriptObject), this.#disassemble.bind(this),
|
|
289
356
|
{jslogContext: 'show-as-javascript-object'});
|
|
290
357
|
}
|
|
291
|
-
|
|
358
|
+
if (this.#object) {
|
|
359
|
+
contextMenu.appendApplicableItems(this.#object);
|
|
360
|
+
}
|
|
292
361
|
void contextMenu.show();
|
|
293
|
-
}
|
|
362
|
+
};
|
|
294
363
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
this.customPreviewSection.detach();
|
|
299
|
-
this.customPreviewSection = null;
|
|
300
|
-
}
|
|
301
|
-
this.element.shadowRoot.textContent = '';
|
|
302
|
-
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
303
|
-
render(defaultObjectPresentation(this.object), this.element.shadowRoot);
|
|
304
|
-
}
|
|
364
|
+
#disassemble(): void {
|
|
365
|
+
this.#disassembled = true;
|
|
366
|
+
this.requestUpdate();
|
|
305
367
|
}
|
|
306
368
|
}
|
|
@@ -56,10 +56,15 @@ export class ObjectPopoverHelper {
|
|
|
56
56
|
resultHighlightedAsDOM = true;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
popover.setMaxContentSize(new Geometry.Size(300, 250));
|
|
60
|
+
popover.setSizeBehavior(UI.GlassPane.SizeBehavior.SET_EXACT_SIZE);
|
|
61
|
+
|
|
59
62
|
if (result.customPreview()) {
|
|
60
|
-
const customPreviewComponent = new CustomPreviewComponent(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
const customPreviewComponent = new CustomPreviewComponent();
|
|
64
|
+
customPreviewComponent.object = result;
|
|
65
|
+
customPreviewComponent.expanded = true;
|
|
66
|
+
customPreviewComponent.element.dataset.stableNameForTest = 'object-popover-content';
|
|
67
|
+
customPreviewComponent.show(popover.contentElement);
|
|
63
68
|
} else {
|
|
64
69
|
popoverContentElement = document.createElement('div');
|
|
65
70
|
popoverContentElement.classList.add('object-popover-content');
|
|
@@ -83,11 +88,9 @@ export class ObjectPopoverHelper {
|
|
|
83
88
|
section.linkifier = linkifier;
|
|
84
89
|
section.showOverflow = true;
|
|
85
90
|
section.show(popoverContentElement, null, true);
|
|
91
|
+
popoverContentElement.dataset.stableNameForTest = 'object-popover-content';
|
|
92
|
+
popover.contentElement.appendChild(popoverContentElement);
|
|
86
93
|
}
|
|
87
|
-
popoverContentElement.dataset.stableNameForTest = 'object-popover-content';
|
|
88
|
-
popover.setMaxContentSize(new Geometry.Size(300, 250));
|
|
89
|
-
popover.setSizeBehavior(UI.GlassPane.SizeBehavior.SET_EXACT_SIZE);
|
|
90
|
-
popover.contentElement.appendChild(popoverContentElement);
|
|
91
94
|
return new ObjectPopoverHelper(linkifier, resultHighlightedAsDOM);
|
|
92
95
|
}
|
|
93
96
|
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
+
import '../../../components/highlighting/highlighting.js';
|
|
33
|
+
|
|
32
34
|
import * as Common from '../../../../core/common/common.js';
|
|
33
35
|
import * as Host from '../../../../core/host/host.js';
|
|
34
36
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
@@ -37,7 +39,6 @@ import * as SDK from '../../../../core/sdk/sdk.js';
|
|
|
37
39
|
import * as TextUtils from '../../../../core/text_utils/text_utils.js';
|
|
38
40
|
import type * as Protocol from '../../../../generated/protocol.js';
|
|
39
41
|
import * as uiI18n from '../../../../ui/i18n/i18n.js';
|
|
40
|
-
import * as Highlighting from '../../../components/highlighting/highlighting.js';
|
|
41
42
|
import * as TextEditor from '../../../components/text_editor/text_editor.js';
|
|
42
43
|
import {
|
|
43
44
|
type DirectiveResult,
|
|
@@ -168,7 +169,7 @@ interface NodeChildren {
|
|
|
168
169
|
accessors?: ObjectTreeNode[];
|
|
169
170
|
}
|
|
170
171
|
|
|
171
|
-
|
|
172
|
+
interface ObjectTreeOptions {
|
|
172
173
|
readonly propertiesMode: ObjectPropertiesMode;
|
|
173
174
|
readonly readOnly: boolean;
|
|
174
175
|
readonly expansionTracker?: ObjectTreeExpansionTracker;
|
|
@@ -178,7 +179,7 @@ export interface ObjectTreeOptions {
|
|
|
178
179
|
// WASM properties are index-based (e.g. locals[0], globals[1]); alphabetical
|
|
179
180
|
// reordering would break the correspondence between displayed index and actual
|
|
180
181
|
// index, so WASM objects are always shown in insertion order.
|
|
181
|
-
|
|
182
|
+
function isWasmObject(object: SDK.RemoteObject.RemoteObject|undefined): boolean {
|
|
182
183
|
return object?.subtype === 'webassemblymemory' || object?.subtype === 'wasmvalue';
|
|
183
184
|
}
|
|
184
185
|
|
|
@@ -703,7 +704,7 @@ interface ArrayGroupRange {
|
|
|
703
704
|
count: number;
|
|
704
705
|
}
|
|
705
706
|
|
|
706
|
-
|
|
707
|
+
class ArrayGroupTreeNode extends ObjectTreeNodeBase {
|
|
707
708
|
readonly #object: SDK.RemoteObject.RemoteObject;
|
|
708
709
|
readonly #range: ArrayGroupRange;
|
|
709
710
|
constructor(object: SDK.RemoteObject.RemoteObject, range: ArrayGroupRange, parent: ObjectTreeNodeBase,
|
|
@@ -1244,19 +1245,6 @@ const ARRAY_LOAD_THRESHOLD = 100;
|
|
|
1244
1245
|
|
|
1245
1246
|
const maxRenderableStringLength = 10000;
|
|
1246
1247
|
|
|
1247
|
-
export interface TreeOutlineOptions {
|
|
1248
|
-
readOnly?: boolean;
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
export class ObjectPropertiesSectionsTreeOutline extends UI.TreeOutline.TreeOutlineInShadow {
|
|
1252
|
-
constructor() {
|
|
1253
|
-
super();
|
|
1254
|
-
this.registerRequiredCSS(objectValueStyles, objectPropertiesSectionStyles);
|
|
1255
|
-
this.contentElement.classList.add('source-code');
|
|
1256
|
-
this.contentElement.classList.add('object-properties-section');
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
1248
|
export const enum ObjectPropertiesMode {
|
|
1261
1249
|
ALL = 0, // All properties, including prototype properties
|
|
1262
1250
|
OWN_AND_INTERNAL_AND_INHERITED = 1, // Own, internal, and inherited properties
|
|
@@ -1543,10 +1531,9 @@ export function renderPropertyValue(value: SDK.RemoteObject.RemoteObject, wasThr
|
|
|
1543
1531
|
variableName?: string, includeNullOrUndefined?: boolean, useCustomPreview = false,
|
|
1544
1532
|
valueRef?: (element: Element|undefined) => void): LitTemplate {
|
|
1545
1533
|
if (useCustomPreview && value.customPreview()) {
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
return html`${result}`;
|
|
1534
|
+
return html`<devtools-widget class="object-properties-section-custom-section" ${
|
|
1535
|
+
UI.Widget.widget(CustomPreviewComponent,
|
|
1536
|
+
{object: value})} ${valueRef ? Directives.ref(valueRef) : nothing}></devtools-widget>`;
|
|
1550
1537
|
}
|
|
1551
1538
|
|
|
1552
1539
|
const type = value.type;
|
|
@@ -1660,7 +1647,7 @@ export function defaultObjectPresentation(objectOrTree: SDK.RemoteObject.RemoteO
|
|
|
1660
1647
|
* Number of initially visible children in an ObjectPropertyTreeElement.
|
|
1661
1648
|
* Remaining children are shown as soon as requested via a show more properties button.
|
|
1662
1649
|
**/
|
|
1663
|
-
|
|
1650
|
+
const InitialVisibleChildrenLimit = 200;
|
|
1664
1651
|
|
|
1665
1652
|
export interface ObjectPropertyViewInput {
|
|
1666
1653
|
editable: boolean;
|
|
@@ -1676,13 +1663,10 @@ export interface ObjectPropertyViewInput {
|
|
|
1676
1663
|
node: ObjectTreeNode;
|
|
1677
1664
|
search?: UI.TreeOutline.TreeSearch<ObjectTreeNodeBase>;
|
|
1678
1665
|
}
|
|
1679
|
-
export
|
|
1680
|
-
valueElement: Element|undefined;
|
|
1681
|
-
nameElement: Element|undefined;
|
|
1682
|
-
}
|
|
1666
|
+
export type ObjectPropertyViewOutput = undefined;
|
|
1683
1667
|
export type ObjectPropertyView =
|
|
1684
1668
|
(input: ObjectPropertyViewInput, output: ObjectPropertyViewOutput, target: HTMLElement) => void;
|
|
1685
|
-
export const OBJECT_PROPERTY_DEFAULT_VIEW: ObjectPropertyView = (input,
|
|
1669
|
+
export const OBJECT_PROPERTY_DEFAULT_VIEW: ObjectPropertyView = (input, _output, target) => {
|
|
1686
1670
|
const {property} = input.node;
|
|
1687
1671
|
const isInternalEntries = property.synthetic && input.node.name === '[[Entries]]';
|
|
1688
1672
|
const completionsId = `completions-${input.node.parent?.object?.objectId?.replaceAll('.', '-')}-${input.node.name}`;
|
|
@@ -1716,19 +1700,14 @@ export const OBJECT_PROPERTY_DEFAULT_VIEW: ObjectPropertyView = (input, output,
|
|
|
1716
1700
|
const valueRanges =
|
|
1717
1701
|
(entries ?? []).filter(e => e !== currentMatch && e.matchType === 'value').map(e => e.range.cssValue()).join(' ');
|
|
1718
1702
|
const value = (): LitTemplate => {
|
|
1719
|
-
const valueRef = ref(e => {
|
|
1720
|
-
output.valueElement = e;
|
|
1721
|
-
});
|
|
1722
1703
|
if (isInternalEntries) {
|
|
1723
|
-
return html`<span
|
|
1704
|
+
return html`<span class=value></span>`;
|
|
1724
1705
|
}
|
|
1725
1706
|
if (property.value) {
|
|
1726
1707
|
const showPreview = property.name !== '[[Prototype]]';
|
|
1727
1708
|
return renderPropertyValue(property.value, property.wasThrown, showPreview, input.linkifier, property.synthetic,
|
|
1728
1709
|
input.node.path /* variableName */, input.node.includeNullOrUndefinedValues,
|
|
1729
|
-
/* useCustomPreview */ true
|
|
1730
|
-
output.valueElement = e;
|
|
1731
|
-
});
|
|
1710
|
+
/* useCustomPreview */ true);
|
|
1732
1711
|
}
|
|
1733
1712
|
if (property.getter) {
|
|
1734
1713
|
const getter = property.getter;
|
|
@@ -1736,13 +1715,13 @@ export const OBJECT_PROPERTY_DEFAULT_VIEW: ObjectPropertyView = (input, output,
|
|
|
1736
1715
|
event.consume();
|
|
1737
1716
|
input.invokeGetter(getter);
|
|
1738
1717
|
};
|
|
1739
|
-
return html`<span
|
|
1718
|
+
return html`<span><span
|
|
1740
1719
|
class=object-value-calculate-value-button
|
|
1741
1720
|
title=${i18nString(UIStrings.invokePropertyGetter)}
|
|
1742
1721
|
@click=${invokeGetter}
|
|
1743
1722
|
>${i18nString(UIStrings.dots)}</span></span>`;
|
|
1744
1723
|
}
|
|
1745
|
-
return html`<span
|
|
1724
|
+
return html`<span
|
|
1746
1725
|
class=object-value-unavailable
|
|
1747
1726
|
title=${i18nString(UIStrings.valueNotAccessibleToTheDebugger)}>${
|
|
1748
1727
|
i18nString(UIStrings.valueUnavailable)}</span>`;
|
|
@@ -1761,7 +1740,6 @@ export const OBJECT_PROPERTY_DEFAULT_VIEW: ObjectPropertyView = (input, output,
|
|
|
1761
1740
|
// clang-format off
|
|
1762
1741
|
render(
|
|
1763
1742
|
html`<span class=name-and-value><span
|
|
1764
|
-
${ref(e => { output.nameElement = e; })}
|
|
1765
1743
|
class=${nameClasses}
|
|
1766
1744
|
title=${input.node.path}><devtools-highlight ranges=${nameRanges} current-range=${nameCurrent}>${property.private ?
|
|
1767
1745
|
html`<span class="private-property-hash">${property.name[0]}</span>${
|
|
@@ -1795,10 +1773,7 @@ export const OBJECT_PROPERTY_DEFAULT_VIEW: ObjectPropertyView = (input, output,
|
|
|
1795
1773
|
};
|
|
1796
1774
|
|
|
1797
1775
|
export class ObjectPropertyWidget extends UI.Widget.Widget {
|
|
1798
|
-
#highlightChanges: Highlighting.HighlightChange[] = [];
|
|
1799
1776
|
#property?: ObjectTreeNode;
|
|
1800
|
-
#nameElement?: Element;
|
|
1801
|
-
#valueElement?: Element;
|
|
1802
1777
|
#completions: string[] = [];
|
|
1803
1778
|
#editing = false;
|
|
1804
1779
|
readonly #view: ObjectPropertyView;
|
|
@@ -1877,55 +1852,7 @@ export class ObjectPropertyWidget extends UI.Widget.Widget {
|
|
|
1877
1852
|
startEditing: this.startEditing.bind(this),
|
|
1878
1853
|
search: this.#search,
|
|
1879
1854
|
};
|
|
1880
|
-
|
|
1881
|
-
const output: ObjectPropertyViewOutput = {
|
|
1882
|
-
set nameElement(e: Element|undefined) {
|
|
1883
|
-
that.#nameElement = e;
|
|
1884
|
-
},
|
|
1885
|
-
set valueElement(e: Element|undefined) {
|
|
1886
|
-
that.#valueElement = e;
|
|
1887
|
-
},
|
|
1888
|
-
};
|
|
1889
|
-
this.#view(input, output, this.element);
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
setSearchRegex(regex: RegExp, additionalCssClassName?: string): boolean {
|
|
1893
|
-
let cssClasses = Highlighting.highlightedSearchResultClassName;
|
|
1894
|
-
if (additionalCssClassName) {
|
|
1895
|
-
cssClasses += ' ' + additionalCssClassName;
|
|
1896
|
-
}
|
|
1897
|
-
this.revertHighlightChanges();
|
|
1898
|
-
|
|
1899
|
-
if (this.#nameElement) {
|
|
1900
|
-
this.#applySearch(regex, this.#nameElement, cssClasses);
|
|
1901
|
-
}
|
|
1902
|
-
if (this.property?.object) {
|
|
1903
|
-
const valueType = this.property?.object.type;
|
|
1904
|
-
if (valueType !== 'object' && this.#valueElement) {
|
|
1905
|
-
this.#applySearch(regex, this.#valueElement, cssClasses);
|
|
1906
|
-
}
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
return Boolean(this.#highlightChanges.length);
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
#applySearch(regex: RegExp, element: Element, cssClassName: string): void {
|
|
1913
|
-
const ranges = [];
|
|
1914
|
-
const content = element.textContent || '';
|
|
1915
|
-
regex.lastIndex = 0;
|
|
1916
|
-
let match = regex.exec(content);
|
|
1917
|
-
while (match) {
|
|
1918
|
-
ranges.push(new TextUtils.TextRange.SourceRange(match.index, match[0].length));
|
|
1919
|
-
match = regex.exec(content);
|
|
1920
|
-
}
|
|
1921
|
-
if (ranges.length) {
|
|
1922
|
-
Highlighting.highlightRangesWithStyleClass(element, ranges, cssClassName, this.#highlightChanges);
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
revertHighlightChanges(): void {
|
|
1927
|
-
Highlighting.revertDomChanges(this.#highlightChanges);
|
|
1928
|
-
this.#highlightChanges = [];
|
|
1855
|
+
this.#view(input, undefined, this.element);
|
|
1929
1856
|
}
|
|
1930
1857
|
|
|
1931
1858
|
async #updateCompletions(expression: string, filter: string, force: boolean): Promise<void> {
|
|
@@ -2124,14 +2051,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2124
2051
|
}
|
|
2125
2052
|
}
|
|
2126
2053
|
|
|
2127
|
-
revertHighlightChanges(): void {
|
|
2128
|
-
this.#widget.revertHighlightChanges();
|
|
2129
|
-
}
|
|
2130
|
-
|
|
2131
|
-
setSearchRegex(regex: RegExp, additionalCssClassName?: string): boolean {
|
|
2132
|
-
return this.#widget.setSearchRegex(regex, additionalCssClassName);
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
2054
|
// This is called by layout tests
|
|
2136
2055
|
startEditing(): void {
|
|
2137
2056
|
this.#widget.startEditing();
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
:host {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
.custom-expandable-section {
|
|
8
12
|
display: inline-flex;
|
|
9
13
|
flex-direction: column;
|
|
@@ -11,8 +15,8 @@
|
|
|
11
15
|
|
|
12
16
|
.custom-expand-icon {
|
|
13
17
|
user-select: none;
|
|
14
|
-
margin-right:
|
|
15
|
-
margin-bottom: -
|
|
18
|
+
margin-right: var(--sys-size-3);
|
|
19
|
+
margin-bottom: calc(-1 * var(--sys-size-3));
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
.custom-expandable-section-standard-section {
|
|
@@ -20,5 +24,5 @@
|
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
.custom-expandable-section-default-body {
|
|
23
|
-
padding-left:
|
|
27
|
+
padding-left: var(--sys-size-6);
|
|
24
28
|
}
|