chrome-devtools-frontend 1.0.1738725 → 1.0.1742811
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/rules/ui-and-widgets/ui-accessibility-and-semantic-html.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +44 -7
- package/.agents/rules/ui-and-widgets/ui-lit-declarative-templates-and-directives.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-view-output-and-callback-contracts.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-widget-dom-and-listener-lifecycle.md +1 -1
- package/.agents/skills/code-review/SKILL.md +23 -6
- package/.agents/skills/devtools-verification/SKILL.md +2 -1
- package/.agents/skills/migrate-chromium-test/SKILL.md +1 -0
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +27 -11
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +41 -23
- package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +12 -7
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +3 -0
- package/.agents/skills/ui-widgets/SKILL.md +22 -7
- package/.agents/skills/version-control/SKILL.md +10 -1
- package/.agents/skills/visual-regression-audit/SKILL.md +88 -0
- package/.gitallowed +2 -1
- package/.stylelintignore +1 -0
- package/.stylelintrc.json +5 -1
- package/AUTHORS +1 -0
- package/DIR_METADATA +2 -1
- package/PRESUBMIT_test.py +143 -0
- package/config/owner/INFRA_OWNERS +0 -1
- package/docs/contributing/infrastructure.md +2 -2
- package/docs/ui_engineering.md +14 -4
- package/eslint.config.mjs +119 -9
- package/front_end/application_tokens.css +0 -65
- package/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/AidaClientTypes.ts +2 -0
- package/front_end/core/host/AidaErrors.ts +3 -3
- package/front_end/core/host/AidaGcaTranslation.ts +39 -0
- package/front_end/core/host/GcaClient.ts +32 -20
- package/front_end/core/host/GcaTypes.ts +4 -2
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/i18n/DevToolsLocale.ts +0 -1
- package/front_end/core/sdk/DebuggerModel.ts +25 -13
- package/front_end/core/sdk/PreloadingModel.ts +2 -2
- package/front_end/core/sdk/RehydratingConnection.ts +59 -30
- package/front_end/core/sdk/SourceMap.ts +30 -3
- package/front_end/core/sdk/SourceMapRangeMappings.ts +57 -0
- package/front_end/core/sdk/StorageKeyManager.ts +0 -1
- package/front_end/core/sdk/Target.ts +6 -0
- package/front_end/core/sdk/TargetManager.ts +10 -4
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +5 -9
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +12 -2
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +159 -52
- package/front_end/entrypoints/inspector_main/outermostTargetSelector.css +77 -25
- package/front_end/entrypoints/main/MainImpl.ts +32 -15
- package/front_end/models/ai_assistance/AiAgent2.ts +95 -46
- package/front_end/models/ai_assistance/AiConversation.ts +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -2
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +3 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +5 -4
- package/front_end/models/ai_assistance/performance/AICallTree.ts +7 -9
- package/front_end/models/ai_assistance/performance/AIQueries.ts +4 -8
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +11 -1
- package/front_end/models/ai_assistance/skills/lighthouse.md +1 -0
- package/front_end/models/ai_assistance/skills/network.md +3 -4
- package/front_end/models/ai_assistance/skills/sources.md +1 -2
- package/front_end/models/ai_assistance/skills/styling.md +3 -4
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +11 -3
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +84 -23
- package/front_end/models/ai_assistance/tools/ListSources.ts +41 -13
- package/front_end/models/badges/Badge.ts +0 -1
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/bindings/ResourceScriptMapping.ts +1 -1
- package/front_end/models/breakpoints/BreakpointManager.ts +2 -4
- package/front_end/models/breakpoints/RecurringPauseDetector.ts +140 -0
- package/front_end/models/breakpoints/breakpoints.ts +2 -1
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +2 -2
- package/front_end/models/persistence/Automapping.ts +0 -1
- package/front_end/models/trace/Processor.ts +16 -7
- package/front_end/models/trace/README.md +17 -1
- package/front_end/models/trace/extras/ThirdParties.ts +4 -6
- package/front_end/models/trace/extras/TraceFilter.ts +16 -8
- package/front_end/models/trace/extras/TraceTree.ts +159 -125
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -5
- package/front_end/models/trace/handlers/MetaHandler.ts +3 -0
- package/front_end/models/trace/handlers/RendererHandler.ts +7 -6
- package/front_end/models/trace/handlers/SamplesHandler.ts +1 -1
- package/front_end/models/trace/handlers/types.ts +15 -0
- package/front_end/models/trace/helpers/Extensions.ts +1 -3
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +155 -87
- package/front_end/models/trace/helpers/Trace.ts +19 -14
- package/front_end/models/trace/helpers/TreeHelpers.ts +38 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +3 -3
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +19 -4
- package/front_end/models/trace/lantern/simulation/Simulator.ts +4 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +19 -9
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +30 -3
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +2 -4
- package/front_end/panels/ai_assistance/components/chatMessage.css +1 -22
- package/front_end/panels/ai_assistance/components/chatView.css +0 -180
- package/front_end/panels/ai_assistance/components/exploreWidget.css +1 -19
- package/front_end/panels/ai_assistance/components/optInChangeDialog.css +1 -1
- package/front_end/panels/ai_assistance/components/walkthroughView.css +0 -13
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +3 -2
- package/front_end/panels/animation/AnimationTimeline.ts +5 -3
- package/front_end/panels/animation/animationTimeline.css +10 -8
- package/front_end/panels/application/ApplicationPanelSidebar.ts +14 -11
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +66 -3
- package/front_end/panels/application/ReportingApiView.ts +0 -1
- package/front_end/panels/application/SubAppsView.ts +0 -1
- package/front_end/panels/application/WebMCPTreeElement.ts +3 -6
- package/front_end/panels/application/WebMCPView.ts +30 -0
- package/front_end/panels/application/components/ReportsGrid.ts +0 -1
- package/front_end/panels/application/components/backForwardCacheView.css +1 -8
- package/front_end/panels/application/components/permissionsPolicySection.css +2 -2
- package/front_end/panels/application/components/protocolHandlersView.css +46 -39
- package/front_end/panels/application/components/trustTokensView.css +0 -4
- package/front_end/panels/application/cookieItemsView.css +0 -7
- package/front_end/panels/application/indexedDBViews.css +0 -6
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +0 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +0 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -5
- package/front_end/panels/application/preloading/components/preloadingGrid.css +0 -9
- package/front_end/panels/application/resourcesPanel.css +0 -48
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +2 -9
- package/front_end/panels/application/serviceWorkersView.css +5 -4
- package/front_end/panels/application/storageView.css +0 -5
- package/front_end/panels/application/webMCPView.css +17 -0
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +15 -20
- package/front_end/panels/changes/changesView.css +0 -5
- package/front_end/panels/common/ExtensionServer.ts +80 -10
- package/front_end/panels/console/ConsolePanel.ts +92 -18
- package/front_end/panels/console/consoleContextSelector.css +1 -8
- package/front_end/panels/console/consoleInsightTeaser.css +10 -17
- package/front_end/panels/console/consolePinPane.css +3 -1
- package/front_end/panels/console/consoleView.css +14 -18
- package/front_end/panels/coverage/coverageListView.css +0 -4
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +0 -22
- package/front_end/panels/css_overview/cssOverviewStartView.css +0 -43
- package/front_end/panels/developer_resources/developerResourcesListView.css +0 -4
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +52 -45
- package/front_end/panels/elements/LayoutPane.ts +1 -3
- package/front_end/panels/elements/PropertiesWidget.ts +26 -8
- package/front_end/panels/elements/PropertyRenderer.ts +45 -21
- package/front_end/panels/elements/StandaloneStylesContainer.ts +6 -7
- package/front_end/panels/elements/StyleEditorWidget.ts +110 -63
- package/front_end/panels/elements/StylePropertiesSection.ts +18 -14
- package/front_end/panels/elements/StylePropertyTreeElement.ts +556 -527
- package/front_end/panels/elements/StylesContainer.ts +5 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -15
- package/front_end/panels/elements/classesPaneWidget.css +3 -7
- package/front_end/panels/elements/components/CSSQuery.ts +6 -5
- package/front_end/panels/elements/components/CSSVariableValueView.ts +17 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +178 -140
- package/front_end/panels/elements/components/cssQuery.css +1 -1
- package/front_end/panels/elements/components/stylePropertyEditor.css +60 -56
- package/front_end/panels/elements/layoutPane.css +2 -2
- package/front_end/panels/elements/metricsSidebarPane.css +7 -8
- package/front_end/panels/elements/platformFontsWidget.css +1 -1
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +1 -12
- package/front_end/panels/elements/stylesSidebarPane.css +3 -5
- package/front_end/panels/emulation/deviceModeView.css +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +9 -2
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/explain/components/consoleInsight.css +1 -7
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +88 -46
- package/front_end/panels/issues/AffectedHeavyAdView.ts +72 -43
- package/front_end/panels/issues/AffectedResourcesView.ts +81 -13
- package/front_end/panels/issues/GenericIssueDetailsView.ts +112 -32
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/issues/issuesTree.css +13 -43
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +1 -1
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/layer_viewer/paintProfiler.css +4 -3
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +1 -6
- package/front_end/panels/lighthouse/lighthousePanel.css +0 -9
- package/front_end/panels/lighthouse/lighthouseStartView.css +5 -16
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +0 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +1 -1
- package/front_end/panels/media/playerListView.css +1 -2
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +4 -4
- package/front_end/panels/network/NetworkLogView.ts +603 -582
- package/front_end/panels/network/RequestCookiesView.ts +0 -1
- package/front_end/panels/network/RequestTimingView.ts +16 -2
- package/front_end/panels/network/networkConfigView.css +3 -4
- package/front_end/panels/network/networkLogView.css +363 -377
- package/front_end/panels/network/networkPanel.css +1 -7
- package/front_end/panels/network/networkTimingTable.css +12 -27
- package/front_end/panels/network/networkWaterfallColumn.css +1 -1
- package/front_end/panels/network/requestConditionsDrawer.css +0 -4
- package/front_end/panels/network/requestCookiesView.css +7 -1
- package/front_end/panels/network/requestPayloadTree.css +0 -4
- package/front_end/panels/profiler/HeapProfileView.ts +1 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +0 -7
- package/front_end/panels/profiler/profilesPanel.css +0 -11
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecorderPanel.ts +1 -1
- package/front_end/panels/recorder/RecordingView.ts +32 -11
- package/front_end/panels/recorder/StepView.ts +31 -5
- package/front_end/panels/recorder/TimelineSection.ts +22 -6
- package/front_end/panels/recorder/controlButton.css +2 -9
- package/front_end/panels/recorder/createRecordingView.css +1 -1
- package/front_end/panels/recorder/recorderPanel.css +0 -9
- package/front_end/panels/recorder/recordingListView.css +4 -4
- package/front_end/panels/recorder/recordingView.css +44 -52
- package/front_end/panels/recorder/replaySection.css +2 -0
- package/front_end/panels/recorder/stepEditor.css +4 -4
- package/front_end/panels/recorder/stepView.css +47 -21
- package/front_end/panels/recorder/timelineSection.css +63 -83
- package/front_end/panels/screencast/ScreencastApp.ts +0 -1
- package/front_end/panels/search/searchView.css +1 -1
- package/front_end/panels/security/mainView.css +1 -1
- package/front_end/panels/security/originView.css +2 -2
- package/front_end/panels/sensors/SensorsView.ts +273 -361
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +0 -1
- package/front_end/panels/settings/backendLinkingSettingsTab.css +7 -7
- package/front_end/panels/settings/components/syncSection.css +0 -1
- package/front_end/panels/settings/workspaceSettingsTab.css +0 -5
- package/front_end/panels/sources/CSSPlugin.ts +177 -98
- package/front_end/panels/sources/DebuggerPausedMessage.ts +100 -27
- package/front_end/panels/sources/NavigatorView.ts +926 -946
- package/front_end/panels/sources/SourcesPanel.ts +9 -2
- package/front_end/panels/sources/breakpointsView.css +6 -28
- package/front_end/panels/sources/components/HeadersView.css +2 -2
- package/front_end/panels/sources/debuggerPausedMessage.css +7 -0
- package/front_end/panels/sources/navigatorTree.css +7 -2
- package/front_end/panels/sources/sourcesNavigator.css +0 -9
- package/front_end/panels/sources/sourcesView.css +2 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +0 -10
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +3 -0
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +18 -5
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +0 -10
- package/front_end/panels/timeline/ModificationsManager.ts +0 -1
- package/front_end/panels/timeline/ThreadAppender.ts +2 -6
- package/front_end/panels/timeline/TimelineController.ts +30 -26
- package/front_end/panels/timeline/TimelineDetailsView.ts +10 -9
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +4 -16
- package/front_end/panels/timeline/TimelineMiniMap.ts +132 -54
- package/front_end/panels/timeline/TimelinePanel.ts +2 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +63 -50
- package/front_end/panels/timeline/TimelineUIUtils.ts +8 -10
- package/front_end/panels/timeline/components/DetailsView.ts +7 -14
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +0 -2
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +5 -1
- package/front_end/panels/timeline/components/fieldSettingsDialog.css +1 -6
- package/front_end/panels/timeline/components/insights/baseInsightComponent.css +0 -12
- package/front_end/panels/timeline/components/interactionBreakdown.css +1 -1
- package/front_end/panels/timeline/components/layoutShiftDetails.css +2 -9
- package/front_end/panels/timeline/components/liveMetricsView.css +0 -16
- package/front_end/panels/timeline/components/metricCard.css +1 -5
- package/front_end/panels/timeline/components/networkRequestDetails.css +3 -3
- package/front_end/panels/timeline/components/networkRequestTooltip.css +6 -4
- package/front_end/panels/timeline/components/networkTrackWidget.css +1 -1
- package/front_end/panels/timeline/components/sidebarAnnotationsTab.css +1 -1
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -1
- package/front_end/panels/timeline/docs/profile_calls.md +7 -9
- package/front_end/panels/timeline/timelineDetailsView.css +1 -12
- package/front_end/panels/timeline/timelineFlamechartPopover.css +0 -4
- package/front_end/panels/timeline/timelineMiniMap.css +1 -4
- package/front_end/panels/timeline/timelinePanel.css +0 -4
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/panels/timeline/timelineTreeView.css +0 -12
- package/front_end/panels/timeline/utils/EntryNodes.ts +1 -1
- package/front_end/panels/webauthn/webauthnPane.css +2 -8
- package/front_end/panels/whats_new/ReleaseNoteText.ts +1 -1
- package/front_end/third_party/axe-core/README.chromium +2 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +328 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +907 -588
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +119 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts +120 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +23 -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 +21 -14
- 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/locators/locators.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +158 -67
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js +28 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js +19 -11
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +17 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js +62 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts +29 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js +60 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +9 -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 +24 -9
- 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/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js +16 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js +37 -20
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +2 -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 +10 -5
- 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/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js +18 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js +24 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js +6 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js +30 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js +12 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +40 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts +23 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js +37 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +74 -16
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +3 -2
- 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 +34 -23
- 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/ResponseBodyStream.d.ts +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js +94 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js +29 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
- 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/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js +6 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +34 -15
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +3 -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 +11 -7
- 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/ChromeLauncher.js +10 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.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/decorators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +328 -11
- package/front_end/third_party/puppeteer/package/package.json +10 -8
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +118 -0
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +119 -0
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +25 -2
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +28 -0
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +65 -38
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +27 -7
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +43 -7
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +38 -8
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +27 -12
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +19 -6
- package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +72 -5
- package/front_end/third_party/puppeteer/package/src/bidi/NetworkEvents.ts +82 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +37 -13
- package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +26 -14
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +43 -22
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -5
- package/front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts +21 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Request.ts +27 -5
- package/front_end/third_party/puppeteer/package/src/cdp/Binding.ts +6 -4
- package/front_end/third_party/puppeteer/package/src/cdp/ExtensionTransport.ts +31 -6
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +18 -1
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +48 -0
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkEventManager.ts +58 -5
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +94 -14
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +50 -28
- package/front_end/third_party/puppeteer/package/src/cdp/ResponseBodyStream.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +38 -3
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +6 -5
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +17 -8
- package/front_end/third_party/puppeteer/package/src/common/util.ts +32 -15
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +21 -13
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +10 -10
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/decorators.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -0
- package/front_end/ui/components/adorners/adorner.css +1 -1
- package/front_end/ui/components/buttons/button.css +0 -28
- package/front_end/ui/components/buttons/textButton.css +1 -45
- package/front_end/ui/components/diff_view/diffView.css +0 -2
- package/front_end/ui/components/input/checkbox.css +3 -3
- package/front_end/ui/components/issue_counter/issueLinkIcon.css +2 -2
- package/front_end/ui/components/menus/Menu.ts +14 -0
- package/front_end/ui/components/menus/menu.css +2 -14
- package/front_end/ui/components/menus/menuItem.css +0 -4
- package/front_end/ui/components/request_link_icon/requestLinkIcon.css +2 -2
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/survey_link/surveyLink.css +3 -3
- package/front_end/ui/components/switch/switch.css +3 -2
- package/front_end/ui/components/text_editor/theme.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +29 -0
- package/front_end/ui/components/tree_outline/treeOutline.css +1 -24
- package/front_end/ui/legacy/ContextMenu.ts +5 -5
- package/front_end/ui/legacy/SoftContextMenu.ts +24 -8
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +31 -78
- package/front_end/ui/legacy/UIUtils.ts +9 -17
- package/front_end/ui/legacy/checkboxTextLabel.css +2 -44
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +39 -27
- package/front_end/ui/legacy/components/color_picker/spectrum.css +2 -10
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +2 -6
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +34 -26
- package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/swatchPopover.css +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +83 -21
- package/front_end/ui/legacy/components/object_ui/objectPopover.css +0 -4
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +41 -14
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +1 -9
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +2 -1
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +0 -5
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +6 -3
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +95 -1
- package/front_end/ui/legacy/components/source_frame/imageView.css +2 -2
- package/front_end/ui/legacy/filter.css +7 -3
- package/front_end/ui/legacy/inspectorCommon.css +7 -81
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +1 -1
- package/front_end/ui/legacy/listWidget.css +2 -2
- package/front_end/ui/legacy/progressIndicator.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +6 -10
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/front_end/ui/visual_logging/LoggingDriver.ts +4 -0
- package/front_end/ui/visual_logging/visual_logging.ts +1 -1
- package/inspector_overlay/common.ts +0 -3
- package/inspector_overlay/main.ts +1 -3
- package/inspector_overlay/tool_highlight.css +0 -7
- package/inspector_overlay/tool_highlight.ts +0 -1
- package/inspector_overlay/tool_source_order.css +0 -4
- package/package.json +1 -1
- package/front_end/generated/SupportedCSSProperties.ts +0 -9689
|
@@ -58,33 +58,21 @@
|
|
|
58
58
|
--color-grid-focus-selected: var(--sys-color-tonal-container);
|
|
59
59
|
--color-grid-selected: var(--sys-color-surface-variant);
|
|
60
60
|
--color-grid-hovered: var(--sys-color-state-hover-on-subtle);
|
|
61
|
-
--color-primary-old: rgb(26 115 232);
|
|
62
|
-
--color-primary-variant: rgb(66 133 244);
|
|
63
61
|
--color-background: rgb(255 255 255);
|
|
64
|
-
--color-background-inverted: rgb(0 0 0);
|
|
65
62
|
--color-background-inverted-opacity-0: rgb(0 0 0 / 0%);
|
|
66
63
|
--color-background-inverted-opacity-2: rgb(0 0 0 / 2%);
|
|
67
|
-
--color-background-inverted-opacity-30: rgb(0 0 0 / 30%);
|
|
68
64
|
--color-background-inverted-opacity-50: rgb(0 0 0 / 50%);
|
|
69
|
-
--color-background-opacity-50: rgb(255 255 255 / 50%);
|
|
70
65
|
--color-background-opacity-80: rgb(255 255 255 / 80%);
|
|
71
|
-
--color-background-elevation-1: rgb(241 243 244);
|
|
72
66
|
--color-background-elevation-2: rgb(222 225 230);
|
|
73
|
-
/** Used when the elevation is visible only on dark theme */
|
|
74
|
-
--color-background-elevation-dark-only: var(--color-background);
|
|
75
67
|
/** To draw grid lines behind elements */
|
|
76
68
|
--divider-line: rgb(0 0 0 / 10%);
|
|
77
69
|
--color-text-primary: rgb(32 33 36);
|
|
78
|
-
--color-text-secondary: rgb(95 99 104);
|
|
79
70
|
--color-text-disabled: rgb(128 134 139);
|
|
80
71
|
--color-red: rgb(238 68 47);
|
|
81
72
|
--drop-shadow:
|
|
82
73
|
0 0 0 1px rgb(0 0 0 / 5%),
|
|
83
74
|
0 2px 4px rgb(0 0 0 / 20%),
|
|
84
75
|
0 2px 6px rgb(0 0 0 / 10%);
|
|
85
|
-
--drop-shadow-depth-1:
|
|
86
|
-
0 1px 2px rgb(60 64 67 / 30%),
|
|
87
|
-
0 1px 3px 1px rgb(60 64 67 / 15%);
|
|
88
76
|
--drop-shadow-depth-3:
|
|
89
77
|
0 4px 8px 3px rgb(60 64 67 / 15%),
|
|
90
78
|
0 1px 3px rgb(60 64 67 / 30%);
|
|
@@ -102,9 +90,6 @@
|
|
|
102
90
|
/** Used to indicate an input box */
|
|
103
91
|
--input-outline: rgb(202 205 209);
|
|
104
92
|
|
|
105
|
-
/** These colors are used to show errors */
|
|
106
|
-
--color-error-text: #f00;
|
|
107
|
-
|
|
108
93
|
/* Colors used by the code editor */
|
|
109
94
|
--color-continue-to-location: var(--ref-palette-blue90);
|
|
110
95
|
--color-continue-to-location-hover: var(--ref-palette-blue80);
|
|
@@ -115,13 +100,8 @@
|
|
|
115
100
|
--color-evaluated-expression: var(--ref-palette-yellow95);
|
|
116
101
|
--color-evaluated-expression-border: var(--ref-palette-yellow70);
|
|
117
102
|
--color-variable-values: var(--ref-palette-orange90);
|
|
118
|
-
|
|
119
|
-
/* Color tokens for icons */
|
|
120
|
-
--color-primary: rgb(11 87 208);
|
|
121
|
-
--legacy-accent-color: #1a73e8;
|
|
122
103
|
--legacy-focus-ring-inactive-shadow-color: #e0e0e0;
|
|
123
104
|
--legacy-input-validation-error: #db1600;
|
|
124
|
-
--legacy-selection-bg-color: var(--legacy-accent-color);
|
|
125
105
|
--legacy-focus-ring-inactive-shadow: 0 0 0 1px var(--legacy-focus-ring-inactive-shadow-color);
|
|
126
106
|
--legacy-focus-ring-active-shadow: 0 0 0 1px var(--sys-color-state-focus-ring);
|
|
127
107
|
|
|
@@ -137,24 +117,14 @@
|
|
|
137
117
|
/* Colors for timeline in Performance Panel */
|
|
138
118
|
|
|
139
119
|
--app-color-loading: var(--ref-palette-blue70);
|
|
140
|
-
--app-color-loading-children: var(--ref-palette-blue80);
|
|
141
120
|
--app-color-scripting: var(--ref-palette-yellow70);
|
|
142
|
-
--app-color-scripting-children: var(--ref-palette-yellow80);
|
|
143
121
|
--app-color-rendering: var(--ref-palette-purple70);
|
|
144
122
|
--app-color-rendering-children: var(--ref-palette-purple80);
|
|
145
123
|
--app-color-painting: var(--ref-palette-green70);
|
|
146
|
-
--app-color-painting-children: var(--ref-palette-green80);
|
|
147
124
|
--app-color-messaging: var(--ref-palette-cyan70);
|
|
148
|
-
--app-color-messaging-children: var(--ref-palette-cyan80);
|
|
149
|
-
--app-color-task: var(--ref-palette-neutral80);
|
|
150
|
-
--app-color-task-children: var(--ref-palette-neutral90);
|
|
151
125
|
--app-color-system: var(--ref-palette-neutral80);
|
|
152
|
-
--app-color-system-children: var(--ref-palette-neutral90);
|
|
153
126
|
--app-color-idle: var(--ref-palette-neutral90);
|
|
154
|
-
--app-color-idle-children: var(--ref-palette-neutral100);
|
|
155
127
|
--app-color-async: var(--ref-palette-error60);
|
|
156
|
-
--app-color-async-children: var(--ref-palette-error70);
|
|
157
|
-
--app-color-other: var(--ref-palette-neutral87);
|
|
158
128
|
--app-color-doc: var(--ref-palette-blue60);
|
|
159
129
|
--app-color-css: var(--ref-palette-purple60);
|
|
160
130
|
--app-color-image: var(--ref-palette-green80);
|
|
@@ -223,11 +193,6 @@
|
|
|
223
193
|
*/
|
|
224
194
|
--app-color-element-sidebar-subtitle: var(--ref-palette-neutral50);
|
|
225
195
|
|
|
226
|
-
/**
|
|
227
|
-
* Color for input driver for AI assistance chat
|
|
228
|
-
*/
|
|
229
|
-
--app-color-ai-assistance-input-divider: rgb(0 0 0 / 10%);
|
|
230
|
-
|
|
231
196
|
/**
|
|
232
197
|
* Gradient colors for Google AI, used in the Global AI button in promotion enabled state
|
|
233
198
|
*/
|
|
@@ -260,30 +225,19 @@
|
|
|
260
225
|
--comment-cursor: var(--image-file-comment-mode-cursor) 10 28, auto;
|
|
261
226
|
|
|
262
227
|
&.theme-with-dark-background {
|
|
263
|
-
--color-primary-old: rgb(138 180 248);
|
|
264
|
-
--color-primary-variant: rgb(102 157 246);
|
|
265
228
|
--color-background: rgb(32 33 36);
|
|
266
|
-
--color-background-inverted: rgb(255 255 255);
|
|
267
229
|
--color-background-inverted-opacity-2: rgb(255 255 255 / 2%);
|
|
268
|
-
--color-background-inverted-opacity-30: rgb(255 255 255 / 30%);
|
|
269
230
|
--color-background-inverted-opacity-50: rgb(255 255 255 / 50%);
|
|
270
|
-
--color-background-opacity-50: rgb(32 33 36 / 50%);
|
|
271
231
|
--color-background-opacity-80: rgb(32 33 36 / 80%);
|
|
272
|
-
--color-background-elevation-1: rgb(41 42 45);
|
|
273
232
|
--color-background-elevation-2: rgb(53 54 58);
|
|
274
|
-
--color-background-elevation-dark-only: var(--color-background-elevation-1);
|
|
275
233
|
--divider-line: rgb(255 255 255 / 10%);
|
|
276
234
|
--color-text-primary: rgb(232 234 237);
|
|
277
|
-
--color-text-secondary: rgb(154 160 166);
|
|
278
235
|
--color-text-disabled: rgb(128 134 139);
|
|
279
236
|
--color-red: rgb(237 78 76);
|
|
280
237
|
--drop-shadow:
|
|
281
238
|
0 0 0 1px rgb(255 255 255 / 20%),
|
|
282
239
|
0 2px 4px 2px rgb(0 0 0 / 20%),
|
|
283
240
|
0 2px 6px 2px rgb(0 0 0 / 10%);
|
|
284
|
-
--drop-shadow-depth-1:
|
|
285
|
-
0 1px 2px rgb(0 0 0 / 30%),
|
|
286
|
-
0 1px 3px 1px rgb(0 0 0 / 15%);
|
|
287
241
|
--drop-shadow-depth-3:
|
|
288
242
|
0 4px 8px 3px rgb(0 0 0 / 15%),
|
|
289
243
|
0 1px 3px rgb(0 0 0 / 30%);
|
|
@@ -292,7 +246,6 @@
|
|
|
292
246
|
--color-scrollbar-mac-hover: rgb(75 76 79);
|
|
293
247
|
--color-scrollbar-other: rgb(51 51 51);
|
|
294
248
|
--color-scrollbar-other-hover: rgb(75 76 79);
|
|
295
|
-
--color-error-text: hsl(0deg 100% 75%);
|
|
296
249
|
|
|
297
250
|
/* Colors used by the code editor */
|
|
298
251
|
--color-continue-to-location: var(--ref-palette-yellow30);
|
|
@@ -305,16 +258,12 @@
|
|
|
305
258
|
--color-evaluated-expression-border: var(--ref-palette-yellow40);
|
|
306
259
|
--color-variable-values: var(--sys-color-surface-error);
|
|
307
260
|
|
|
308
|
-
/* Color tokens for icons */
|
|
309
|
-
--color-primary: rgb(168 199 250);
|
|
310
|
-
|
|
311
261
|
/**
|
|
312
262
|
* Inherit the native form control colors when using a dark theme.
|
|
313
263
|
* Override them using CSS variables if needed.
|
|
314
264
|
*/
|
|
315
265
|
color-scheme: dark;
|
|
316
266
|
|
|
317
|
-
--legacy-accent-color: #0e639c;
|
|
318
267
|
--legacy-focus-ring-inactive-shadow-color: #5a5a5a;
|
|
319
268
|
--legacy-focus-ring-inactive-shadow: 0 0 0 1px var(--legacy-focus-ring-inactive-shadow-color);
|
|
320
269
|
|
|
@@ -330,22 +279,13 @@
|
|
|
330
279
|
/* Colors for timeline in Performance Panel */
|
|
331
280
|
|
|
332
281
|
--app-color-loading: var(--ref-palette-blue60);
|
|
333
|
-
--app-color-loading-children: var(--ref-palette-blue50);
|
|
334
282
|
--app-color-scripting: var(--ref-palette-yellow70);
|
|
335
|
-
--app-color-scripting-children: var(--ref-palette-yellow60);
|
|
336
283
|
--app-color-rendering: var(--ref-palette-purple60);
|
|
337
284
|
--app-color-rendering-children: var(--ref-palette-purple50);
|
|
338
285
|
--app-color-painting: var(--ref-palette-green70);
|
|
339
|
-
--app-color-painting-children: var(--ref-palette-green60);
|
|
340
|
-
--app-color-task: var(--ref-palette-neutral80);
|
|
341
|
-
--app-color-task-children: var(--ref-palette-neutral70);
|
|
342
286
|
--app-color-system: var(--ref-palette-neutral50);
|
|
343
|
-
--app-color-system-children: var(--ref-palette-neutral40);
|
|
344
287
|
--app-color-idle: var(--ref-palette-neutral30);
|
|
345
|
-
--app-color-idle-children: var(--ref-palette-neutral20);
|
|
346
288
|
--app-color-async: var(--ref-palette-error60);
|
|
347
|
-
--app-color-async-children: var(--ref-palette-error50);
|
|
348
|
-
--app-color-other: var(--ref-palette-neutral60);
|
|
349
289
|
--app-color-doc: var(--ref-palette-blue60);
|
|
350
290
|
--app-color-css: var(--ref-palette-purple60);
|
|
351
291
|
--app-color-image: var(--ref-palette-green80);
|
|
@@ -403,11 +343,6 @@
|
|
|
403
343
|
*/
|
|
404
344
|
--app-color-element-sidebar-subtitle: var(--sys-color-token-subtle);
|
|
405
345
|
|
|
406
|
-
/**
|
|
407
|
-
* Color for input driver for AI assistance chat
|
|
408
|
-
*/
|
|
409
|
-
--app-color-ai-assistance-input-divider: rgb(255 255 255 / 15%);
|
|
410
|
-
|
|
411
346
|
/**
|
|
412
347
|
* Combobox image.
|
|
413
348
|
*/
|
|
@@ -286,7 +286,7 @@ export class AidaClient {
|
|
|
286
286
|
...result.metadata,
|
|
287
287
|
};
|
|
288
288
|
if (metadata?.attributionMetadata?.attributionAction === RecitationAction.BLOCK) {
|
|
289
|
-
throw new AidaBlockError();
|
|
289
|
+
throw new AidaBlockError(result.blockMessage);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
if (result.textChunk) {
|
|
@@ -486,6 +486,8 @@ export interface AidaChunkResponse {
|
|
|
486
486
|
* {"code": 429, "message": "You have exhausted your capacity on this model.", "status": "RESOURCE_EXHAUSTED", "details": [...]}).
|
|
487
487
|
*/
|
|
488
488
|
error?: string|Record<string, unknown>;
|
|
489
|
+
/** Why GCA blocked the prompt or the response, for the `AidaBlockError` message. */
|
|
490
|
+
blockMessage?: string;
|
|
489
491
|
}
|
|
490
492
|
|
|
491
493
|
// Reads `devToolsAiDebug` directly because `core/host` cannot depend on `models/ai-utils`.
|
|
@@ -162,8 +162,8 @@ export function mapError(err: unknown, detail?: string): AidaClientError {
|
|
|
162
162
|
* - `'AIDA request was blocked'`: `HandleAidaClientUnavailable()` returns this string on
|
|
163
163
|
* `aidaCodeComplete` when `AidaClient::CanUseAida()` blocks the profile, and the embedder
|
|
164
164
|
* dispatcher returns it when a non-local frontend invokes `aidaCodeComplete`.
|
|
165
|
-
* - `'Disallowed path or
|
|
166
|
-
* `kAccessDenied` when `DevToolsHttpServiceRegistry` rejects the endpoint path
|
|
165
|
+
* - `'Disallowed path, method, or header'`: `OnHttpRequestPerformed()` returns this string for
|
|
166
|
+
* `kAccessDenied` when `DevToolsHttpServiceRegistry` rejects the endpoint path, HTTP method, or header.
|
|
167
167
|
* - `'Request validation failed'`: `OnHttpRequestPerformed()` returns this string for
|
|
168
168
|
* `kValidationFailed` when `CanMakeRequest()` rejects the profile (off-the-record, enterprise
|
|
169
169
|
* policy, age, or geo restrictions), and the embedder dispatcher returns it when a non-local
|
|
@@ -173,7 +173,7 @@ export function mapError(err: unknown, detail?: string): AidaClientError {
|
|
|
173
173
|
*/
|
|
174
174
|
const VALIDATION_ERROR_MESSAGES = new Set<string>([
|
|
175
175
|
'AIDA request was blocked',
|
|
176
|
-
'Disallowed path or
|
|
176
|
+
'Disallowed path, method, or header',
|
|
177
177
|
'Request validation failed',
|
|
178
178
|
'Service not found',
|
|
179
179
|
]);
|
|
@@ -94,6 +94,10 @@ function mapCommonAidaRequestFields(aidaRequest: AidaRequest, gcaRequest: GCA.Ge
|
|
|
94
94
|
temperature: aidaRequest.options.temperature,
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
+
if (aidaRequest.metadata?.string_session_id) {
|
|
98
|
+
// Populate top-level sessionId for server-side session affinity; labels['session_id'] only sets a sanitized GCP label.
|
|
99
|
+
gcaRequest.sessionId = aidaRequest.metadata.string_session_id;
|
|
100
|
+
}
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
export function gcaResponseToAidaDoConversationResponse(response: GCA.GenerateContentResponse):
|
|
@@ -501,6 +505,33 @@ function convertAidaParamToGcaSchema<T extends string|number|symbol = string>(pa
|
|
|
501
505
|
return schema;
|
|
502
506
|
}
|
|
503
507
|
|
|
508
|
+
// `FinishReason` covers normal completion ('STOP'), failures (for example 'MAX_TOKENS'),
|
|
509
|
+
// and content blocks. Only the reasons below mean that GCA blocked the candidate output.
|
|
510
|
+
const BLOCKING_FINISH_REASONS = new Set<string>([
|
|
511
|
+
'SAFETY',
|
|
512
|
+
'RECITATION',
|
|
513
|
+
'BLOCKLIST',
|
|
514
|
+
'PROHIBITED_CONTENT',
|
|
515
|
+
'SPII',
|
|
516
|
+
'IMAGE_SAFETY',
|
|
517
|
+
'IMAGE_PROHIBITED_CONTENT',
|
|
518
|
+
'IMAGE_RECITATION',
|
|
519
|
+
]);
|
|
520
|
+
|
|
521
|
+
// GCA JSON responses send enum names (for example 'STOP'), while the GcaTypes enums and test fixtures use numbers.
|
|
522
|
+
function enumName(value: number|string|undefined, names: Record<number, string>): string|undefined {
|
|
523
|
+
return typeof value === 'number' ? names[value] : value;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// Setting `RecitationAction.BLOCK` makes `AidaClient` throw `AidaBlockError`.
|
|
527
|
+
function blockedChunk(metadata: AIDA.ResponseMetadata, blockMessage: string): AIDA.AidaChunkResponse {
|
|
528
|
+
const citations = metadata.attributionMetadata?.citations ?? [];
|
|
529
|
+
return {
|
|
530
|
+
metadata: {...metadata, attributionMetadata: {attributionAction: AIDA.RecitationAction.BLOCK, citations}},
|
|
531
|
+
blockMessage,
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
|
|
504
535
|
export function gcaChunkResponseToAidaChunkResponse(response: GCA.GenerateContentResponse): AIDA.AidaChunkResponse[] {
|
|
505
536
|
try {
|
|
506
537
|
if (response.error) {
|
|
@@ -533,6 +564,14 @@ export function gcaChunkResponseToAidaChunkResponse(response: GCA.GenerateConten
|
|
|
533
564
|
})),
|
|
534
565
|
};
|
|
535
566
|
}
|
|
567
|
+
const blockReason = enumName(response.promptFeedback?.blockReason, GCA.BlockReason);
|
|
568
|
+
if (blockReason && blockReason !== 'BLOCKED_REASON_UNSPECIFIED') {
|
|
569
|
+
return [blockedChunk(metadata, `GCA prompt blocked: ${blockReason}`)];
|
|
570
|
+
}
|
|
571
|
+
const finishReason = enumName(candidate?.finishReason, GCA.FinishReason);
|
|
572
|
+
if (finishReason && BLOCKING_FINISH_REASONS.has(finishReason)) {
|
|
573
|
+
return [blockedChunk(metadata, `GCA response blocked: ${finishReason}`)];
|
|
574
|
+
}
|
|
536
575
|
// Trailing chunks without parts still yield metadata so the client receives the final
|
|
537
576
|
// rpcGlobalId, modelVersion, usageMetadata, and citationMetadata.
|
|
538
577
|
const chunks: AIDA.AidaChunkResponse[] = parts.length === 0 ? [{metadata}] : parts.map(part => {
|
|
@@ -26,6 +26,9 @@ import type {GenerateContentRequest, GenerateContentResponse} from './GcaTypes.j
|
|
|
26
26
|
import type {AidaClientResult} from './InspectorFrontendHostAPI.js';
|
|
27
27
|
|
|
28
28
|
const SERVICE_NAME = 'gcaService';
|
|
29
|
+
const OPT_OUT_DATA_COLLECTION_HEADER = {
|
|
30
|
+
'User-Agent': 'Chrome (aidev_client; datacollection_opt_in=false)',
|
|
31
|
+
};
|
|
29
32
|
|
|
30
33
|
const ENDPOINTS = {
|
|
31
34
|
CONTENT: '/v1beta:generateContent',
|
|
@@ -38,19 +41,25 @@ export class GcaClient {
|
|
|
38
41
|
return Root.Runtime.hostConfig.devToolsUseGcaApi?.enabled;
|
|
39
42
|
}
|
|
40
43
|
|
|
44
|
+
#getHeaders(disableUserContentLogging: boolean): Record<string, string>|undefined {
|
|
45
|
+
// Only send the User-Agent override when logging is disabled; otherwise omit it so
|
|
46
|
+
// GCA runs its own server-side eligibility and preference checks.
|
|
47
|
+
return disableUserContentLogging ? OPT_OUT_DATA_COLLECTION_HEADER : undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
async conversationRequest(request: DoConversationRequest, streamId: number, options?: {signal?: AbortSignal}):
|
|
42
51
|
Promise<void> {
|
|
43
52
|
try {
|
|
44
53
|
const gcaRequest = aidaDoConversationRequestToGcaRequest(request);
|
|
45
|
-
const response = await DispatchHttpRequestClient.makeHttpRequest<GenerateContentResponse>(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
const response = await DispatchHttpRequestClient.makeHttpRequest<GenerateContentResponse>({
|
|
55
|
+
service: SERVICE_NAME,
|
|
56
|
+
path: ENDPOINTS.STREAM_CONTENT,
|
|
57
|
+
method: 'POST',
|
|
58
|
+
body: JSON.stringify(gcaRequest),
|
|
59
|
+
headers: this.#getHeaders(request.metadata.disable_user_content_logging),
|
|
60
|
+
streamId,
|
|
61
|
+
},
|
|
62
|
+
options);
|
|
54
63
|
debugLog('GCA conversation request succeeded:', JSON.stringify(request), JSON.stringify(response));
|
|
55
64
|
} catch (err) {
|
|
56
65
|
debugLog('GCA request failed:', JSON.stringify(request), err);
|
|
@@ -65,6 +74,7 @@ export class GcaClient {
|
|
|
65
74
|
path: ENDPOINTS.SEND_TELEMETRY,
|
|
66
75
|
method: 'POST',
|
|
67
76
|
body: JSON.stringify(gcaEvent),
|
|
77
|
+
headers: this.#getHeaders(clientEvent.disable_user_content_logging),
|
|
68
78
|
});
|
|
69
79
|
return response.then(
|
|
70
80
|
result => {
|
|
@@ -79,27 +89,29 @@ export class GcaClient {
|
|
|
79
89
|
|
|
80
90
|
async completeCode(request: CompletionRequest): Promise<CompletionResponse> {
|
|
81
91
|
const gcaRequest = aidaCompletionRequestToGcaRequest(request);
|
|
82
|
-
const result =
|
|
92
|
+
const result =
|
|
93
|
+
await this.#requestContent(gcaRequest, this.#getHeaders(request.metadata.disable_user_content_logging));
|
|
83
94
|
return gcaResponseToAidaCompletionResponse(result);
|
|
84
95
|
}
|
|
85
96
|
|
|
86
97
|
async generateCode(request: GenerateCodeRequest, options?: {signal?: AbortSignal}): Promise<GenerateCodeResponse> {
|
|
87
98
|
const gcaRequest = aidaGenerateCodeRequestToGcaRequest(request);
|
|
88
|
-
const result = await this.#requestContent(gcaRequest,
|
|
99
|
+
const result = await this.#requestContent(gcaRequest,
|
|
100
|
+
this.#getHeaders(request.metadata.disable_user_content_logging), options);
|
|
89
101
|
return gcaResponseToAidaGenerateCodeResponse(result);
|
|
90
102
|
}
|
|
91
103
|
|
|
92
|
-
async #requestContent(request: GenerateContentRequest,
|
|
104
|
+
async #requestContent(request: GenerateContentRequest, headers: Record<string, string>|undefined,
|
|
93
105
|
options?: {signal?: AbortSignal}): Promise<GenerateContentResponse> {
|
|
94
106
|
try {
|
|
95
|
-
const response = await DispatchHttpRequestClient.makeHttpRequest<GenerateContentResponse>(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
const response = await DispatchHttpRequestClient.makeHttpRequest<GenerateContentResponse>({
|
|
108
|
+
service: SERVICE_NAME,
|
|
109
|
+
path: ENDPOINTS.CONTENT,
|
|
110
|
+
method: 'POST',
|
|
111
|
+
body: JSON.stringify(request),
|
|
112
|
+
headers,
|
|
113
|
+
},
|
|
114
|
+
options);
|
|
103
115
|
debugLog('GCA request succeeded:', JSON.stringify(request), JSON.stringify(response));
|
|
104
116
|
return response;
|
|
105
117
|
} catch (err) {
|
|
@@ -339,7 +339,8 @@ export interface GenerateContentResponse {
|
|
|
339
339
|
export interface Candidate {
|
|
340
340
|
index: number;
|
|
341
341
|
content: Content;
|
|
342
|
-
|
|
342
|
+
// GCA JSON responses send the enum name (for example 'STOP'), while `FinishReason` is a numeric enum.
|
|
343
|
+
finishReason: FinishReason|keyof typeof FinishReason;
|
|
343
344
|
safetyRatings: SafetyRating[];
|
|
344
345
|
citationMetadata: CitationMetadata;
|
|
345
346
|
groundingMetadata: GroundingMetadata;
|
|
@@ -423,7 +424,8 @@ export interface PredictionMetadata {
|
|
|
423
424
|
}
|
|
424
425
|
|
|
425
426
|
export interface PromptFeedback {
|
|
426
|
-
|
|
427
|
+
// GCA JSON responses send the enum name (for example 'SAFETY'), while `BlockReason` is a numeric enum.
|
|
428
|
+
blockReason: BlockReason|keyof typeof BlockReason;
|
|
427
429
|
safetyRatings: SafetyRating[];
|
|
428
430
|
blockReasonMessage: string;
|
|
429
431
|
}
|
|
@@ -276,6 +276,7 @@ export type DispatchHttpRequestRequest = {
|
|
|
276
276
|
path: string,
|
|
277
277
|
method: 'GET',
|
|
278
278
|
queryParams?: Record<string, string|string[]>,
|
|
279
|
+
headers?: Record<string, string>,
|
|
279
280
|
streamId?: number,
|
|
280
281
|
body?: never,
|
|
281
282
|
}|{
|
|
@@ -283,6 +284,7 @@ export type DispatchHttpRequestRequest = {
|
|
|
283
284
|
path: string,
|
|
284
285
|
method: 'POST',
|
|
285
286
|
queryParams?: Record<string, string|string[]>,
|
|
287
|
+
headers?: Record<string, string>,
|
|
286
288
|
streamId?: number,
|
|
287
289
|
// A JSON string containing the request body.
|
|
288
290
|
body?: string,
|
|
@@ -34,7 +34,6 @@ export class DevToolsLocale {
|
|
|
34
34
|
private constructor(data: DevToolsLocaleData) {
|
|
35
35
|
this.lookupClosestDevToolsLocale = data.lookupClosestDevToolsLocale;
|
|
36
36
|
|
|
37
|
-
// TODO(crbug.com/1163928): Use constant once setting actually exists.
|
|
38
37
|
if (data.settingLanguage === 'browserLanguage') {
|
|
39
38
|
this.locale = data.navigatorLanguage || 'en-US';
|
|
40
39
|
} else {
|
|
@@ -336,11 +336,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
private onFrameNavigated(): void {
|
|
339
|
-
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
DebuggerModel.shouldResyncDebuggerId = true;
|
|
339
|
+
DebuggerModel.modelsNeedingDebuggerIdResync.add(this);
|
|
344
340
|
}
|
|
345
341
|
|
|
346
342
|
private registerDebugger(response: Protocol.Debugger.EnableResponse): void {
|
|
@@ -349,6 +345,9 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
349
345
|
return;
|
|
350
346
|
}
|
|
351
347
|
const {debuggerId} = response;
|
|
348
|
+
if (typeof this.#debuggerId === 'string' && this.#debuggerId !== debuggerId) {
|
|
349
|
+
debuggerIdToModel.delete(this.#debuggerId);
|
|
350
|
+
}
|
|
352
351
|
debuggerIdToModel.set(debuggerId, this);
|
|
353
352
|
this.#debuggerId = debuggerId;
|
|
354
353
|
this.dispatchEventToListeners(Events.DebuggerIsReadyToPause, this);
|
|
@@ -359,20 +358,30 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
359
358
|
}
|
|
360
359
|
|
|
361
360
|
static async modelForDebuggerId(debuggerId: string): Promise<DebuggerModel|null> {
|
|
362
|
-
|
|
361
|
+
const existingModel = debuggerIdToModel.get(debuggerId);
|
|
362
|
+
if (existingModel) {
|
|
363
|
+
return existingModel;
|
|
364
|
+
}
|
|
365
|
+
if (DebuggerModel.modelsNeedingDebuggerIdResync.size > 0 || DebuggerModel.resyncDebuggerIdPromise) {
|
|
363
366
|
await DebuggerModel.resyncDebuggerIdForModels();
|
|
364
|
-
DebuggerModel.shouldResyncDebuggerId = false;
|
|
365
367
|
}
|
|
366
368
|
return debuggerIdToModel.get(debuggerId) || null;
|
|
367
369
|
}
|
|
368
370
|
|
|
369
371
|
static async resyncDebuggerIdForModels(): Promise<void> {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
372
|
+
if (!DebuggerModel.resyncDebuggerIdPromise) {
|
|
373
|
+
const promise = (async () => {
|
|
374
|
+
while (DebuggerModel.modelsNeedingDebuggerIdResync.size > 0) {
|
|
375
|
+
const dbgModels = Array.from(DebuggerModel.modelsNeedingDebuggerIdResync).filter(m => m.debuggerEnabled());
|
|
376
|
+
DebuggerModel.modelsNeedingDebuggerIdResync.clear();
|
|
377
|
+
await Promise.all(dbgModels.map(m => m.syncDebuggerId()));
|
|
378
|
+
}
|
|
379
|
+
})();
|
|
380
|
+
DebuggerModel.resyncDebuggerIdPromise = promise.finally(() => {
|
|
381
|
+
DebuggerModel.resyncDebuggerIdPromise = null;
|
|
382
|
+
});
|
|
375
383
|
}
|
|
384
|
+
await DebuggerModel.resyncDebuggerIdPromise;
|
|
376
385
|
}
|
|
377
386
|
|
|
378
387
|
private async disableDebugger(): Promise<void> {
|
|
@@ -390,6 +399,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
390
399
|
debuggerIdToModel.delete(this.#debuggerId);
|
|
391
400
|
}
|
|
392
401
|
this.#debuggerId = null;
|
|
402
|
+
DebuggerModel.modelsNeedingDebuggerIdResync.delete(this);
|
|
393
403
|
}
|
|
394
404
|
|
|
395
405
|
private skipAllPauses(skip: boolean): void {
|
|
@@ -949,6 +959,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
949
959
|
}
|
|
950
960
|
|
|
951
961
|
override dispose(): void {
|
|
962
|
+
DebuggerModel.modelsNeedingDebuggerIdResync.delete(this);
|
|
952
963
|
if (this.#debuggerId) {
|
|
953
964
|
debuggerIdToModel.delete(this.#debuggerId);
|
|
954
965
|
}
|
|
@@ -972,7 +983,8 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
972
983
|
await this.enableDebugger();
|
|
973
984
|
}
|
|
974
985
|
|
|
975
|
-
private static
|
|
986
|
+
private static readonly modelsNeedingDebuggerIdResync = new Set<DebuggerModel>();
|
|
987
|
+
private static resyncDebuggerIdPromise: Promise<void>|null = null;
|
|
976
988
|
|
|
977
989
|
getEvaluateOnCallFrameCallback():
|
|
978
990
|
((arg0: CallFrame, arg1: EvaluationOptions) => Promise<EvaluationResult|null>)|null {
|
|
@@ -874,8 +874,8 @@ class PreloadingAttemptRegistry {
|
|
|
874
874
|
}
|
|
875
875
|
|
|
876
876
|
mergePrevious(prev: PreloadingAttemptRegistry): void {
|
|
877
|
-
for (const
|
|
878
|
-
prev.
|
|
877
|
+
for (const attempt of this.map.values()) {
|
|
878
|
+
prev.upsert(attempt);
|
|
879
879
|
}
|
|
880
880
|
|
|
881
881
|
this.map = prev.map;
|
|
@@ -106,6 +106,11 @@ export class RehydratingConnectionTransport implements ProtocolClient.Connection
|
|
|
106
106
|
fetchPromiseForTest?: Promise<void>;
|
|
107
107
|
#onConnectionLost: (message: Platform.UIString.LocalizedString) => void;
|
|
108
108
|
#rehydratingWindow = window;
|
|
109
|
+
// The window we announced ourselves to; the only one allowed to send the trace.
|
|
110
|
+
#hostWindow: Window|null = null;
|
|
111
|
+
// Popup openers (`TimelinePanel.#launchRehydratedSession`) are always same-origin, whereas
|
|
112
|
+
// external tools may embed `trace_app.html` in a cross-origin iframe (crbug.com/453705035).
|
|
113
|
+
#requireSameOriginHost = false;
|
|
109
114
|
#onReceiveHostWindowPayloadBound = this.onReceiveHostWindowPayload.bind(this);
|
|
110
115
|
|
|
111
116
|
constructor(onConnectionLost: (message: Platform.UIString.LocalizedString) => void) {
|
|
@@ -153,33 +158,57 @@ export class RehydratingConnectionTransport implements ProtocolClient.Connection
|
|
|
153
158
|
}
|
|
154
159
|
|
|
155
160
|
#setupMessagePassing(): void {
|
|
156
|
-
this.#rehydratingWindow.addEventListener('message', this.#onReceiveHostWindowPayloadBound);
|
|
157
161
|
if (this.#rehydratingWindow.opener) {
|
|
162
|
+
this.#hostWindow = this.#rehydratingWindow.opener;
|
|
163
|
+
this.#requireSameOriginHost = true;
|
|
164
|
+
this.#rehydratingWindow.addEventListener('message', this.#onReceiveHostWindowPayloadBound);
|
|
158
165
|
this.#rehydratingWindow.opener.postMessage({type: 'REHYDRATING_WINDOW_READY'});
|
|
159
166
|
} else if (this.#rehydratingWindow !== window.top) {
|
|
167
|
+
this.#hostWindow = this.#rehydratingWindow.parent;
|
|
168
|
+
this.#requireSameOriginHost = false;
|
|
169
|
+
this.#rehydratingWindow.addEventListener('message', this.#onReceiveHostWindowPayloadBound);
|
|
160
170
|
this.#rehydratingWindow.parent.postMessage({type: 'REHYDRATING_IFRAME_READY'}, '*');
|
|
161
171
|
} else {
|
|
162
172
|
this.#onConnectionLost(i18nString(UIStrings.noHostWindow));
|
|
163
173
|
}
|
|
164
174
|
}
|
|
165
175
|
|
|
176
|
+
/**
|
|
177
|
+
* The trace payload is replayed into the front-end as synthetic CDP events, so only accept it
|
|
178
|
+
* from the window we announced ourselves to. For popups, also require same-origin (matching
|
|
179
|
+
* `TimelinePanel.#launchRehydratedSession`); iframe embedders may be cross-origin
|
|
180
|
+
* (crbug.com/453705035), so `event.source` is checked there.
|
|
181
|
+
*/
|
|
182
|
+
#isFromHostWindow(event: MessageEvent): boolean {
|
|
183
|
+
if (this.#hostWindow === null || event.source !== this.#hostWindow) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
if (this.#requireSameOriginHost && event.origin !== this.#rehydratingWindow.location.origin) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
return true;
|
|
190
|
+
}
|
|
191
|
+
|
|
166
192
|
/**
|
|
167
193
|
* This is a callback for rehydrated session to receive payload from host window. Payload includes but not limited to
|
|
168
194
|
* the trace event and all necessary data to power a rehydrated session.
|
|
169
195
|
*/
|
|
170
196
|
onReceiveHostWindowPayload(event: MessageEvent): void {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
trace = new TraceObject(JSON.parse(traceJson));
|
|
176
|
-
} catch {
|
|
177
|
-
this.#onConnectionLost(i18nString(UIStrings.errorLoadingLog));
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
void this.startHydration(trace);
|
|
197
|
+
// Ignore (and keep listening after) anything that is not the trace from the host window,
|
|
198
|
+
// so a stray or hostile message cannot take the one-shot channel away from the host.
|
|
199
|
+
if (!this.#isFromHostWindow(event) || event.data?.type !== 'REHYDRATING_TRACE_FILE') {
|
|
200
|
+
return;
|
|
181
201
|
}
|
|
182
202
|
this.#rehydratingWindow.removeEventListener('message', this.#onReceiveHostWindowPayloadBound);
|
|
203
|
+
const traceJson = event.data.traceJson as string;
|
|
204
|
+
let trace;
|
|
205
|
+
try {
|
|
206
|
+
trace = new TraceObject(JSON.parse(traceJson));
|
|
207
|
+
} catch {
|
|
208
|
+
this.#onConnectionLost(i18nString(UIStrings.errorLoadingLog));
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
void this.startHydration(trace);
|
|
183
212
|
}
|
|
184
213
|
|
|
185
214
|
async startHydration(trace: TraceObject): Promise<boolean> {
|
|
@@ -285,6 +314,7 @@ export class RehydratingConnectionTransport implements ProtocolClient.Connection
|
|
|
285
314
|
}
|
|
286
315
|
|
|
287
316
|
disconnect(): Promise<void> {
|
|
317
|
+
this.#rehydratingWindow.removeEventListener('message', this.#onReceiveHostWindowPayloadBound);
|
|
288
318
|
return Promise.reject();
|
|
289
319
|
}
|
|
290
320
|
}
|
|
@@ -321,9 +351,9 @@ export class RehydratingSession extends RehydratingSessionBase {
|
|
|
321
351
|
scripts: RehydratingScript[] = [];
|
|
322
352
|
resources: RehydratingResource[] = [];
|
|
323
353
|
|
|
324
|
-
constructor(
|
|
325
|
-
|
|
326
|
-
|
|
354
|
+
constructor(sessionId: number, target: RehydratingTarget, executionContexts: RehydratingExecutionContext[],
|
|
355
|
+
scripts: RehydratingScript[], resources: RehydratingResource[],
|
|
356
|
+
connection: RehydratingConnectionInterface) {
|
|
327
357
|
super(connection);
|
|
328
358
|
this.sessionId = sessionId;
|
|
329
359
|
this.target = target;
|
|
@@ -386,23 +416,22 @@ export class RehydratingSession extends RehydratingSessionBase {
|
|
|
386
416
|
}
|
|
387
417
|
|
|
388
418
|
declareSessionAttachedToTarget(): void {
|
|
389
|
-
this.sendMessageToFrontend(
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
canAccessOpener: false,
|
|
402
|
-
},
|
|
403
|
-
},
|
|
419
|
+
this.sendMessageToFrontend({
|
|
420
|
+
method: 'Target.attachedToTarget',
|
|
421
|
+
params: {
|
|
422
|
+
sessionId: this.sessionId,
|
|
423
|
+
waitingForDebugger: false,
|
|
424
|
+
targetInfo: {
|
|
425
|
+
targetId: this.target.targetId,
|
|
426
|
+
type: this.target.type,
|
|
427
|
+
title: this.target.url,
|
|
428
|
+
url: this.target.url,
|
|
429
|
+
attached: true,
|
|
430
|
+
canAccessOpener: false,
|
|
404
431
|
},
|
|
405
|
-
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
/* attachSessionId */ false);
|
|
406
435
|
}
|
|
407
436
|
|
|
408
437
|
// Runtime.Enable indicates that Runtime domain is flushing the event to communicate
|