chrome-devtools-frontend 1.0.1669021 → 1.0.1672557
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/fixing-skipped-tests/SKILL.md +6 -6
- package/.agents/skills/gerrit-cli/SKILL.md +4 -10
- package/.agents/skills/gerrit-cli/references/commands.md +45 -2
- package/.agents/skills/gerrit-cli/references/workflows.md +7 -0
- package/.agents/skills/gerrit-cli/scripts/import_upstream.py +34 -152
- package/config/typescript/tsconfig.eslint.json +1 -1
- package/docs/contributing/settings-experiments-features.md +2 -8
- package/docs/ecosystem/automatic_workspace_folders.md +0 -19
- package/eslint.config.mjs +5 -5
- package/front_end/core/common/Lazy.ts +3 -3
- package/front_end/core/common/SettingRegistration.ts +0 -7
- package/front_end/core/common/Settings.ts +0 -38
- package/front_end/core/host/UserMetrics.ts +187 -953
- package/front_end/core/host/UserMetricsEnums.ts +949 -0
- package/front_end/core/root/Runtime.ts +21 -138
- package/front_end/core/sdk/CSSMetadata.ts +70 -65
- package/front_end/core/sdk/CategorizedBreakpoint.ts +0 -1
- package/front_end/core/sdk/ChildTargetManager.ts +0 -2
- package/front_end/core/sdk/EmulationModel.ts +0 -2
- package/front_end/core/sdk/EventBreakpointsModel.ts +0 -4
- package/front_end/core/sdk/NetworkManager.ts +0 -3
- package/front_end/core/sdk/PageResourceLoader.ts +9 -9
- package/front_end/core/sdk/RehydratingConnection.ts +52 -4
- package/front_end/core/sdk/Target.ts +0 -4
- package/front_end/devtools_compatibility.js +886 -0
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +7 -6
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +0 -1
- package/front_end/entrypoints/main/MainImpl.ts +18 -22
- package/front_end/foundation/Universe.ts +7 -2
- package/front_end/generated/InspectorBackendCommands.ts +3 -10
- package/front_end/generated/{SupportedCSSProperties.js → SupportedCSSProperties.ts} +16 -0
- package/front_end/generated/protocol-mapping.d.ts +0 -42
- package/front_end/generated/protocol-proxy-api.d.ts +0 -38
- package/front_end/generated/protocol.ts +9 -169
- package/front_end/models/ai_assistance/AiAgent2.ts +11 -3
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +8 -5
- package/front_end/models/ai_assistance/AiSetting.ts +108 -0
- package/front_end/models/ai_assistance/AiUtils.ts +47 -0
- package/front_end/models/ai_assistance/ChangeManager.ts +1 -0
- package/front_end/models/ai_assistance/ExtensionScope.ts +3 -12
- package/front_end/models/ai_assistance/agents/AiAgent.ts +11 -18
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -0
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +42 -17
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +3 -2
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +253 -155
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +12 -6
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +3 -1
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +4 -3
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -0
- package/front_end/models/ai_assistance/injected.ts +1 -0
- package/front_end/models/ai_assistance/performance/AICallTree.ts +1 -0
- package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
- package/front_end/models/ai_assistance/skills/performance.md +10 -0
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +52 -5
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +4 -4
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +4 -4
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +5 -4
- package/front_end/models/ai_assistance/tools/GetStyles.ts +5 -4
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +5 -4
- package/front_end/models/ai_assistance/tools/README.md +1 -1
- package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +63 -0
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +5 -5
- package/front_end/models/ai_assistance/tools/Tool.ts +118 -24
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +2 -0
- package/front_end/models/badges/UserBadges.ts +2 -0
- package/front_end/models/bindings/NetworkProject.ts +5 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -0
- package/front_end/models/bindings/ResourceUtils.ts +3 -0
- package/front_end/models/crux-manager/CrUXManager.ts +1 -0
- package/front_end/models/emulation/DeviceModeModel.ts +140 -7
- package/front_end/models/emulation/EmulatedDevices.ts +246 -793
- package/front_end/models/issues_manager/IssuesManager.ts +10 -2
- package/front_end/models/live-metrics/LiveMetrics.ts +41 -9
- package/front_end/models/logs/LogManager.ts +8 -5
- package/front_end/models/logs/NetworkLog.ts +1 -0
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +21 -3
- package/front_end/models/persistence/NetworkPersistenceManager.ts +6 -0
- package/front_end/models/project_settings/ProjectSettingsModel.ts +8 -12
- package/front_end/models/trace/Processor.ts +42 -10
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +12 -19
- package/front_end/models/trace/handlers/MetaHandler.ts +38 -5
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -2
- package/front_end/models/trace/insights/CharacterSet.ts +1 -1
- package/front_end/models/trace/insights/Common.ts +21 -2
- package/front_end/models/trace/insights/DocumentLatency.ts +1 -1
- package/front_end/models/trace/insights/LCPBreakdown.ts +7 -6
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
- package/front_end/models/trace/insights/ModernHTTP.ts +7 -3
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/ThirdParties.ts +5 -2
- package/front_end/models/trace/insights/types.ts +11 -6
- package/front_end/models/trace/types/Configuration.ts +5 -0
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +3 -1
- package/front_end/models/workspace/IgnoreListManager.ts +2 -0
- package/front_end/models/workspace/UISourceCode.ts +2 -0
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +4 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +22 -22
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +0 -7
- package/front_end/panels/ai_assistance/components/ChatInput.ts +4 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +79 -34
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +1 -2
- package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +9 -106
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/application.ts +0 -10
- package/front_end/panels/application/components/components.ts +0 -4
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +0 -5
- package/front_end/panels/browser_debugger/EventListenerBreakpointsSidebarPane.ts +6 -12
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +5 -3
- package/front_end/panels/console/ConsoleFormat.ts +2 -62
- package/front_end/panels/console/ConsoleViewMessage.ts +14 -7
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -2
- package/front_end/panels/emulation/AdvancedApp.ts +1 -2
- package/front_end/panels/emulation/DeviceModeToolbar.ts +83 -69
- package/front_end/panels/emulation/DeviceModeView.ts +4 -134
- package/front_end/panels/emulation/DeviceModeWrapper.ts +52 -69
- package/front_end/panels/emulation/MediaQueryInspector.ts +2 -2
- package/front_end/panels/emulation/emulation-meta.ts +12 -12
- package/front_end/panels/issues/IssuesPane.ts +3 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +6 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +17 -21
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +206 -126
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +1 -1
- package/front_end/panels/mobile_throttling/CalibrationController.ts +1 -1
- package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +3 -3
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +6 -6
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +14 -12
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +13 -13
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +10 -10
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +28 -28
- package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +6 -6
- package/front_end/panels/network/RequestHeadersView.ts +1 -1
- package/front_end/panels/network/ResourceChunkView.ts +243 -144
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +52 -29
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +21 -35
- package/front_end/panels/network/resourceChunkView.css +41 -36
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +21 -12
- package/front_end/panels/profiler/profiler.ts +4 -0
- package/front_end/panels/recorder/RecorderPanel.ts +6 -14
- package/front_end/panels/sensors/LocationsSettingsTab.ts +7 -7
- package/front_end/panels/settings/AISettingsTab.ts +75 -31
- package/front_end/panels/settings/SettingsScreen.ts +8 -13
- package/front_end/panels/settings/components/SyncSection.ts +3 -4
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +650 -18
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +18 -0
- package/front_end/panels/settings/settings-meta.ts +0 -1
- package/front_end/panels/sources/CategorizedBreakpointL10n.ts +0 -2
- package/front_end/panels/sources/DebuggerPausedMessage.ts +11 -5
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +12 -9
- package/front_end/panels/sources/SourcesPanel.ts +19 -17
- package/front_end/panels/sources/SourcesView.ts +191 -96
- package/front_end/panels/sources/TabbedEditorContainer.ts +3 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -5
- package/front_end/panels/timeline/TimelinePanel.ts +2 -0
- package/front_end/panels/timeline/TimelineUIUtils.ts +15 -0
- package/front_end/panels/timeline/components/CWVMetrics.ts +16 -3
- package/front_end/panels/timeline/components/cwvMetrics.css +4 -0
- package/front_end/panels/timeline/components/liveMetricsView.css +0 -17
- package/front_end/panels/timeline/components/metricValueStyles.css +17 -0
- package/front_end/panels/timeline/timeline-meta.ts +3 -5
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1332 -193
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +64 -15
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +65 -16
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +50 -7
- 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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +8 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +16 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js +11 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +4 -3
- 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/Debug.d.ts +27 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js +12 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js +5 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.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.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +64 -15
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +50 -7
- package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +9 -7
- package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +9 -6
- package/front_end/third_party/puppeteer/package/src/bidi/Dialog.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +24 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Connection.ts +11 -6
- package/front_end/third_party/puppeteer/package/src/cdp/Dialog.ts +7 -0
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +7 -3
- package/front_end/third_party/puppeteer/package/src/common/Debug.ts +30 -5
- package/front_end/third_party/puppeteer/package/src/common/util.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +6 -4
- 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/tsconfig.compatibility.json +2 -1
- package/front_end/tsconfig.json +1 -1
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
- package/front_end/ui/components/settings/SettingCheckbox.ts +4 -7
- package/front_end/ui/components/settings/settings.ts +1 -2
- package/front_end/ui/legacy/Treeoutline.ts +52 -30
- package/front_end/ui/legacy/components/object_ui/CSSStyleSanitizer.ts +74 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +6 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +47 -54
- package/front_end/ui/legacy/components/object_ui/object_ui.ts +2 -0
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -27
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +10 -12
- package/front_end/ui/settings/SettingUIRegistration.ts +0 -8
- package/front_end/ui/visual_logging/KnownContextValues.ts +37 -0
- package/inspector_overlay/tsconfig.json +8 -2
- package/package.json +3 -2
- package/.agents/skills/gerrit-cli/scripts/gerrit_client_wrapper.py +0 -47
- package/front_end/core/sdk/CSSModel.test.api.ts +0 -102
- package/front_end/core/sdk/DOMModel.test.api.ts +0 -104
- package/front_end/foundation/Universe.test.api.ts +0 -73
- package/front_end/panels/application/SharedStorageEventsView.ts +0 -128
- package/front_end/panels/application/SharedStorageItemsView.ts +0 -179
- package/front_end/panels/application/SharedStorageListTreeElement.ts +0 -65
- package/front_end/panels/application/SharedStorageModel.ts +0 -249
- package/front_end/panels/application/SharedStorageTreeElement.ts +0 -40
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +0 -191
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +0 -133
- package/front_end/panels/application/components/sharedStorageAccessGrid.css +0 -29
- package/front_end/panels/application/components/sharedStorageMetadataView.css +0 -29
- package/front_end/panels/application/sharedStorageEventsView.css +0 -9
- package/front_end/panels/network/OriginalResourceChunkView.ts +0 -340
- package/front_end/panels/network/originalResourceChunkView.css +0 -49
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +0 -47
- package/front_end/ui/components/settings/settingDeprecationWarning.css +0 -14
- /package/front_end/generated/{ARIAProperties.js → ARIAProperties.ts} +0 -0
|
@@ -13,11 +13,10 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
13
13
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
14
14
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
15
15
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
16
|
-
import {createIcon} from '../../ui/kit/kit.js';
|
|
17
16
|
import * as QuickOpen from '../../ui/legacy/components/quick_open/quick_open.js';
|
|
18
17
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
19
18
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
20
|
-
import {render} from '../../ui/lit/lit.js';
|
|
19
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
21
20
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
22
21
|
|
|
23
22
|
import * as Components from './components/components.js';
|
|
@@ -56,11 +55,78 @@ const UIStrings = {
|
|
|
56
55
|
const str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesView.ts', UIStrings);
|
|
57
56
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
58
57
|
|
|
58
|
+
export interface Shortcut {
|
|
59
|
+
description: string;
|
|
60
|
+
onClick: () => void;
|
|
61
|
+
keys: string[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ViewInput {
|
|
65
|
+
placeholderElement: HTMLElement;
|
|
66
|
+
scriptViewToolbar: UI.Toolbar.Toolbar;
|
|
67
|
+
bottomToolbar: UI.Toolbar.Toolbar;
|
|
68
|
+
leftToolbarItems: UI.Toolbar.ToolbarItem[];
|
|
69
|
+
rightToolbarItems: UI.Toolbar.ToolbarItem[];
|
|
70
|
+
searchableView: UI.SearchableView.SearchableView;
|
|
71
|
+
editorContainer: TabbedEditorContainer;
|
|
72
|
+
shortcuts: Shortcut[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface ViewOutput {
|
|
76
|
+
onSelectFolderClicked: () => void;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
80
|
+
|
|
81
|
+
export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement): void => {
|
|
82
|
+
render(html`
|
|
83
|
+
<devtools-widget class="vbox flex-auto" ${UI.Widget.widget(() => input.searchableView)}>
|
|
84
|
+
<devtools-widget class="vbox flex-auto" ${UI.Widget.widget(() => input.editorContainer.view)}>
|
|
85
|
+
</devtools-widget>
|
|
86
|
+
</devtools-widget>
|
|
87
|
+
<div class="sources-toolbar" jslog=${VisualLogging.toolbar('bottom')}>
|
|
88
|
+
${input.scriptViewToolbar}
|
|
89
|
+
${input.bottomToolbar}
|
|
90
|
+
</div>`,
|
|
91
|
+
target);
|
|
92
|
+
|
|
93
|
+
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
94
|
+
render(html`
|
|
95
|
+
<div class="tabbed-pane-placeholder-row workspace">
|
|
96
|
+
<span class="icon-container">
|
|
97
|
+
<devtools-icon name="sync" class="sync-icon"></devtools-icon>
|
|
98
|
+
</span>
|
|
99
|
+
<span>
|
|
100
|
+
${i18nString(UIStrings.workspaceDropInAFolderToSyncSources)}
|
|
101
|
+
<button @click=${() => output.onSelectFolderClicked()}>${i18nString(UIStrings.selectFolder)}</button>
|
|
102
|
+
</span>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<div class="shortcuts-list tabbed-pane-placeholder-row" role="list"
|
|
106
|
+
aria-label=${i18nString(UIStrings.sourceViewActions)}>
|
|
107
|
+
${input.shortcuts.map(shortcut => {
|
|
108
|
+
if (!shortcut.keys.length) {
|
|
109
|
+
return html`<div class="shortcut-line" role="listitem"></div>`;
|
|
110
|
+
}
|
|
111
|
+
return html`<div class="shortcut-line" role="listitem">
|
|
112
|
+
<button @click=${shortcut.onClick}>${shortcut.description}</button>
|
|
113
|
+
<span class="shortcuts">
|
|
114
|
+
${shortcut.keys.map(key => html`
|
|
115
|
+
<span class="keybinds-key"><span>${key}</span></span>
|
|
116
|
+
`)}
|
|
117
|
+
</span>
|
|
118
|
+
</div>`;
|
|
119
|
+
})}
|
|
120
|
+
</div>`,
|
|
121
|
+
input.placeholderElement);
|
|
122
|
+
};
|
|
123
|
+
|
|
59
124
|
export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox)
|
|
60
125
|
implements TabbedEditorContainerDelegate, UI.SearchableView.Searchable, UI.SearchableView.Replaceable {
|
|
61
|
-
|
|
126
|
+
#searchableView!: UI.SearchableView.SearchableView;
|
|
62
127
|
private readonly sourceViewByUISourceCode: Map<Workspace.UISourceCode.UISourceCode, UI.Widget.Widget>;
|
|
63
|
-
editorContainer
|
|
128
|
+
editorContainer?: TabbedEditorContainer;
|
|
129
|
+
#uiSourceCodes = new Set<Workspace.UISourceCode.UISourceCode>();
|
|
64
130
|
private readonly historyManager: EditingLocationHistoryManager;
|
|
65
131
|
readonly #scriptViewToolbar: UI.Toolbar.Toolbar;
|
|
66
132
|
readonly #bottomToolbar: UI.Toolbar.Toolbar;
|
|
@@ -68,6 +134,10 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
68
134
|
private readonly focusedPlaceholderElement?: HTMLElement;
|
|
69
135
|
private searchView?: UISourceCodeFrame;
|
|
70
136
|
private searchConfig?: UI.SearchableView.SearchConfig;
|
|
137
|
+
#leftToolbarItems: UI.Toolbar.ToolbarItem[] = [];
|
|
138
|
+
#rightToolbarItems: UI.Toolbar.ToolbarItem[] = [];
|
|
139
|
+
#placeholderElement: HTMLElement;
|
|
140
|
+
#view: View = DEFAULT_VIEW;
|
|
71
141
|
|
|
72
142
|
constructor() {
|
|
73
143
|
super({jslog: `${VisualLogging.pane('editor').track({keydown: 'Escape'})}`});
|
|
@@ -78,31 +148,31 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
78
148
|
|
|
79
149
|
const workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
|
80
150
|
|
|
81
|
-
this.#
|
|
82
|
-
this.#
|
|
83
|
-
this.#searchableView.show(this.element);
|
|
151
|
+
this.#placeholderElement = document.createElement('div');
|
|
152
|
+
this.#placeholderElement.classList.add('sources-placeholder');
|
|
84
153
|
|
|
85
154
|
this.sourceViewByUISourceCode = new Map();
|
|
86
155
|
|
|
87
|
-
this.editorContainer = new TabbedEditorContainer(
|
|
88
|
-
this, Common.Settings.Settings.instance().createLocalSetting('previously-viewed-files', []),
|
|
89
|
-
this.placeholderElement(), this.focusedPlaceholderElement);
|
|
90
|
-
this.editorContainer.show(this.#searchableView.element);
|
|
91
|
-
this.editorContainer.addEventListener(TabbedEditorContainerEvents.EDITOR_SELECTED, this.editorSelected, this);
|
|
92
|
-
this.editorContainer.addEventListener(TabbedEditorContainerEvents.EDITOR_CLOSED, this.editorClosed, this);
|
|
93
|
-
|
|
94
156
|
this.historyManager = new EditingLocationHistoryManager(this);
|
|
95
157
|
|
|
96
|
-
|
|
97
|
-
toolbarContainerElementInternal.setAttribute('jslog', `${VisualLogging.toolbar('bottom')}`);
|
|
98
|
-
this.#scriptViewToolbar = toolbarContainerElementInternal.createChild('devtools-toolbar');
|
|
158
|
+
this.#scriptViewToolbar = document.createElement('devtools-toolbar') as UI.Toolbar.Toolbar;
|
|
99
159
|
this.#scriptViewToolbar.style.flex = 'auto';
|
|
100
|
-
this.#bottomToolbar =
|
|
160
|
+
this.#bottomToolbar = document.createElement('devtools-toolbar') as UI.Toolbar.Toolbar;
|
|
101
161
|
|
|
102
162
|
this.toolbarChangedListener = null;
|
|
103
163
|
|
|
164
|
+
this.#searchableView = new UI.SearchableView.SearchableView(this, this, 'sources-view-search-config');
|
|
165
|
+
this.#searchableView.setMinimalSearchQuerySize(0);
|
|
166
|
+
|
|
167
|
+
const previouslyViewedFilesSetting =
|
|
168
|
+
Common.Settings.Settings.instance().createLocalSetting('previously-viewed-files', []);
|
|
169
|
+
this.editorContainer = new TabbedEditorContainer(this, previouslyViewedFilesSetting, this.#placeholderElement,
|
|
170
|
+
this.focusedPlaceholderElement);
|
|
171
|
+
this.editorContainer.addEventListener(TabbedEditorContainerEvents.EDITOR_SELECTED, this.editorSelected, this);
|
|
172
|
+
this.editorContainer.addEventListener(TabbedEditorContainerEvents.EDITOR_CLOSED, this.editorClosed, this);
|
|
173
|
+
|
|
104
174
|
UI.UIUtils.startBatchUpdate();
|
|
105
|
-
workspace.uiSourceCodes().forEach(this.addUISourceCode
|
|
175
|
+
workspace.uiSourceCodes().forEach(ui => this.addUISourceCode(ui));
|
|
106
176
|
UI.UIUtils.endBatchUpdate();
|
|
107
177
|
|
|
108
178
|
workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, this.uiSourceCodeAdded, this);
|
|
@@ -110,6 +180,8 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
110
180
|
workspace.addEventListener(Workspace.Workspace.Events.ProjectRemoved, this.projectRemoved.bind(this), this);
|
|
111
181
|
SDK.TargetManager.TargetManager.instance().addScopeChangeListener(this.#onScopeChange.bind(this));
|
|
112
182
|
|
|
183
|
+
this.requestUpdate();
|
|
184
|
+
|
|
113
185
|
function handleBeforeUnload(event: Event): void {
|
|
114
186
|
if (event.returnValue) {
|
|
115
187
|
return;
|
|
@@ -142,55 +214,30 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
142
214
|
}
|
|
143
215
|
}
|
|
144
216
|
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
const browseButton = text.createChild('button');
|
|
157
|
-
browseButton.textContent = i18nString(UIStrings.selectFolder);
|
|
158
|
-
browseButton.addEventListener('click', this.addFileSystemClicked.bind(this));
|
|
159
|
-
|
|
160
|
-
const shortcuts = [
|
|
161
|
-
{actionId: 'quick-open.show', description: i18nString(UIStrings.openFile)},
|
|
162
|
-
{actionId: 'quick-open.show-command-menu', description: i18nString(UIStrings.runCommand)},
|
|
163
|
-
];
|
|
217
|
+
override performUpdate(): void {
|
|
218
|
+
const input: ViewInput = {
|
|
219
|
+
placeholderElement: this.#placeholderElement,
|
|
220
|
+
scriptViewToolbar: this.#scriptViewToolbar,
|
|
221
|
+
bottomToolbar: this.#bottomToolbar,
|
|
222
|
+
leftToolbarItems: this.#leftToolbarItems,
|
|
223
|
+
rightToolbarItems: this.#rightToolbarItems,
|
|
224
|
+
searchableView: this.#searchableView,
|
|
225
|
+
editorContainer: this.editorContainer as TabbedEditorContainer,
|
|
226
|
+
shortcuts: this.#getPlaceholderShortcuts(),
|
|
227
|
+
};
|
|
164
228
|
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
229
|
+
const output: ViewOutput = {
|
|
230
|
+
onSelectFolderClicked: () => {
|
|
231
|
+
void this.addFileSystemClicked();
|
|
232
|
+
},
|
|
233
|
+
};
|
|
169
234
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
const listItemElement = list.createChild('div');
|
|
173
|
-
listItemElement.classList.add('shortcut-line');
|
|
174
|
-
|
|
175
|
-
UI.ARIAUtils.markAsListitem(listItemElement);
|
|
176
|
-
|
|
177
|
-
// Take the first shortcut for display.
|
|
178
|
-
if (shortcutKeys?.[0]) {
|
|
179
|
-
const button = listItemElement.createChild('button');
|
|
180
|
-
button.textContent = shortcut.description;
|
|
181
|
-
const action = UI.ActionRegistry.ActionRegistry.instance().getAction(shortcut.actionId);
|
|
182
|
-
button.addEventListener('click', () => action.execute());
|
|
183
|
-
|
|
184
|
-
const shortcutElement = listItemElement.createChild('span', 'shortcuts');
|
|
185
|
-
const separator = Host.Platform.isMac() ? '\u2004' : ' + ';
|
|
186
|
-
const keys = shortcutKeys[0].descriptors.flatMap(descriptor => descriptor.name.split(separator));
|
|
187
|
-
keys.forEach(key => {
|
|
188
|
-
shortcutElement.createChild('span', 'keybinds-key').createChild('span').textContent = key;
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}
|
|
235
|
+
this.#view(input, output, this.element);
|
|
236
|
+
}
|
|
192
237
|
|
|
193
|
-
|
|
238
|
+
override onDetach(): void {
|
|
239
|
+
super.onDetach();
|
|
240
|
+
this.editorContainer?.view.detachChildWidgets();
|
|
194
241
|
}
|
|
195
242
|
|
|
196
243
|
private async addFileSystemClicked(): Promise<void> {
|
|
@@ -202,11 +249,38 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
202
249
|
void UI.ViewManager.ViewManager.instance().showView('navigator-files');
|
|
203
250
|
}
|
|
204
251
|
|
|
252
|
+
#getPlaceholderShortcuts(): Shortcut[] {
|
|
253
|
+
const shortcuts = [
|
|
254
|
+
{actionId: 'quick-open.show', description: i18nString(UIStrings.openFile)},
|
|
255
|
+
{actionId: 'quick-open.show-command-menu', description: i18nString(UIStrings.runCommand)},
|
|
256
|
+
];
|
|
257
|
+
const separator = Host.Platform.isMac() ? '\u2004' : ' + ';
|
|
258
|
+
return shortcuts.map(shortcut => {
|
|
259
|
+
const shortcutKeys = UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction(shortcut.actionId);
|
|
260
|
+
if (!shortcutKeys?.[0]) {
|
|
261
|
+
return {
|
|
262
|
+
description: shortcut.description,
|
|
263
|
+
onClick: () => {},
|
|
264
|
+
keys: [],
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
const action = UI.ActionRegistry.ActionRegistry.instance().getAction(shortcut.actionId);
|
|
268
|
+
const keys = shortcutKeys[0].descriptors.flatMap(descriptor => descriptor.name.split(separator));
|
|
269
|
+
return {
|
|
270
|
+
description: shortcut.description,
|
|
271
|
+
onClick: () => {
|
|
272
|
+
void action.execute();
|
|
273
|
+
},
|
|
274
|
+
keys,
|
|
275
|
+
};
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
|
|
205
279
|
static defaultUISourceCodeScores(): Map<Workspace.UISourceCode.UISourceCode, number> {
|
|
206
280
|
const defaultScores = new Map<Workspace.UISourceCode.UISourceCode, number>();
|
|
207
281
|
const sourcesView = UI.Context.Context.instance().flavor(SourcesView);
|
|
208
282
|
if (sourcesView) {
|
|
209
|
-
const uiSourceCodes = sourcesView.editorContainer
|
|
283
|
+
const uiSourceCodes = sourcesView.editorContainer?.historyUISourceCodes() ?? [];
|
|
210
284
|
for (let i = 1; i < uiSourceCodes.length; ++i) // Skip current element
|
|
211
285
|
{
|
|
212
286
|
defaultScores.set(uiSourceCodes[i], uiSourceCodes.length - i);
|
|
@@ -215,12 +289,30 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
215
289
|
return defaultScores;
|
|
216
290
|
}
|
|
217
291
|
|
|
218
|
-
|
|
219
|
-
|
|
292
|
+
set leftToolbarItems(items: UI.Toolbar.ToolbarItem[]) {
|
|
293
|
+
this.#leftToolbarItems = items;
|
|
294
|
+
const container = this.editorContainer;
|
|
295
|
+
if (container) {
|
|
296
|
+
container.leftToolbar().removeToolbarItems();
|
|
297
|
+
items.forEach(item => container.leftToolbar().appendToolbarItem(item));
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
get leftToolbarItems(): UI.Toolbar.ToolbarItem[] {
|
|
302
|
+
return this.#leftToolbarItems;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
set rightToolbarItems(items: UI.Toolbar.ToolbarItem[]) {
|
|
306
|
+
this.#rightToolbarItems = items;
|
|
307
|
+
const container = this.editorContainer;
|
|
308
|
+
if (container) {
|
|
309
|
+
container.rightToolbar().removeToolbarItems();
|
|
310
|
+
items.forEach(item => container.rightToolbar().appendToolbarItem(item));
|
|
311
|
+
}
|
|
220
312
|
}
|
|
221
313
|
|
|
222
|
-
|
|
223
|
-
return this
|
|
314
|
+
get rightToolbarItems(): UI.Toolbar.ToolbarItem[] {
|
|
315
|
+
return this.#rightToolbarItems;
|
|
224
316
|
}
|
|
225
317
|
|
|
226
318
|
bottomToolbar(): UI.Toolbar.Toolbar {
|
|
@@ -246,7 +338,7 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
246
338
|
}
|
|
247
339
|
|
|
248
340
|
visibleView(): UI.Widget.Widget|null {
|
|
249
|
-
return this.editorContainer
|
|
341
|
+
return (this.editorContainer?.visibleView ?? null) as UI.Widget.Widget | null;
|
|
250
342
|
}
|
|
251
343
|
|
|
252
344
|
currentSourceFrame(): UISourceCodeFrame|null {
|
|
@@ -258,15 +350,15 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
258
350
|
}
|
|
259
351
|
|
|
260
352
|
currentUISourceCode(): Workspace.UISourceCode.UISourceCode|null {
|
|
261
|
-
return this.editorContainer
|
|
353
|
+
return this.editorContainer?.currentFile() ?? null;
|
|
262
354
|
}
|
|
263
355
|
|
|
264
356
|
onCloseEditorTab(): boolean {
|
|
265
|
-
const uiSourceCode = this.editorContainer
|
|
357
|
+
const uiSourceCode = this.editorContainer?.currentFile();
|
|
266
358
|
if (!uiSourceCode) {
|
|
267
359
|
return false;
|
|
268
360
|
}
|
|
269
|
-
this.editorContainer
|
|
361
|
+
this.editorContainer?.closeFile(uiSourceCode);
|
|
270
362
|
return true;
|
|
271
363
|
}
|
|
272
364
|
|
|
@@ -317,7 +409,8 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
317
409
|
}
|
|
318
410
|
}
|
|
319
411
|
}
|
|
320
|
-
this.
|
|
412
|
+
this.#uiSourceCodes.add(uiSourceCode);
|
|
413
|
+
this.editorContainer?.addUISourceCode(uiSourceCode);
|
|
321
414
|
}
|
|
322
415
|
|
|
323
416
|
private uiSourceCodeRemoved(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
|
|
@@ -326,7 +419,8 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
326
419
|
}
|
|
327
420
|
|
|
328
421
|
private removeUISourceCodes(uiSourceCodes: Workspace.UISourceCode.UISourceCode[]): void {
|
|
329
|
-
this.
|
|
422
|
+
uiSourceCodes.forEach(ui => this.#uiSourceCodes.delete(ui));
|
|
423
|
+
this.editorContainer?.removeUISourceCodes(uiSourceCodes);
|
|
330
424
|
for (let i = 0; i < uiSourceCodes.length; ++i) {
|
|
331
425
|
this.removeSourceFrame(uiSourceCodes[i]);
|
|
332
426
|
this.historyManager.removeHistoryForSourceCode(uiSourceCodes[i]);
|
|
@@ -357,15 +451,15 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
357
451
|
}
|
|
358
452
|
}
|
|
359
453
|
|
|
360
|
-
showSourceLocation(
|
|
361
|
-
|
|
362
|
-
|
|
454
|
+
async showSourceLocation(uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
455
|
+
location?: SourceFrame.SourceFrame.RevealPosition, omitFocus?: boolean,
|
|
456
|
+
omitHighlight?: boolean): Promise<void> {
|
|
363
457
|
const currentFrame = this.currentSourceFrame();
|
|
364
458
|
if (currentFrame) {
|
|
365
|
-
this.historyManager.updateCurrentState(
|
|
366
|
-
|
|
459
|
+
this.historyManager.updateCurrentState(currentFrame.uiSourceCode(),
|
|
460
|
+
currentFrame.textEditor.state.selection.main.head);
|
|
367
461
|
}
|
|
368
|
-
this.editorContainer
|
|
462
|
+
this.editorContainer?.showFile(uiSourceCode);
|
|
369
463
|
const currentSourceFrame = this.currentSourceFrame();
|
|
370
464
|
if (currentSourceFrame && location) {
|
|
371
465
|
currentSourceFrame.revealPosition(location, !omitHighlight);
|
|
@@ -432,7 +526,8 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
432
526
|
if (this.#sourceViewTypeForWidget(widget) !== this.#sourceViewTypeForUISourceCode(uiSourceCode)) {
|
|
433
527
|
// Remove the existing editor tab and create a new one of the correct type.
|
|
434
528
|
this.removeUISourceCodes([uiSourceCode]);
|
|
435
|
-
this.
|
|
529
|
+
this.#uiSourceCodes.add(uiSourceCode);
|
|
530
|
+
void this.showSourceLocation(uiSourceCode);
|
|
436
531
|
}
|
|
437
532
|
}
|
|
438
533
|
}
|
|
@@ -446,8 +541,8 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
446
541
|
}
|
|
447
542
|
|
|
448
543
|
recycleUISourceCodeFrame(sourceFrame: UISourceCodeFrame, uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
449
|
-
sourceFrame.uiSourceCode().removeEventListener(
|
|
450
|
-
|
|
544
|
+
sourceFrame.uiSourceCode().removeEventListener(Workspace.UISourceCode.Events.TitleChanged,
|
|
545
|
+
this.#uiSourceCodeTitleChanged, this);
|
|
451
546
|
this.sourceViewByUISourceCode.delete(sourceFrame.uiSourceCode());
|
|
452
547
|
sourceFrame.setUISourceCode(uiSourceCode);
|
|
453
548
|
this.sourceViewByUISourceCode.set(uiSourceCode, sourceFrame);
|
|
@@ -472,7 +567,7 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
472
567
|
this.historyManager.removeHistoryForSourceCode(uiSourceCode);
|
|
473
568
|
|
|
474
569
|
let wasSelected = false;
|
|
475
|
-
if (!this.editorContainer
|
|
570
|
+
if (!this.editorContainer?.currentFile()) {
|
|
476
571
|
wasSelected = true;
|
|
477
572
|
}
|
|
478
573
|
|
|
@@ -503,7 +598,7 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
503
598
|
this.updateToolbarChangedListener();
|
|
504
599
|
this.updateScriptViewToolbarItems();
|
|
505
600
|
|
|
506
|
-
const currentFile = this.editorContainer
|
|
601
|
+
const currentFile = this.editorContainer?.currentFile();
|
|
507
602
|
if (currentFile) {
|
|
508
603
|
this.dispatchEventToListeners(Events.EDITOR_SELECTED, currentFile);
|
|
509
604
|
}
|
|
@@ -522,8 +617,8 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
522
617
|
if (!sourceFrame) {
|
|
523
618
|
return;
|
|
524
619
|
}
|
|
525
|
-
this.toolbarChangedListener = sourceFrame.addEventListener(
|
|
526
|
-
|
|
620
|
+
this.toolbarChangedListener = sourceFrame.addEventListener(UISourceCodeFrameEvents.TOOLBAR_ITEMS_CHANGED,
|
|
621
|
+
this.updateScriptViewToolbarItems, this);
|
|
527
622
|
}
|
|
528
623
|
|
|
529
624
|
onSearchCanceled(): void {
|
|
@@ -611,7 +706,7 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
611
706
|
}
|
|
612
707
|
|
|
613
708
|
showGoToLineQuickOpen(): void {
|
|
614
|
-
if (this.editorContainer
|
|
709
|
+
if (this.editorContainer?.currentFile()) {
|
|
615
710
|
QuickOpen.QuickOpen.QuickOpenImpl.show(':');
|
|
616
711
|
}
|
|
617
712
|
}
|
|
@@ -621,7 +716,7 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
621
716
|
}
|
|
622
717
|
|
|
623
718
|
saveAll(): void {
|
|
624
|
-
const sourceFrames = this.editorContainer
|
|
719
|
+
const sourceFrames = this.editorContainer?.fileViews() ?? [];
|
|
625
720
|
sourceFrames.forEach(this.saveSourceFrame.bind(this));
|
|
626
721
|
}
|
|
627
722
|
|
|
@@ -634,7 +729,7 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
634
729
|
}
|
|
635
730
|
|
|
636
731
|
toggleBreakpointsActiveState(active: boolean): void {
|
|
637
|
-
this.editorContainer
|
|
732
|
+
this.editorContainer?.view.element.classList.toggle('breakpoints-deactivated', !active);
|
|
638
733
|
}
|
|
639
734
|
}
|
|
640
735
|
|
|
@@ -696,7 +791,7 @@ export class SwitchFileActionDelegate implements UI.ActionRegistration.ActionDel
|
|
|
696
791
|
if (!nextUISourceCode) {
|
|
697
792
|
return false;
|
|
698
793
|
}
|
|
699
|
-
sourcesView.showSourceLocation(nextUISourceCode);
|
|
794
|
+
void sourcesView.showSourceLocation(nextUISourceCode);
|
|
700
795
|
return true;
|
|
701
796
|
}
|
|
702
797
|
}
|
|
@@ -710,7 +805,7 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
|
710
805
|
|
|
711
806
|
switch (actionId) {
|
|
712
807
|
case 'sources.close-all':
|
|
713
|
-
sourcesView.editorContainer
|
|
808
|
+
sourcesView.editorContainer?.closeAllFiles();
|
|
714
809
|
return true;
|
|
715
810
|
case 'sources.jump-to-previous-location':
|
|
716
811
|
sourcesView.onJumpToPreviousLocation();
|
|
@@ -719,10 +814,10 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
|
719
814
|
sourcesView.onJumpToNextLocation();
|
|
720
815
|
return true;
|
|
721
816
|
case 'sources.next-editor-tab':
|
|
722
|
-
sourcesView.editorContainer
|
|
817
|
+
sourcesView.editorContainer?.selectNextTab();
|
|
723
818
|
return true;
|
|
724
819
|
case 'sources.previous-editor-tab':
|
|
725
|
-
sourcesView.editorContainer
|
|
820
|
+
sourcesView.editorContainer?.selectPrevTab();
|
|
726
821
|
return true;
|
|
727
822
|
case 'sources.close-editor-tab':
|
|
728
823
|
return sourcesView.onCloseEditorTab();
|
|
@@ -73,13 +73,12 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
73
73
|
private currentView!: UI.Widget.Widget|null;
|
|
74
74
|
private scrollTimer?: number;
|
|
75
75
|
private reentrantShow: boolean;
|
|
76
|
-
constructor(
|
|
77
|
-
|
|
78
|
-
placeholderElement: Element, focusedPlaceholderElement?: Element) {
|
|
76
|
+
constructor(delegate: TabbedEditorContainerDelegate, setting: Common.Settings.Setting<SerializedHistoryItem[]>,
|
|
77
|
+
placeholderElement: Element, focusedPlaceholderElement?: Element, element?: HTMLElement) {
|
|
79
78
|
super();
|
|
80
79
|
this.delegate = delegate;
|
|
81
80
|
|
|
82
|
-
this.tabbedPane = new UI.TabbedPane.TabbedPane();
|
|
81
|
+
this.tabbedPane = new UI.TabbedPane.TabbedPane(element);
|
|
83
82
|
this.tabbedPane.setPlaceholderElement(placeholderElement, focusedPlaceholderElement);
|
|
84
83
|
this.tabbedPane.setTabDelegate(new EditorContainerTabDelegate(this));
|
|
85
84
|
|
|
@@ -150,11 +150,8 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
const renderNameElement = (e: WatchExpression):
|
|
154
|
-
|
|
155
|
-
UI.Tooltip.Tooltip.install(nameElement as HTMLElement, e.expression);
|
|
156
|
-
return nameElement;
|
|
157
|
-
};
|
|
153
|
+
const renderNameElement = (e: WatchExpression): TemplateResult => ObjectUI.ObjectPropertiesSection.renderPropertyName(
|
|
154
|
+
e.expression, /* isPrivate= */ false, e.expression ?? undefined);
|
|
158
155
|
|
|
159
156
|
const renderTreeElement = (e: WatchExpression): TemplateResult =>
|
|
160
157
|
// clang-format off
|
|
@@ -767,6 +767,8 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
767
767
|
const config = Trace.Types.Configuration.defaults();
|
|
768
768
|
config.showAllEvents = Common.Settings.Settings.instance().moduleSetting('timeline-show-all-events').get();
|
|
769
769
|
config.debugMode = Common.Settings.Settings.instance().moduleSetting('timeline-debug-mode').get() as boolean;
|
|
770
|
+
config.enableSoftNavigation =
|
|
771
|
+
Common.Settings.Settings.instance().moduleSetting('timeline-enable-soft-navigations').get() as boolean;
|
|
770
772
|
|
|
771
773
|
const traceEngineModel = Trace.TraceModel.Model.createWithAllHandlers(config);
|
|
772
774
|
|
|
@@ -542,6 +542,21 @@ export class TimelineUIUtils {
|
|
|
542
542
|
tokens.push(url);
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
+
if (Trace.Types.Extensions.isSyntheticExtensionEntry(traceEvent)) {
|
|
546
|
+
// Extension entries are synthetic events that carry the text shown to the
|
|
547
|
+
// user on the event itself rather than in `args`, so gather it explicitly.
|
|
548
|
+
const {tooltipText, properties} = traceEvent.devtoolsObj;
|
|
549
|
+
if (tooltipText) {
|
|
550
|
+
tokens.push(tooltipText);
|
|
551
|
+
}
|
|
552
|
+
for (const [propertyName, propertyValue] of properties ?? []) {
|
|
553
|
+
tokens.push(propertyName);
|
|
554
|
+
appendObjectProperties({propertyValue} as ContentObject, 3);
|
|
555
|
+
}
|
|
556
|
+
if (traceEvent.userDetail !== null) {
|
|
557
|
+
appendObjectProperties({userDetail: traceEvent.userDetail} as ContentObject, 3);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
545
560
|
if (TimelineUIUtils.getGetDebugModeEnabled()) {
|
|
546
561
|
// When in debug mode append top level properties (like timestamp)
|
|
547
562
|
// and deeply nested properties.
|
|
@@ -14,6 +14,7 @@ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
|
14
14
|
import cwvMetricsStyles from './cwvMetrics.css.js';
|
|
15
15
|
import {md} from './insights/Helpers.js';
|
|
16
16
|
import * as Insights from './insights/insights.js';
|
|
17
|
+
import metricValueStyles from './metricValueStyles.css.js';
|
|
17
18
|
import {isFieldWorseThanLocal, NumberWithUnit} from './Utils.js';
|
|
18
19
|
|
|
19
20
|
const {html} = Lit.StaticHtml;
|
|
@@ -204,6 +205,16 @@ const CWV_METRICS_VIEW: MetricsView = (input, _output, target) => {
|
|
|
204
205
|
const inpEl = renderMetricValue('INP', local?.inp?.value ?? null, local?.inp?.event ?? null);
|
|
205
206
|
const clsEl = renderMetricValue('CLS', local?.cls?.value ?? null, local?.cls?.worstClusterEvent ?? null);
|
|
206
207
|
|
|
208
|
+
const navigation = parsedTrace?.insights?.get(insightSetKey ?? '')?.navigation;
|
|
209
|
+
const isSoftNav = navigation && Trace.Types.Events.isSoftNavigationStart(navigation);
|
|
210
|
+
|
|
211
|
+
const softNavBadgeTemplate = isSoftNav ? html`
|
|
212
|
+
<div class="metrics-row soft-nav-badge-row">
|
|
213
|
+
<span class="badge">SOFT NAV</span>
|
|
214
|
+
</div>
|
|
215
|
+
` :
|
|
216
|
+
Lit.nothing;
|
|
217
|
+
|
|
207
218
|
const localMetricsTemplateResult = html`
|
|
208
219
|
<div class="metrics-row">
|
|
209
220
|
<span>${lcpEl}</span>
|
|
@@ -211,6 +222,7 @@ const CWV_METRICS_VIEW: MetricsView = (input, _output, target) => {
|
|
|
211
222
|
<span>${clsEl}</span>
|
|
212
223
|
<span class="row-label">Local</span>
|
|
213
224
|
</div>
|
|
225
|
+
${!field ? softNavBadgeTemplate : Lit.nothing}
|
|
214
226
|
${!field && input.skipBottomBorder ? Lit.nothing : html`<span class="row-border"></span>`}
|
|
215
227
|
`;
|
|
216
228
|
|
|
@@ -235,6 +247,7 @@ const CWV_METRICS_VIEW: MetricsView = (input, _output, target) => {
|
|
|
235
247
|
<span>${clsEl}</span>
|
|
236
248
|
<span class="row-label">${i18nString(UIStrings.fieldScoreLabel, {PH1: scope})}</span>
|
|
237
249
|
</div>
|
|
250
|
+
${softNavBadgeTemplate}
|
|
238
251
|
${input.skipBottomBorder ? Lit.nothing : html`<span class="row-border"></span>`}
|
|
239
252
|
`;
|
|
240
253
|
// clang-format on
|
|
@@ -271,13 +284,13 @@ const CWV_METRICS_VIEW: MetricsView = (input, _output, target) => {
|
|
|
271
284
|
${fieldMetricsTemplateResult}
|
|
272
285
|
</div>`;
|
|
273
286
|
|
|
274
|
-
Lit.render(
|
|
275
|
-
html`
|
|
287
|
+
Lit.render(html`
|
|
276
288
|
<style>${cwvMetricsStyles}</style>
|
|
289
|
+
<style>${metricValueStyles}</style>
|
|
277
290
|
${metricsTableEl}
|
|
278
291
|
${fieldIsDifferentEl}
|
|
279
292
|
`,
|
|
280
|
-
|
|
293
|
+
target);
|
|
281
294
|
};
|
|
282
295
|
|
|
283
296
|
export interface CWVMetricsData {
|
|
@@ -405,20 +405,3 @@ devtools-link {
|
|
|
405
405
|
.section-header .section-title {
|
|
406
406
|
margin-bottom: 0;
|
|
407
407
|
}
|
|
408
|
-
|
|
409
|
-
.section-header .badge {
|
|
410
|
-
display: inline-flex;
|
|
411
|
-
align-items: center;
|
|
412
|
-
width: fit-content;
|
|
413
|
-
height: var(--sys-size-8);
|
|
414
|
-
line-height: var(--sys-size-8);
|
|
415
|
-
border-radius: var(--sys-shape-corner-extra-small);
|
|
416
|
-
padding: 0 var(--sys-size-3);
|
|
417
|
-
border: var(--sys-size-1) solid var(--sys-color-primary);
|
|
418
|
-
color: var(--sys-color-primary);
|
|
419
|
-
font-weight: var(--ref-typeface-weight-bold);
|
|
420
|
-
font-size: var(--sys-size-5);
|
|
421
|
-
text-align: center;
|
|
422
|
-
margin-top: var(--sys-size-5);
|
|
423
|
-
margin-bottom: var(--sys-size-5);
|
|
424
|
-
}
|
|
@@ -39,3 +39,20 @@
|
|
|
39
39
|
.metric-value.poor.dim {
|
|
40
40
|
color: var(--app-color-performance-bad-dim);
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
.badge {
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
width: fit-content;
|
|
48
|
+
height: var(--sys-size-8);
|
|
49
|
+
border-radius: var(--sys-shape-corner-extra-small);
|
|
50
|
+
padding: 0 var(--sys-size-3);
|
|
51
|
+
border: var(--sys-size-1) solid var(--sys-color-primary);
|
|
52
|
+
color: var(--sys-color-primary);
|
|
53
|
+
font-weight: var(--ref-typeface-weight-bold);
|
|
54
|
+
font-size: var(--sys-size-5);
|
|
55
|
+
text-align: center;
|
|
56
|
+
margin-top: var(--sys-size-5);
|
|
57
|
+
margin-bottom: var(--sys-size-5);
|
|
58
|
+
}
|