chrome-devtools-frontend 1.0.1690531 → 1.0.1696904
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/platform/Size.ts +43 -0
- package/front_end/core/platform/platform.ts +1 -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/AccessibilityModel.ts +2 -2
- package/front_end/core/sdk/CSSLocation.ts +32 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -0
- package/front_end/core/sdk/CSSModel.ts +2 -22
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +29 -0
- package/front_end/core/sdk/CSSQuery.ts +2 -1
- package/front_end/core/sdk/CSSRule.ts +29 -0
- package/front_end/core/sdk/DOMModel.ts +10 -6
- 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 +15 -11
- package/front_end/generated/SupportedCSSProperties.ts +13 -3
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +60 -3
- package/front_end/models/ai_assistance/AiAgent2.ts +44 -11
- 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 +32 -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 +12 -2
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +18 -5
- package/front_end/models/ai_assistance/contexts/FileContext.ts +14 -6
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +53 -25
- package/front_end/models/ai_assistance/contexts/RequestContext.ts +19 -34
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +15 -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 +6 -8
- 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 +11 -18
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +2 -4
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +6 -11
- 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 +11 -6
- 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 +30 -13
- 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 +6 -10
- package/front_end/models/ai_assistance/tools/Tool.ts +35 -4
- package/front_end/models/comment_manager/CD4ABridge.ts +128 -0
- package/front_end/models/comment_manager/CommentManager.ts +77 -11
- package/front_end/models/comment_manager/comment_manager.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +48 -59
- package/front_end/models/javascript_metadata/NativeFunctions.ts +10 -6
- 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 +98 -32
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +14 -3
- 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/animation/AnimationUI.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +1 -1
- 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/KeyValueStorageItemsView.ts +1 -1
- package/front_end/panels/application/components/AdsView.ts +134 -5
- package/front_end/panels/application/components/adScriptsTable.css +22 -0
- package/front_end/panels/application/indexedDBViews.css +0 -14
- package/front_end/panels/application/resourcesPanel.css +17 -17
- package/front_end/panels/common/CPUThrottlingOption.ts +0 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +1 -1
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
- 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 +5 -6
- 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 +184 -108
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -34
- package/front_end/panels/elements/StylePropertyTreeElement.ts +83 -0
- 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/elements/stylePropertiesTreeOutline.css +2 -1
- package/front_end/panels/emulation/DeviceModeView.ts +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +57 -88
- 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 +14 -12
- package/front_end/panels/layers/LayerTreeModel.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +1 -1
- 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/CalibrationController.ts +3 -0
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +11 -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/OriginTreeElement.ts +59 -0
- package/front_end/panels/security/SecurityPanel.ts +52 -40
- package/front_end/panels/security/SecurityPanelSidebar.ts +231 -64
- package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +30 -0
- package/front_end/panels/security/security.ts +4 -0
- package/front_end/panels/sensors/SensorsView.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -32
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +1 -1
- 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/timelineMiniMap.css +9 -9
- package/front_end/panels/timeline/timelinePanel.css +0 -74
- package/front_end/panels/timeline/timelineStatusDialog.css +9 -9
- 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 +122 -6
- package/front_end/ui/comments/CommentOverlayManager.ts +147 -27
- 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/dialogs/TypeToAllowDialog.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownView.ts +31 -1
- package/front_end/ui/components/markdown_view/codeBlock.css +3 -8
- package/front_end/ui/components/markdown_view/markdownView.css +2 -7
- package/front_end/{models → ui}/geometry/GeometryImpl.ts +4 -40
- 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/GlassPane.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -1
- package/front_end/ui/legacy/SoftDropDown.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.ts +17 -3
- package/front_end/ui/legacy/StatusBar.ts +78 -0
- package/front_end/ui/legacy/SuggestBox.ts +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/Toolbar.ts +4 -0
- package/front_end/ui/legacy/Treeoutline.ts +82 -11
- package/front_end/ui/legacy/UIUtils.ts +3 -2
- package/front_end/ui/legacy/ViewRegistration.ts +1 -0
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +23 -23
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierUI.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.docs.ts +83 -0
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +787 -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 +160 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +113 -51
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +11 -8
- 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/components/quick_open/FilteredListWidget.ts +1 -1
- 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 +14 -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
- /package/front_end/{models → ui}/geometry/geometry.ts +0 -0
|
@@ -22,12 +22,12 @@ This guide outlines the standard procedure for creating a new model or migrating
|
|
|
22
22
|
## 2. Build Configuration (`BUILD.gn`)
|
|
23
23
|
Every model requires a `BUILD.gn` file in its directory with three specific targets:
|
|
24
24
|
|
|
25
|
-
1. **`devtools_module("<model_name>")`**: Lists implementation source files (`sources`) and dependencies (`
|
|
25
|
+
1. **`devtools_module("<model_name>")`**: Lists implementation source files (`sources`) and TypeScript dependencies (`ts_deps`). Non-TypeScript dependencies (e.g. CSS, assets) go into `deps`.
|
|
26
26
|
* **Crucial:** Do NOT include the barrel file (`<model_name>.ts`) in `sources`.
|
|
27
27
|
2. **`devtools_entrypoint("bundle")`**: Defines the barrel file (`entrypoint = "<model_name>.ts"`).
|
|
28
|
-
* **Crucial:** Must depend on the module target: `
|
|
28
|
+
* **Crucial:** Must depend on the module target: `ts_deps = [ ":<model_name>" ]`.
|
|
29
29
|
3. **`ts_library("unittests")`**: Lists test files and test-only dependencies.
|
|
30
|
-
* **Crucial:** Must depend on the bundle: `
|
|
30
|
+
* **Crucial:** Must depend on the bundle: `ts_deps = [ ":bundle" ]`.
|
|
31
31
|
|
|
32
32
|
## 3. Global Registration (Crucial)
|
|
33
33
|
The build system does not auto-detect new modules. You must manually register them in **`config/gni/devtools_grd_files.gni`**:
|
|
@@ -143,13 +143,13 @@ When a module and its tests are ready, update `BUILD.gn`:
|
|
|
143
143
|
|
|
144
144
|
devtools_foundation_module("my_module") {
|
|
145
145
|
sources = [ "MyModule.ts" ]
|
|
146
|
-
|
|
146
|
+
ts_deps = [ "../../core/common:bundle" ]
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
devtools_foundation_module("unittests") {
|
|
150
150
|
testonly = true
|
|
151
151
|
sources = [ "MyModule.test.ts" ]
|
|
152
|
-
|
|
152
|
+
ts_deps = [
|
|
153
153
|
":my_module",
|
|
154
154
|
"../../testing",
|
|
155
155
|
]
|
|
@@ -19,7 +19,7 @@ You will need the following information:
|
|
|
19
19
|
|
|
20
20
|
Read the contents of the `BUILD.gn` file from both the child module and the parent module. Identify the following from the child's `BUILD.gn`:
|
|
21
21
|
- The list of `sources` in the `devtools_module`.
|
|
22
|
-
- The list of `
|
|
22
|
+
- The list of `ts_deps` (and non-TypeScript `deps`) in the `devtools_module`.
|
|
23
23
|
- The `entrypoint` for the `devtools_entrypoint("bundle")`.
|
|
24
24
|
|
|
25
25
|
### 2. Modify the Parent `BUILD.gn`
|
|
@@ -27,8 +27,8 @@ Read the contents of the `BUILD.gn` file from both the child module and the pare
|
|
|
27
27
|
Edit the `BUILD.gn` file in the parent module's directory to incorporate the child module's configuration.
|
|
28
28
|
|
|
29
29
|
1. **Add Child's Sources:** Append the list of `sources` from the child's `devtools_module` to the parent's `sources` list. Remember to maintain the relative path from the parent's directory (e.g., `extensions/ExtensionUI.ts`).
|
|
30
|
-
2. **Merge Dependencies:** Add the `
|
|
31
|
-
3. **Remove Child Bundle Dependency:** Delete the dependency on the child's bundle from the parent's `
|
|
30
|
+
2. **Merge Dependencies:** Add the `ts_deps` from the child's `devtools_module` to the parent's `ts_deps` list (and merge any non-TypeScript `deps`). Remove any duplicate entries.
|
|
31
|
+
3. **Remove Child Bundle Dependency:** Delete the dependency on the child's bundle from the parent's `ts_deps` list (e.g., remove `./extensions:bundle`).
|
|
32
32
|
|
|
33
33
|
### 3. Delete the Child `BUILD.gn`
|
|
34
34
|
|
|
@@ -63,7 +63,7 @@ devtools_module("timeline") {
|
|
|
63
63
|
"UIDevtoolsUtils.ts",
|
|
64
64
|
]
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
ts_deps = [
|
|
67
67
|
...
|
|
68
68
|
"./components:bundle",
|
|
69
69
|
"./extensions:bundle",
|
|
@@ -82,7 +82,7 @@ devtools_module("timeline") {
|
|
|
82
82
|
"extensions/ExtensionUI.ts", # Added from child
|
|
83
83
|
]
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
ts_deps = [
|
|
86
86
|
...
|
|
87
87
|
"./components:bundle",
|
|
88
88
|
# "./extensions:bundle", # Removed
|
package/.gitmodules
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
[submodule "test/ai_evals/eval_data"]
|
|
2
|
-
path = test/ai_evals/eval_data
|
|
3
|
-
url = https://chrome-internal.googlesource.com/devtools/chrome-devtools-evals
|
|
4
|
-
gclient-condition = checkout_ai_evals == True
|
|
5
1
|
[submodule "third_party/clang-format/script"]
|
|
6
2
|
path = third_party/clang-format/script
|
|
7
3
|
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format
|
package/AUTHORS
CHANGED
|
@@ -35,6 +35,7 @@ Conner Turner <cturner@zyme.xyz>
|
|
|
35
35
|
Daniel bellfield <dnlbellfield@gmail.com>
|
|
36
36
|
Danny Eldridge <me@heardanieljames.com>
|
|
37
37
|
Derek Li <the.derekli@gmail.com>
|
|
38
|
+
Dmitry Kryaklin <dmkryak@gmail.com>
|
|
38
39
|
Douglas Chiang <douglasdothnc@gmail.com>
|
|
39
40
|
Dragonish <no.web.developer@outlook.com>
|
|
40
41
|
Eden Wang <nedenwang@gmail.com>
|
|
@@ -79,6 +80,7 @@ Michael Rienstra <mrienstra@gmail.com>
|
|
|
79
80
|
Mostafa Aboalkasim <mostafa.aboalkasim.offical@gmail.com>
|
|
80
81
|
Muhammad Mahad <mahadtxt@gmail.com>
|
|
81
82
|
Naoto Ono <onoto1998@gmail.com>
|
|
83
|
+
Navoda Munasinha <navoda.munasinha@codimite.com>
|
|
82
84
|
Nourhan Hasan <nourhan.m.hasan@gmail.com>
|
|
83
85
|
Paras Awasthi <awasthiparas6@gmail.com>
|
|
84
86
|
Paul Fisher <paul@pfish.zone>
|
|
@@ -121,6 +123,7 @@ Yoichiro Hibara <hibarayoichiro871@gmail.com>
|
|
|
121
123
|
Yoni Feigelson <yfeigelson@gmail.com>
|
|
122
124
|
Young Min Kim <y@ylem.kim>
|
|
123
125
|
Yuan Zhuang <joann.yuanzhuang@gmail.com>
|
|
126
|
+
Zuyao Chen <zuyaocat@gmail.com>
|
|
124
127
|
# Please DO NOT APPEND here. See comments at the top of the file.
|
|
125
128
|
# END individuals section.
|
|
126
129
|
|
package/docs/get_the_code.md
CHANGED
|
@@ -43,17 +43,12 @@ npm run build -- -t Debug
|
|
|
43
43
|
will build in `out/Debug` instead of `out/Default`. If the directory doesn't exist,
|
|
44
44
|
it'll automatically create and initialize it.
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
shorter build times.
|
|
50
|
-
|
|
51
|
-
Additionally, we now bundle files together by default in all builds, which has
|
|
52
|
-
a build time cost. If you want an even fast fast build, you might want to opt
|
|
53
|
-
out of bundling by setting `devtools_bundle` to `false`
|
|
46
|
+
We bundle files together by default in all builds, which has a build time cost.
|
|
47
|
+
If you want a faster build, you can opt out of bundling by setting `devtools_bundle`
|
|
48
|
+
to `false`:
|
|
54
49
|
|
|
55
50
|
```bash
|
|
56
|
-
gn gen out/Fast --args="
|
|
51
|
+
gn gen out/Fast --args="devtools_bundle=false"
|
|
57
52
|
```
|
|
58
53
|
|
|
59
54
|
and use `npm run build -- -t Fast` to build this target.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g filter="url(#filter0_dd_6727_40653)">
|
|
3
|
+
<path d="M30 18C30 12.4772 25.5228 8 20 8C14.4772 8 10 12.4772 10 18V27.2308C10 27.6556 10.3444 28 10.7692 28H20C25.5228 28 30 23.5228 30 18Z" fill="white"/>
|
|
4
|
+
<path d="M20 7C13.9249 7 9 11.9249 9 18V27.2305C9 28.2076 9.79241 29 10.7695 29H20C26.0751 29 31 24.0751 31 18C31 11.9249 26.0751 7 20 7Z" stroke="#0B57D0" stroke-width="2"/>
|
|
5
|
+
</g>
|
|
6
|
+
<defs>
|
|
7
|
+
<filter id="filter0_dd_6727_40653" x="0" y="0" width="40" height="40" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
8
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
9
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
10
|
+
<feMorphology radius="2" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_6727_40653"/>
|
|
11
|
+
<feOffset dy="2"/>
|
|
12
|
+
<feGaussianBlur stdDeviation="3"/>
|
|
13
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"/>
|
|
14
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6727_40653"/>
|
|
15
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
16
|
+
<feOffset dy="1"/>
|
|
17
|
+
<feGaussianBlur stdDeviation="1"/>
|
|
18
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"/>
|
|
19
|
+
<feBlend mode="normal" in2="effect1_dropShadow_6727_40653" result="effect2_dropShadow_6727_40653"/>
|
|
20
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_6727_40653" result="shape"/>
|
|
21
|
+
</filter>
|
|
22
|
+
</defs>
|
|
23
|
+
</svg>
|
package/front_end/Tests.js
CHANGED
|
@@ -254,6 +254,11 @@
|
|
|
254
254
|
*/
|
|
255
255
|
--combobox-dropdown-arrow: var(--image-file-arrow-drop-down-light);
|
|
256
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Comment mode cursor.
|
|
259
|
+
*/
|
|
260
|
+
--comment-cursor: var(--image-file-comment-mode-cursor) 10 28, auto;
|
|
261
|
+
|
|
257
262
|
&.theme-with-dark-background {
|
|
258
263
|
--color-primary-old: rgb(138 180 248);
|
|
259
264
|
--color-primary-variant: rgb(102 157 246);
|
|
@@ -274,9 +274,9 @@ export class ColorConverter {
|
|
|
274
274
|
const xyzInput = new Vector3([x, y, z]);
|
|
275
275
|
const lmsIntermediate = XYZ_TO_LMS_MATRIX.multiply(xyzInput);
|
|
276
276
|
|
|
277
|
-
lmsIntermediate.values[0] = Math.
|
|
278
|
-
lmsIntermediate.values[1] = Math.
|
|
279
|
-
lmsIntermediate.values[2] = Math.
|
|
277
|
+
lmsIntermediate.values[0] = Math.cbrt(lmsIntermediate.values[0]);
|
|
278
|
+
lmsIntermediate.values[1] = Math.cbrt(lmsIntermediate.values[1]);
|
|
279
|
+
lmsIntermediate.values[2] = Math.cbrt(lmsIntermediate.values[2]);
|
|
280
280
|
|
|
281
281
|
const labOutput = LMS_TO_OKLAB_MATRIX.multiply(lmsIntermediate);
|
|
282
282
|
return [labOutput.values[0], labOutput.values[1], labOutput.values[2]];
|
|
@@ -265,6 +265,31 @@ export class UserMetrics {
|
|
|
265
265
|
InspectorFrontendHostInstance.recordPerformanceHistogram('DevTools.Insights.ShortTeaserGenerationTime',
|
|
266
266
|
timeInMilliseconds);
|
|
267
267
|
}
|
|
268
|
+
|
|
269
|
+
changeRecorded(count: number): void {
|
|
270
|
+
InspectorFrontendHostInstance.recordCountHistogram('DevTools.Comments.ChangeRecorded', count, 1, 100, 50);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
changeSharedWithAgent(count: number): void {
|
|
274
|
+
InspectorFrontendHostInstance.recordCountHistogram('DevTools.Comments.ChangeSharedWithAgent', count, 1, 100, 50);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
commentCreated(count: number): void {
|
|
278
|
+
InspectorFrontendHostInstance.recordCountHistogram('DevTools.Comments.CommentCreated', count, 1, 100, 50);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
commentResolved(resolver: CommentResolver, count: number): void {
|
|
282
|
+
InspectorFrontendHostInstance.recordCountHistogram(`DevTools.Comments.CommentResolvedBy${resolver}`, count, 1, 100,
|
|
283
|
+
50);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
commentSharedWithAgent(count: number): void {
|
|
287
|
+
InspectorFrontendHostInstance.recordCountHistogram('DevTools.Comments.CommentSharedWithAgent', count, 1, 100, 50);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
commentSize(characters: number): void {
|
|
291
|
+
InspectorFrontendHostInstance.recordCountHistogram('DevTools.Comments.CommentSize', characters, 1, 100_000, 50);
|
|
292
|
+
}
|
|
268
293
|
}
|
|
269
294
|
|
|
270
295
|
/**
|
|
@@ -493,3 +518,5 @@ export function resendRequestType(resourceType: Common.ResourceType.ResourceType
|
|
|
493
518
|
const key = resendRequestTypeMap.get(resourceType);
|
|
494
519
|
return (key ? ResendRequestType[key] : undefined) ?? ResendRequestType.OTHER;
|
|
495
520
|
}
|
|
521
|
+
|
|
522
|
+
export type CommentResolver = 'Agent'|'User';
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
export class Size {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
constructor(width: number, height: number) {
|
|
9
|
+
this.width = width;
|
|
10
|
+
this.height = height;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
clipTo(size?: Size|null): Size {
|
|
14
|
+
if (!size) {
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
return new Size(Math.min(this.width, size.width), Math.min(this.height, size.height));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
scale(scale: number): Size {
|
|
21
|
+
return new Size(this.width * scale, this.height * scale);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
isEqual(size: Size|null): boolean {
|
|
25
|
+
return size !== null && this.width === size.width && this.height === size.height;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
widthToMax(size: number|Size): Size {
|
|
29
|
+
return new Size(Math.max(this.width, (typeof size === 'number' ? size : size.width)), this.height);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
addWidth(size: number|Size): Size {
|
|
33
|
+
return new Size(this.width + (typeof size === 'number' ? size : size.width), this.height);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
heightToMax(size: number|Size): Size {
|
|
37
|
+
return new Size(this.width, Math.max(this.height, (typeof size === 'number' ? size : size.height)));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
addHeight(size: number|Size): Size {
|
|
41
|
+
return new Size(this.width, this.height + (typeof size === 'number' ? size : size.height));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -19,6 +19,7 @@ import * as TypeScriptUtilities from './TypescriptUtilities.js';
|
|
|
19
19
|
import * as UIString from './UIString.js';
|
|
20
20
|
import * as UserVisibleError from './UserVisibleError.js';
|
|
21
21
|
|
|
22
|
+
export {Size} from './Size.js';
|
|
22
23
|
/* `assertNotNullOrUndefined` also need to be exposed, as TypeScript does
|
|
23
24
|
* not allow `asserts` functions to be used with qualified access (e.g.
|
|
24
25
|
* `Platform.TypeScriptUtilities.assertNotNullOrUndefined` causes a compile
|
|
@@ -25,21 +25,15 @@ interface CallbackWithDebugInfo {
|
|
|
25
25
|
|
|
26
26
|
type Callback = (error: MessageError|null, arg1: Object|null) => void;
|
|
27
27
|
|
|
28
|
-
const LongPollingMethods = new Set<string>(['CSS.takeComputedStyleUpdates']);
|
|
29
|
-
|
|
30
28
|
export class DevToolsCDPConnection implements CDPConnection {
|
|
31
29
|
readonly #transport: ConnectionTransport;
|
|
32
30
|
#lastMessageId = 1;
|
|
33
|
-
#pendingResponsesCount = 0;
|
|
34
|
-
readonly #pendingLongPollingMessageIds = new Set<number>();
|
|
35
|
-
#pendingScripts: Array<() => void> = [];
|
|
36
31
|
readonly #callbacks = new Map<number, CallbackWithDebugInfo>();
|
|
37
32
|
readonly #observers = new Set<CDPConnectionObserver>();
|
|
38
33
|
|
|
39
34
|
constructor(transport: ConnectionTransport) {
|
|
40
35
|
this.#transport = transport;
|
|
41
36
|
|
|
42
|
-
test.deprecatedRunAfterPendingDispatches = this.deprecatedRunAfterPendingDispatches.bind(this);
|
|
43
37
|
test.sendRawMessage = this.sendRawMessageForTesting.bind(this);
|
|
44
38
|
|
|
45
39
|
this.#transport.setOnMessage(this.onMessage.bind(this));
|
|
@@ -81,11 +75,6 @@ export class DevToolsCDPConnection implements CDPConnection {
|
|
|
81
75
|
test.onMessageSent({domain, method, params: (paramsObject as Object), id: messageId, sessionId});
|
|
82
76
|
}
|
|
83
77
|
|
|
84
|
-
++this.#pendingResponsesCount;
|
|
85
|
-
if (LongPollingMethods.has(method)) {
|
|
86
|
-
this.#pendingLongPollingMessageIds.add(messageId);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
78
|
return new Promise(resolve => {
|
|
90
79
|
this.#callbacks.set(messageId, {resolve, method, sessionId});
|
|
91
80
|
this.#transport.sendRawMessage(JSON.stringify(messageObject));
|
|
@@ -147,45 +136,10 @@ export class DevToolsCDPConnection implements CDPConnection {
|
|
|
147
136
|
}
|
|
148
137
|
|
|
149
138
|
callback.resolve(messageObject);
|
|
150
|
-
--this.#pendingResponsesCount;
|
|
151
|
-
this.#pendingLongPollingMessageIds.delete(messageObject.id);
|
|
152
|
-
|
|
153
|
-
if (this.#pendingScripts.length && !this.hasOutstandingNonLongPollingRequests()) {
|
|
154
|
-
this.deprecatedRunAfterPendingDispatches();
|
|
155
|
-
}
|
|
156
139
|
} else if ('method' in messageObject) {
|
|
157
140
|
this.#observers.forEach(observer => observer.onEvent(messageObject));
|
|
158
141
|
} else {
|
|
159
142
|
InspectorBackend.reportProtocolError('Protocol Error: the message without method', messageObject);
|
|
160
143
|
}
|
|
161
144
|
}
|
|
162
|
-
|
|
163
|
-
private hasOutstandingNonLongPollingRequests(): boolean {
|
|
164
|
-
return this.#pendingResponsesCount - this.#pendingLongPollingMessageIds.size > 0;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
private deprecatedRunAfterPendingDispatches(script?: (() => void)): void {
|
|
168
|
-
if (script) {
|
|
169
|
-
this.#pendingScripts.push(script);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// Execute all promises.
|
|
173
|
-
setTimeout(() => {
|
|
174
|
-
if (!this.hasOutstandingNonLongPollingRequests()) {
|
|
175
|
-
this.executeAfterPendingDispatches();
|
|
176
|
-
} else {
|
|
177
|
-
this.deprecatedRunAfterPendingDispatches();
|
|
178
|
-
}
|
|
179
|
-
}, 0);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
private executeAfterPendingDispatches(): void {
|
|
183
|
-
if (!this.hasOutstandingNonLongPollingRequests()) {
|
|
184
|
-
const scripts = this.#pendingScripts;
|
|
185
|
-
this.#pendingScripts = [];
|
|
186
|
-
for (let id = 0; id < scripts.length; ++id) {
|
|
187
|
-
scripts[id]();
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
145
|
}
|
|
@@ -153,12 +153,6 @@ export const test = {
|
|
|
153
153
|
*/
|
|
154
154
|
dumpProtocol: null as ((arg0: string) => void) | null,
|
|
155
155
|
|
|
156
|
-
/**
|
|
157
|
-
* Runs a function when no protocol activity is present.
|
|
158
|
-
* ProtocolClient.test.deprecatedRunAfterPendingDispatches(() => console.log('done'))
|
|
159
|
-
*/
|
|
160
|
-
deprecatedRunAfterPendingDispatches: null as ((arg0: () => void) => void) | null,
|
|
161
|
-
|
|
162
156
|
/**
|
|
163
157
|
* Sends a raw message over main connection.
|
|
164
158
|
* ProtocolClient.test.sendRawMessage('Page.enable', {}, console.log)
|
|
@@ -181,6 +175,12 @@ export const test = {
|
|
|
181
175
|
* Set to get notified about any messages received over protocol.
|
|
182
176
|
*/
|
|
183
177
|
onMessageReceived: null as ((message: Object) => void) | null,
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Runs a function when no protocol activity is present.
|
|
181
|
+
* ProtocolClient.test.deprecatedRunAfterPendingDispatches(() => console.log('done'))
|
|
182
|
+
*/
|
|
183
|
+
deprecatedRunAfterPendingDispatches: null as ((arg0: () => void) => void) | null,
|
|
184
184
|
};
|
|
185
185
|
|
|
186
186
|
export class SessionRouter implements CDPConnectionObserver {
|
|
@@ -352,7 +352,7 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
|
|
|
352
352
|
Promise<AccessibilityNode[]> {
|
|
353
353
|
const parent = this.#axIdToAXNode.get(nodeId);
|
|
354
354
|
if (!parent) {
|
|
355
|
-
|
|
355
|
+
return [];
|
|
356
356
|
}
|
|
357
357
|
if (!parent.hasUnloadedChildren()) {
|
|
358
358
|
return parent.children();
|
|
@@ -370,7 +370,7 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
|
|
|
370
370
|
this.#pendingChildRequests.delete(nodeId);
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
return
|
|
373
|
+
return this.#axIdToAXNode.get(nodeId)?.children() ?? [];
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
async requestAndLoadSubTreeToNode(node: DOMNode): Promise<AccessibilityNode[]|null> {
|
|
@@ -0,0 +1,32 @@
|
|
|
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 type * as Protocol from '../../generated/protocol.js';
|
|
6
|
+
import type * as Platform from '../platform/platform.js';
|
|
7
|
+
|
|
8
|
+
import type {CSSModel} from './CSSModel.js';
|
|
9
|
+
import type {CSSStyleSheetHeader} from './CSSStyleSheetHeader.js';
|
|
10
|
+
|
|
11
|
+
export class CSSLocation {
|
|
12
|
+
readonly #cssModel: CSSModel;
|
|
13
|
+
styleSheetId: Protocol.DOM.StyleSheetId;
|
|
14
|
+
url: Platform.DevToolsPath.UrlString;
|
|
15
|
+
lineNumber: number;
|
|
16
|
+
columnNumber: number;
|
|
17
|
+
constructor(header: CSSStyleSheetHeader, lineNumber: number, columnNumber?: number) {
|
|
18
|
+
this.#cssModel = header.cssModel();
|
|
19
|
+
this.styleSheetId = header.id;
|
|
20
|
+
this.url = header.resourceURL();
|
|
21
|
+
this.lineNumber = lineNumber;
|
|
22
|
+
this.columnNumber = columnNumber || 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
cssModel(): CSSModel {
|
|
26
|
+
return this.#cssModel;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
header(): CSSStyleSheetHeader|null {
|
|
30
|
+
return this.#cssModel.styleSheetHeaderForId(this.styleSheetId);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
localEvalCSS,
|
|
35
35
|
MathFunctionMatcher,
|
|
36
36
|
PositionAnchorMatcher,
|
|
37
|
+
PositionAreaMatcher,
|
|
37
38
|
PositionTryMatcher,
|
|
38
39
|
RelativeColorChannelMatcher,
|
|
39
40
|
ShadowMatcher,
|
|
@@ -1068,6 +1069,7 @@ export class CSSMatchedStyles {
|
|
|
1068
1069
|
new AnchorFunctionMatcher(),
|
|
1069
1070
|
new PositionAnchorMatcher(),
|
|
1070
1071
|
new FlexGridGridLanesMatcher(),
|
|
1072
|
+
new PositionAreaMatcher(),
|
|
1071
1073
|
new PositionTryMatcher(),
|
|
1072
1074
|
new LengthMatcher(),
|
|
1073
1075
|
new MathFunctionMatcher(),
|
|
@@ -11,6 +11,7 @@ import * as Root from '../root/root.js';
|
|
|
11
11
|
import * as TextUtils from '../text_utils/text_utils.js';
|
|
12
12
|
|
|
13
13
|
import {CSSFontFace} from './CSSFontFace.js';
|
|
14
|
+
import {CSSLocation} from './CSSLocation.js';
|
|
14
15
|
import {CSSMatchedStyles} from './CSSMatchedStyles.js';
|
|
15
16
|
import {CSSMedia} from './CSSMedia.js';
|
|
16
17
|
import {cssMetadata} from './CSSMetadata.js';
|
|
@@ -1052,28 +1053,7 @@ export class Edit {
|
|
|
1052
1053
|
}
|
|
1053
1054
|
}
|
|
1054
1055
|
|
|
1055
|
-
export
|
|
1056
|
-
readonly #cssModel: CSSModel;
|
|
1057
|
-
styleSheetId: Protocol.DOM.StyleSheetId;
|
|
1058
|
-
url: Platform.DevToolsPath.UrlString;
|
|
1059
|
-
lineNumber: number;
|
|
1060
|
-
columnNumber: number;
|
|
1061
|
-
constructor(header: CSSStyleSheetHeader, lineNumber: number, columnNumber?: number) {
|
|
1062
|
-
this.#cssModel = header.cssModel();
|
|
1063
|
-
this.styleSheetId = header.id;
|
|
1064
|
-
this.url = header.resourceURL();
|
|
1065
|
-
this.lineNumber = lineNumber;
|
|
1066
|
-
this.columnNumber = columnNumber || 0;
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
cssModel(): CSSModel {
|
|
1070
|
-
return this.#cssModel;
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
header(): CSSStyleSheetHeader|null {
|
|
1074
|
-
return this.#cssModel.styleSheetHeaderForId(this.styleSheetId);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1056
|
+
export {CSSLocation};
|
|
1077
1057
|
|
|
1078
1058
|
class CSSDispatcher implements ProtocolProxyApi.CSSDispatcher {
|
|
1079
1059
|
readonly #cssModel: CSSModel;
|
|
@@ -1508,3 +1508,32 @@ export class EnvFunctionMatcher extends EnvFunctionMatcherBase {
|
|
|
1508
1508
|
return new EnvFunctionMatch(matching.ast.text(node), node, varName, value ?? fallbackValue ?? null, Boolean(value));
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
+
|
|
1512
|
+
export class PositionAreaMatch implements Match {
|
|
1513
|
+
constructor(readonly text: string, readonly node: CodeMirror.SyntaxNode) {
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
const PositionAreaMatcherBase: MatcherClass<PositionAreaMatch> = matcherBase(PositionAreaMatch);
|
|
1518
|
+
// clang-format off
|
|
1519
|
+
export class PositionAreaMatcher extends PositionAreaMatcherBase {
|
|
1520
|
+
// clang-format on
|
|
1521
|
+
override accepts(propertyName: string): boolean {
|
|
1522
|
+
return propertyName === 'position-area' || propertyName === 'inset-area';
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): PositionAreaMatch|null {
|
|
1526
|
+
if (node.name !== 'Declaration') {
|
|
1527
|
+
return null;
|
|
1528
|
+
}
|
|
1529
|
+
const valueNodes = ASTUtils.siblings(ASTUtils.declValue(node));
|
|
1530
|
+
if (valueNodes.length === 0) {
|
|
1531
|
+
return null;
|
|
1532
|
+
}
|
|
1533
|
+
const valueText = matching.getComputedTextRange(valueNodes[0], valueNodes[valueNodes.length - 1]);
|
|
1534
|
+
if (CSSMetadata.isCSSWideKeyword(valueText)) {
|
|
1535
|
+
return null;
|
|
1536
|
+
}
|
|
1537
|
+
return new PositionAreaMatch(valueText, node);
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import type * as Protocol from '../../generated/protocol.js';
|
|
6
6
|
import type * as TextUtils from '../text_utils/text_utils.js';
|
|
7
7
|
|
|
8
|
-
import {CSSLocation
|
|
8
|
+
import {CSSLocation} from './CSSLocation.js';
|
|
9
|
+
import type {CSSModel, Edit} from './CSSModel.js';
|
|
9
10
|
import type {CSSStyleSheetHeader} from './CSSStyleSheetHeader.js';
|
|
10
11
|
|
|
11
12
|
type CSSQueryPayload =
|
|
@@ -231,6 +231,35 @@ export class CSSStyleRule extends CSSRule {
|
|
|
231
231
|
|
|
232
232
|
super.rebase(edit);
|
|
233
233
|
}
|
|
234
|
+
|
|
235
|
+
constructResolvedSelector(nestingIndex?: number): string|undefined {
|
|
236
|
+
const nestingSelectors = this.nestingSelectors;
|
|
237
|
+
if (!nestingSelectors) {
|
|
238
|
+
return nestingIndex === undefined ? this.selectorText() : undefined;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (nestingIndex !== undefined && (nestingIndex < 0 || nestingIndex >= nestingSelectors.length)) {
|
|
242
|
+
return undefined;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const selectorText = nestingIndex !== undefined ? nestingSelectors[nestingIndex] : this.selectorText();
|
|
246
|
+
|
|
247
|
+
const parentIndex = nestingIndex !== undefined ? nestingIndex + 1 : 0;
|
|
248
|
+
const parentSelector = this.constructResolvedSelector(parentIndex);
|
|
249
|
+
|
|
250
|
+
if (!parentSelector) {
|
|
251
|
+
return selectorText;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Strip pseudo-elements (e.g. ::before) because pseudo-elements are invalid inside CSS :is(...).
|
|
255
|
+
const sanitizedParent = parentSelector.replace(/::[a-zA-Z-]+/g, '').trim();
|
|
256
|
+
|
|
257
|
+
if (selectorText.includes('&')) {
|
|
258
|
+
return selectorText.replaceAll('&', `:is(${sanitizedParent})`);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return `:is(${sanitizedParent}) ${selectorText.trim()}`;
|
|
262
|
+
}
|
|
234
263
|
}
|
|
235
264
|
|
|
236
265
|
export class CSSPropertyRule extends CSSRule {
|
|
@@ -1076,17 +1076,19 @@ export class DOMNode extends Common.ObjectWrapper.ObjectWrapper<DOMNodeEventType
|
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
-
duplicate():
|
|
1079
|
+
async duplicate(): Promise<{error: string | null, node: DOMNode|null}> {
|
|
1080
1080
|
if (this.isInShadowTree()) {
|
|
1081
|
-
return;
|
|
1081
|
+
return {error: 'Cannot duplicate node in shadow tree', node: null};
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
1084
|
const parentNode = this.parentNode ? this.parentNode : this;
|
|
1085
1085
|
if (parentNode.nodeName() === '#document') {
|
|
1086
|
-
return;
|
|
1086
|
+
return {error: 'Parent node is document', node: null};
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
|
-
|
|
1089
|
+
return await new Promise(resolve => {
|
|
1090
|
+
this.copyTo(parentNode, this.nextSibling, (error, node) => resolve({error, node}));
|
|
1091
|
+
});
|
|
1090
1092
|
}
|
|
1091
1093
|
|
|
1092
1094
|
/**
|
|
@@ -2564,7 +2566,8 @@ export class DOMNodeSnapshot extends DOMNode {
|
|
|
2564
2566
|
_callback?: ((arg0: string|null, arg1: DOMNode|null) => void)|undefined): void {
|
|
2565
2567
|
}
|
|
2566
2568
|
|
|
2567
|
-
override duplicate():
|
|
2569
|
+
override duplicate(): Promise<{error: string | null, node: DOMNode|null}> {
|
|
2570
|
+
return Promise.resolve({error: null, node: null});
|
|
2568
2571
|
}
|
|
2569
2572
|
|
|
2570
2573
|
override canInspectNode(): boolean {
|
|
@@ -2616,7 +2619,8 @@ export class DOMDocumentSnapshot extends DOMDocument {
|
|
|
2616
2619
|
_callback?: ((arg0: string|null, arg1: DOMNode|null) => void)|undefined): void {
|
|
2617
2620
|
}
|
|
2618
2621
|
|
|
2619
|
-
override duplicate():
|
|
2622
|
+
override duplicate(): Promise<{error: string | null, node: DOMNode|null}> {
|
|
2623
|
+
return Promise.resolve({error: null, node: null});
|
|
2620
2624
|
}
|
|
2621
2625
|
|
|
2622
2626
|
override canInspectNode(): boolean {
|
|
@@ -1473,8 +1473,12 @@ export class Scope implements ScopeChainEntry {
|
|
|
1473
1473
|
return undefined;
|
|
1474
1474
|
}
|
|
1475
1475
|
|
|
1476
|
+
empty(): boolean {
|
|
1477
|
+
return Boolean(this.#payload.empty);
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1476
1480
|
extraProperties(): RemoteObjectProperty[] {
|
|
1477
|
-
if (this
|
|
1481
|
+
if (this !== this.#callFrame.localScope() || this.#callFrame.script.isWasm()) {
|
|
1478
1482
|
return [];
|
|
1479
1483
|
}
|
|
1480
1484
|
|
|
@@ -1014,6 +1014,8 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
requestToManagerMap.set(networkRequest, this.#manager);
|
|
1016
1016
|
}
|
|
1017
|
+
networkRequest.setCacheDisabled(
|
|
1018
|
+
this.#manager.target().targetManager().settings.resolve(cacheDisabledSettingDescriptor).get());
|
|
1017
1019
|
networkRequest.hasNetworkData = true;
|
|
1018
1020
|
this.updateNetworkRequestWithRequest(networkRequest, request);
|
|
1019
1021
|
networkRequest.setIssueTime(timestamp, wallTime);
|