chrome-devtools-frontend 1.0.1616061 → 1.0.1621064
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/AUTHORS +1 -0
- package/docs/checklist/README.md +8 -7
- package/eslint.config.mjs +7 -0
- package/front_end/core/common/Object.ts +11 -2
- package/front_end/core/dom_extension/DOMExtension.ts +11 -8
- package/front_end/core/host/AidaClient.ts +8 -0
- package/front_end/core/host/AidaGcaTranslation.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/platform/api/HostRuntime.ts +2 -2
- package/front_end/core/platform/browser/HostRuntime.ts +4 -2
- package/front_end/core/platform/node/HostRuntime.ts +2 -2
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/NetworkManager.ts +30 -4
- package/front_end/core/sdk/NetworkRequest.ts +2 -10
- package/front_end/core/sdk/Resource.ts +2 -1
- package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
- package/front_end/core/sdk/TraceObject.ts +7 -2
- package/front_end/entrypoint_template.html +1 -2
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -15
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +43 -33
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +9 -6
- package/front_end/entrypoints/main/MainImpl.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +8 -7
- package/front_end/generated/SupportedCSSProperties.js +119 -100
- package/front_end/generated/protocol-mapping.d.ts +1 -9
- package/front_end/generated/protocol-proxy-api.d.ts +1 -9
- package/front_end/generated/protocol.ts +24 -1
- package/front_end/legacy/legacy-defs.d.ts +1 -1
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +39 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +28 -16
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +112 -145
- package/front_end/models/ai_assistance/agents/README.md +0 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +19 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +48 -13
- package/front_end/models/bindings/SymbolizedError.ts +95 -8
- package/front_end/models/emulation/DeviceModeModel.ts +42 -13
- package/front_end/models/emulation/EmulatedDevices.ts +1 -1
- package/front_end/models/issues_manager/IssuesManager.ts +13 -6
- package/front_end/models/issues_manager/IssuesManagerEvents.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -0
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +49 -10
- package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
- package/front_end/models/stack_trace/StackTraceModel.ts +5 -1
- package/front_end/models/text_utils/ContentData.ts +71 -10
- package/front_end/models/trace/types/File.ts +8 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +22 -0
- package/front_end/models/workspace/UISourceCode.ts +4 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +3 -2
- package/front_end/panels/accessibility/SourceOrderView.ts +4 -4
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +66 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +144 -21
- package/front_end/panels/ai_assistance/components/ChatView.ts +43 -8
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +1 -0
- package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +74 -0
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +34 -5
- package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +7 -0
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +8 -9
- package/front_end/panels/application/DOMStorageItemsView.ts +3 -3
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +7 -0
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +21 -0
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +32 -14
- package/front_end/panels/application/ResourcesPanel.ts +5 -5
- package/front_end/panels/application/StorageItemsToolbar.ts +0 -19
- package/front_end/panels/application/WebMCPView.ts +285 -86
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +4 -4
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +4 -4
- package/front_end/panels/application/webMCPView.css +261 -182
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
- package/front_end/panels/changes/ChangesSidebar.ts +2 -2
- package/front_end/panels/changes/ChangesView.ts +9 -14
- package/front_end/panels/console/ConsolePanel.ts +10 -3
- package/front_end/panels/console/ConsoleSidebar.ts +5 -5
- package/front_end/panels/console/ConsoleView.ts +11 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
- package/front_end/panels/coverage/CoverageView.ts +4 -5
- package/front_end/panels/elements/ElementsPanel.ts +9 -12
- package/front_end/panels/elements/ElementsSidebarPane.ts +4 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +61 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +46 -0
- package/front_end/panels/elements/LayersWidget.ts +2 -2
- package/front_end/panels/elements/MetricsSidebarPane.ts +5 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
- package/front_end/panels/elements/components/QueryContainer.ts +5 -6
- package/front_end/panels/elements/components/components.ts +0 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -7
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
- package/front_end/panels/network/NetworkConfigView.ts +11 -11
- package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -5
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
- package/front_end/panels/profiler/HeapProfileView.ts +29 -4
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.css +8 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +7 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -4
- package/front_end/panels/recorder/components/ControlButton.ts +4 -4
- package/front_end/panels/recorder/components/StepView.ts +6 -6
- package/front_end/panels/search/SearchView.ts +4 -7
- package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
- package/front_end/panels/sources/SourcesView.ts +1 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +24 -20
- package/front_end/panels/timeline/StatusDialog.ts +5 -8
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -0
- package/front_end/panels/timeline/TimelineLoader.ts +3 -4
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +2 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +9 -1
- package/front_end/panels/timeline/components/timelineSummary.css +4 -0
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +2 -2
- package/front_end/panels/timeline/thirdPartyTreeView.css +8 -1
- package/front_end/panels/web_audio/WebAudioView.ts +5 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
- package/front_end/panels/whats_new/resources/WNDT.md +9 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js +853 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1046 -33
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js +805 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/package.json +3 -2
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +53 -11
- package/front_end/third_party/puppeteer/package/src/api/Extension.ts +29 -1
- package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +9 -2
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +59 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +6 -1
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -0
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +21 -10
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +2 -4
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +44 -39
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +25 -19
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +16 -18
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +2 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenActivated.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +11 -7
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
- package/front_end/third_party/web-vitals/package/package.json +24 -27
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +2 -7
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +49 -43
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +27 -24
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +21 -20
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +2 -3
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +2 -4
- package/front_end/third_party/web-vitals/package/src/lib/whenActivated.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +13 -7
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +4 -0
- package/front_end/third_party/web-vitals/package/src/types.ts +1 -2
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +13 -74
- package/front_end/third_party/web-vitals/rebuild.sh +3 -3
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -1
- package/front_end/ui/components/icon_button/iconButton.css +1 -0
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +6 -6
- package/front_end/ui/components/lists/list.css +4 -0
- package/front_end/ui/legacy/Dialog.ts +21 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +3 -3
- package/front_end/ui/legacy/SplitWidget.ts +9 -9
- package/front_end/ui/legacy/TabbedPane.ts +12 -12
- package/front_end/ui/legacy/View.ts +24 -22
- package/front_end/ui/legacy/ViewManager.ts +12 -12
- package/front_end/ui/legacy/ViewRegistration.ts +2 -2
- package/front_end/ui/legacy/Widget.ts +165 -119
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +9 -6
- package/front_end/ui/legacy/components/utils/Linkifier.ts +37 -11
- package/front_end/ui/legacy/components/utils/jsUtils.css +1 -0
- package/front_end/ui/legacy/inspectorCommon.css +0 -6
- package/front_end/ui/lit/render.ts +11 -9
- package/front_end/ui/visual_logging/KnownContextValues.ts +36 -0
- package/package.json +1 -1
- package/front_end/Images/src/dots-circle.svg +0 -10
- package/front_end/panels/elements/components/Helper.ts +0 -35
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.d.ts +0 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.js +0 -16
- package/front_end/third_party/web-vitals/package/src/types/polyfills.ts +0 -24
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
import * as Common from '../../core/common/common.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
8
|
import * as Platform from '../../core/platform/platform.js';
|
|
9
|
-
import * as Root from '../../core/root/root.js';
|
|
10
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
10
|
import type * as Protocol from '../../generated/protocol.js';
|
|
12
11
|
import * as CPUProfile from '../../models/cpu_profile/cpu_profile.js';
|
|
13
12
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
13
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
14
14
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
15
15
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
16
|
+
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
16
17
|
|
|
17
18
|
import {Events, HeapTimelineOverview, type IdsRangeChangedEvent, type Samples} from './HeapTimelineOverview.js';
|
|
18
19
|
import type {Formatter, ProfileDataGridNode} from './ProfileDataGrid.js';
|
|
@@ -103,6 +104,10 @@ const UIStrings = {
|
|
|
103
104
|
* @description Text for web URLs
|
|
104
105
|
*/
|
|
105
106
|
url: 'URL',
|
|
107
|
+
/**
|
|
108
|
+
* @description Label for a checkbox in the memory panel to enable sampling heap profiler timeline.
|
|
109
|
+
*/
|
|
110
|
+
samplingHeapProfilerTimeline: 'Sampling heap profiler timeline',
|
|
106
111
|
} as const;
|
|
107
112
|
const str_ = i18n.i18n.registerUIStrings('panels/profiler/HeapProfileView.ts', UIStrings);
|
|
108
113
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -144,7 +149,7 @@ export class HeapProfileView extends ProfileView implements UI.SearchableView.Se
|
|
|
144
149
|
|
|
145
150
|
this.timelineOverview = new HeapTimelineOverview();
|
|
146
151
|
|
|
147
|
-
if (
|
|
152
|
+
if (this.profileType.hasTemporaryView()) {
|
|
148
153
|
this.timelineOverview.addEventListener(Events.IDS_RANGE_CHANGED, this.onIdsRangeChanged.bind(this));
|
|
149
154
|
this.timelineOverview.show(this.element, this.element.firstChild);
|
|
150
155
|
this.timelineOverview.start();
|
|
@@ -337,6 +342,9 @@ let samplingHeapProfileTypeInstance: SamplingHeapProfileType;
|
|
|
337
342
|
export class SamplingHeapProfileType extends SamplingHeapProfileTypeBase {
|
|
338
343
|
updateTimer: number;
|
|
339
344
|
updateIntervalMs: number;
|
|
345
|
+
readonly #recordTimelineSetting: Common.Settings.Setting<boolean>;
|
|
346
|
+
customContentInternal: UI.UIUtils.CheckboxLabel|null = null;
|
|
347
|
+
|
|
340
348
|
constructor() {
|
|
341
349
|
super(SamplingHeapProfileType.TypeId, i18nString(UIStrings.allocationSampling));
|
|
342
350
|
if (!samplingHeapProfileTypeInstance) {
|
|
@@ -345,6 +353,8 @@ export class SamplingHeapProfileType extends SamplingHeapProfileTypeBase {
|
|
|
345
353
|
|
|
346
354
|
this.updateTimer = 0;
|
|
347
355
|
this.updateIntervalMs = 200;
|
|
356
|
+
this.#recordTimelineSetting =
|
|
357
|
+
Common.Settings.Settings.instance().createSetting('record-sampling-heap-profiler-timeline', false);
|
|
348
358
|
}
|
|
349
359
|
|
|
350
360
|
static get instance(): SamplingHeapProfileType {
|
|
@@ -362,7 +372,22 @@ export class SamplingHeapProfileType extends SamplingHeapProfileTypeBase {
|
|
|
362
372
|
}
|
|
363
373
|
|
|
364
374
|
override hasTemporaryView(): boolean {
|
|
365
|
-
return
|
|
375
|
+
return this.#recordTimelineSetting.get();
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
override customContent(): Element|null {
|
|
379
|
+
const checkboxSetting = SettingsUI.SettingsUI.createSettingCheckbox(
|
|
380
|
+
i18nString(UIStrings.samplingHeapProfilerTimeline), this.#recordTimelineSetting);
|
|
381
|
+
this.customContentInternal = checkboxSetting;
|
|
382
|
+
checkboxSetting.setAttribute(
|
|
383
|
+
'jslog', `${VisualLogging.toggle('record-sampling-heap-profiler-timeline').track({click: true})}`);
|
|
384
|
+
return checkboxSetting;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
override setCustomContentEnabled(enable: boolean): void {
|
|
388
|
+
if (this.customContentInternal) {
|
|
389
|
+
this.customContentInternal.disabled = !enable;
|
|
390
|
+
}
|
|
366
391
|
}
|
|
367
392
|
|
|
368
393
|
override startSampling(): void {
|
|
@@ -372,7 +397,7 @@ export class SamplingHeapProfileType extends SamplingHeapProfileTypeBase {
|
|
|
372
397
|
}
|
|
373
398
|
|
|
374
399
|
void heapProfilerModel.startSampling();
|
|
375
|
-
if (
|
|
400
|
+
if (this.#recordTimelineSetting.get()) {
|
|
376
401
|
this.updateTimer = window.setTimeout(() => {
|
|
377
402
|
void this.updateStats();
|
|
378
403
|
}, this.updateIntervalMs);
|
|
@@ -145,8 +145,8 @@ export class ProfilesPanel extends UI.Panel.PanelWithSidebar implements DataDisp
|
|
|
145
145
|
selectedProfileType?: ProfileType;
|
|
146
146
|
static registry: ProfileTypeRegistry = {
|
|
147
147
|
heapSnapshotProfileType: new HeapSnapshotProfileType(),
|
|
148
|
-
samplingHeapProfileType: new SamplingHeapProfileType(),
|
|
149
148
|
trackingHeapSnapshotProfileType: new TrackingHeapSnapshotProfileType(),
|
|
149
|
+
samplingHeapProfileType: new SamplingHeapProfileType(),
|
|
150
150
|
detachedElementProfileType: new DetachedElementsProfileType(),
|
|
151
151
|
};
|
|
152
152
|
|
|
@@ -65,14 +65,21 @@ ul {
|
|
|
65
65
|
display: flex;
|
|
66
66
|
flex-direction: column;
|
|
67
67
|
height: 100%;
|
|
68
|
+
min-height: 0;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
.editor-wrapper {
|
|
71
72
|
padding-left: 1em;
|
|
72
73
|
overflow-x: hidden;
|
|
73
74
|
flex-grow: 1;
|
|
74
|
-
padding-bottom: 50px;
|
|
75
75
|
padding-top: 0.5em;
|
|
76
|
+
min-height: 1lh;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.editor-wrapper::after {
|
|
80
|
+
content: "";
|
|
81
|
+
display: block;
|
|
82
|
+
height: 50px;
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
.clear-button,
|
|
@@ -137,6 +137,7 @@ interface ViewInput {
|
|
|
137
137
|
onParameterValueBlur: (event: Event) => void;
|
|
138
138
|
displayTargetSelector?: boolean;
|
|
139
139
|
displayCommandInput?: boolean;
|
|
140
|
+
displayToolbar?: boolean;
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
@@ -188,6 +189,7 @@ export class JSONEditor extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
188
189
|
#view: View;
|
|
189
190
|
displayTargetSelector = true;
|
|
190
191
|
displayCommandInput = true;
|
|
192
|
+
displayToolbar = true;
|
|
191
193
|
|
|
192
194
|
constructor(element: HTMLElement, view = DEFAULT_VIEW) {
|
|
193
195
|
super(element, {useShadowDom: true});
|
|
@@ -252,8 +254,8 @@ export class JSONEditor extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
252
254
|
}
|
|
253
255
|
}
|
|
254
256
|
|
|
255
|
-
set commandToDisplay(command: string) {
|
|
256
|
-
this.displayCommand(command, {});
|
|
257
|
+
set commandToDisplay(data: {command: string, parameters?: Record<string, unknown>}) {
|
|
258
|
+
this.displayCommand(data.command, data.parameters ?? {});
|
|
257
259
|
}
|
|
258
260
|
|
|
259
261
|
get targetId(): string|undefined {
|
|
@@ -992,6 +994,7 @@ export class JSONEditor extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
992
994
|
},
|
|
993
995
|
displayTargetSelector: this.displayTargetSelector,
|
|
994
996
|
displayCommandInput: this.displayCommandInput,
|
|
997
|
+
displayToolbar: this.displayToolbar,
|
|
995
998
|
};
|
|
996
999
|
const viewOutput = {};
|
|
997
1000
|
this.#view(viewInput, viewOutput, this.contentElement);
|
|
@@ -1275,6 +1278,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
1275
1278
|
${renderParameters(input, input.parameters)}
|
|
1276
1279
|
` : nothing}
|
|
1277
1280
|
</div>
|
|
1281
|
+
${input.displayToolbar !== false ? html`
|
|
1278
1282
|
<devtools-toolbar class="protocol-monitor-sidebar-toolbar">
|
|
1279
1283
|
<devtools-button title=${i18nString(UIStrings.copyCommand)}
|
|
1280
1284
|
.iconName=${'copy'}
|
|
@@ -1288,6 +1292,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
1288
1292
|
.variant=${Buttons.Button.Variant.PRIMARY_TOOLBAR}
|
|
1289
1293
|
@click=${input.onCommandSend}></devtools-button>
|
|
1290
1294
|
</devtools-toolbar>
|
|
1295
|
+
` : nothing}
|
|
1291
1296
|
</div>`, target);
|
|
1292
1297
|
// clang-format on
|
|
1293
1298
|
};
|
|
@@ -18,7 +18,7 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
|
18
18
|
import {Directives, html, render} from '../../ui/lit/lit.js';
|
|
19
19
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
20
20
|
|
|
21
|
-
import {
|
|
21
|
+
import {JSONEditor, type Parameter} from './JSONEditor.js';
|
|
22
22
|
import protocolMonitorStyles from './protocolMonitor.css.js';
|
|
23
23
|
|
|
24
24
|
const {styleMap} = Directives;
|
|
@@ -183,6 +183,7 @@ export interface ViewInput {
|
|
|
183
183
|
onCommandSubmitted: (input: string) => void;
|
|
184
184
|
onTargetChange: (targetId: string) => void;
|
|
185
185
|
onToggleSidebar: () => void;
|
|
186
|
+
onEditorSubmit: (command: string, parameters: Record<string, unknown>, targetId?: string) => void;
|
|
186
187
|
targets: SDK.Target.Target[];
|
|
187
188
|
selectedTargetId: string;
|
|
188
189
|
}
|
|
@@ -350,6 +351,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
350
351
|
</div>
|
|
351
352
|
<devtools-widget slot="sidebar"
|
|
352
353
|
${widget(JSONEditor, { metadataByCommand, typesByName, enumsByName})}
|
|
354
|
+
@submiteditor=${(e: CustomEvent) => input.onEditorSubmit(e.detail.command, e.detail.parameters, e.detail.targetId)}
|
|
353
355
|
${widgetRef(JSONEditor, e => {output.editorWidget = e;})}>
|
|
354
356
|
</devtools-widget>
|
|
355
357
|
</devtools-split-view>`,
|
|
@@ -385,9 +387,6 @@ export class ProtocolMonitorImpl extends UI.Panel.Panel implements SDK.TargetMan
|
|
|
385
387
|
|
|
386
388
|
this.#selectedTargetId = 'main';
|
|
387
389
|
this.performUpdate();
|
|
388
|
-
this.#editorWidget.addEventListener(JSONEditorEvents.SUBMIT_EDITOR, event => {
|
|
389
|
-
this.onCommandSend(event.data.command, event.data.parameters, event.data.targetId);
|
|
390
|
-
});
|
|
391
390
|
SDK.TargetManager.TargetManager.instance().addEventListener(
|
|
392
391
|
SDK.TargetManager.Events.AVAILABLE_TARGETS_CHANGED, () => {
|
|
393
392
|
this.requestUpdate();
|
|
@@ -471,6 +470,9 @@ export class ProtocolMonitorImpl extends UI.Panel.Panel implements SDK.TargetMan
|
|
|
471
470
|
this.#sidebarVisible = !this.#sidebarVisible;
|
|
472
471
|
this.requestUpdate();
|
|
473
472
|
},
|
|
473
|
+
onEditorSubmit: (command: string, parameters: Record<string, unknown>, targetId?: string) => {
|
|
474
|
+
this.onCommandSend(command, parameters, targetId);
|
|
475
|
+
},
|
|
474
476
|
targets: SDK.TargetManager.TargetManager.instance().targets(),
|
|
475
477
|
selectedTargetId: this.#selectedTargetId,
|
|
476
478
|
};
|
|
@@ -16,7 +16,7 @@ export interface ViewInput {
|
|
|
16
16
|
onClick: (event: Event) => void;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export const DEFAULT_VIEW = (input: ViewInput, _output: unknown, target: HTMLElement): void => {
|
|
19
|
+
export const DEFAULT_VIEW = (input: ViewInput, _output: unknown, target: HTMLElement|DocumentFragment): void => {
|
|
20
20
|
const {label, shape, disabled, onClick} = input;
|
|
21
21
|
const handleClickEvent = (event: Event): void => {
|
|
22
22
|
if (disabled) {
|
|
@@ -36,11 +36,11 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: unknown, target: HTMLEle
|
|
|
36
36
|
<div class="icon ${shape}"></div>
|
|
37
37
|
<div class="label">${label}</div>
|
|
38
38
|
</button>
|
|
39
|
-
`, target);
|
|
39
|
+
`, target, {container: {attributes: {classes: 'flex-none'}}});
|
|
40
40
|
// clang-format on
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
export class ControlButton extends UI.Widget.Widget {
|
|
43
|
+
export class ControlButton extends UI.Widget.Widget<ShadowRoot> {
|
|
44
44
|
#label = '';
|
|
45
45
|
#shape = 'square';
|
|
46
46
|
#disabled = false;
|
|
@@ -49,7 +49,7 @@ export class ControlButton extends UI.Widget.Widget {
|
|
|
49
49
|
#view: typeof DEFAULT_VIEW;
|
|
50
50
|
|
|
51
51
|
constructor(element?: HTMLElement, view?: typeof DEFAULT_VIEW) {
|
|
52
|
-
super(element, {useShadowDom:
|
|
52
|
+
super(element, {useShadowDom: 'pure'});
|
|
53
53
|
this.#view = view || DEFAULT_VIEW;
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -492,12 +492,12 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
492
492
|
</devtools-widget>
|
|
493
493
|
</div>
|
|
494
494
|
`,
|
|
495
|
-
target,
|
|
495
|
+
target, {container: {classes: ['step-view-widget']}}
|
|
496
496
|
);
|
|
497
497
|
// clang-format on
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
-
export class StepView extends UI.Widget.Widget {
|
|
500
|
+
export class StepView extends UI.Widget.Widget<ShadowRoot> {
|
|
501
501
|
#observer: IntersectionObserver = new IntersectionObserver(result => {
|
|
502
502
|
this.#viewInput.isVisible = result[0].isIntersecting;
|
|
503
503
|
});
|
|
@@ -532,7 +532,7 @@ export class StepView extends UI.Widget.Widget {
|
|
|
532
532
|
#view: typeof DEFAULT_VIEW;
|
|
533
533
|
|
|
534
534
|
constructor(element?: HTMLElement, view?: typeof DEFAULT_VIEW) {
|
|
535
|
-
super(element, {useShadowDom:
|
|
535
|
+
super(element, {useShadowDom: 'pure'});
|
|
536
536
|
this.#view = view || DEFAULT_VIEW;
|
|
537
537
|
}
|
|
538
538
|
|
|
@@ -551,7 +551,7 @@ export class StepView extends UI.Widget.Widget {
|
|
|
551
551
|
this.#viewInput.state = state;
|
|
552
552
|
this.performUpdate();
|
|
553
553
|
if (this.#viewInput.state !== prevState && this.#viewInput.state === 'current' && !this.#viewInput.isVisible) {
|
|
554
|
-
this.
|
|
554
|
+
this.element.scrollIntoView();
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
|
|
@@ -650,13 +650,13 @@ export class StepView extends UI.Widget.Widget {
|
|
|
650
650
|
|
|
651
651
|
override wasShown(): void {
|
|
652
652
|
super.wasShown();
|
|
653
|
-
this.#observer.observe(this.
|
|
653
|
+
this.#observer.observe(this.element);
|
|
654
654
|
this.requestUpdate();
|
|
655
655
|
}
|
|
656
656
|
|
|
657
657
|
override willHide(): void {
|
|
658
658
|
super.willHide();
|
|
659
|
-
this.#observer.unobserve(this.
|
|
659
|
+
this.#observer.unobserve(this.element);
|
|
660
660
|
}
|
|
661
661
|
|
|
662
662
|
#toggleShowDetails(): void {
|
|
@@ -134,7 +134,7 @@ export interface SearchViewOutput {
|
|
|
134
134
|
collapseAllResults: () => void;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
export type View = (input: SearchViewInput, output: SearchViewOutput, target: HTMLElement) => void;
|
|
137
|
+
export type View = (input: SearchViewInput, output: SearchViewOutput, target: HTMLElement|DocumentFragment) => void;
|
|
138
138
|
|
|
139
139
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
140
140
|
const {
|
|
@@ -262,11 +262,11 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
262
262
|
</devtools-progress>` : ''}
|
|
263
263
|
</div>
|
|
264
264
|
<div class="search-message">${searchResultsMessage}</div>
|
|
265
|
-
</div>`, target);
|
|
265
|
+
</div>`, target, {container: {attributes: {jslog: `${VisualLogging.panel('search').track({resize: true})}`}}});
|
|
266
266
|
// clang-format on
|
|
267
267
|
};
|
|
268
268
|
|
|
269
|
-
export class SearchView extends UI.Widget.VBox {
|
|
269
|
+
export class SearchView extends UI.Widget.VBox<ShadowRoot> {
|
|
270
270
|
readonly #view: View;
|
|
271
271
|
#focusSearchInput = (): void => {};
|
|
272
272
|
#showAllMatches = (): void => {};
|
|
@@ -295,10 +295,7 @@ export class SearchView extends UI.Widget.VBox {
|
|
|
295
295
|
#searchResults: SearchResult[] = [];
|
|
296
296
|
|
|
297
297
|
constructor(settingKey: string, view = DEFAULT_VIEW) {
|
|
298
|
-
super({
|
|
299
|
-
jslog: `${VisualLogging.panel('search').track({resize: true})}`,
|
|
300
|
-
useShadowDom: true,
|
|
301
|
-
});
|
|
298
|
+
super({useShadowDom: 'pure'});
|
|
302
299
|
this.#view = view;
|
|
303
300
|
this.setMinimumSize(0, 40);
|
|
304
301
|
|
|
@@ -153,43 +153,39 @@ function domBreakpointSubtext(data: DOMBreakpointData): Lit.LitTemplate {
|
|
|
153
153
|
`;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
const DEFAULT_VIEW = (input: ViewInput|null, _output: undefined, target:
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
const DEFAULT_VIEW = (input: ViewInput|null, _output: undefined, target: DocumentFragment): void => {
|
|
157
|
+
// clang-format off
|
|
158
|
+
render(html`
|
|
159
159
|
<style>${debuggerPausedMessageStyles}</style>
|
|
160
|
-
<div aria-live="polite" ?hidden=${!input}>${
|
|
161
|
-
input ?
|
|
162
|
-
html`
|
|
160
|
+
<div aria-live="polite" ?hidden=${!input}>${input ? html`
|
|
163
161
|
<div class="paused-status ${input.errorLike ? 'error-reason' : ''}">
|
|
164
162
|
<span>
|
|
165
163
|
<div class="status-main">
|
|
166
164
|
<devtools-icon name=${input.errorLike ? 'cross-circle-filled' : 'info'} class="medium"></devtools-icon>
|
|
167
165
|
${input.mainText}
|
|
168
166
|
</div>
|
|
169
|
-
${
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
input.domBreakpointData ? domBreakpointSubtext(input.domBreakpointData) : input.subText}</div>
|
|
174
|
-
` :
|
|
175
|
-
nothing}
|
|
167
|
+
${input.subText || input.domBreakpointData ? html`
|
|
168
|
+
<div class="status-sub monospace" title=${ifDefined(input.title ?? input.subText)}>
|
|
169
|
+
${input.domBreakpointData ? domBreakpointSubtext(input.domBreakpointData) : input.subText}
|
|
170
|
+
</div>` : nothing}
|
|
176
171
|
</span>
|
|
177
|
-
</div>` :
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
172
|
+
</div>` : nothing}
|
|
173
|
+
</div>`, target, {
|
|
174
|
+
container: {
|
|
175
|
+
attributes: {jslog: `${VisualLogging.dialog('debugger-paused')}`},
|
|
176
|
+
classes: ['paused-message', 'flex-none']
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
// clang-format on
|
|
182
180
|
};
|
|
183
181
|
|
|
184
182
|
type View = typeof DEFAULT_VIEW;
|
|
185
183
|
|
|
186
|
-
export class DebuggerPausedMessage extends UI.Widget.Widget {
|
|
184
|
+
export class DebuggerPausedMessage extends UI.Widget.Widget<ShadowRoot> {
|
|
187
185
|
#viewInput: ViewInput|null = null;
|
|
188
186
|
constructor(element?: HTMLElement, private readonly view: View = DEFAULT_VIEW) {
|
|
189
187
|
super(element, {
|
|
190
|
-
|
|
191
|
-
classes: ['paused-message', 'flex-none'],
|
|
192
|
-
useShadowDom: true,
|
|
188
|
+
useShadowDom: 'pure',
|
|
193
189
|
});
|
|
194
190
|
}
|
|
195
191
|
|
|
@@ -246,7 +246,7 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
visibleView(): UI.Widget.Widget|null {
|
|
249
|
-
return this.editorContainer.visibleView;
|
|
249
|
+
return this.editorContainer.visibleView as UI.Widget.Widget | null;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
currentSourceFrame(): UISourceCodeFrame|null {
|
|
@@ -166,11 +166,11 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
get visibleView(): UI.Widget.Widget|null {
|
|
169
|
-
return this.tabbedPane.visibleView;
|
|
169
|
+
return this.tabbedPane.visibleView as UI.Widget.Widget | null;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
fileViews(): UI.Widget.Widget[] {
|
|
173
|
-
return this.tabbedPane.tabViews();
|
|
173
|
+
return this.tabbedPane.tabViews() as UI.Widget.Widget[];
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
leftToolbar(): UI.Toolbar.Toolbar {
|
|
@@ -52,7 +52,7 @@ const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement)
|
|
|
52
52
|
</button>
|
|
53
53
|
`)}
|
|
54
54
|
</div>
|
|
55
|
-
`, target);
|
|
55
|
+
`, target, {container: {attributes: {jslog: `${VisualLogging.section('sources.threads')}`}}});
|
|
56
56
|
};
|
|
57
57
|
// clang-format on
|
|
58
58
|
|
|
@@ -65,9 +65,7 @@ export class ThreadsSidebarPane extends UI.Widget.VBox implements
|
|
|
65
65
|
#view: View;
|
|
66
66
|
|
|
67
67
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
68
|
-
super(element
|
|
69
|
-
jslog: `${VisualLogging.section('sources.threads')}`,
|
|
70
|
-
});
|
|
68
|
+
super(element);
|
|
71
69
|
this.#view = view;
|
|
72
70
|
|
|
73
71
|
const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);
|
|
@@ -99,9 +99,9 @@ let watchExpressionsSidebarPaneInstance: WatchExpressionsSidebarPane;
|
|
|
99
99
|
export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
100
100
|
UI.ActionRegistration.ActionDelegate, UI.Toolbar.ItemsProvider,
|
|
101
101
|
UI.ContextMenu.Provider<ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement|UISourceCodeFrame> {
|
|
102
|
-
|
|
102
|
+
#watchExpressions: WatchExpression[];
|
|
103
103
|
private emptyElement!: HTMLElement;
|
|
104
|
-
|
|
104
|
+
#watchExpressionsSetting: Common.Settings.Setting<string[]>;
|
|
105
105
|
private readonly addButton: UI.Toolbar.ToolbarButton;
|
|
106
106
|
private readonly refreshButton: UI.Toolbar.ToolbarButton;
|
|
107
107
|
private readonly treeOutline: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline;
|
|
@@ -114,8 +114,8 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
|
114
114
|
// TODO(szuend): Replace with a Set once the web test
|
|
115
115
|
// panels/sources/debugger-ui/watch-expressions-preserve-expansion.js is either converted
|
|
116
116
|
// to an e2e test or no longer accesses this variable directly.
|
|
117
|
-
this
|
|
118
|
-
this
|
|
117
|
+
this.#watchExpressions = [];
|
|
118
|
+
this.#watchExpressionsSetting =
|
|
119
119
|
Common.Settings.Settings.instance().createLocalSetting<string[]>('watch-expressions', []);
|
|
120
120
|
|
|
121
121
|
this.addButton = new UI.Toolbar.ToolbarButton(
|
|
@@ -154,6 +154,10 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
|
154
154
|
return watchExpressionsSidebarPaneInstance;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
get watchExpressions(): WatchExpression[] {
|
|
158
|
+
return this.#watchExpressions;
|
|
159
|
+
}
|
|
160
|
+
|
|
157
161
|
toolbarItems(): UI.Toolbar.ToolbarItem[] {
|
|
158
162
|
return [this.addButton, this.refreshButton];
|
|
159
163
|
}
|
|
@@ -162,21 +166,21 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
|
162
166
|
if (this.hasFocus()) {
|
|
163
167
|
return;
|
|
164
168
|
}
|
|
165
|
-
if (this
|
|
169
|
+
if (this.#watchExpressions.length > 0) {
|
|
166
170
|
this.treeOutline.forceSelect();
|
|
167
171
|
}
|
|
168
172
|
}
|
|
169
173
|
|
|
170
174
|
private saveExpressions(): void {
|
|
171
175
|
const toSave = [];
|
|
172
|
-
for (let i = 0; i < this
|
|
173
|
-
const expression = this
|
|
176
|
+
for (let i = 0; i < this.#watchExpressions.length; i++) {
|
|
177
|
+
const expression = this.#watchExpressions[i].expression();
|
|
174
178
|
if (expression) {
|
|
175
179
|
toSave.push(expression);
|
|
176
180
|
}
|
|
177
181
|
}
|
|
178
182
|
|
|
179
|
-
this
|
|
183
|
+
this.#watchExpressionsSetting.set(toSave);
|
|
180
184
|
}
|
|
181
185
|
|
|
182
186
|
private async addButtonClicked(): Promise<void> {
|
|
@@ -189,11 +193,11 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
|
189
193
|
this.linkifier.reset();
|
|
190
194
|
this.contentElement.removeChildren();
|
|
191
195
|
this.treeOutline.removeChildren();
|
|
192
|
-
this
|
|
196
|
+
this.#watchExpressions = [];
|
|
193
197
|
this.emptyElement = this.contentElement.createChild('div', 'gray-info-message');
|
|
194
198
|
this.emptyElement.textContent = i18nString(UIStrings.noWatchExpressions);
|
|
195
199
|
this.emptyElement.tabIndex = -1;
|
|
196
|
-
const watchExpressionStrings = this
|
|
200
|
+
const watchExpressionStrings = this.#watchExpressionsSetting.get();
|
|
197
201
|
if (watchExpressionStrings.length) {
|
|
198
202
|
this.emptyElement.classList.add('hidden');
|
|
199
203
|
}
|
|
@@ -213,16 +217,16 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
|
213
217
|
UI.ARIAUtils.setLabel(this.contentElement, i18nString(UIStrings.addWatchExpression));
|
|
214
218
|
watchExpression.addEventListener(Events.EXPRESSION_UPDATED, this.watchExpressionUpdated, this);
|
|
215
219
|
this.treeOutline.appendChild(watchExpression.treeElement());
|
|
216
|
-
this
|
|
220
|
+
this.#watchExpressions.push(watchExpression);
|
|
217
221
|
return watchExpression;
|
|
218
222
|
}
|
|
219
223
|
|
|
220
224
|
private watchExpressionUpdated({data: watchExpression}: Common.EventTarget.EventTargetEvent<WatchExpression>): void {
|
|
221
225
|
if (!watchExpression.expression()) {
|
|
222
|
-
Platform.ArrayUtilities.removeElement(this
|
|
226
|
+
Platform.ArrayUtilities.removeElement(this.#watchExpressions, watchExpression);
|
|
223
227
|
this.treeOutline.removeChild(watchExpression.treeElement());
|
|
224
|
-
this.emptyElement.classList.toggle('hidden', Boolean(this
|
|
225
|
-
if (this
|
|
228
|
+
this.emptyElement.classList.toggle('hidden', Boolean(this.#watchExpressions.length));
|
|
229
|
+
if (this.#watchExpressions.length === 0) {
|
|
226
230
|
this.treeOutline.element.remove();
|
|
227
231
|
}
|
|
228
232
|
}
|
|
@@ -238,7 +242,7 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
|
238
242
|
|
|
239
243
|
private populateContextMenu(contextMenu: UI.ContextMenu.ContextMenu, event: MouseEvent): void {
|
|
240
244
|
let isEditing = false;
|
|
241
|
-
for (const watchExpression of this
|
|
245
|
+
for (const watchExpression of this.#watchExpressions) {
|
|
242
246
|
isEditing = isEditing || watchExpression.isEditing();
|
|
243
247
|
}
|
|
244
248
|
|
|
@@ -248,7 +252,7 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
|
248
252
|
{jslogContext: 'add-watch-expression'});
|
|
249
253
|
}
|
|
250
254
|
|
|
251
|
-
if (this
|
|
255
|
+
if (this.#watchExpressions.length > 1) {
|
|
252
256
|
contextMenu.debugSection().appendItem(
|
|
253
257
|
i18nString(UIStrings.deleteAllWatchExpressions), this.deleteAllButtonClicked.bind(this),
|
|
254
258
|
{jslogContext: 'delete-all-watch-expressions'});
|
|
@@ -259,14 +263,14 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
|
259
263
|
return;
|
|
260
264
|
}
|
|
261
265
|
const currentWatchExpression =
|
|
262
|
-
this
|
|
266
|
+
this.#watchExpressions.find(watchExpression => treeElement.hasAncestorOrSelf(watchExpression.treeElement()));
|
|
263
267
|
if (currentWatchExpression) {
|
|
264
268
|
currentWatchExpression.populateContextMenu(contextMenu, event);
|
|
265
269
|
}
|
|
266
270
|
}
|
|
267
271
|
|
|
268
272
|
private deleteAllButtonClicked(): void {
|
|
269
|
-
this
|
|
273
|
+
this.#watchExpressions = [];
|
|
270
274
|
this.saveExpressions();
|
|
271
275
|
this.requestUpdate();
|
|
272
276
|
}
|
|
@@ -456,8 +460,8 @@ export class WatchExpression extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
456
460
|
this.updateExpression(null);
|
|
457
461
|
}
|
|
458
462
|
|
|
459
|
-
|
|
460
|
-
|
|
463
|
+
createWatchExpression(result?: SDK.RemoteObject.RemoteObject, exceptionDetails?: Protocol.Runtime.ExceptionDetails):
|
|
464
|
+
void {
|
|
461
465
|
this.result = result || null;
|
|
462
466
|
|
|
463
467
|
this.element.removeChildren();
|
|
@@ -62,7 +62,7 @@ export interface ViewInput {
|
|
|
62
62
|
|
|
63
63
|
export type ViewOutput = Record<string, never>;
|
|
64
64
|
|
|
65
|
-
export type View = (input: ViewInput, output: ViewOutput, target:
|
|
65
|
+
export type View = (input: ViewInput, output: ViewOutput, target: DocumentFragment) => void;
|
|
66
66
|
|
|
67
67
|
// clang-format off
|
|
68
68
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
@@ -118,14 +118,14 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
118
118
|
` : nothing}
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
121
|
-
`, target);
|
|
121
|
+
`, target, {container: {attributes: {jslog: `${VisualLogging.dialog('timeline-status').track({resize: true})}`}}});
|
|
122
|
+
// clang-format on
|
|
122
123
|
};
|
|
123
|
-
// clang-format on
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* This is the dialog shown whilst a trace is being recorded/imported.
|
|
127
127
|
*/
|
|
128
|
-
export class StatusDialog extends UI.Widget.VBox {
|
|
128
|
+
export class StatusDialog extends UI.Widget.VBox<ShadowRoot> {
|
|
129
129
|
readonly #view: View;
|
|
130
130
|
#statusText = '';
|
|
131
131
|
readonly #showTimer: boolean;
|
|
@@ -153,10 +153,7 @@ export class StatusDialog extends UI.Widget.VBox {
|
|
|
153
153
|
buttonText?: string,
|
|
154
154
|
},
|
|
155
155
|
onButtonClickCallback: () => (Promise<void>| void), view: View = DEFAULT_VIEW) {
|
|
156
|
-
super({
|
|
157
|
-
jslog: `${VisualLogging.dialog('timeline-status').track({resize: true})}`,
|
|
158
|
-
useShadowDom: true,
|
|
159
|
-
});
|
|
156
|
+
super({useShadowDom: 'pure'});
|
|
160
157
|
|
|
161
158
|
this.#view = view;
|
|
162
159
|
this.#showTimer = Boolean(options.showTimer);
|
|
@@ -41,6 +41,7 @@ export class ThirdPartyTreeViewWidget extends TimelineTreeView.TimelineTreeView
|
|
|
41
41
|
#onRowHovered?: (node: Trace.Extras.TraceTree.Node|null, events?: Trace.Types.Events.Event[]) => void;
|
|
42
42
|
#onBottomUpButtonClicked?: (node: Trace.Extras.TraceTree.Node|null) => void;
|
|
43
43
|
#onRowClicked?: (node: Trace.Extras.TraceTree.Node|null, events?: Trace.Types.Events.Event[]) => void;
|
|
44
|
+
#isInAIWidget = false;
|
|
44
45
|
|
|
45
46
|
constructor(element?: HTMLElement) {
|
|
46
47
|
super(element);
|
|
@@ -262,6 +263,15 @@ export class ThirdPartyTreeViewWidget extends TimelineTreeView.TimelineTreeView
|
|
|
262
263
|
return super.maxRows;
|
|
263
264
|
}
|
|
264
265
|
|
|
266
|
+
get isInAIWidget(): boolean {
|
|
267
|
+
return this.#isInAIWidget;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
set isInAIWidget(x: boolean) {
|
|
271
|
+
this.#isInAIWidget = x;
|
|
272
|
+
this.element.classList.toggle('is-in-ai-widget', x);
|
|
273
|
+
}
|
|
274
|
+
|
|
265
275
|
override set maxRows(maxRows: number) {
|
|
266
276
|
super.maxRows = maxRows;
|
|
267
277
|
this.element.style.setProperty('--max-rows', String(maxRows));
|
|
@@ -147,9 +147,8 @@ export class TimelineLoader {
|
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
if ('
|
|
151
|
-
this.#metadata = trace.metadata;
|
|
152
|
-
|
|
150
|
+
if (!Array.isArray(trace) && 'traceEvents' in trace) {
|
|
151
|
+
this.#metadata = trace.metadata ?? {};
|
|
153
152
|
// Older traces set these fields even when throttling is not active, while newer traces do not.
|
|
154
153
|
// Clear them out on load to simplify usage.
|
|
155
154
|
if (this.#metadata.cpuThrottling === 1) {
|
|
@@ -241,4 +240,4 @@ export class TimelineLoader {
|
|
|
241
240
|
/**
|
|
242
241
|
* Used when we parse the input, but do not yet know if it is a raw CPU Profile or a Trace
|
|
243
242
|
**/
|
|
244
|
-
type ParsedJSONFile = Trace.Types.File.Contents|Protocol.Profiler.Profile;
|
|
243
|
+
export type ParsedJSONFile = Trace.Types.File.Contents|Protocol.Profiler.Profile;
|