chrome-devtools-frontend 1.0.1690531 → 1.0.1695017
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/devtools-model-management/SKILL.md +3 -3
- package/.agents/skills/foundation-test-migration/SKILL.md +2 -2
- package/.agents/skills/merging-devtools-module/SKILL.md +5 -5
- package/.gitmodules +0 -4
- package/AUTHORS +3 -0
- package/config/typescript/tsconfig.base.json +1 -0
- package/docs/get_the_code.md +4 -9
- package/front_end/Images/src/comment-mode-cursor.svg +23 -0
- package/front_end/Tests.js +1 -1
- package/front_end/application_tokens.css +5 -0
- package/front_end/core/common/ColorConverter.ts +3 -3
- package/front_end/core/host/UserMetrics.ts +27 -0
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +0 -46
- package/front_end/core/protocol_client/InspectorBackend.ts +6 -6
- package/front_end/core/sdk/CSSLocation.ts +32 -0
- package/front_end/core/sdk/CSSModel.ts +2 -22
- package/front_end/core/sdk/CSSQuery.ts +2 -1
- package/front_end/core/sdk/CSSRule.ts +29 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -1
- package/front_end/core/sdk/NetworkManager.ts +2 -0
- package/front_end/core/sdk/NetworkRequest.ts +14 -1
- package/front_end/core/sdk/NetworkRequestAccess.ts +41 -22
- package/front_end/core/sdk/ResourceTreeModel.ts +72 -23
- package/front_end/core/sdk/SecurityOrigin.ts +89 -29
- package/front_end/core/sdk/Target.ts +18 -0
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/main/MainImpl.ts +8 -1
- package/front_end/foundation/Universe.ts +14 -11
- package/front_end/generated/Deprecation.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +9 -8
- package/front_end/generated/SupportedCSSProperties.ts +13 -3
- package/front_end/generated/protocol.ts +24 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +42 -9
- package/front_end/models/ai_assistance/AiConversation.ts +6 -6
- package/front_end/models/ai_assistance/README.md +5 -3
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +28 -34
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +13 -17
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +5 -3
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +16 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -4
- package/front_end/models/ai_assistance/ai_assistance.ts +0 -2
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +11 -2
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +17 -5
- package/front_end/models/ai_assistance/contexts/FileContext.ts +13 -6
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +52 -25
- package/front_end/models/ai_assistance/contexts/RequestContext.ts +18 -34
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +14 -3
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +2 -5
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +135 -58
- package/front_end/models/ai_assistance/tools/CookieUtils.ts +25 -35
- package/front_end/models/ai_assistance/tools/DOMStorageUtils.ts +6 -3
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +9 -2
- package/front_end/models/ai_assistance/tools/GetCookieValues.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +3 -2
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +3 -5
- package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +8 -11
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +2 -4
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +6 -13
- package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +9 -9
- package/front_end/models/ai_assistance/tools/GetStyles.ts +3 -2
- package/front_end/models/ai_assistance/tools/ListCookies.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +6 -14
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +10 -15
- package/front_end/models/ai_assistance/tools/ListSources.ts +5 -7
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +9 -9
- package/front_end/models/ai_assistance/tools/README.md +4 -2
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +3 -2
- package/front_end/models/ai_assistance/tools/Tool.ts +27 -3
- package/front_end/models/comment_manager/CD4ABridge.ts +128 -0
- package/front_end/models/comment_manager/CommentManager.ts +50 -8
- package/front_end/models/comment_manager/comment_manager.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +37 -47
- package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -1
- package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +9 -7
- package/front_end/models/trace/ModelImpl.ts +2 -0
- package/front_end/models/trace/Processor.ts +6 -4
- package/front_end/models/trace/handlers/LayerTreeHandler.ts +3 -3
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -1
- package/front_end/models/trace/helpers/SyntheticEvents.ts +23 -1
- package/front_end/models/trace/types/Configuration.ts +7 -0
- package/front_end/models/trace/types/TraceEvents.ts +20 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -0
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingListView.ts +177 -0
- package/front_end/panels/accessibility/accessibility.ts +2 -0
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingListView.css +33 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -15
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +6 -35
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +4 -3
- package/front_end/panels/animation/AnimationTimeline.ts +1 -0
- package/front_end/panels/application/CrashReportContextView.ts +0 -1
- package/front_end/panels/application/FrameDetailsView.ts +5 -4
- package/front_end/panels/application/IndexedDBViews.ts +4 -4
- package/front_end/panels/application/indexedDBViews.css +0 -14
- package/front_end/panels/console/ConsoleContextSelector.ts +12 -5
- package/front_end/panels/console/ConsoleViewMessage.ts +12 -8
- package/front_end/panels/coverage/coverageView.css +8 -8
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +4 -5
- package/front_end/panels/developer_resources/developerResourcesView.css +3 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +39 -12
- package/front_end/panels/elements/ElementsTreeOutline.ts +183 -107
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -34
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +5 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -0
- package/front_end/panels/elements/components/computedStyleProperty.css +5 -5
- package/front_end/panels/elements/components/computedStyleTrace.css +5 -5
- package/front_end/panels/elements/components/cssHintDetailsView.css +1 -1
- package/front_end/panels/elements/components/cssPropertyDocsView.css +3 -3
- package/front_end/panels/elements/components/cssVariableValueView.css +4 -4
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +3 -3
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -5
- package/front_end/panels/elements/components/queryContainer.css +2 -2
- package/front_end/panels/elements/elementsTreeOutline.css +20 -4
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/issues/AffectedElementsView.ts +3 -0
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +12 -10
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -0
- package/front_end/panels/layer_viewer/Layers3DView.ts +13 -11
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspectorUtils.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +11 -11
- package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
- package/front_end/panels/media/TickingFlameChart.ts +3 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +2 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +5 -2
- package/front_end/panels/network/RequestHeadersView.ts +46 -10
- package/front_end/panels/network/components/RequestHeadersView.css +12 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
- package/front_end/panels/recorder/RecordingListView.ts +0 -6
- package/front_end/panels/recorder/RecordingView.ts +0 -6
- package/front_end/panels/recorder/controlButton.css +10 -10
- package/front_end/panels/recorder/startView.css +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +4 -2
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +46 -35
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -32
- package/front_end/panels/timeline/TimelinePanel.ts +0 -17
- package/front_end/panels/timeline/components/cwvMetrics.css +2 -2
- package/front_end/panels/timeline/components/insights/checklist.css +1 -1
- package/front_end/panels/timeline/components/insights/table.css +3 -3
- package/front_end/panels/timeline/overlays/components/entriesLinkOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +2 -2
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +4 -4
- package/front_end/panels/timeline/timelinePanel.css +0 -74
- package/front_end/panels/web_audio/webAudio.css +5 -5
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/csp_evaluator/package/tsconfig.json +1 -0
- package/front_end/third_party/diff/DiffWrapper.ts +1 -8
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +183 -4
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +708 -122
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +85 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +84 -11
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts +75 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js +102 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js +138 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +23 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +131 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +7 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +42 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js +265 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +24 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts +23 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +49 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +183 -4
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +143 -11
- package/front_end/third_party/puppeteer/package/src/api/ScreenRecording.ts +145 -0
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/bidi/ScreenRecording.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/bidi/bidi.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +41 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +101 -0
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +17 -9
- package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +46 -0
- package/front_end/third_party/puppeteer/package/src/common/Device.ts +287 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +30 -1
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +73 -2
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +194 -0
- package/front_end/tsconfig.json +1 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +8 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +53 -12
- package/front_end/ui/comments/CommentsOverlayWidget.ts +3 -3
- package/front_end/ui/comments/CommentsStatusBarPill.ts +96 -0
- package/front_end/ui/comments/comments-meta.ts +21 -0
- package/front_end/ui/comments/comments.ts +2 -0
- package/front_end/ui/comments/commentsOverlay.css +22 -3
- package/front_end/ui/components/markdown_view/MarkdownView.ts +31 -1
- package/front_end/ui/kit/icons/Icon.ts +0 -1
- package/front_end/ui/kit/link/Link.ts +8 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -1
- package/front_end/ui/legacy/SplitWidget.ts +16 -2
- package/front_end/ui/legacy/StatusBar.ts +78 -0
- package/front_end/ui/legacy/Toolbar.ts +4 -0
- package/front_end/ui/legacy/Treeoutline.ts +78 -11
- package/front_end/ui/legacy/UIUtils.ts +2 -1
- package/front_end/ui/legacy/ViewRegistration.ts +1 -0
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +23 -23
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.docs.ts +83 -0
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +600 -0
- package/front_end/ui/legacy/components/inline_editor/animationNameSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/colorMixSwatch.css +4 -4
- package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +3 -3
- package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +2 -0
- package/front_end/ui/legacy/components/inline_editor/linkSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +154 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +113 -51
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +10 -7
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +16 -97
- package/front_end/ui/legacy/components/object_ui/customPreviewComponent.css +7 -3
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -66
- package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
- package/front_end/ui/legacy/inspectorCommon.css +30 -6
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/legacy/statusBar.css +18 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/inspector_overlay/main.ts +8 -8
- package/mcp/mcp.ts +5 -0
- package/package.json +2 -9
- package/front_end/Images/generate-css-vars.js +0 -52
- package/front_end/Images/rollup.config.mjs +0 -36
- package/front_end/models/ai_assistance/AiOrigins.ts +0 -107
- package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +0 -20
- package/front_end/panels/recorder/injected/rollup.config.mjs +0 -20
- package/front_end/panels/timeline/EasterEgg.d.ts +0 -6
- package/front_end/panels/timeline/easter-egg-tsconfig.json +0 -8
- package/front_end/panels/timeline/enable-easter-egg.js +0 -20
- package/front_end/third_party/puppeteer-replay/puppeteer-replay-tsconfig.json +0 -8
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +0 -606
- package/inspector_overlay/loadCSS.rollup.js +0 -29
|
@@ -8,10 +8,8 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
8
8
|
import * as Platform from '../../core/platform/platform.js';
|
|
9
9
|
import * as Root from '../../core/root/root.js';
|
|
10
10
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
|
-
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
12
11
|
import * as Protocol from '../../generated/protocol.js';
|
|
13
12
|
import * as Geometry from '../geometry/geometry.js';
|
|
14
|
-
import * as Workspace from '../workspace/workspace.js';
|
|
15
13
|
|
|
16
14
|
import {
|
|
17
15
|
type Cutout,
|
|
@@ -128,19 +126,17 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
128
126
|
readonly #targetManager: SDK.TargetManager.TargetManager;
|
|
129
127
|
readonly #settings: Common.Settings.Settings;
|
|
130
128
|
readonly #multitargetNetworkManager: SDK.NetworkManager.MultitargetNetworkManager;
|
|
131
|
-
|
|
129
|
+
#lastScreenshotBlobUrl: string|null = null;
|
|
132
130
|
|
|
133
131
|
constructor(
|
|
134
132
|
targetManager: SDK.TargetManager.TargetManager,
|
|
135
133
|
settings: Common.Settings.Settings,
|
|
136
134
|
multitargetNetworkManager: SDK.NetworkManager.MultitargetNetworkManager,
|
|
137
|
-
fileManager: Workspace.FileManager.FileManager,
|
|
138
135
|
) {
|
|
139
136
|
super();
|
|
140
137
|
this.#targetManager = targetManager;
|
|
141
138
|
this.#settings = settings;
|
|
142
139
|
this.#multitargetNetworkManager = multitargetNetworkManager;
|
|
143
|
-
this.#fileManager = fileManager;
|
|
144
140
|
this.#screenRect = new Rect(0, 0, 1, 1);
|
|
145
141
|
this.#visiblePageRect = new Rect(0, 0, 1, 1);
|
|
146
142
|
this.#availableSize = new Geometry.Size(1, 1);
|
|
@@ -209,8 +205,6 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
209
205
|
Common.Settings.Settings.instance(),
|
|
210
206
|
// eslint-disable-next-line @devtools/no-instance-of-migrated-singletons
|
|
211
207
|
SDK.NetworkManager.MultitargetNetworkManager.instance(),
|
|
212
|
-
// eslint-disable-next-line @devtools/no-instance-of-migrated-singletons
|
|
213
|
-
Workspace.FileManager.FileManager.instance(),
|
|
214
208
|
));
|
|
215
209
|
}
|
|
216
210
|
|
|
@@ -241,6 +235,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
241
235
|
|
|
242
236
|
dispose(): void {
|
|
243
237
|
this.#targetManager.unobserveModels(SDK.EmulationModel.EmulationModel, this);
|
|
238
|
+
this.#revokeLastScreenshotBlobUrl();
|
|
244
239
|
}
|
|
245
240
|
|
|
246
241
|
static widthValidator(value: string): {
|
|
@@ -357,6 +352,8 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
357
352
|
|
|
358
353
|
if (type !== Type.None) {
|
|
359
354
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.DeviceModeEnabled);
|
|
355
|
+
} else {
|
|
356
|
+
this.#revokeLastScreenshotBlobUrl();
|
|
360
357
|
}
|
|
361
358
|
this.calculateAndEmulate(resetPageScaleFactor);
|
|
362
359
|
}
|
|
@@ -499,7 +496,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
499
496
|
const resourceTreeModel = emulationModel.target().model(SDK.ResourceTreeModel.ResourceTreeModel);
|
|
500
497
|
if (resourceTreeModel) {
|
|
501
498
|
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameResized, this.onFrameChange, this);
|
|
502
|
-
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameNavigated, this.
|
|
499
|
+
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameNavigated, this.onFrameNavigated, this);
|
|
503
500
|
}
|
|
504
501
|
} else {
|
|
505
502
|
void emulationModel.emulateTouch(this.#touchEnabled, this.#touchMobile);
|
|
@@ -511,8 +508,14 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
511
508
|
emulationModel.removeEventListener(
|
|
512
509
|
SDK.EmulationModel.EmulationModelEvents.SCREEN_ORIENTATION_LOCK_CHANGED, this.onScreenOrientationLockChanged,
|
|
513
510
|
this);
|
|
511
|
+
const resourceTreeModel = emulationModel.target().model(SDK.ResourceTreeModel.ResourceTreeModel);
|
|
512
|
+
if (resourceTreeModel) {
|
|
513
|
+
resourceTreeModel.removeEventListener(SDK.ResourceTreeModel.Events.FrameResized, this.onFrameChange, this);
|
|
514
|
+
resourceTreeModel.removeEventListener(SDK.ResourceTreeModel.Events.FrameNavigated, this.onFrameNavigated, this);
|
|
515
|
+
}
|
|
514
516
|
this.#emulationModel = null;
|
|
515
517
|
this.#screenOrientationLocked = false;
|
|
518
|
+
this.#revokeLastScreenshotBlobUrl();
|
|
516
519
|
this.dispatchEventToListeners(Events.UPDATED);
|
|
517
520
|
}
|
|
518
521
|
}
|
|
@@ -530,6 +533,13 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
530
533
|
this.showDeviceOverlaysIfApplicable(overlayModel);
|
|
531
534
|
}
|
|
532
535
|
|
|
536
|
+
private onFrameNavigated(event: Common.EventTarget.EventTargetEvent<SDK.ResourceTreeModel.ResourceTreeFrame>): void {
|
|
537
|
+
if (event.data.isMainFrame()) {
|
|
538
|
+
this.#revokeLastScreenshotBlobUrl();
|
|
539
|
+
}
|
|
540
|
+
this.onFrameChange();
|
|
541
|
+
}
|
|
542
|
+
|
|
533
543
|
private onScreenOrientationLockChanged(
|
|
534
544
|
event: Common.EventTarget.EventTargetEvent<SDK.EmulationModel.ScreenOrientationLockChangedEvent>): void {
|
|
535
545
|
this.#screenOrientationLocked = event.data.locked;
|
|
@@ -934,54 +944,34 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
934
944
|
});
|
|
935
945
|
}
|
|
936
946
|
|
|
937
|
-
|
|
947
|
+
async saveScreenshot(canvas: OffscreenCanvas): Promise<void> {
|
|
938
948
|
const url = this.inspectedURL();
|
|
939
|
-
let
|
|
949
|
+
let fileName = '';
|
|
940
950
|
if (url) {
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
const host = parsedURL.host;
|
|
944
|
-
const path = parsedURL.path.replace(/^\/+/, '').replace(/\/+$/, '');
|
|
945
|
-
baseName = host;
|
|
946
|
-
if (path) {
|
|
947
|
-
baseName += '-' + path.replaceAll('/', '-');
|
|
948
|
-
}
|
|
949
|
-
baseName = baseName.replace(/[^a-z0-9._-]/gi, '_');
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
if (!baseName) {
|
|
954
|
-
baseName = 'screenshot';
|
|
951
|
+
const withoutFragment = Platform.StringUtilities.removeURLFragment(url);
|
|
952
|
+
fileName = Platform.StringUtilities.trimURL(withoutFragment);
|
|
955
953
|
}
|
|
956
954
|
|
|
957
|
-
let suffix = '';
|
|
958
955
|
const device = this.device();
|
|
959
956
|
if (device && this.type() === Type.Device) {
|
|
960
|
-
|
|
957
|
+
fileName += `(${device.title})`;
|
|
961
958
|
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
const
|
|
968
|
-
|
|
959
|
+
this.#revokeLastScreenshotBlobUrl();
|
|
960
|
+
/* eslint-disable-next-line @devtools/no-imperative-dom-api */
|
|
961
|
+
const link = document.createElement('a');
|
|
962
|
+
link.download = fileName + '.png';
|
|
963
|
+
const blob = await canvas.convertToBlob({type: 'image/png'});
|
|
964
|
+
const blobUrl = URL.createObjectURL(blob);
|
|
965
|
+
this.#lastScreenshotBlobUrl = blobUrl;
|
|
966
|
+
link.href = blobUrl;
|
|
967
|
+
link.click();
|
|
968
|
+
}
|
|
969
969
|
|
|
970
|
-
|
|
971
|
-
if (
|
|
972
|
-
|
|
970
|
+
#revokeLastScreenshotBlobUrl(): void {
|
|
971
|
+
if (this.#lastScreenshotBlobUrl) {
|
|
972
|
+
URL.revokeObjectURL(this.#lastScreenshotBlobUrl);
|
|
973
|
+
this.#lastScreenshotBlobUrl = null;
|
|
973
974
|
}
|
|
974
|
-
const blob = await canvas.convertToBlob({type: 'image/png'});
|
|
975
|
-
const dataUrl = await new Promise<string>((resolve, reject) => {
|
|
976
|
-
const reader = new FileReader();
|
|
977
|
-
reader.onloadend = () => resolve(reader.result as string);
|
|
978
|
-
reader.onerror = reject;
|
|
979
|
-
reader.readAsDataURL(blob);
|
|
980
|
-
});
|
|
981
|
-
const base64 = dataUrl.slice(dataUrl.indexOf(',') + 1);
|
|
982
|
-
const contentData = new TextUtils.ContentData.ContentData(base64, /* isBase64=*/ true, 'image/png');
|
|
983
|
-
await this.#fileManager.save(fileName as Platform.DevToolsPath.RawPathString, contentData, /* forceSaveAs=*/ true);
|
|
984
|
-
this.#fileManager.close(fileName as Platform.DevToolsPath.RawPathString);
|
|
985
975
|
}
|
|
986
976
|
|
|
987
977
|
private applyTouch(touchEnabled: boolean, mobile: boolean): void {
|
|
@@ -6662,7 +6662,7 @@ export const NativeFunctions: readonly NativeFunctionValue[] = [
|
|
|
6662
6662
|
},
|
|
6663
6663
|
{
|
|
6664
6664
|
name: "WebSocket",
|
|
6665
|
-
signatures: [["url","?
|
|
6665
|
+
signatures: [["url","?protocolsOrOptions"]]
|
|
6666
6666
|
},
|
|
6667
6667
|
{
|
|
6668
6668
|
name: "WebSocketError",
|
|
@@ -6812,6 +6812,10 @@ export const NativeFunctions: readonly NativeFunctionValue[] = [
|
|
|
6812
6812
|
name: "provokingVertexWEBGL",
|
|
6813
6813
|
signatures: [["provokeMode"]]
|
|
6814
6814
|
},
|
|
6815
|
+
{
|
|
6816
|
+
name: "drawingBufferToneMapping",
|
|
6817
|
+
signatures: [["?toneMapping"]]
|
|
6818
|
+
},
|
|
6815
6819
|
{
|
|
6816
6820
|
name: "texElementImage2D",
|
|
6817
6821
|
signatures: [["target","internalformat","element","?config"]]
|
|
@@ -8734,6 +8738,10 @@ export const NativeFunctions: readonly NativeFunctionValue[] = [
|
|
|
8734
8738
|
name: "CanvasPaintEvent",
|
|
8735
8739
|
signatures: [["type","?eventInitDict"]]
|
|
8736
8740
|
},
|
|
8741
|
+
{
|
|
8742
|
+
name: "ElementGeometryUpdateEvent",
|
|
8743
|
+
signatures: [["type","?eventInitDict"]]
|
|
8744
|
+
},
|
|
8737
8745
|
{
|
|
8738
8746
|
name: "captureElementImage",
|
|
8739
8747
|
signatures: [["element"]]
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
[`web-vitals`](https://github.com/GoogleChrome/web-vitals) is a Google-maintained library that measures CWV metrics using their canonical definition. We use it to ensure we are using consistent implementations for measuring CWV across Google. It can also measure performance metrics of the current page *after* the they happen (See [`PerformanceObserver` buffered setting](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/observe#buffered)). See [go/cpq:rpp-metric-observations](http://go/cpq:rpp-metric-observations) for more information.
|
|
4
4
|
|
|
5
|
-
The web-vitals library needs to be run in the target page (although it can be used in an isolated execution context). We therefore need to create a JS binary that can be injected via `Page.evaluate`/`Page.addScriptToEvaluateOnNewDocument`. See `BUILD.gn`
|
|
5
|
+
The web-vitals library needs to be run in the target page (although it can be used in an isolated execution context). We therefore need to create a JS binary that can be injected via `Page.evaluate`/`Page.addScriptToEvaluateOnNewDocument`. See `BUILD.gn` for how we bundle the JS binary.
|
|
@@ -385,11 +385,12 @@ export const resolveScopeChain =
|
|
|
385
385
|
// 2) We have a chrome feature flag.
|
|
386
386
|
|
|
387
387
|
if (callFrame.script.isWasm()) {
|
|
388
|
-
return callFrame.scopeChain();
|
|
388
|
+
return callFrame.scopeChain().filter(scope => !scope.empty());
|
|
389
389
|
}
|
|
390
390
|
const thisObject = await resolveThisObject(callFrame, debuggerWorkspaceBinding);
|
|
391
|
-
|
|
392
|
-
|
|
391
|
+
const scopes = callFrame.scopeChain().filter(scope => !scope.empty() ||
|
|
392
|
+
scope.type() === Protocol.Debugger.ScopeType.Local);
|
|
393
|
+
return scopes.map(scope => new ScopeWithSourceMappedVariables(scope, thisObject, debuggerWorkspaceBinding));
|
|
393
394
|
};
|
|
394
395
|
|
|
395
396
|
/**
|
|
@@ -411,7 +412,7 @@ export const allVariablesInCallFrame = async(
|
|
|
411
412
|
return cachedMap;
|
|
412
413
|
}
|
|
413
414
|
|
|
414
|
-
const scopeChain = callFrame.scopeChain();
|
|
415
|
+
const scopeChain = callFrame.scopeChain().filter(scope => !scope.empty());
|
|
415
416
|
const nameMappings =
|
|
416
417
|
await Promise.all(scopeChain.map(scope => resolveDebuggerScope(scope, debuggerWorkspaceBinding)));
|
|
417
418
|
const reverseMapping = new Map<string, string|null>();
|
|
@@ -485,12 +486,13 @@ export const resolveThisObject = async(
|
|
|
485
486
|
callFrame: SDK.DebuggerModel.CallFrame,
|
|
486
487
|
debuggerWorkspaceBinding:
|
|
487
488
|
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding): Promise<SDK.RemoteObject.RemoteObject|null> => {
|
|
488
|
-
const
|
|
489
|
-
|
|
489
|
+
const innermostScope =
|
|
490
|
+
callFrame.scopeChain().find(scope => !scope.empty() || scope.type() === Protocol.Debugger.ScopeType.Local);
|
|
491
|
+
if (!innermostScope) {
|
|
490
492
|
return callFrame.thisObject();
|
|
491
493
|
}
|
|
492
494
|
|
|
493
|
-
const {thisMapping} = await resolveDebuggerScope(
|
|
495
|
+
const {thisMapping} = await resolveDebuggerScope(innermostScope, debuggerWorkspaceBinding);
|
|
494
496
|
if (!thisMapping) {
|
|
495
497
|
return callFrame.thisObject();
|
|
496
498
|
}
|
|
@@ -110,6 +110,8 @@ export class Model extends EventTarget {
|
|
|
110
110
|
}
|
|
111
111
|
const file = this.#storeAndCreateParsedTraceFile(
|
|
112
112
|
syntheticEventsManager, traceEvents, metadata, this.#processor.data, this.#processor.insights);
|
|
113
|
+
// Reclaim memory used by the temporary event-to-index lookup map now that trace parsing is complete.
|
|
114
|
+
syntheticEventsManager.clearRegistrationIndex();
|
|
113
115
|
// We only push the file onto this.#traces here once we know it's valid
|
|
114
116
|
// and there's been no errors in the parsing.
|
|
115
117
|
this.#traces.push(file);
|
|
@@ -208,7 +208,7 @@ export class TraceProcessor extends EventTarget {
|
|
|
208
208
|
// Handle each event.
|
|
209
209
|
for (let i = 0; i < traceEvents.length; ++i) {
|
|
210
210
|
// Every so often we take a break just to render.
|
|
211
|
-
if (i % eventsPerChunk === 0 && i) {
|
|
211
|
+
if (options.yieldToMain !== false && i % eventsPerChunk === 0 && i) {
|
|
212
212
|
// Take the opportunity to provide status update events.
|
|
213
213
|
const percent = calculateProgress(i / traceEvents.length, ProgressPhase.HANDLE_EVENT);
|
|
214
214
|
this.dispatchEvent(new TraceParseProgressEvent({percent}));
|
|
@@ -233,9 +233,11 @@ export class TraceProcessor extends EventTarget {
|
|
|
233
233
|
const [name, handler] = sortedHandlers[i];
|
|
234
234
|
if (handler.finalize) {
|
|
235
235
|
options.logger?.start(`parse:${name}:finalize`);
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
if (options.yieldToMain !== false) {
|
|
237
|
+
// Yield to the UI because finalize() calls can be expensive
|
|
238
|
+
// TODO(jacktfranklin): consider using `scheduler.yield()` or `scheduler.postTask(() => {}, {priority: 'user-blocking'})`
|
|
239
|
+
await new Promise(resolve => setTimeout(resolve, 0));
|
|
240
|
+
}
|
|
239
241
|
await handler.finalize(finalizeOptions);
|
|
240
242
|
options.logger?.end(`parse:${name}:finalize`);
|
|
241
243
|
}
|
|
@@ -62,9 +62,9 @@ export async function finalize(): Promise<void> {
|
|
|
62
62
|
updateLayerEvents.push(event);
|
|
63
63
|
} else if (Types.Events.isPaint(event)) {
|
|
64
64
|
if (!event.args.data.layerId) {
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
65
|
+
// A layerId of 0 means that this event cannot be associated with a
|
|
66
|
+
// compositor layer. This includes modern Paint duration events and
|
|
67
|
+
// older Paint events for subframes.
|
|
68
68
|
continue;
|
|
69
69
|
}
|
|
70
70
|
paintEvents.push(event);
|
|
@@ -37,7 +37,7 @@ import type {HandlerName} from './types.js';
|
|
|
37
37
|
// score for the given recording, and almost certainly not the
|
|
38
38
|
// navigation-to-unload CLS score.
|
|
39
39
|
|
|
40
|
-
interface LayoutShiftsData {
|
|
40
|
+
export interface LayoutShiftsData {
|
|
41
41
|
clusters: readonly Types.Events.SyntheticLayoutShiftCluster[];
|
|
42
42
|
sessionMaxScore: number;
|
|
43
43
|
// The session window which contains the SessionMaxScore
|
|
@@ -54,13 +54,35 @@ export class SyntheticEventsManager {
|
|
|
54
54
|
this.#rawTraceEvents = rawEvents;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
#rawEventIndexes: Map<Types.Events.Event, number>|null = null;
|
|
58
|
+
|
|
59
|
+
#getRawEventIndex(event: Types.Events.Event): number {
|
|
60
|
+
if (!this.#rawEventIndexes) {
|
|
61
|
+
this.#rawEventIndexes = new Map();
|
|
62
|
+
for (let i = 0; i < this.#rawTraceEvents.length; i++) {
|
|
63
|
+
this.#rawEventIndexes.set(this.#rawTraceEvents[i], i);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return this.#rawEventIndexes.get(event) ?? -1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Clears the transient raw event index map.
|
|
71
|
+
* During trace parsing, this map provides O(1) lookups for registering synthetic events.
|
|
72
|
+
* Once parsing is complete, queries look up synthetic events exclusively by index in
|
|
73
|
+
* `#syntheticTraces`, so this map is discarded to reclaim memory.
|
|
74
|
+
*/
|
|
75
|
+
clearRegistrationIndex(): void {
|
|
76
|
+
this.#rawEventIndexes = null;
|
|
77
|
+
}
|
|
78
|
+
|
|
57
79
|
/**
|
|
58
80
|
* Registers and returns a branded synthetic event. Synthetic events need to
|
|
59
81
|
* be created with this method to ensure they are registered and made
|
|
60
82
|
* available to load events using serialized keys.
|
|
61
83
|
*/
|
|
62
84
|
#registerSyntheticEvent<T extends Types.Events.SyntheticBased>(syntheticEvent: Omit<T, '_tag'>): T {
|
|
63
|
-
const rawIndex = this.#
|
|
85
|
+
const rawIndex = this.#getRawEventIndex(syntheticEvent.rawSourceEvent);
|
|
64
86
|
if (rawIndex < 0) {
|
|
65
87
|
throw new Error('Attempted to register a synthetic event paired to an unknown raw event.');
|
|
66
88
|
}
|
|
@@ -73,6 +73,13 @@ export interface ParseOptions {
|
|
|
73
73
|
* @default false
|
|
74
74
|
*/
|
|
75
75
|
isFreshRecording?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the processor should yield to the main thread during parsing to keep the UI responsive.
|
|
78
|
+
* This should always remain enabled in production to prevent blocking the UI, but can be disabled
|
|
79
|
+
* in unit tests to speed up test execution.
|
|
80
|
+
* @default true
|
|
81
|
+
*/
|
|
82
|
+
yieldToMain?: boolean;
|
|
76
83
|
/**
|
|
77
84
|
* If the trace is a CPU Profile rather than a Chrome tracing trace.
|
|
78
85
|
* @default false
|
|
@@ -2628,8 +2628,8 @@ export function isUpdateLayer(event: Event): event is UpdateLayer {
|
|
|
2628
2628
|
return event.name === Name.UPDATE_LAYER;
|
|
2629
2629
|
}
|
|
2630
2630
|
|
|
2631
|
-
export interface
|
|
2632
|
-
name: Name.
|
|
2631
|
+
export interface LegacyDisplayItemListSnapshot extends Event {
|
|
2632
|
+
name: Name.LEGACY_DISPLAY_ITEM_LIST_SNAPSHOT;
|
|
2633
2633
|
ph: Phase.OBJECT_SNAPSHOT;
|
|
2634
2634
|
id2: {
|
|
2635
2635
|
local?: string,
|
|
@@ -2638,14 +2638,29 @@ export interface DisplayItemListSnapshot extends Event {
|
|
|
2638
2638
|
snapshot: {
|
|
2639
2639
|
skp64: string,
|
|
2640
2640
|
params?: {
|
|
2641
|
+
layer_rect: [number, number, number, number],
|
|
2642
|
+
},
|
|
2643
|
+
},
|
|
2644
|
+
};
|
|
2645
|
+
}
|
|
2641
2646
|
|
|
2647
|
+
export interface InstantDisplayItemListSnapshot extends Instant {
|
|
2648
|
+
name: Name.DISPLAY_ITEM_LIST_SNAPSHOT;
|
|
2649
|
+
args: Args&{
|
|
2650
|
+
snapshot: {
|
|
2651
|
+
skp64: string,
|
|
2652
|
+
params?: {
|
|
2642
2653
|
layer_rect: [number, number, number, number],
|
|
2643
2654
|
},
|
|
2644
2655
|
},
|
|
2645
2656
|
};
|
|
2646
2657
|
}
|
|
2658
|
+
|
|
2659
|
+
export type DisplayItemListSnapshot = LegacyDisplayItemListSnapshot|InstantDisplayItemListSnapshot;
|
|
2660
|
+
|
|
2647
2661
|
export function isDisplayListItemListSnapshot(event: Event): event is DisplayItemListSnapshot {
|
|
2648
|
-
return event.name === Name.
|
|
2662
|
+
return (event.name === Name.LEGACY_DISPLAY_ITEM_LIST_SNAPSHOT && event.ph === Phase.OBJECT_SNAPSHOT) ||
|
|
2663
|
+
(event.name === Name.DISPLAY_ITEM_LIST_SNAPSHOT && event.ph === Phase.INSTANT);
|
|
2649
2664
|
}
|
|
2650
2665
|
|
|
2651
2666
|
export interface LayerTreeHostImplSnapshot extends Event {
|
|
@@ -3246,7 +3261,8 @@ export const enum Name {
|
|
|
3246
3261
|
LAZY_PIXEL_REF = 'LazyPixelRef',
|
|
3247
3262
|
LAYER_TREE_HOST_IMPL_SNAPSHOT = 'cc::LayerTreeHostImpl',
|
|
3248
3263
|
PICTURE_SNAPSHOT = 'cc::Picture',
|
|
3249
|
-
|
|
3264
|
+
LEGACY_DISPLAY_ITEM_LIST_SNAPSHOT = 'cc::DisplayItemList',
|
|
3265
|
+
DISPLAY_ITEM_LIST_SNAPSHOT = 'cc::DisplayItemList:snapshot',
|
|
3250
3266
|
INPUT_LATENCY_MOUSE_MOVE = 'InputLatency::MouseMove',
|
|
3251
3267
|
INPUT_LATENCY_MOUSE_WHEEL = 'InputLatency::MouseWheel',
|
|
3252
3268
|
IMPL_SIDE_FLING = 'InputHandlerProxy::HandleGestureFling::started',
|
|
@@ -36,6 +36,7 @@ interface ViewInput {
|
|
|
36
36
|
attributeBeingEdited: SDK.DOMModel.Attribute|null;
|
|
37
37
|
attributes: SDK.DOMModel.Attribute[];
|
|
38
38
|
backendNodeId?: number;
|
|
39
|
+
targetId?: string;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
type View = (input: ViewInput, output: object, target: HTMLElement|DocumentFragment) => void;
|
|
@@ -99,6 +100,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
99
100
|
attributes: {
|
|
100
101
|
jslog: `${VisualLogging.section('aria-attributes')}`,
|
|
101
102
|
...(input.backendNodeId ? {'data-backend-node-id': `${input.backendNodeId}`} : {}),
|
|
103
|
+
...(input.targetId ? {'data-target-id': `${input.targetId}`} : {}),
|
|
102
104
|
},
|
|
103
105
|
},
|
|
104
106
|
});
|
|
@@ -159,6 +161,7 @@ export class ARIAAttributesPane extends AccessibilitySubPane<ShadowRoot> {
|
|
|
159
161
|
onCancelEditing,
|
|
160
162
|
propertyCompletions,
|
|
161
163
|
backendNodeId: this.node()?.backendNodeId(),
|
|
164
|
+
targetId: this.node()?.domModel().target().id(),
|
|
162
165
|
};
|
|
163
166
|
this.#view(input, {}, this.contentElement);
|
|
164
167
|
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import '../../ui/legacy/components/data_grid/data_grid.js';
|
|
6
|
+
|
|
7
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
|
+
import * as Lit from '../../ui/lit/lit.js';
|
|
10
|
+
|
|
11
|
+
import accessibilityAnnouncementRecordingListViewStyles from './accessibilityAnnouncementRecordingListView.css.js';
|
|
12
|
+
import {
|
|
13
|
+
type A11yAnnouncement,
|
|
14
|
+
AnnouncementApi,
|
|
15
|
+
} from './AccessibilityAnnouncementRecordingView.js';
|
|
16
|
+
|
|
17
|
+
const {html, render} = Lit;
|
|
18
|
+
|
|
19
|
+
const UIStrings = {
|
|
20
|
+
/**
|
|
21
|
+
* @description Column header for the announcement timestamp.
|
|
22
|
+
*/
|
|
23
|
+
time: 'Time',
|
|
24
|
+
/**
|
|
25
|
+
* @description Column header for the API type (DOM aria-live vs JS ariaNotify).
|
|
26
|
+
*/
|
|
27
|
+
api: 'API',
|
|
28
|
+
/**
|
|
29
|
+
* @description Column header for the politeness level (e.g. polite, assertive).
|
|
30
|
+
*/
|
|
31
|
+
politeness: 'Politeness',
|
|
32
|
+
/**
|
|
33
|
+
* @description Column header for the announcement message text.
|
|
34
|
+
*/
|
|
35
|
+
message: 'Message',
|
|
36
|
+
/**
|
|
37
|
+
* @description Value for DOM aria-live announcements in the API column.
|
|
38
|
+
*/
|
|
39
|
+
ariaLive: 'ARIA live',
|
|
40
|
+
/**
|
|
41
|
+
* @description Value for JS ariaNotify announcements in the API column.
|
|
42
|
+
*/
|
|
43
|
+
jsTriggered: 'JS-triggered',
|
|
44
|
+
/**
|
|
45
|
+
* @description Accessible title for the announcements data grid.
|
|
46
|
+
*/
|
|
47
|
+
ariaLiveRecordingList: 'Accessibility Announcements',
|
|
48
|
+
} as const;
|
|
49
|
+
const str_ =
|
|
50
|
+
i18n.i18n.registerUIStrings('panels/accessibility/AccessibilityAnnouncementRecordingListView.ts', UIStrings);
|
|
51
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
52
|
+
|
|
53
|
+
export interface ViewInput {
|
|
54
|
+
items: readonly A11yAnnouncement[];
|
|
55
|
+
selectedItem: A11yAnnouncement|null;
|
|
56
|
+
onSelect: (item: A11yAnnouncement) => void;
|
|
57
|
+
onDeselect: () => void;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
61
|
+
|
|
62
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
63
|
+
// clang-format off
|
|
64
|
+
render(html`
|
|
65
|
+
<style>${accessibilityAnnouncementRecordingListViewStyles}</style>
|
|
66
|
+
<devtools-data-grid
|
|
67
|
+
name=${i18nString(UIStrings.ariaLiveRecordingList)}
|
|
68
|
+
striped
|
|
69
|
+
class="flex-auto"
|
|
70
|
+
@deselect=${input.onDeselect}>
|
|
71
|
+
<table>
|
|
72
|
+
<tr>
|
|
73
|
+
<th id="time" sortable fixed width="110px" align="right">
|
|
74
|
+
${i18nString(UIStrings.time)}
|
|
75
|
+
</th>
|
|
76
|
+
<th id="api" sortable fixed width="110px">
|
|
77
|
+
${i18nString(UIStrings.api)}
|
|
78
|
+
</th>
|
|
79
|
+
<th id="politeness" sortable fixed width="90px">
|
|
80
|
+
${i18nString(UIStrings.politeness)}
|
|
81
|
+
</th>
|
|
82
|
+
<th id="message" sortable width="300px">
|
|
83
|
+
${i18nString(UIStrings.message)}
|
|
84
|
+
</th>
|
|
85
|
+
</tr>
|
|
86
|
+
${input.items.map(item => {
|
|
87
|
+
const timeString = new Date(item.time).toLocaleTimeString(i18n.DevToolsLocale.DevToolsLocale.instance().locale);
|
|
88
|
+
const apiDisplay = item.api === AnnouncementApi.JS_TRIGGERED ?
|
|
89
|
+
i18nString(UIStrings.jsTriggered) :
|
|
90
|
+
i18nString(UIStrings.ariaLive);
|
|
91
|
+
|
|
92
|
+
return html`
|
|
93
|
+
<tr
|
|
94
|
+
?selected=${item === input.selectedItem}
|
|
95
|
+
@select=${() => input.onSelect(item)}>
|
|
96
|
+
<td data-value=${item.time}>
|
|
97
|
+
<span>${timeString}</span>
|
|
98
|
+
</td>
|
|
99
|
+
<td>${apiDisplay}</td>
|
|
100
|
+
<td>${item.politeness}</td>
|
|
101
|
+
<td title=${item.message}>
|
|
102
|
+
${item.message}
|
|
103
|
+
</td>
|
|
104
|
+
</tr>`;
|
|
105
|
+
})}
|
|
106
|
+
</table>
|
|
107
|
+
</devtools-data-grid>`,
|
|
108
|
+
target);
|
|
109
|
+
// clang-format on
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export class AccessibilityAnnouncementRecordingListView extends UI.Widget.VBox {
|
|
113
|
+
#items: readonly A11yAnnouncement[] = [];
|
|
114
|
+
#selectedItem: A11yAnnouncement|null = null;
|
|
115
|
+
#onSelect: ((item: A11yAnnouncement|null) => void)|null = null;
|
|
116
|
+
readonly #view: View;
|
|
117
|
+
|
|
118
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
119
|
+
super(element, {useShadowDom: true});
|
|
120
|
+
this.#view = view;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
override wasShown(): void {
|
|
124
|
+
super.wasShown();
|
|
125
|
+
this.requestUpdate();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
set items(items: readonly A11yAnnouncement[]) {
|
|
129
|
+
if (this.#items === items) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this.#items = items;
|
|
133
|
+
this.requestUpdate();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
get items(): readonly A11yAnnouncement[] {
|
|
137
|
+
return this.#items;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
set selectedItem(item: A11yAnnouncement|null) {
|
|
141
|
+
if (this.#selectedItem === item) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
this.#selectedItem = item;
|
|
145
|
+
this.requestUpdate();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
get selectedItem(): A11yAnnouncement|null {
|
|
149
|
+
return this.#selectedItem;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
set onSelect(onSelect: (item: A11yAnnouncement|null) => void) {
|
|
153
|
+
this.#onSelect = onSelect;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
reset(): void {
|
|
157
|
+
this.#items = [];
|
|
158
|
+
this.#selectedItem = null;
|
|
159
|
+
this.requestUpdate();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
override performUpdate(): void {
|
|
163
|
+
const input: ViewInput = {
|
|
164
|
+
items: this.#items,
|
|
165
|
+
selectedItem: this.#selectedItem,
|
|
166
|
+
onSelect: (item: A11yAnnouncement) => {
|
|
167
|
+
this.selectedItem = item;
|
|
168
|
+
this.#onSelect?.(item);
|
|
169
|
+
},
|
|
170
|
+
onDeselect: () => {
|
|
171
|
+
this.selectedItem = null;
|
|
172
|
+
this.#onSelect?.(null);
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
this.#view(input, undefined, this.contentElement);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import * as AccessibilityAnnouncementRecordingListView from './AccessibilityAnnouncementRecordingListView.js';
|
|
5
6
|
import * as AccessibilityAnnouncementRecordingView from './AccessibilityAnnouncementRecordingView.js';
|
|
6
7
|
import * as AccessibilityNodeView from './AccessibilityNodeView.js';
|
|
7
8
|
import * as AccessibilitySidebarView from './AccessibilitySidebarView.js';
|
|
@@ -11,6 +12,7 @@ import * as ARIAAttributesView from './ARIAAttributesView.js';
|
|
|
11
12
|
import * as ARIAMetadata from './ARIAMetadata.js';
|
|
12
13
|
|
|
13
14
|
export {
|
|
15
|
+
AccessibilityAnnouncementRecordingListView,
|
|
14
16
|
AccessibilityAnnouncementRecordingView,
|
|
15
17
|
AccessibilityNodeView,
|
|
16
18
|
AccessibilitySidebarView,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 The Chromium Authors
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
font-family: inherit;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
flex: auto;
|
|
12
|
+
height: 100%;
|
|
13
|
+
min-height: 0;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@scope to (devtools-widget > *) {
|
|
18
|
+
:scope {
|
|
19
|
+
font-family: inherit;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
flex: auto;
|
|
23
|
+
height: 100%;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
devtools-data-grid {
|
|
28
|
+
font-family: inherit;
|
|
29
|
+
flex: auto;
|
|
30
|
+
height: 100%;
|
|
31
|
+
border: none;
|
|
32
|
+
}
|
|
33
|
+
}
|