chrome-devtools-frontend 1.0.1690116 → 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/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/root/Runtime.ts +1 -0
- 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 +63 -4
- package/front_end/core/sdk/NetworkRequestAccess.ts +191 -0
- package/front_end/core/sdk/ResourceTreeModel.ts +72 -23
- package/front_end/core/sdk/SecurityOrigin.ts +97 -12
- package/front_end/core/sdk/Target.ts +18 -0
- package/front_end/core/sdk/sdk.ts +4 -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 +14 -4
- package/front_end/generated/protocol.ts +24 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +46 -10
- package/front_end/models/ai_assistance/AiConversation.ts +35 -24
- 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/ai_assistance/components/chatMessage.css +3 -1
- 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/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +2 -1
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/indexedDBViews.css +0 -14
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionView.ts +2 -1
- package/front_end/panels/console/ConsoleContextSelector.ts +12 -5
- package/front_end/panels/console/ConsolePinPane.ts +4 -2
- package/front_end/panels/console/ConsoleSidebar.ts +6 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +12 -8
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -4
- package/front_end/panels/coverage/coverageView.css +8 -8
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +13 -14
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/developer_resources/developerResourcesView.css +3 -3
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +43 -15
- package/front_end/panels/elements/ElementsTreeOutline.ts +185 -109
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
- package/front_end/panels/elements/ShortcutTreeElement.ts +6 -1
- package/front_end/panels/elements/StandaloneStylesContainer.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +2 -35
- package/front_end/panels/elements/StylesSidebarPane.ts +3 -2
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +5 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +161 -148
- 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/emulation/MediaQueryInspector.ts +2 -1
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/issues/AffectedElementsView.ts +3 -0
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
- 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/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
- package/front_end/panels/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/NetworkDataGridNode.ts +11 -9
- package/front_end/panels/network/NetworkLogView.ts +4 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +5 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +47 -11
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
- package/front_end/panels/network/components/RequestHeadersView.css +12 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- 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/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
- package/front_end/panels/sources/ProfilePlugin.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/timeline/IsolateSelector.ts +1 -1
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/NetworkTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -32
- package/front_end/panels/timeline/TimelineHistoryManager.ts +1 -1
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
- package/front_end/panels/timeline/TimelinePanel.ts +3 -20
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
- package/front_end/panels/timeline/components/Sidebar.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
- package/front_end/panels/timeline/components/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/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
- package/front_end/panels/web_audio/WebAudioView.ts +3 -3
- package/front_end/panels/web_audio/webAudio.css +5 -5
- package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
- package/front_end/third_party/acorn/acorn.ts +3 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
- package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
- package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
- package/front_end/third_party/csp_evaluator/package/tsconfig.json +1 -0
- package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
- package/front_end/third_party/diff/DiffWrapper.ts +1 -8
- package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
- package/front_end/third_party/json5/json5.ts +2 -2
- package/front_end/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 +3 -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/buttons/floatingButton.css +25 -0
- package/front_end/ui/components/markdown_view/MarkdownView.ts +31 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +45 -25
- 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/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/DropTarget.ts +6 -1
- package/front_end/ui/legacy/EmptyWidget.ts +1 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
- package/front_end/ui/legacy/SplitWidget.ts +18 -3
- package/front_end/ui/legacy/StackedPane.ts +1 -1
- package/front_end/ui/legacy/StatusBar.ts +78 -0
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +5 -1
- package/front_end/ui/legacy/Treeoutline.ts +91 -48
- package/front_end/ui/legacy/UIUtils.ts +8 -4
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/ViewRegistration.ts +1 -0
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +7 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +23 -23
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +48 -44
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.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 +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 +224 -127
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +10 -7
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +25 -106
- 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/perf_ui/pieChart.css +7 -5
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +8 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
- package/front_end/ui/legacy/inspectorCommon.css +41 -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/Debugging.ts +2 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -1
- package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
- package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/visual_logging.ts +67 -56
- package/inspector_overlay/main.ts +8 -8
- package/mcp/mcp.ts +5 -0
- package/package.json +2 -8
- 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/acorn/acorn-tsconfig.json +0 -12
- package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
- package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/front_end/third_party/json5/json5-tsconfig.json +0 -8
- package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
- package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
- package/front_end/third_party/lit/lit-tsconfig.json +0 -15
- package/front_end/third_party/marked/marked-tsconfig.json +0 -8
- package/front_end/third_party/puppeteer-replay/puppeteer-replay-tsconfig.json +0 -8
- package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +0 -606
- package/inspector_overlay/loadCSS.rollup.js +0 -29
|
@@ -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/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';
|
|
@@ -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 {
|
|
@@ -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
|
+
}
|
|
@@ -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;
|
|
@@ -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 {
|
|
@@ -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);
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
Events as NetworkManagerEvents,
|
|
17
17
|
NetworkManager,
|
|
18
18
|
} from './NetworkManager.js';
|
|
19
|
+
import {SecurityOrigin} from './SecurityOrigin.js';
|
|
19
20
|
import {ServerSentEvents} from './ServerSentEvents.js';
|
|
20
21
|
import {ServerTiming} from './ServerTiming.js';
|
|
21
22
|
import {Type} from './Target.js';
|
|
@@ -177,6 +178,7 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
177
178
|
#endTime = -1;
|
|
178
179
|
#blockedReason: Protocol.Network.BlockedReason|undefined = undefined;
|
|
179
180
|
#renderBlockingBehavior?: Protocol.Network.RenderBlockingBehavior;
|
|
181
|
+
#initiatorSecurityOrigin?: SecurityOrigin;
|
|
180
182
|
#corsErrorStatus: Protocol.Network.CorsErrorStatus|undefined = undefined;
|
|
181
183
|
statusCode = 0;
|
|
182
184
|
statusText = '';
|
|
@@ -247,6 +249,7 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
247
249
|
#fromMemoryCache?: boolean;
|
|
248
250
|
#fromDiskCache?: boolean;
|
|
249
251
|
#fromPrefetchCache?: boolean;
|
|
252
|
+
#cacheDisabled = false;
|
|
250
253
|
#fromEarlyHints?: boolean;
|
|
251
254
|
#fetchedViaServiceWorker?: boolean;
|
|
252
255
|
#serviceWorkerRouterInfo?: Protocol.Network.ServiceWorkerRouterInfo;
|
|
@@ -388,6 +391,58 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
388
391
|
return this.#backendRequestId;
|
|
389
392
|
}
|
|
390
393
|
|
|
394
|
+
/**
|
|
395
|
+
* Returns the security origin of the target resource URL (`request.url()`) for this network request.
|
|
396
|
+
*
|
|
397
|
+
* For example, if an inspected document at `https://example.com/index.html` initiates a fetch
|
|
398
|
+
* to `https://api.github.com/users`, `requestURLSecurityOrigin()` returns the origin for
|
|
399
|
+
* `https://api.github.com`.
|
|
400
|
+
*
|
|
401
|
+
* For imported HAR files, the origin is mapped to an isolated virtual domain
|
|
402
|
+
* (`imported-har://${authority}`) to ensure recorded network traffic never collides with
|
|
403
|
+
* live web origins.
|
|
404
|
+
*
|
|
405
|
+
* @see {@link initiatorSecurityOrigin} to obtain the origin of the document that initiated the request.
|
|
406
|
+
*/
|
|
407
|
+
requestURLSecurityOrigin(): SecurityOrigin {
|
|
408
|
+
return this.#resolveSecurityOrigin(this.#url);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Returns the security origin of the document or context (`request.documentURL`) that initiated
|
|
413
|
+
* this network request.
|
|
414
|
+
*
|
|
415
|
+
* For example, if an inspected document at `https://example.com/index.html` initiates a fetch
|
|
416
|
+
* to `https://api.github.com/users`, `initiatorSecurityOrigin()` returns the origin for
|
|
417
|
+
* `https://example.com`.
|
|
418
|
+
*
|
|
419
|
+
* If `documentURL` is empty, invalid, or an opaque context (such as a `data:` URL or sandboxed
|
|
420
|
+
* iframe), this returns a unique opaque `SecurityOrigin`.
|
|
421
|
+
*
|
|
422
|
+
* For imported HAR files, the origin is mapped to an isolated virtual domain
|
|
423
|
+
* (`imported-har://${authority}`) matching the imported initiating document.
|
|
424
|
+
*
|
|
425
|
+
* @see {@link requestURLSecurityOrigin} to obtain the origin of the target resource URL being requested.
|
|
426
|
+
*/
|
|
427
|
+
initiatorSecurityOrigin(): SecurityOrigin {
|
|
428
|
+
if (!this.#initiatorSecurityOrigin) {
|
|
429
|
+
this.#initiatorSecurityOrigin = this.#resolveSecurityOrigin(this.#documentURL);
|
|
430
|
+
}
|
|
431
|
+
return this.#initiatorSecurityOrigin;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
#resolveSecurityOrigin(url: Platform.DevToolsPath.UrlString): SecurityOrigin {
|
|
435
|
+
if (this.#isImportedHar) {
|
|
436
|
+
const parsed = Common.ParsedURL.ParsedURL.fromString(url);
|
|
437
|
+
if (!parsed || !parsed.host) {
|
|
438
|
+
return SecurityOrigin.createUniqueOpaque();
|
|
439
|
+
}
|
|
440
|
+
const authority = parsed.host + (parsed.port ? ':' + parsed.port : '');
|
|
441
|
+
return SecurityOrigin.create(`imported-har://${authority}`);
|
|
442
|
+
}
|
|
443
|
+
return SecurityOrigin.create(url);
|
|
444
|
+
}
|
|
445
|
+
|
|
391
446
|
url(): Platform.DevToolsPath.UrlString {
|
|
392
447
|
return this.#url;
|
|
393
448
|
}
|
|
@@ -486,10 +541,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
486
541
|
return this.#securityDetails;
|
|
487
542
|
}
|
|
488
543
|
|
|
489
|
-
securityOrigin(): string {
|
|
490
|
-
return this.#parsedURL.securityOrigin();
|
|
491
|
-
}
|
|
492
|
-
|
|
493
544
|
setSecurityDetails(securityDetails: Protocol.Network.SecurityDetails): void {
|
|
494
545
|
this.#securityDetails = securityDetails;
|
|
495
546
|
}
|
|
@@ -681,6 +732,14 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
681
732
|
this.#fromPrefetchCache = true;
|
|
682
733
|
}
|
|
683
734
|
|
|
735
|
+
cacheDisabled(): boolean {
|
|
736
|
+
return this.#cacheDisabled;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
setCacheDisabled(cacheDisabled: boolean): void {
|
|
740
|
+
this.#cacheDisabled = cacheDisabled;
|
|
741
|
+
}
|
|
742
|
+
|
|
684
743
|
fromEarlyHints(): boolean {
|
|
685
744
|
return Boolean(this.#fromEarlyHints);
|
|
686
745
|
}
|