chrome-devtools-frontend 1.0.1736236 → 1.0.1739869
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-css-scoping-and-flex-layout.md +1 -1
- package/.agents/skills/version-control/SKILL.md +63 -11
- package/.stylelintrc.json +3 -1
- package/docs/devtools-protocol.md +3 -1
- package/eslint.config.mjs +127 -6
- package/front_end/application_tokens.css +0 -30
- package/front_end/core/host/AidaClient.ts +14 -36
- package/front_end/core/host/AidaGcaTranslation.ts +8 -5
- package/front_end/core/root/Runtime.ts +0 -5
- package/front_end/core/sdk/SourceMap.ts +30 -3
- package/front_end/core/sdk/SourceMapRangeMappings.ts +57 -0
- package/front_end/design_system_tokens.css +1 -0
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +5 -9
- package/front_end/entrypoints/main/GlobalAiButton.ts +2 -9
- package/front_end/entrypoints/main/MainImpl.ts +0 -4
- package/front_end/generated/SupportedCSSProperties.ts +24 -23
- package/front_end/models/ai-utils/AiUtils.ts +1 -5
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -18
- package/front_end/models/ai_assistance/contexts/FileContext.ts +1 -2
- package/front_end/models/ai_assistance/tools/ListSources.ts +3 -1
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +0 -6
- package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -5
- package/front_end/models/trace/EventsSerializer.ts +0 -8
- package/front_end/models/trace/extras/TraceFilter.ts +16 -8
- package/front_end/models/trace/extras/TraceTree.ts +104 -67
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -5
- 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/helpers/Extensions.ts +1 -3
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +155 -87
- package/front_end/models/trace/helpers/Trace.ts +15 -12
- 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/workspace/UISourceCode.ts +30 -8
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -7
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +15 -34
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -16
- package/front_end/panels/ai_assistance/components/chatView.css +0 -212
- package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/animationTimeline.css +5 -3
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +66 -3
- package/front_end/panels/application/PrivateVerificationTokensView.ts +114 -26
- package/front_end/panels/application/ResourcesPanel.ts +1 -0
- package/front_end/panels/application/backgroundServiceView.css +2 -2
- package/front_end/panels/application/components/backForwardCacheView.css +1 -1
- package/front_end/panels/application/components/permissionsPolicySection.css +0 -4
- package/front_end/panels/application/frameDetailsReportView.css +0 -7
- package/front_end/panels/application/indexedDBViews.css +3 -3
- package/front_end/panels/application/privateVerificationTokensView.css +6 -0
- package/front_end/panels/application/resourcesPanel.css +0 -48
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +1 -1
- package/front_end/panels/application/serviceWorkersView.css +2 -2
- package/front_end/panels/comments/CommentsPane.ts +1 -1
- package/front_end/panels/comments/commentsPane.css +1 -1
- package/front_end/panels/common/common.ts +0 -1
- package/front_end/panels/console/ConsoleView.ts +11 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +5 -1
- package/front_end/panels/console/consolePinPane.css +1 -1
- package/front_end/panels/console/consoleView.css +6 -5
- package/front_end/panels/elements/DOMTreeWidget.ts +47 -5
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -9
- package/front_end/panels/elements/StylePropertyTreeElement.ts +52 -34
- package/front_end/panels/elements/classesPaneWidget.css +3 -7
- package/front_end/panels/elements/components/CSSQuery.ts +6 -5
- package/front_end/panels/elements/layoutPane.css +0 -1
- package/front_end/panels/elements/metricsSidebarPane.css +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +0 -6
- package/front_end/panels/elements/stylesSidebarPane.css +0 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +1 -0
- package/front_end/panels/emulation/deviceModeView.css +0 -1
- package/front_end/panels/explain/components/consoleInsight.css +1 -6
- 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 +9 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +34 -17
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +39 -17
- package/front_end/panels/layer_viewer/Layers3DView.ts +34 -13
- package/front_end/panels/layer_viewer/layerDetailsView.css +2 -2
- package/front_end/panels/layer_viewer/layers3DView.css +0 -4
- package/front_end/panels/lighthouse/lighthousePanel.css +0 -9
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +2 -2
- package/front_end/panels/media/playerListView.css +0 -18
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +2 -2
- package/front_end/panels/network/NetworkLogView.ts +9 -2
- package/front_end/panels/network/NetworkWaterfallColumn.ts +22 -10
- package/front_end/panels/network/RequestPreviewView.ts +182 -63
- package/front_end/panels/network/RequestTimingView.ts +16 -2
- package/front_end/panels/network/SignedExchangeInfoView.ts +242 -158
- package/front_end/panels/network/networkConfigView.css +3 -3
- package/front_end/panels/network/networkLogView.css +4 -16
- package/front_end/panels/network/networkPanel.css +0 -7
- package/front_end/panels/network/networkTimingTable.css +12 -27
- package/front_end/panels/network/signedExchangeInfoView.css +12 -8
- package/front_end/panels/performance_monitor/performanceMonitor.css +2 -2
- package/front_end/panels/profiler/IsolateSelector.ts +31 -10
- package/front_end/panels/profiler/profilesPanel.css +0 -19
- package/front_end/panels/protocol_monitor/JSONEditor.css +1 -1
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecordingView.ts +22 -1
- package/front_end/panels/recorder/StepView.ts +26 -1
- package/front_end/panels/recorder/TimelineSection.ts +22 -6
- package/front_end/panels/recorder/controlButton.css +2 -9
- package/front_end/panels/recorder/recorderPanel.css +0 -1
- package/front_end/panels/recorder/recordingView.css +32 -32
- package/front_end/panels/recorder/replaySection.css +2 -0
- package/front_end/panels/recorder/stepView.css +18 -14
- package/front_end/panels/recorder/timelineSection.css +60 -84
- package/front_end/panels/screencast/screencastView.css +2 -2
- package/front_end/panels/search/searchView.css +1 -1
- package/front_end/panels/security/SecurityPanel.ts +474 -418
- package/front_end/panels/security/SecurityPanelSidebar.ts +68 -48
- package/front_end/panels/security/lockIcon.css +52 -50
- package/front_end/panels/security/mainView.css +149 -145
- package/front_end/panels/security/originView.css +117 -115
- package/front_end/panels/sensors/LocationsSettingsTab.ts +2 -50
- package/front_end/panels/sensors/SensorsView.ts +6 -21
- package/front_end/panels/sensors/locationsSettingsTab.css +1 -21
- package/front_end/panels/settings/AISettingsTab.ts +1 -2
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +31 -6
- package/front_end/panels/sources/NavigatorView.ts +105 -31
- package/front_end/panels/sources/breakpointsView.css +5 -3
- package/front_end/panels/sources/scopeChainSidebarPane.css +1 -1
- package/front_end/panels/sources/sourcesView.css +2 -1
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +18 -5
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -0
- 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/TimelineLayersView.ts +108 -46
- package/front_end/panels/timeline/TimelineMiniMap.ts +132 -54
- package/front_end/panels/timeline/TimelinePanel.ts +4 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +25 -9
- package/front_end/panels/timeline/components/DetailsView.ts +7 -14
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +5 -1
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/interactionBreakdown.css +1 -0
- package/front_end/panels/timeline/components/networkRequestDetails.css +2 -1
- package/front_end/panels/timeline/components/networkTrackWidget.css +1 -1
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -0
- package/front_end/panels/timeline/docs/profile_calls.md +7 -9
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +0 -7
- package/front_end/panels/timeline/timelineDetailsView.css +2 -2
- package/front_end/panels/web_audio/webAudio.css +1 -2
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/panels/webauthn/webauthnPane.css +1 -1
- package/front_end/panels/whats_new/ReleaseNoteText.ts +6 -6
- package/front_end/panels/whats_new/resources/WNDT.md +6 -6
- 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/comments/CommentAnchorResolver.ts +45 -4
- package/front_end/ui/comments/CommentOverlayManager.ts +45 -12
- package/front_end/ui/components/buttons/FloatingButton.ts +2 -6
- package/front_end/ui/components/buttons/button.css +2 -2
- package/front_end/ui/components/buttons/floatingButton.css +0 -44
- package/front_end/ui/components/diff_view/diffView.css +0 -2
- package/front_end/ui/components/icon_button/iconButton.css +1 -1
- package/front_end/ui/components/markdown_view/markdownView.css +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +29 -0
- package/front_end/ui/components/tree_outline/treeOutline.css +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +7 -5
- package/front_end/ui/legacy/InspectorDrawerView.ts +1 -0
- package/front_end/ui/legacy/InspectorView.ts +5 -1
- package/front_end/ui/legacy/PopoverHelper.ts +1 -0
- package/front_end/ui/legacy/RootView.ts +9 -3
- package/front_end/ui/legacy/SplitWidget.ts +1 -0
- package/front_end/ui/legacy/Treeoutline.ts +9 -0
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +130 -137
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -1
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +7 -6
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +34 -20
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +43 -14
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +2 -2
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +1 -10
- 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/infobar.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +3 -55
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +3 -3
- package/front_end/ui/legacy/listWidget.css +3 -8
- package/front_end/ui/legacy/softDropDownButton.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +2 -9
- package/front_end/ui/legacy/treeoutline.css +3 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +134 -0
- package/front_end/ui/visual_logging/LoggingEvents.ts +1 -1
- package/inspector_overlay/tool_highlight.css +0 -7
- package/inspector_overlay/tool_highlight.ts +0 -1
- package/package.json +1 -1
- package/front_end/Images/geminiInDevTools.png +0 -0
- package/front_end/Images/geminiInDevTools_2x.png +0 -0
- package/front_end/generated/InspectorBackendCommands.ts +0 -1690
- package/front_end/generated/protocol-mapping.d.ts +0 -5986
- package/front_end/generated/protocol-proxy-api.d.ts +0 -5452
- package/front_end/generated/protocol.ts +0 -23364
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +0 -193
- package/front_end/panels/common/geminiRebrandPromoDialog.css +0 -47
|
@@ -108,8 +108,11 @@ export const withSourcePuppeteerURLIfNone = <T extends NonNullable<unknown>>(
|
|
|
108
108
|
// which is precisely what we want.
|
|
109
109
|
return stack[2];
|
|
110
110
|
};
|
|
111
|
-
const site = new Error().stack as unknown as NodeJS.CallSite;
|
|
111
|
+
const site = new Error().stack as unknown as NodeJS.CallSite | undefined;
|
|
112
112
|
Error.prepareStackTrace = original;
|
|
113
|
+
if (!site) {
|
|
114
|
+
return object;
|
|
115
|
+
}
|
|
113
116
|
return Object.assign(object, {
|
|
114
117
|
[SOURCE_URL]: PuppeteerURL.fromCallSite(functionName, site),
|
|
115
118
|
});
|
|
@@ -197,28 +200,35 @@ export async function getReadableAsTypedArray(
|
|
|
197
200
|
): Promise<Uint8Array | null> {
|
|
198
201
|
const buffers: Uint8Array[] = [];
|
|
199
202
|
const reader = readable.getReader();
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
+
try {
|
|
204
|
+
if (path) {
|
|
205
|
+
const fileHandle = await environment.value.openFileForWriting(path);
|
|
206
|
+
try {
|
|
207
|
+
while (true) {
|
|
208
|
+
const {done, value} = await reader.read();
|
|
209
|
+
if (done) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
buffers.push(value);
|
|
213
|
+
await fileHandle.writeFile(value);
|
|
214
|
+
}
|
|
215
|
+
} finally {
|
|
216
|
+
await fileHandle.close();
|
|
217
|
+
}
|
|
218
|
+
} else {
|
|
203
219
|
while (true) {
|
|
204
220
|
const {done, value} = await reader.read();
|
|
205
221
|
if (done) {
|
|
206
222
|
break;
|
|
207
223
|
}
|
|
208
224
|
buffers.push(value);
|
|
209
|
-
await fileHandle.writeFile(value);
|
|
210
225
|
}
|
|
211
|
-
} finally {
|
|
212
|
-
await fileHandle.close();
|
|
213
|
-
}
|
|
214
|
-
} else {
|
|
215
|
-
while (true) {
|
|
216
|
-
const {done, value} = await reader.read();
|
|
217
|
-
if (done) {
|
|
218
|
-
break;
|
|
219
|
-
}
|
|
220
|
-
buffers.push(value);
|
|
221
226
|
}
|
|
227
|
+
} catch (error) {
|
|
228
|
+
// Release the underlying stream (e.g. the protocol stream handle) if
|
|
229
|
+
// the stream was not read to the end.
|
|
230
|
+
await reader.cancel().catch(() => {});
|
|
231
|
+
throw error;
|
|
222
232
|
}
|
|
223
233
|
try {
|
|
224
234
|
const concat = mergeUint8Arrays(buffers);
|
|
@@ -251,6 +261,13 @@ export async function getReadableFromProtocolStream(
|
|
|
251
261
|
controller.close();
|
|
252
262
|
}
|
|
253
263
|
},
|
|
264
|
+
async cancel() {
|
|
265
|
+
try {
|
|
266
|
+
await client.send('IO.close', {handle});
|
|
267
|
+
} catch {
|
|
268
|
+
// The stream or the session can be closed already.
|
|
269
|
+
}
|
|
270
|
+
},
|
|
254
271
|
});
|
|
255
272
|
}
|
|
256
273
|
|
|
@@ -28,6 +28,7 @@ import {CdpBrowser} from '../cdp/Browser.js';
|
|
|
28
28
|
import {Connection} from '../cdp/Connection.js';
|
|
29
29
|
import type {WsOptions} from '../common/ConnectOptions.js';
|
|
30
30
|
import {DEBUG_PREFIXES, type Logger} from '../common/Debug.js';
|
|
31
|
+
import type {DownloadBehavior} from '../common/DownloadBehavior.js';
|
|
31
32
|
import {TimeoutError} from '../common/Errors.js';
|
|
32
33
|
import type {SupportedBrowser} from '../common/SupportedBrowser.js';
|
|
33
34
|
import {
|
|
@@ -262,6 +263,7 @@ export abstract class BrowserLauncher {
|
|
|
262
263
|
protocolTimeout,
|
|
263
264
|
slowMo,
|
|
264
265
|
defaultViewport,
|
|
266
|
+
downloadBehavior,
|
|
265
267
|
acceptInsecureCerts,
|
|
266
268
|
networkEnabled,
|
|
267
269
|
idGenerator,
|
|
@@ -296,6 +298,7 @@ export abstract class BrowserLauncher {
|
|
|
296
298
|
browserCloseCallback,
|
|
297
299
|
{
|
|
298
300
|
defaultViewport,
|
|
301
|
+
downloadBehavior,
|
|
299
302
|
acceptInsecureCerts,
|
|
300
303
|
networkEnabled,
|
|
301
304
|
issuesEnabled,
|
|
@@ -408,24 +411,25 @@ export abstract class BrowserLauncher {
|
|
|
408
411
|
// Attempt to close the browser gracefully
|
|
409
412
|
try {
|
|
410
413
|
await cdpConnection.closeBrowser();
|
|
411
|
-
await browserProcess.hasClosed();
|
|
412
414
|
} catch (error) {
|
|
413
415
|
this.#logger?.(DEBUG_PREFIXES.error)?.(error);
|
|
414
416
|
await browserProcess.close();
|
|
417
|
+
return;
|
|
415
418
|
}
|
|
416
|
-
} else {
|
|
417
|
-
// Wait for a possible graceful shutdown.
|
|
418
|
-
await firstValueFrom(
|
|
419
|
-
race(
|
|
420
|
-
from(browserProcess.hasClosed()),
|
|
421
|
-
timer(5000).pipe(
|
|
422
|
-
mergeMap(() => {
|
|
423
|
-
return from(browserProcess.close());
|
|
424
|
-
}),
|
|
425
|
-
),
|
|
426
|
-
),
|
|
427
|
-
);
|
|
428
419
|
}
|
|
420
|
+
// Wait for a possible graceful shutdown. The browser can accept the
|
|
421
|
+
// close command and then not exit (e.g. on Windows). Kill the browser
|
|
422
|
+
// process after a timeout so that the close does not wait forever.
|
|
423
|
+
await firstValueFrom(
|
|
424
|
+
race(
|
|
425
|
+
from(browserProcess.hasClosed()),
|
|
426
|
+
timer(5000).pipe(
|
|
427
|
+
mergeMap(() => {
|
|
428
|
+
return from(browserProcess.close());
|
|
429
|
+
}),
|
|
430
|
+
),
|
|
431
|
+
),
|
|
432
|
+
);
|
|
429
433
|
}
|
|
430
434
|
|
|
431
435
|
/**
|
|
@@ -525,6 +529,7 @@ export abstract class BrowserLauncher {
|
|
|
525
529
|
closeCallback: BrowserCloseCallback,
|
|
526
530
|
opts: {
|
|
527
531
|
defaultViewport: Viewport | null;
|
|
532
|
+
downloadBehavior?: DownloadBehavior;
|
|
528
533
|
acceptInsecureCerts?: boolean;
|
|
529
534
|
networkEnabled: boolean;
|
|
530
535
|
issuesEnabled: boolean;
|
|
@@ -545,6 +550,7 @@ export abstract class BrowserLauncher {
|
|
|
545
550
|
closeCallback,
|
|
546
551
|
process: browserProcess.nodeProcess,
|
|
547
552
|
defaultViewport: opts.defaultViewport,
|
|
553
|
+
downloadBehavior: opts.downloadBehavior,
|
|
548
554
|
acceptInsecureCerts: opts.acceptInsecureCerts,
|
|
549
555
|
networkEnabled: opts.networkEnabled,
|
|
550
556
|
issuesEnabled: opts.issuesEnabled,
|
|
@@ -564,6 +570,7 @@ export abstract class BrowserLauncher {
|
|
|
564
570
|
slowMo: number;
|
|
565
571
|
idGenerator: GetIdFn;
|
|
566
572
|
defaultViewport: Viewport | null;
|
|
573
|
+
downloadBehavior?: DownloadBehavior;
|
|
567
574
|
acceptInsecureCerts?: boolean;
|
|
568
575
|
networkEnabled?: boolean;
|
|
569
576
|
issuesEnabled?: boolean;
|
|
@@ -596,6 +603,7 @@ export abstract class BrowserLauncher {
|
|
|
596
603
|
closeCallback,
|
|
597
604
|
process: browserProcess.nodeProcess,
|
|
598
605
|
defaultViewport: opts.defaultViewport,
|
|
606
|
+
downloadBehavior: opts.downloadBehavior,
|
|
599
607
|
acceptInsecureCerts: opts.acceptInsecureCerts,
|
|
600
608
|
networkEnabled: opts.networkEnabled ?? true,
|
|
601
609
|
issuesEnabled: opts.issuesEnabled ?? true,
|
|
@@ -167,20 +167,21 @@ export class ChromeLauncher extends BrowserLauncher {
|
|
|
167
167
|
override defaultArgs(options: LaunchOptions = {}): string[] {
|
|
168
168
|
// See https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
170
|
+
// Feature flags are merged below; clone so repeated defaultArgs() /
|
|
171
|
+
// launch() calls do not mutate the caller's options.args.
|
|
172
|
+
const args = structuredClone(options.args ?? []);
|
|
173
|
+
|
|
174
|
+
const userDisabledFeatures = getFeatures('--disable-features', args);
|
|
175
|
+
if (userDisabledFeatures.length > 0) {
|
|
176
|
+
removeMatchingFlags(args, '--disable-features');
|
|
176
177
|
}
|
|
177
178
|
|
|
178
179
|
const turnOnExperimentalFeaturesForTesting =
|
|
179
180
|
process.env['PUPPETEER_TEST_EXPERIMENTAL_CHROME_FEATURES'] === 'true';
|
|
180
181
|
|
|
181
|
-
const userEnabledFeatures = getFeatures('--enable-features',
|
|
182
|
-
if (
|
|
183
|
-
removeMatchingFlags(
|
|
182
|
+
const userEnabledFeatures = getFeatures('--enable-features', args);
|
|
183
|
+
if (userEnabledFeatures.length > 0) {
|
|
184
|
+
removeMatchingFlags(args, '--enable-features');
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
// Merge default enabled features with user-provided ones, if any.
|
|
@@ -254,7 +255,6 @@ export class ChromeLauncher extends BrowserLauncher {
|
|
|
254
255
|
const {
|
|
255
256
|
devtools = false,
|
|
256
257
|
headless = !devtools,
|
|
257
|
-
args = [],
|
|
258
258
|
userDataDir,
|
|
259
259
|
enableExtensions = false,
|
|
260
260
|
} = options;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
10
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
|
11
|
-
chrome: '
|
|
12
|
-
'chrome-headless-shell': '
|
|
13
|
-
firefox: '
|
|
11
|
+
chrome: '157.0.8103.50',
|
|
12
|
+
'chrome-headless-shell': '157.0.8103.50',
|
|
13
|
+
firefox: 'stable_159.0.1',
|
|
14
14
|
});
|
|
@@ -202,7 +202,7 @@ export function bubble<T extends EventType[]>(events?: T) {
|
|
|
202
202
|
bubbleInitializer.apply(this, [events]);
|
|
203
203
|
|
|
204
204
|
const handler = bubbleHandlers.get(this)!.get(events)!;
|
|
205
|
-
emitter.on('*', handler
|
|
205
|
+
emitter.on('*', handler);
|
|
206
206
|
return emitter;
|
|
207
207
|
},
|
|
208
208
|
};
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"package/lib/puppeteer/bidi/HTTPResponse.js",
|
|
45
45
|
"package/lib/puppeteer/bidi/Input.js",
|
|
46
46
|
"package/lib/puppeteer/bidi/JSHandle.js",
|
|
47
|
+
"package/lib/puppeteer/bidi/NetworkEvents.js",
|
|
47
48
|
"package/lib/puppeteer/bidi/Page.js",
|
|
48
49
|
"package/lib/puppeteer/bidi/Realm.js",
|
|
49
50
|
"package/lib/puppeteer/bidi/ScreenRecording.js",
|
|
@@ -95,6 +96,7 @@
|
|
|
95
96
|
"package/lib/puppeteer/cdp/NetworkManager.js",
|
|
96
97
|
"package/lib/puppeteer/cdp/Page.js",
|
|
97
98
|
"package/lib/puppeteer/cdp/PredefinedNetworkConditions.js",
|
|
99
|
+
"package/lib/puppeteer/cdp/ResponseBodyStream.js",
|
|
98
100
|
"package/lib/puppeteer/cdp/ScreenRecording.js",
|
|
99
101
|
"package/lib/puppeteer/cdp/Target.js",
|
|
100
102
|
"package/lib/puppeteer/cdp/TargetManageEvents.js",
|
|
@@ -639,11 +639,47 @@ export function deepQuerySelector(root: Document|Element, selector: string): Ele
|
|
|
639
639
|
return deepQuerySelectorAll(root, selector, 1)[0] ?? null;
|
|
640
640
|
}
|
|
641
641
|
|
|
642
|
+
/**
|
|
643
|
+
* Rematches a DOM node anchor whose backend node ID is no longer rendered.
|
|
644
|
+
*
|
|
645
|
+
* In the Elements tree every row at the same depth shares the same VE path, so
|
|
646
|
+
* the VE path alone does not identify a node. Only candidates whose text equals
|
|
647
|
+
* the anchor's `textSignature` are accepted; if none match, the node is
|
|
648
|
+
* considered removed and null is returned so the thread shows as orphaned.
|
|
649
|
+
*
|
|
650
|
+
* @param anchor The DOM node anchor signature to rematch.
|
|
651
|
+
* @param root The root Document or Element to search within.
|
|
652
|
+
* @param cachedJslogElements Optional pre-collected list of `[jslog]` elements for performance.
|
|
653
|
+
* @returns The rematched live Element, or null if no element matches the text.
|
|
654
|
+
*/
|
|
655
|
+
function rematchDOMNodeByVePathAndText(anchor: CommentAnchorSignature, root: Document|Element,
|
|
656
|
+
cachedJslogElements?: Element[]): Element|null {
|
|
657
|
+
if (anchor.textSignature === undefined) {
|
|
658
|
+
return null;
|
|
659
|
+
}
|
|
660
|
+
const targetVeName = extractVeName(anchor.vePath);
|
|
661
|
+
const allJslog = cachedJslogElements || deepQuerySelectorAll(root, '[jslog]');
|
|
662
|
+
const candidates = allJslog.filter(el => matchesVePath(el, anchor.vePath, targetVeName));
|
|
663
|
+
const matches = candidates.filter(el => el.deepTextContent() === anchor.textSignature);
|
|
664
|
+
if (matches.length <= 1) {
|
|
665
|
+
return matches[0] ?? null;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
// Several rows have the same text: disambiguate by the parent's text.
|
|
669
|
+
if (anchor.parentTextSignature === undefined) {
|
|
670
|
+
return matches[0];
|
|
671
|
+
}
|
|
672
|
+
const parentMatch =
|
|
673
|
+
matches.find(el => el.parentElementOrShadowHost()?.deepTextContent() === anchor.parentTextSignature);
|
|
674
|
+
return parentMatch ?? null;
|
|
675
|
+
}
|
|
676
|
+
|
|
642
677
|
/**
|
|
643
678
|
* Rematches a stored comment thread to its live corresponding DOM element.
|
|
644
679
|
*
|
|
645
680
|
* Matching pipeline:
|
|
646
681
|
* 1. Primary fast-path: Query by domain IDs (`networkRequestId` or `backendNodeId`) across shadow roots.
|
|
682
|
+
* DOM node anchors whose `backendNodeId` is not found are rematched by VE path and exact text only.
|
|
647
683
|
* 2. CodeMirror editor line match: Match editor and line number/text, scoped by `filePath` if present.
|
|
648
684
|
* 3. Visual logging path fallback: Find all candidate elements matching `vePath`.
|
|
649
685
|
* 4. Text content refinement: Filter candidates by `textSignature` and `parentTextSignature`.
|
|
@@ -663,10 +699,15 @@ export function rematchCommentAnchor(comment: CommentThread, root: Document|Elem
|
|
|
663
699
|
return deepQuerySelector(root, `[data-network-request-id="${CSS.escape(anchor.networkRequestId)}"]`);
|
|
664
700
|
}
|
|
665
701
|
if (anchor.node) {
|
|
666
|
-
|
|
667
|
-
root,
|
|
668
|
-
|
|
669
|
-
|
|
702
|
+
const nodeElement =
|
|
703
|
+
deepQuerySelector(root,
|
|
704
|
+
`[data-backend-node-id="${CSS.escape(String(anchor.node.backendNodeId))}"][data-target-id="${
|
|
705
|
+
CSS.escape(anchor.node.targetId)}"]`);
|
|
706
|
+
if (nodeElement) {
|
|
707
|
+
return nodeElement;
|
|
708
|
+
}
|
|
709
|
+
// Backend node IDs are not stable across reloads, so rematch by VE path and text.
|
|
710
|
+
return rematchDOMNodeByVePathAndText(anchor, root, cachedJslogElements);
|
|
670
711
|
}
|
|
671
712
|
if (anchor.editor) {
|
|
672
713
|
const {lineNumber, filePath} = anchor.editor;
|
|
@@ -29,6 +29,10 @@ import {
|
|
|
29
29
|
|
|
30
30
|
export const COMMENT_MODE_CURSOR = 'var(--comment-cursor)';
|
|
31
31
|
|
|
32
|
+
const PIN_SIZE = 20;
|
|
33
|
+
const PIN_RADIUS = PIN_SIZE / 2;
|
|
34
|
+
const PIN_STACK_OFFSET = 26;
|
|
35
|
+
|
|
32
36
|
export interface StartOptions {
|
|
33
37
|
root?: Document|Element;
|
|
34
38
|
scrollTarget?: EventTarget;
|
|
@@ -453,20 +457,42 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
453
457
|
|
|
454
458
|
const newPins: PinData[] = [];
|
|
455
459
|
const newHighlights: HighlightRectData[] = [];
|
|
460
|
+
const elementTotalPinCounts = new Map<Element, number>();
|
|
456
461
|
const elementPinCounts = new Map<Element, number>();
|
|
457
462
|
const rectCache = new Map<Element, DOMRect>();
|
|
458
463
|
const activeScrollRoots = new Set<ShadowRoot>();
|
|
464
|
+
const activeThreads: Array<{
|
|
465
|
+
id: string,
|
|
466
|
+
el: Element,
|
|
467
|
+
visibleRect: VisibleRect,
|
|
468
|
+
}> = [];
|
|
459
469
|
const resolvedPins: Array<{id: string, el: Element, visibleRect: VisibleRect}> = [];
|
|
460
|
-
const createPin = (id: string, visibleRect: VisibleRect, offsetIndex: number,
|
|
461
|
-
resolved: boolean): PinData =>
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
+
const createPin = (id: string, el: Element, visibleRect: VisibleRect, offsetIndex: number,
|
|
471
|
+
totalPinsOnElement: number, visible: boolean, resolved: boolean): PinData => {
|
|
472
|
+
const doc = el.ownerDocument || document;
|
|
473
|
+
const win = doc.defaultView || window;
|
|
474
|
+
const viewportWidth = win.innerWidth || doc.documentElement.clientWidth;
|
|
475
|
+
const viewportHeight = win.innerHeight || doc.documentElement.clientHeight;
|
|
476
|
+
|
|
477
|
+
// Offset by 26px vertically so multiple comment pins on the same element stack vertically without overlapping.
|
|
478
|
+
const offsetY = offsetIndex * PIN_STACK_OFFSET;
|
|
479
|
+
|
|
480
|
+
// Offset by -PIN_RADIUS (half of the 20px pin diameter) so the pin icon is centered on the top-right corner of the visible clipped area,
|
|
481
|
+
// and clamp to the viewport boundaries so pins near the border do not overflow out of view.
|
|
482
|
+
const minTop = 0;
|
|
483
|
+
const maxTop = Math.max(minTop, viewportHeight - PIN_SIZE);
|
|
484
|
+
const maxLeft = Math.max(0, viewportWidth - PIN_SIZE);
|
|
485
|
+
const maxBaseTop = Math.max(minTop, maxTop - (totalPinsOnElement - 1) * PIN_STACK_OFFSET);
|
|
486
|
+
const baseTop = Math.min(Math.max(minTop, visibleRect.top - PIN_RADIUS), maxBaseTop);
|
|
487
|
+
|
|
488
|
+
return {
|
|
489
|
+
id,
|
|
490
|
+
top: scrollY + Math.min(baseTop + offsetY, maxTop),
|
|
491
|
+
left: scrollX + Math.min(Math.max(0, visibleRect.right - PIN_RADIUS), maxLeft),
|
|
492
|
+
visible,
|
|
493
|
+
resolved,
|
|
494
|
+
};
|
|
495
|
+
};
|
|
470
496
|
|
|
471
497
|
for (const thread of this.#commentManager.getCommentThreads()) {
|
|
472
498
|
// Generated comments do not render overlay pins.
|
|
@@ -519,16 +545,23 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
519
545
|
continue;
|
|
520
546
|
}
|
|
521
547
|
|
|
548
|
+
elementTotalPinCounts.set(el, (elementTotalPinCounts.get(el) || 0) + 1);
|
|
549
|
+
activeThreads.push({id: thread.id, el, visibleRect});
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
for (const {id, el, visibleRect} of activeThreads) {
|
|
553
|
+
const totalPinsOnElement = elementTotalPinCounts.get(el) || 1;
|
|
522
554
|
const offsetIndex = elementPinCounts.get(el) || 0;
|
|
523
555
|
elementPinCounts.set(el, offsetIndex + 1);
|
|
524
|
-
newPins.push(createPin(
|
|
556
|
+
newPins.push(createPin(id, el, visibleRect, offsetIndex, totalPinsOnElement, true, false));
|
|
525
557
|
}
|
|
526
558
|
|
|
527
559
|
// Pins of RESOLVED threads are hidden; the UI shows the pin of the open
|
|
528
560
|
// thread. They all share the slot below the other pins of their element,
|
|
529
561
|
// so they never shift the other pins, and only one is open at a time.
|
|
530
562
|
for (const {id, el, visibleRect} of resolvedPins) {
|
|
531
|
-
|
|
563
|
+
const activeCount = elementPinCounts.get(el) || 0;
|
|
564
|
+
newPins.push(createPin(id, el, visibleRect, activeCount, activeCount + 1, false, true));
|
|
532
565
|
}
|
|
533
566
|
|
|
534
567
|
if (this.#scrollListener) {
|
|
@@ -9,7 +9,7 @@ import * as Lit from '../../lit/lit.js';
|
|
|
9
9
|
|
|
10
10
|
import floatingButtonStyles from './floatingButton.css.js';
|
|
11
11
|
|
|
12
|
-
const {html
|
|
12
|
+
const {html} = Lit;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* A simple floating button component, primarily used to display the 'Ask AI!'
|
|
@@ -111,14 +111,10 @@ export class FloatingButton extends HTMLElement {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
#render(): void {
|
|
114
|
-
const classes = classMap({
|
|
115
|
-
gemini: this.iconName === 'spark',
|
|
116
|
-
});
|
|
117
|
-
|
|
118
114
|
// clang-format off
|
|
119
115
|
Lit.render(html`
|
|
120
116
|
<style>${floatingButtonStyles}</style>
|
|
121
|
-
<button
|
|
117
|
+
<button ?disabled=${this.disabled}><devtools-icon .name=${this.iconName}></devtools-icon></button>`,
|
|
122
118
|
this.#shadow, {host: this});
|
|
123
119
|
// clang-format on
|
|
124
120
|
}
|
|
@@ -73,50 +73,6 @@ button {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.gemini {
|
|
77
|
-
display: flex;
|
|
78
|
-
justify-content: center;
|
|
79
|
-
align-items: center;
|
|
80
|
-
width: var(--sys-size-9);
|
|
81
|
-
height: var(--sys-size-9);
|
|
82
|
-
border-radius: var(--sys-shape-corner-full);
|
|
83
|
-
background-image: var(--app-gradient-google-ai);
|
|
84
|
-
font: var(--sys-typescale-body4-medium);
|
|
85
|
-
color: var(--ref-palette-neutral100);
|
|
86
|
-
transition: width 1s, padding 1s;
|
|
87
|
-
margin-left: auto;
|
|
88
|
-
overflow: hidden;
|
|
89
|
-
position: relative;
|
|
90
|
-
border: 0;
|
|
91
|
-
|
|
92
|
-
&:focus-visible {
|
|
93
|
-
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&:hover::after,
|
|
97
|
-
&:active::after {
|
|
98
|
-
content: "";
|
|
99
|
-
height: 100%;
|
|
100
|
-
width: 100%;
|
|
101
|
-
border-radius: inherit;
|
|
102
|
-
position: absolute;
|
|
103
|
-
top: 0;
|
|
104
|
-
left: 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&:hover::after {
|
|
108
|
-
background-color: var(--sys-color-state-hover-on-prominent);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&:active::after {
|
|
112
|
-
background-color: var(--sys-color-state-ripple-primary);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
devtools-icon {
|
|
116
|
-
color: var(--ref-palette-neutral100) !important; /* stylelint-disable-line declaration-no-important */
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
76
|
@media (forced-colors: active) {
|
|
121
77
|
button {
|
|
122
78
|
forced-color-adjust: none;
|
|
@@ -32,12 +32,10 @@
|
|
|
32
32
|
padding: 0 var(--sys-size-3);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.diff-line-marker-addition,
|
|
36
35
|
.diff-line-addition {
|
|
37
36
|
background-color: var(--sys-color-surface-green);
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
.diff-line-marker-deletion,
|
|
41
39
|
.diff-line-deletion {
|
|
42
40
|
background-color: var(--sys-color-surface-error);
|
|
43
41
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
/* eslint-disable @devtools/no-lit-render-outside-of-view, @devtools/enforce-custom-element-definitions-location */
|
|
5
5
|
|
|
6
|
+
import * as Platform from '../../../core/platform/platform.js';
|
|
6
7
|
import * as UI from '../../legacy/legacy.js';
|
|
7
8
|
import {AsyncDirective, Directives, html, type LitTemplate, nothing, render} from '../../lit/lit.js';
|
|
8
9
|
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
@@ -657,6 +658,34 @@ export class Tooltip extends HTMLElement {
|
|
|
657
658
|
}
|
|
658
659
|
}
|
|
659
660
|
|
|
661
|
+
export class IdFactory {
|
|
662
|
+
static #nextId = 0;
|
|
663
|
+
#keys = new Map<string|number, number>();
|
|
664
|
+
#id: number|string;
|
|
665
|
+
|
|
666
|
+
constructor(id?: number|string) {
|
|
667
|
+
this.#id = id ?? IdFactory.#nextId++;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
keyed(key: string|number, ...additionalSuffixes: Array<number|string>): string {
|
|
671
|
+
const keyedId = Platform.MapUtilities.getWithDefault(this.#keys, key, () => 0);
|
|
672
|
+
this.#keys.set(key, keyedId + 1);
|
|
673
|
+
return this.get(key, ...additionalSuffixes, keyedId);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
get(suffix: string|number, ...additionalSuffixes: Array<number|string>): string {
|
|
677
|
+
return `${this.#id}-${[suffix, ...additionalSuffixes].join('-')}`;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
clearKeys(): void {
|
|
681
|
+
this.#keys.clear();
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
subfactory(name: string, suffix: string|number): IdFactory {
|
|
685
|
+
return new IdFactory(`${name}-${this.#id}-${suffix}`);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
660
689
|
type IfExpandedContent = LitTemplate|Iterable<LitTemplate>|Promise<LitTemplate|Iterable<LitTemplate>>;
|
|
661
690
|
|
|
662
691
|
class IfExpandedDirective extends AsyncDirective.AsyncDirective {
|
|
@@ -36,7 +36,7 @@ li {
|
|
|
36
36
|
mask-image: var(--image-file-arrow-collapse);
|
|
37
37
|
background-color: var(--icon-default);
|
|
38
38
|
margin-top: calc(-1 * var(--sys-size-2));
|
|
39
|
-
margin-right:
|
|
39
|
+
margin-right: var(--sys-size-3);
|
|
40
40
|
content: "";
|
|
41
41
|
text-shadow: none;
|
|
42
42
|
height: var(--sys-size-7);
|
|
@@ -832,10 +832,12 @@ export class ContextMenu extends SubMenu {
|
|
|
832
832
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
833
833
|
Host.InspectorFrontendHostAPI.Events.ContextMenuItemSelected, this.onItemSelected, this);
|
|
834
834
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
835
|
+
if (menuObject.length > 0) {
|
|
836
|
+
VisualLogging.registerLoggable(
|
|
837
|
+
menuObject, `${VisualLogging.menu()}`, this.loggableParent,
|
|
838
|
+
new DOMRect(0, 0, MENU_ITEM_WIDTH_FOR_LOGGING, MENU_ITEM_HEIGHT_FOR_LOGGING * menuObject.length));
|
|
839
|
+
this.registerLoggablesWithin(menuObject);
|
|
840
|
+
}
|
|
839
841
|
this.openHostedMenu = menuObject;
|
|
840
842
|
// showContextMenuAtPoint call above synchronously issues a clear event for previous context menu (if any),
|
|
841
843
|
// so we skip it before subscribing to the clear event.
|
|
@@ -935,7 +937,7 @@ export class ContextMenu extends SubMenu {
|
|
|
935
937
|
Host.InspectorFrontendHostAPI.Events.ContextMenuCleared, this.menuCleared, this);
|
|
936
938
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(
|
|
937
939
|
Host.InspectorFrontendHostAPI.Events.ContextMenuItemSelected, this.onItemSelected, this);
|
|
938
|
-
if (this.openHostedMenu) {
|
|
940
|
+
if (this.openHostedMenu && this.openHostedMenu.length > 0) {
|
|
939
941
|
void VisualLogging.logResize(this.openHostedMenu, new DOMRect(0, 0, 0, 0));
|
|
940
942
|
}
|
|
941
943
|
this.openHostedMenu = null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright 2026 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
+
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
4
5
|
|
|
5
6
|
import * as Common from '../../core/common/common.js';
|
|
6
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
@@ -912,7 +912,7 @@ function createLocaleInfobar(): Infobar {
|
|
|
912
912
|
new Intl.DisplayNames([devtoolsLocale.locale], {type: 'language'}).of(locale.language || 'en') || 'English';
|
|
913
913
|
|
|
914
914
|
const languageSetting = Common.Settings.Settings.instance().moduleSetting<string>('language');
|
|
915
|
-
|
|
915
|
+
const infobar = new Infobar(
|
|
916
916
|
InfobarType.INFO, i18nString(UIStrings.devToolsLanguageMissmatch, {PH1: closestSupportedLanguageInCurrentLocale}),
|
|
917
917
|
[
|
|
918
918
|
{
|
|
@@ -937,6 +937,10 @@ function createLocaleInfobar(): Infobar {
|
|
|
937
937
|
},
|
|
938
938
|
],
|
|
939
939
|
getDisableLocaleInfoBarSetting(), 'language-mismatch');
|
|
940
|
+
// Closing the infobar with the close button or Esc also answers it, so that
|
|
941
|
+
// we notify users only once.
|
|
942
|
+
infobar.setCloseCallback(() => getDisableLocaleInfoBarSetting().set(true));
|
|
943
|
+
return infobar;
|
|
940
944
|
}
|
|
941
945
|
|
|
942
946
|
function reloadDevTools(): void {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright 2009 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
+
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
4
5
|
|
|
5
6
|
import * as VisualLogging from '../visual_logging/visual_logging.js';
|
|
6
7
|
|