chrome-devtools-frontend 1.0.1689415 → 1.0.1690531
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/.gitmodules +4 -0
- package/eslint.config.mjs +8 -2
- package/front_end/core/common/Object.ts +10 -4
- package/front_end/core/i18n/collect-ui-strings.js +5 -5
- package/front_end/core/i18n/generate-locales-js.js +1 -1
- package/front_end/core/i18n/i18n.ts +6 -0
- package/front_end/core/root/Runtime.ts +1 -5
- package/front_end/core/sdk/CSSMetadata.ts +3 -5
- package/front_end/core/sdk/DOMModel.ts +46 -11
- package/front_end/core/sdk/EmulationModel.ts +18 -0
- package/front_end/core/sdk/NetworkRequest.ts +50 -4
- package/front_end/core/sdk/NetworkRequestAccess.ts +172 -0
- package/front_end/core/sdk/SDKSettings.ts +9 -0
- package/front_end/core/sdk/Script.ts +0 -1
- package/front_end/core/sdk/SecurityOrigin.ts +160 -25
- package/front_end/core/sdk/Target.ts +1 -5
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/generated/SupportedCSSProperties.ts +1 -1
- package/front_end/models/ai_assistance/AiAgent2.ts +4 -1
- package/front_end/models/ai_assistance/AiConversation.ts +29 -18
- package/front_end/models/ai_assistance/AiUtils.ts +0 -10
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +6 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -1
- package/front_end/models/ai_assistance/injected.ts +0 -2
- package/front_end/models/javascript_metadata/NativeFunctions.ts +1 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -2
- package/front_end/models/trace/insights/Cache.ts +1 -3
- package/front_end/models/trace/insights/CharacterSet.ts +1 -3
- package/front_end/models/trace/insights/DOMSize.ts +1 -3
- package/front_end/models/trace/insights/DocumentLatency.ts +1 -3
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -3
- package/front_end/models/trace/insights/FontDisplay.ts +1 -2
- package/front_end/models/trace/insights/ForcedReflow.ts +1 -2
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -3
- package/front_end/models/trace/insights/ImageDelivery.ts +1 -3
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -3
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -3
- package/front_end/models/trace/insights/LegacyJavaScript.ts +1 -3
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -2
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -2
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -3
- package/front_end/models/trace/insights/SlowCSSSelector.ts +1 -3
- package/front_end/models/trace/insights/ThirdParties.ts +1 -3
- package/front_end/models/trace/insights/Viewport.ts +1 -2
- package/front_end/panels/accessibility/ARIAAttributesView.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +3 -3
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
- package/front_end/panels/accessibility/AccessibilityStrings.ts +7 -3
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -2
- package/front_end/panels/ai_assistance/components/AccessibilityAgentMarkdownRenderer.ts +1 -3
- package/front_end/panels/ai_assistance/components/chatMessage.css +3 -1
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/AnimationUI.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +6 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/IndexedDBViews.ts +3 -2
- package/front_end/panels/application/ReportingApiTreeElement.ts +1 -1
- package/front_end/panels/application/ReportingApiView.ts +2 -2
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
- package/front_end/panels/application/StorageItemsToolbar.ts +6 -2
- package/front_end/panels/application/StorageView.ts +9 -8
- package/front_end/panels/application/TrustTokensTreeElement.ts +1 -1
- package/front_end/panels/application/WebMCPView.ts +2 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +1 -1
- package/front_end/panels/application/components/CrashReportContextGrid.ts +1 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +3 -2
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ReportsGrid.ts +1 -1
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +2 -2
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +7 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +2 -0
- package/front_end/panels/autofill/AutofillView.ts +2 -2
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +56 -15
- package/front_end/panels/changes/ChangesView.ts +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionView.ts +2 -1
- package/front_end/panels/console/ConsolePinPane.ts +4 -2
- package/front_end/panels/console/ConsolePrompt.ts +6 -2
- package/front_end/panels/console/ConsoleSidebar.ts +12 -4
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -9
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +16 -3
- package/front_end/panels/elements/ElementsTreeOutline.ts +402 -130
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
- package/front_end/panels/elements/PropertyRenderer.ts +22 -15
- package/front_end/panels/elements/ShortcutTreeElement.ts +2 -1
- package/front_end/panels/elements/StandaloneStylesContainer.ts +7 -3
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +75 -26
- package/front_end/panels/elements/StylesSidebarPane.ts +9 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +160 -148
- package/front_end/panels/elements/elementsTreeOutline.css +4 -0
- package/front_end/panels/emulation/DeviceModeView.ts +6 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +6 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +2 -1
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +6 -2
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +7 -2
- package/front_end/panels/layer_viewer/Layers3DView.ts +8 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +6 -2
- package/front_end/panels/lighthouse/lighthousePanel.css +5 -5
- package/front_end/panels/lighthouse/lighthouseStartView.css +13 -13
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +6 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +6 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +6 -2
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +25 -54
- package/front_end/panels/network/NetworkDataGridNode.ts +11 -9
- package/front_end/panels/network/NetworkLogView.ts +12 -4
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
- package/front_end/panels/network/components/RequestHeadersView.css +5 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/network/networkLogView.css +4 -0
- package/front_end/panels/network/requestInitiatorViewTree.css +2 -0
- package/front_end/panels/performance_monitor/performanceMonitor.css +3 -3
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +7 -2
- package/front_end/panels/profiler/HeapProfileView.ts +7 -2
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +8 -4
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +8 -4
- package/front_end/panels/profiler/HeapSnapshotView.ts +15 -6
- package/front_end/panels/profiler/HeapTimelineOverview.ts +6 -2
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +12 -5
- package/front_end/panels/profiler/ProfileLauncherView.ts +6 -2
- package/front_end/panels/profiler/profilesPanel.css +8 -9
- package/front_end/panels/profiler/profilesSidebarTree.css +13 -13
- package/front_end/panels/protocol_monitor/JSONEditor.css +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +6 -1
- package/front_end/panels/protocol_monitor/protocolMonitor.css +2 -2
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
- package/front_end/panels/sources/ProfilePlugin.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/SourcesView.ts +7 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +6 -2
- package/front_end/panels/sources/UISourceCodeFrame.ts +10 -3
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/AnnotationHelpers.ts +9 -9
- package/front_end/panels/timeline/CountersGraph.ts +8 -8
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/ExtensionTrackAppender.ts +1 -1
- package/front_end/panels/timeline/GPUTrackAppender.ts +1 -1
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/IsolateSelector.ts +3 -3
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +4 -4
- package/front_end/panels/timeline/NetworkTrackAppender.ts +2 -2
- package/front_end/panels/timeline/StatusDialog.ts +5 -6
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +4 -4
- package/front_end/panels/timeline/ThreadAppender.ts +12 -14
- package/front_end/panels/timeline/TimelineController.ts +5 -8
- package/front_end/panels/timeline/TimelineDetailsView.ts +13 -9
- package/front_end/panels/timeline/TimelineEventOverview.ts +4 -4
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +18 -18
- package/front_end/panels/timeline/TimelineFlameChartView.ts +8 -3
- package/front_end/panels/timeline/TimelineHistoryManager.ts +9 -9
- package/front_end/panels/timeline/TimelineLoader.ts +1 -1
- package/front_end/panels/timeline/TimelineMiniMap.ts +7 -2
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
- package/front_end/panels/timeline/TimelinePanel.ts +60 -62
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +27 -27
- package/front_end/panels/timeline/TimelineTreeView.ts +47 -45
- package/front_end/panels/timeline/TimelineUIUtils.ts +146 -120
- package/front_end/panels/timeline/TimingsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TrackConfigBanner.ts +4 -4
- package/front_end/panels/timeline/UIDevtoolsUtils.ts +15 -15
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
- package/front_end/panels/timeline/components/Sidebar.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
- package/front_end/panels/timeline/components/insights/Table.ts +1 -1
- package/front_end/panels/timeline/enable-easter-egg.js +1 -1
- package/front_end/panels/timeline/timeline-meta.ts +30 -30
- package/front_end/panels/timeline/timelineFlameChartView.css +10 -10
- package/front_end/panels/timeline/timelineFlamechartPopover.css +5 -5
- package/front_end/panels/timeline/timelineHistoryManager.css +7 -7
- package/front_end/panels/timeline/timelinePaintProfiler.css +2 -2
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/timeline/utils/IgnoreList.ts +4 -4
- package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
- package/front_end/panels/web_audio/WebAudioView.ts +3 -3
- package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
- package/front_end/third_party/acorn/acorn.ts +3 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
- package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
- package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
- package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
- package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
- package/front_end/third_party/json5/json5.ts +2 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +12 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +9 -1
- package/front_end/ui/components/buttons/Button.docs.ts +1 -1
- package/front_end/ui/components/buttons/button.css +21 -0
- package/front_end/ui/components/buttons/floatingButton.css +25 -0
- package/front_end/ui/components/report_view/ReportView.docs.ts +1 -1
- package/front_end/ui/components/snackbars/Snackbars.docs.ts +1 -1
- package/front_end/ui/components/spinners/Spinner.ts +1 -1
- package/front_end/ui/components/spinners/Spinners.docs.ts +1 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +46 -27
- package/front_end/ui/components/switch/Switch.docs.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +10 -8
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +2 -1
- package/front_end/ui/components/text_editor/ExecutionPositionHighlighter.ts +2 -2
- package/front_end/ui/components/text_editor/TextEditor.ts +19 -0
- package/front_end/ui/components/text_editor/config.ts +109 -96
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +1 -1
- package/front_end/ui/components/text_editor/theme.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.docs.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
- package/front_end/ui/components/tree_outline/TreeOutlineUtils.ts +4 -1
- package/front_end/ui/kit/cards/Card.ts +1 -1
- package/front_end/ui/kit/icons/Icon.ts +1 -1
- package/front_end/ui/kit/link/Link.docs.ts +1 -1
- package/front_end/ui/kit/link/Link.ts +1 -1
- package/front_end/ui/legacy/ContextMenu.docs.ts +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/Dialog.ts +10 -2
- package/front_end/ui/legacy/DropTarget.ts +6 -1
- package/front_end/ui/legacy/EmptyWidget.ts +1 -1
- package/front_end/ui/legacy/FilterBar.ts +6 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/RadioButton.docs.ts +1 -1
- package/front_end/ui/legacy/SelectMenu.docs.ts +1 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
- package/front_end/ui/legacy/Slider.docs.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.ts +7 -2
- package/front_end/ui/legacy/StackedPane.ts +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +5 -1
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +13 -37
- package/front_end/ui/legacy/UIUtils.ts +6 -3
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +13 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +6 -2
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +54 -45
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +6 -2
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +141 -106
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -10
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -0
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +6 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +6 -2
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -4
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +7 -5
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -3
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +6 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +15 -7
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
- package/front_end/ui/legacy/inspectorCommon.css +11 -0
- package/front_end/ui/visual_logging/Debugging.ts +2 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -1
- package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
- package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/visual_logging.ts +67 -56
- package/package.json +3 -2
- package/front_end/third_party/acorn/acorn-tsconfig.json +0 -12
- package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
- package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/front_end/third_party/json5/json5-tsconfig.json +0 -8
- package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
- package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
- package/front_end/third_party/lit/lit-tsconfig.json +0 -15
- package/front_end/third_party/marked/marked-tsconfig.json +0 -8
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +0 -191
- package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
|
@@ -19,8 +19,6 @@ import {
|
|
|
19
19
|
ObjectTree,
|
|
20
20
|
} from './ObjectPropertiesSection.js';
|
|
21
21
|
|
|
22
|
-
const {widget} = UI.Widget;
|
|
23
|
-
|
|
24
22
|
const UIStrings = {
|
|
25
23
|
/**
|
|
26
24
|
* @description Context menu item to show a custom formatted object as a standard JavaScript object.
|
|
@@ -30,18 +28,38 @@ const UIStrings = {
|
|
|
30
28
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/object_ui/CustomPreviewComponent.ts', UIStrings);
|
|
31
29
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
32
30
|
|
|
33
|
-
export class CustomPreviewSection {
|
|
34
|
-
|
|
35
|
-
private readonly object: SDK.RemoteObject.RemoteObject;
|
|
31
|
+
export class CustomPreviewSection extends UI.Widget.Widget {
|
|
32
|
+
#object?: SDK.RemoteObject.RemoteObject;
|
|
36
33
|
private expanded = false;
|
|
37
|
-
private cachedContent?: unknown|ObjectTree
|
|
34
|
+
private cachedContent?: unknown|ObjectTree;
|
|
38
35
|
private headerJsonML?: unknown;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
private readonly view: View;
|
|
37
|
+
|
|
38
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
39
|
+
super(element);
|
|
40
|
+
this.view = view;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
get object(): SDK.RemoteObject.RemoteObject|undefined {
|
|
44
|
+
return this.#object;
|
|
45
|
+
}
|
|
44
46
|
|
|
47
|
+
set object(object: SDK.RemoteObject.RemoteObject|undefined) {
|
|
48
|
+
if (this.#object === object) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.#object = object;
|
|
52
|
+
this.headerJsonML = undefined;
|
|
53
|
+
this.cachedContent = undefined;
|
|
54
|
+
this.expanded = false;
|
|
55
|
+
this.parseHeader();
|
|
56
|
+
// CustomPreviewComponent is used synchronously by ConsoleViewMessage. We must render synchronously
|
|
57
|
+
// so ConsoleViewport can measure the true row height upon insertion.
|
|
58
|
+
this.performUpdate();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
private parseHeader(): void {
|
|
62
|
+
const customPreview = this.#object?.customPreview();
|
|
45
63
|
if (!customPreview) {
|
|
46
64
|
return;
|
|
47
65
|
}
|
|
@@ -50,74 +68,88 @@ export class CustomPreviewSection {
|
|
|
50
68
|
this.headerJsonML = JSON.parse(customPreview.header);
|
|
51
69
|
} catch (e) {
|
|
52
70
|
Common.Console.Console.instance().error('Broken formatter: header is invalid json ' + e);
|
|
53
|
-
return;
|
|
54
71
|
}
|
|
55
|
-
this.render();
|
|
56
72
|
}
|
|
57
73
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
74
|
+
override performUpdate(): void {
|
|
75
|
+
this.view({
|
|
76
|
+
object: this.#object,
|
|
77
|
+
headerJsonML: this.headerJsonML,
|
|
78
|
+
expanded: this.expanded,
|
|
79
|
+
cachedContent: this.cachedContent,
|
|
80
|
+
toggleExpanded: this.toggleExpanded,
|
|
81
|
+
},
|
|
82
|
+
undefined, this.contentElement);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
private toggleExpanded = (): void => {
|
|
86
|
+
if (this.cachedContent !== undefined) {
|
|
87
|
+
this.toggleExpand();
|
|
88
|
+
} else {
|
|
89
|
+
void this.loadBody();
|
|
62
90
|
}
|
|
91
|
+
};
|
|
63
92
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
bodyContent = html`<devtools-widget class="custom-expandable-section-default-body" ${
|
|
69
|
-
widget(ObjectPropertiesSectionWidget, {
|
|
70
|
-
objectTree: this.cachedContent,
|
|
71
|
-
showOverflow: false,
|
|
72
|
-
})}></devtools-widget>`;
|
|
73
|
-
} else if (this.cachedContent !== undefined) {
|
|
74
|
-
bodyContent = this.renderJSONMLTag(this.cachedContent);
|
|
75
|
-
}
|
|
93
|
+
private toggleExpand(): void {
|
|
94
|
+
this.expanded = !this.expanded;
|
|
95
|
+
this.performUpdate();
|
|
96
|
+
}
|
|
76
97
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
async loadBody(): Promise<void> {
|
|
99
|
+
const customPreview = this.#object?.customPreview();
|
|
100
|
+
if (!this.#object || !customPreview?.bodyGetterId) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const bodyJsonML =
|
|
105
|
+
await this.#object.callFunctionJSON(bodyGetter => bodyGetter(), [{objectId: customPreview.bodyGetterId}]);
|
|
106
|
+
if (bodyJsonML === null) {
|
|
107
|
+
// Per https://firefox-source-docs.mozilla.org/devtools-user/custom_formatters/index.html#custom-formatter-structure
|
|
108
|
+
// we are supposed to fall back to the default format when the `body()` callback returns `null`.
|
|
109
|
+
const objectTree = new ObjectTree(this.#object, {
|
|
110
|
+
readOnly: true,
|
|
111
|
+
propertiesMode: ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
|
|
112
|
+
});
|
|
113
|
+
objectTree.expanded = true;
|
|
114
|
+
this.cachedContent = objectTree;
|
|
93
115
|
} else {
|
|
94
|
-
|
|
95
|
-
render(html`${headerTemplate}`, this.sectionElement);
|
|
116
|
+
this.cachedContent = bodyJsonML;
|
|
96
117
|
}
|
|
97
|
-
}
|
|
98
118
|
|
|
99
|
-
|
|
100
|
-
|
|
119
|
+
this.expanded = true;
|
|
120
|
+
this.performUpdate();
|
|
101
121
|
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const ALLOWED_TAGS = ['span', 'div', 'ol', 'li', 'table', 'tr', 'td'];
|
|
125
|
+
|
|
126
|
+
export interface ViewInput {
|
|
127
|
+
object?: SDK.RemoteObject.RemoteObject;
|
|
128
|
+
headerJsonML?: unknown;
|
|
129
|
+
expanded: boolean;
|
|
130
|
+
cachedContent?: unknown|ObjectTree|null;
|
|
131
|
+
toggleExpanded: () => void;
|
|
132
|
+
}
|
|
102
133
|
|
|
103
|
-
|
|
134
|
+
export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
|
|
135
|
+
const renderJSONMLTag = (object: SDK.RemoteObject.RemoteObject, jsonML: unknown): LitTemplate => {
|
|
104
136
|
if (!Array.isArray(jsonML)) {
|
|
105
137
|
return html`${String(jsonML)}`;
|
|
106
138
|
}
|
|
107
139
|
|
|
108
140
|
if (jsonML[0] !== 'object') {
|
|
109
|
-
return
|
|
141
|
+
return renderElement(object, jsonML);
|
|
110
142
|
}
|
|
111
143
|
if (jsonML.length !== 2) {
|
|
112
144
|
Common.Console.Console.instance().error('Broken formatter: object reference must contain exactly two elements');
|
|
113
145
|
return html`<span></span>`;
|
|
114
146
|
}
|
|
115
|
-
return
|
|
116
|
-
}
|
|
147
|
+
return layoutObjectTag(object, jsonML);
|
|
148
|
+
};
|
|
117
149
|
|
|
118
150
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
119
|
-
|
|
120
|
-
const it =
|
|
151
|
+
const renderElement = (object: SDK.RemoteObject.RemoteObject, jsonML: any[]): LitTemplate => {
|
|
152
|
+
const it = jsonML[Symbol.iterator]();
|
|
121
153
|
const tagName = it.next().value as string;
|
|
122
154
|
if (!ALLOWED_TAGS.includes(tagName)) {
|
|
123
155
|
Common.Console.Console.instance().error('Broken formatter: element ' + tagName + ' is not allowed!');
|
|
@@ -145,7 +177,7 @@ export class CustomPreviewSection {
|
|
|
145
177
|
|
|
146
178
|
const children: LitTemplate[] = [];
|
|
147
179
|
while (!next.done) {
|
|
148
|
-
children.push(
|
|
180
|
+
children.push(renderJSONMLTag(object, next.value));
|
|
149
181
|
next = it.next();
|
|
150
182
|
}
|
|
151
183
|
const style = Directives.styleMap(stylePropertyMap);
|
|
@@ -168,65 +200,65 @@ export class CustomPreviewSection {
|
|
|
168
200
|
default:
|
|
169
201
|
return html`<span>${children}</span>`;
|
|
170
202
|
}
|
|
171
|
-
}
|
|
203
|
+
};
|
|
172
204
|
|
|
173
|
-
|
|
205
|
+
const layoutObjectTag = (object: SDK.RemoteObject.RemoteObject, objectTag: unknown[]): LitTemplate => {
|
|
174
206
|
const it = objectTag[Symbol.iterator]();
|
|
175
207
|
it.next(); // skip 'object'
|
|
176
208
|
const attributes = it.next().value;
|
|
177
|
-
const remoteObject =
|
|
209
|
+
const remoteObject = object.runtimeModel().createRemoteObject((attributes as Protocol.Runtime.RemoteObject));
|
|
178
210
|
if (remoteObject.customPreview()) {
|
|
179
|
-
return html`${(
|
|
211
|
+
return html`${UI.Widget.widget(CustomPreviewSection, {object: remoteObject})}`;
|
|
180
212
|
}
|
|
181
213
|
|
|
182
214
|
return defaultObjectPresentation(remoteObject, undefined, undefined, undefined,
|
|
183
215
|
{'custom-expandable-section-standard-section': remoteObject.hasChildren});
|
|
184
|
-
}
|
|
216
|
+
};
|
|
185
217
|
|
|
186
|
-
|
|
218
|
+
const onClick = (event: Event): void => {
|
|
187
219
|
event.consume(true);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
} else {
|
|
191
|
-
void this.loadBody();
|
|
192
|
-
}
|
|
193
|
-
}
|
|
220
|
+
input.toggleExpanded();
|
|
221
|
+
};
|
|
194
222
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
223
|
+
const object = input.object;
|
|
224
|
+
const customPreview = object?.customPreview();
|
|
225
|
+
if (!object || !customPreview || !input.headerJsonML) {
|
|
226
|
+
render(nothing, target);
|
|
227
|
+
return;
|
|
198
228
|
}
|
|
199
229
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
if (
|
|
204
|
-
|
|
230
|
+
const headerTemplate = renderJSONMLTag(object, input.headerJsonML);
|
|
231
|
+
if (customPreview.bodyGetterId) {
|
|
232
|
+
let bodyContent: LitTemplate|Node|undefined;
|
|
233
|
+
if (input.cachedContent instanceof ObjectTree) {
|
|
234
|
+
bodyContent = html`<devtools-widget class="custom-expandable-section-default-body" ${
|
|
235
|
+
UI.Widget.widget(ObjectPropertiesSectionWidget, {
|
|
236
|
+
objectTree: input.cachedContent,
|
|
237
|
+
showOverflow: false,
|
|
238
|
+
})}></devtools-widget>`;
|
|
239
|
+
} else if (input.cachedContent) {
|
|
240
|
+
bodyContent = renderJSONMLTag(object, input.cachedContent);
|
|
205
241
|
}
|
|
206
242
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
this.expanded = true;
|
|
224
|
-
this.render();
|
|
225
|
-
}
|
|
243
|
+
render(html`
|
|
244
|
+
<span class=${Directives.classMap({'custom-expandable-section-header': true,
|
|
245
|
+
expanded: input.expanded})} @click=${onClick}>
|
|
246
|
+
<devtools-icon name=${
|
|
247
|
+
input.expanded ? 'triangle-down' : 'triangle-right'} class="custom-expand-icon"></devtools-icon>
|
|
248
|
+
${headerTemplate}
|
|
249
|
+
</span>
|
|
250
|
+
${
|
|
251
|
+
bodyContent ?
|
|
252
|
+
html`<span class="custom-expandable-section-body" ?hidden=${!input.expanded}>${bodyContent}</span>` :
|
|
253
|
+
nothing}
|
|
254
|
+
`,
|
|
255
|
+
target, {container: {classes: ['custom-expandable-section']}});
|
|
256
|
+
} else {
|
|
257
|
+
render(html`${headerTemplate}`, target, {container: {classes: ['custom-expandable-section']}});
|
|
226
258
|
}
|
|
227
|
-
}
|
|
259
|
+
};
|
|
228
260
|
|
|
229
|
-
|
|
261
|
+
export type View = typeof DEFAULT_VIEW;
|
|
230
262
|
|
|
231
263
|
export class CustomPreviewComponent {
|
|
232
264
|
private readonly object: SDK.RemoteObject.RemoteObject;
|
|
@@ -234,27 +266,27 @@ export class CustomPreviewComponent {
|
|
|
234
266
|
element: HTMLSpanElement;
|
|
235
267
|
constructor(object: SDK.RemoteObject.RemoteObject) {
|
|
236
268
|
this.object = object;
|
|
237
|
-
this.customPreviewSection = new CustomPreviewSection(
|
|
269
|
+
this.customPreviewSection = new CustomPreviewSection();
|
|
270
|
+
this.customPreviewSection.object = object;
|
|
238
271
|
this.element = document.createElement('span');
|
|
239
272
|
this.element.classList.add('source-code');
|
|
240
273
|
const shadowRoot = UI.UIUtils.createShadowRootWithCoreStyles(this.element, {cssFile: customPreviewComponentStyles});
|
|
241
274
|
this.element.addEventListener('contextmenu', this.contextMenuEventFired.bind(this), false);
|
|
242
|
-
|
|
275
|
+
this.customPreviewSection.show(shadowRoot, undefined, /* suppressOrphanWidgetError= */ true);
|
|
243
276
|
}
|
|
244
277
|
|
|
245
|
-
expandIfPossible(): void {
|
|
278
|
+
async expandIfPossible(): Promise<void> {
|
|
246
279
|
const customPreview = this.object.customPreview();
|
|
247
280
|
if (customPreview && customPreview.bodyGetterId && this.customPreviewSection) {
|
|
248
|
-
|
|
281
|
+
await this.customPreviewSection.loadBody();
|
|
249
282
|
}
|
|
250
283
|
}
|
|
251
284
|
|
|
252
285
|
private contextMenuEventFired(event: Event): void {
|
|
253
286
|
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
254
287
|
if (this.customPreviewSection) {
|
|
255
|
-
contextMenu.revealSection().appendItem(
|
|
256
|
-
|
|
257
|
-
{jslogContext: 'show-as-javascript-object'});
|
|
288
|
+
contextMenu.revealSection().appendItem(i18nString(UIStrings.showAsJavascriptObject), this.disassemble.bind(this),
|
|
289
|
+
{jslogContext: 'show-as-javascript-object'});
|
|
258
290
|
}
|
|
259
291
|
contextMenu.appendApplicableItems(this.object);
|
|
260
292
|
void contextMenu.show();
|
|
@@ -262,8 +294,11 @@ export class CustomPreviewComponent {
|
|
|
262
294
|
|
|
263
295
|
private disassemble(): void {
|
|
264
296
|
if (this.element.shadowRoot) {
|
|
297
|
+
if (this.customPreviewSection) {
|
|
298
|
+
this.customPreviewSection.detach();
|
|
299
|
+
this.customPreviewSection = null;
|
|
300
|
+
}
|
|
265
301
|
this.element.shadowRoot.textContent = '';
|
|
266
|
-
this.customPreviewSection = null;
|
|
267
302
|
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
268
303
|
render(defaultObjectPresentation(this.object), this.element.shadowRoot);
|
|
269
304
|
}
|
|
@@ -58,7 +58,7 @@ export class ObjectPopoverHelper {
|
|
|
58
58
|
|
|
59
59
|
if (result.customPreview()) {
|
|
60
60
|
const customPreviewComponent = new CustomPreviewComponent(result);
|
|
61
|
-
customPreviewComponent.expandIfPossible();
|
|
61
|
+
void customPreviewComponent.expandIfPossible();
|
|
62
62
|
popoverContentElement = customPreviewComponent.element;
|
|
63
63
|
} else {
|
|
64
64
|
popoverContentElement = document.createElement('div');
|
|
@@ -1301,7 +1301,7 @@ export function populateObjectTreeContextMenu(
|
|
|
1301
1301
|
{checked: object.includeNullOrUndefinedValues, jslogContext: 'show-all'});
|
|
1302
1302
|
}
|
|
1303
1303
|
|
|
1304
|
-
interface ObjectTreeViewInput {
|
|
1304
|
+
export interface ObjectTreeViewInput {
|
|
1305
1305
|
renderAsSubtree: boolean;
|
|
1306
1306
|
objectTree?: ObjectTree;
|
|
1307
1307
|
linkifier?: Components.Linkifier.Linkifier;
|
|
@@ -1309,7 +1309,7 @@ interface ObjectTreeViewInput {
|
|
|
1309
1309
|
skipProto: boolean;
|
|
1310
1310
|
onExpand: (expanded: boolean) => void;
|
|
1311
1311
|
}
|
|
1312
|
-
type ObjectTreeView = (input: ObjectTreeViewInput, output: object, target: HTMLElement) => void;
|
|
1312
|
+
export type ObjectTreeView = (input: ObjectTreeViewInput, output: object, target: HTMLElement) => void;
|
|
1313
1313
|
export const OBJECT_TREE_DEFAULT_VIEW: ObjectTreeView = (input, output, target) => {
|
|
1314
1314
|
const objectTree = input.objectTree;
|
|
1315
1315
|
if (!objectTree) {
|
|
@@ -1351,7 +1351,7 @@ export class ObjectTreeWidget extends UI.Widget.Widget {
|
|
|
1351
1351
|
#skipProto = false;
|
|
1352
1352
|
readonly #view: ObjectTreeView;
|
|
1353
1353
|
|
|
1354
|
-
constructor(element?: HTMLElement, view = OBJECT_TREE_DEFAULT_VIEW) {
|
|
1354
|
+
constructor(element?: HTMLElement, view: ObjectTreeView = OBJECT_TREE_DEFAULT_VIEW) {
|
|
1355
1355
|
super(element);
|
|
1356
1356
|
this.#view = view;
|
|
1357
1357
|
}
|
|
@@ -1676,12 +1676,12 @@ export interface ObjectPropertyViewInput {
|
|
|
1676
1676
|
node: ObjectTreeNode;
|
|
1677
1677
|
search?: UI.TreeOutline.TreeSearch<ObjectTreeNodeBase>;
|
|
1678
1678
|
}
|
|
1679
|
-
interface ObjectPropertyViewOutput {
|
|
1679
|
+
export interface ObjectPropertyViewOutput {
|
|
1680
1680
|
valueElement: Element|undefined;
|
|
1681
1681
|
nameElement: Element|undefined;
|
|
1682
1682
|
}
|
|
1683
|
-
type ObjectPropertyView =
|
|
1684
|
-
void;
|
|
1683
|
+
export type ObjectPropertyView =
|
|
1684
|
+
(input: ObjectPropertyViewInput, output: ObjectPropertyViewOutput, target: HTMLElement) => void;
|
|
1685
1685
|
export const OBJECT_PROPERTY_DEFAULT_VIEW: ObjectPropertyView = (input, output, target) => {
|
|
1686
1686
|
const {property} = input.node;
|
|
1687
1687
|
const isInternalEntries = property.synthetic && input.node.name === '[[Entries]]';
|
|
@@ -1807,7 +1807,7 @@ export class ObjectPropertyWidget extends UI.Widget.Widget {
|
|
|
1807
1807
|
#editable = false;
|
|
1808
1808
|
#search?: UI.TreeOutline.TreeSearch<ObjectTreeNodeBase>;
|
|
1809
1809
|
|
|
1810
|
-
constructor(target?: HTMLElement, view = OBJECT_PROPERTY_DEFAULT_VIEW) {
|
|
1810
|
+
constructor(target?: HTMLElement, view: ObjectPropertyView = OBJECT_PROPERTY_DEFAULT_VIEW) {
|
|
1811
1811
|
super(target);
|
|
1812
1812
|
this.#view = view;
|
|
1813
1813
|
}
|
|
@@ -2522,7 +2522,7 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2522
2522
|
static sparseIterationThreshold = 250000;
|
|
2523
2523
|
}
|
|
2524
2524
|
|
|
2525
|
-
interface ExpandableTextViewInput {
|
|
2525
|
+
export interface ExpandableTextViewInput {
|
|
2526
2526
|
copyText: () => void;
|
|
2527
2527
|
expandText: () => void;
|
|
2528
2528
|
expanded: boolean;
|
|
@@ -2530,7 +2530,7 @@ interface ExpandableTextViewInput {
|
|
|
2530
2530
|
byteCount: number;
|
|
2531
2531
|
text: string;
|
|
2532
2532
|
}
|
|
2533
|
-
type ExpandableTextView = (input: ExpandableTextViewInput, output: object, target: HTMLElement) => void;
|
|
2533
|
+
export type ExpandableTextView = (input: ExpandableTextViewInput, output: object, target: HTMLElement) => void;
|
|
2534
2534
|
export const EXPANDABLE_TEXT_DEFAULT_VIEW: ExpandableTextView = (input, output, target) => {
|
|
2535
2535
|
const totalBytesText = i18n.ByteUtilities.bytesToString(input.byteCount);
|
|
2536
2536
|
const canExpand = input.text.length < ExpandableTextPropertyValue.MAX_DISPLAYABLE_TEXT_LENGTH;
|
|
@@ -2588,7 +2588,7 @@ export class ExpandableTextPropertyValue extends UI.Widget.Widget {
|
|
|
2588
2588
|
#maxLength = ExpandableTextPropertyValue.EXPANDABLE_MAX_LENGTH;
|
|
2589
2589
|
readonly #view: ExpandableTextView;
|
|
2590
2590
|
|
|
2591
|
-
constructor(target?: HTMLElement, view = EXPANDABLE_TEXT_DEFAULT_VIEW) {
|
|
2591
|
+
constructor(target?: HTMLElement, view: ExpandableTextView = EXPANDABLE_TEXT_DEFAULT_VIEW) {
|
|
2592
2592
|
super(target);
|
|
2593
2593
|
this.#view = view;
|
|
2594
2594
|
}
|
|
@@ -90,6 +90,8 @@ li.object-properties-section {
|
|
|
90
90
|
|
|
91
91
|
.tree-outline.hide-selection-when-blurred .selected:focus-visible {
|
|
92
92
|
background: none;
|
|
93
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
94
|
+
outline-offset: calc(-1 * var(--sys-size-2));
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
.tree-outline.hide-selection-when-blurred .selected:focus-visible ::slotted(*),
|
|
@@ -37,7 +37,12 @@ const UIStrings = {
|
|
|
37
37
|
} as const;
|
|
38
38
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/perf_ui/FilmStripView.ts', UIStrings);
|
|
39
39
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
40
|
-
|
|
40
|
+
const FilmStripViewBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.HBox> =
|
|
41
|
+
Common.ObjectWrapper.eventMixin(
|
|
42
|
+
UI.Widget.HBox,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export class FilmStripView extends FilmStripViewBase {
|
|
41
46
|
private statusLabel: HTMLElement;
|
|
42
47
|
private zeroTime: Trace.Types.Timing.Milli = Trace.Types.Timing.Milli(0);
|
|
43
48
|
#filmStrip: Trace.Extras.FilmStrip.Data|null = null;
|
|
@@ -245,8 +245,12 @@ export type DrawOverride =
|
|
|
245
245
|
(context: CanvasRenderingContext2D, x: number, y: number, width: number, height: number,
|
|
246
246
|
timeToPosition: (time: number) => number, transformColor: (color: string) => string) => PositionOverride;
|
|
247
247
|
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
const FlameChartBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.VBox> =
|
|
249
|
+
Common.ObjectWrapper.eventMixin(
|
|
250
|
+
UI.Widget.VBox,
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
export class FlameChart extends FlameChartBase implements NetworkTimeCalculator.Calculator, ChartViewportDelegate {
|
|
250
254
|
private readonly flameChartDelegate: FlameChartDelegate;
|
|
251
255
|
private chartViewport: ChartViewport;
|
|
252
256
|
private dataProvider: FlameChartDataProvider;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import * as Common from '../../../../core/common/common.js';
|
|
7
7
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
8
8
|
import * as TraceBounds from '../../../../services/trace_bounds/trace_bounds.js';
|
|
9
|
-
import * as
|
|
9
|
+
import * as VisualLogging from '../../../visual_logging/visual_logging.js';
|
|
10
10
|
import * as UI from '../../legacy.js';
|
|
11
11
|
import * as ThemeSupport from '../../theme_support/theme_support.js';
|
|
12
12
|
|
|
@@ -14,8 +14,12 @@ import {Events as OverviewGridEvents, OverviewGrid, type WindowChangedWithPositi
|
|
|
14
14
|
import {TimelineOverviewCalculator} from './TimelineOverviewCalculator.js';
|
|
15
15
|
import timelineOverviewInfoStyles from './timelineOverviewInfo.css.js';
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const TimelineOverviewPaneBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.VBox> =
|
|
18
|
+
Common.ObjectWrapper.eventMixin(
|
|
19
|
+
UI.Widget.VBox,
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export class TimelineOverviewPane extends TimelineOverviewPaneBase {
|
|
19
23
|
readonly overviewCalculator: TimelineOverviewCalculator;
|
|
20
24
|
private readonly overviewGrid: OverviewGrid;
|
|
21
25
|
private readonly cursorArea: HTMLElement;
|
|
@@ -41,7 +45,7 @@ export class TimelineOverviewPane extends Common.ObjectWrapper.eventMixin<EventT
|
|
|
41
45
|
this.overviewCalculator = new TimelineOverviewCalculator();
|
|
42
46
|
this.overviewGrid = new OverviewGrid(prefix, this.overviewCalculator);
|
|
43
47
|
this.overviewGrid.element.setAttribute(
|
|
44
|
-
'jslog', `${
|
|
48
|
+
'jslog', `${VisualLogging.timeline(`${prefix}-overview`).track({click: true, drag: true, hover: true})}`);
|
|
45
49
|
this.element.appendChild(this.overviewGrid.element);
|
|
46
50
|
this.cursorArea = this.overviewGrid.element.createChild('div', 'overview-grid-cursor-area');
|
|
47
51
|
this.cursorElement = this.overviewGrid.element.createChild('div', 'overview-grid-cursor-position');
|
|
@@ -4,10 +4,16 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
.root {
|
|
8
12
|
align-items: flex-start; /* keep chart at top so it doesnt change position as the legend changes height */
|
|
13
|
+
gap: var(--sys-size-6) 30px;
|
|
9
14
|
display: flex;
|
|
10
|
-
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
justify-content: flex-start;
|
|
11
17
|
white-space: nowrap;
|
|
12
18
|
}
|
|
13
19
|
|
|
@@ -48,10 +54,6 @@
|
|
|
48
54
|
stroke-linejoin: round;
|
|
49
55
|
}
|
|
50
56
|
|
|
51
|
-
.pie-chart-legend {
|
|
52
|
-
margin-left: 30px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
57
|
.pie-chart-legend-row {
|
|
56
58
|
margin: 5px var(--sys-size-2) 5px auto;
|
|
57
59
|
padding-right: 25px;
|
|
@@ -44,8 +44,12 @@ const UIStrings = {
|
|
|
44
44
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/quick_open/FilteredListWidget.ts', UIStrings);
|
|
45
45
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const FilteredListWidgetBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.VBox> =
|
|
48
|
+
Common.ObjectWrapper.eventMixin(
|
|
49
|
+
UI.Widget.VBox,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export class FilteredListWidget extends FilteredListWidgetBase implements UI.ListControl.ListDelegate<number> {
|
|
49
53
|
private promptHistory: string[];
|
|
50
54
|
private scoringTimer: number;
|
|
51
55
|
private filterTimer: number;
|
|
@@ -154,8 +158,9 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
|
|
|
154
158
|
this.inputBoxElement.setSuggestion(suggestion);
|
|
155
159
|
}
|
|
156
160
|
|
|
157
|
-
setHintElement(hint: string): void {
|
|
161
|
+
setHintElement(hint: string, accessibleName: string): void {
|
|
158
162
|
this.hintElement.textContent = hint;
|
|
163
|
+
UI.ARIAUtils.setLabel(this.hintElement, accessibleName);
|
|
159
164
|
}
|
|
160
165
|
|
|
161
166
|
showAsDialog(dialogTitle?: string): void {
|
|
@@ -17,6 +17,10 @@ const UIStrings = {
|
|
|
17
17
|
* @description Hint text displayed below the quick open input prompt.
|
|
18
18
|
*/
|
|
19
19
|
typeToSeeAvailableCommands: 'Type ? to see available commands',
|
|
20
|
+
/**
|
|
21
|
+
* @description Accessible text for the hint displayed below the quick open input prompt.
|
|
22
|
+
*/
|
|
23
|
+
typeQuestionMarkToSeeAvailableCommands: 'Type question mark to see available commands',
|
|
20
24
|
} as const;
|
|
21
25
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/quick_open/QuickOpen.ts', UIStrings);
|
|
22
26
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -42,7 +46,8 @@ export class QuickOpenImpl {
|
|
|
42
46
|
const quickOpen = new this();
|
|
43
47
|
const filteredListWidget = new FilteredListWidget(null, history, quickOpen.queryChanged.bind(quickOpen));
|
|
44
48
|
quickOpen.filteredListWidget = filteredListWidget;
|
|
45
|
-
filteredListWidget.setHintElement(i18nString(UIStrings.typeToSeeAvailableCommands)
|
|
49
|
+
filteredListWidget.setHintElement(i18nString(UIStrings.typeToSeeAvailableCommands),
|
|
50
|
+
i18nString(UIStrings.typeQuestionMarkToSeeAvailableCommands));
|
|
46
51
|
filteredListWidget.showAsDialog();
|
|
47
52
|
filteredListWidget.setQuery(query);
|
|
48
53
|
}
|
|
@@ -107,8 +107,8 @@ export interface EventTypes {
|
|
|
107
107
|
[Events.EDITOR_SCROLL]: void;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
type FormatFn = (lineNo: number, state: CodeMirror.EditorState) => string;
|
|
111
|
-
export const LINE_NUMBER_FORMATTER = CodeMirror.Facet.define<FormatFn, FormatFn>({
|
|
110
|
+
export type FormatFn = (lineNo: number, state: CodeMirror.EditorState) => string;
|
|
111
|
+
export const LINE_NUMBER_FORMATTER: CodeMirror.Facet<FormatFn, FormatFn> = CodeMirror.Facet.define<FormatFn, FormatFn>({
|
|
112
112
|
combine(value): FormatFn {
|
|
113
113
|
if (value.length === 0) {
|
|
114
114
|
return (lineNo: number) => lineNo.toString();
|
|
@@ -117,8 +117,13 @@ export const LINE_NUMBER_FORMATTER = CodeMirror.Facet.define<FormatFn, FormatFn>
|
|
|
117
117
|
},
|
|
118
118
|
});
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
const SourceFrameImplBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.View.SimpleView> =
|
|
121
|
+
Common.ObjectWrapper.eventMixin(
|
|
122
|
+
UI.View.SimpleView,
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
export class SourceFrameImpl extends SourceFrameImplBase implements UI.SearchableView.Searchable,
|
|
126
|
+
UI.SearchableView.Replaceable, Transformer {
|
|
122
127
|
private readonly lazyContent: () => Promise<TextUtils.ContentData.ContentDataOrError>;
|
|
123
128
|
private prettyInternal: boolean;
|
|
124
129
|
private rawContent: string|CodeMirror.Text|null;
|
|
@@ -1179,7 +1184,8 @@ const nonBreakableLineMark = new (class extends CodeMirror.GutterMarker {
|
|
|
1179
1184
|
})();
|
|
1180
1185
|
|
|
1181
1186
|
/** Effect to add lines (by position) to the set of non-breakable lines. **/
|
|
1182
|
-
export const addNonBreakableLines
|
|
1187
|
+
export const addNonBreakableLines: CodeMirror.StateEffectType<readonly number[]> =
|
|
1188
|
+
CodeMirror.StateEffect.define<readonly number[]>();
|
|
1183
1189
|
|
|
1184
1190
|
const nonBreakableLines = CodeMirror.StateField.define<CodeMirror.RangeSet<CodeMirror.GutterMarker>>({
|
|
1185
1191
|
create(): CodeMirror.RangeSet<CodeMirror.GutterMarker> {
|
|
@@ -1259,8 +1265,10 @@ export interface SourceFrameInfobar {
|
|
|
1259
1265
|
}
|
|
1260
1266
|
|
|
1261
1267
|
/** Infobar panel state, used to show additional panels below the editor. **/
|
|
1262
|
-
export const addSourceFrameInfobar
|
|
1263
|
-
|
|
1268
|
+
export const addSourceFrameInfobar: CodeMirror.StateEffectType<SourceFrameInfobar> =
|
|
1269
|
+
CodeMirror.StateEffect.define<SourceFrameInfobar>();
|
|
1270
|
+
export const removeSourceFrameInfobar: CodeMirror.StateEffectType<SourceFrameInfobar> =
|
|
1271
|
+
CodeMirror.StateEffect.define<SourceFrameInfobar>();
|
|
1264
1272
|
|
|
1265
1273
|
const sourceFrameInfobarState = CodeMirror.StateField.define<SourceFrameInfobar[]>({
|
|
1266
1274
|
create(): SourceFrameInfobar[] {
|
|
@@ -217,7 +217,7 @@ export class StackTracePreviewContent extends UI.Widget.Widget<ShadowRoot> {
|
|
|
217
217
|
#expanded = false;
|
|
218
218
|
#showIgnoreListed = false;
|
|
219
219
|
|
|
220
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
220
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
221
221
|
super(element, {useShadowDom: 'pure'});
|
|
222
222
|
this.#view = view;
|
|
223
223
|
}
|