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
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
// Copyright 2011 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 */
|
|
5
4
|
|
|
6
5
|
import '../../ui/legacy/legacy.js';
|
|
7
6
|
|
|
7
|
+
import * as Common from '../../core/common/common.js';
|
|
8
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
9
9
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
10
10
|
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
11
11
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
12
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
|
-
import {render} from '../../ui/lit/lit.js';
|
|
13
|
+
import {Directives, html, type LitTemplate, render} from '../../ui/lit/lit.js';
|
|
14
14
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
15
15
|
|
|
16
16
|
import {RequestHTMLView} from './RequestHTMLView.js';
|
|
17
17
|
import {SignedExchangeInfoView} from './SignedExchangeInfoView.js';
|
|
18
18
|
|
|
19
|
+
const {widget} = UI.Widget;
|
|
20
|
+
const {repeat} = Directives;
|
|
21
|
+
|
|
19
22
|
const UIStrings = {
|
|
20
23
|
/**
|
|
21
24
|
* @description Text in Request Preview View of the Network panel
|
|
@@ -25,17 +28,102 @@ const UIStrings = {
|
|
|
25
28
|
* @description Text in Request Preview View of the Network panel
|
|
26
29
|
*/
|
|
27
30
|
previewNotAvailable: 'Preview not available',
|
|
31
|
+
/**
|
|
32
|
+
* @description Text shown in the empty widget when there is no content to
|
|
33
|
+
* preview in the Request Preview View of the Network panel.
|
|
34
|
+
*/
|
|
35
|
+
nothingToPreview: 'Nothing to preview',
|
|
28
36
|
} as const;
|
|
29
37
|
const str_ = i18n.i18n.registerUIStrings('panels/network/RequestPreviewView.ts', UIStrings);
|
|
30
38
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
39
|
+
|
|
40
|
+
export interface ViewInput {
|
|
41
|
+
request: SDK.NetworkRequest.NetworkRequest;
|
|
42
|
+
resourceType: Common.ResourceType.ResourceType;
|
|
43
|
+
mimeType: string;
|
|
44
|
+
highlighterType: string;
|
|
45
|
+
hasSignedExchange: boolean;
|
|
46
|
+
error: string|null;
|
|
47
|
+
htmlDataURL: string|null;
|
|
48
|
+
parsedJSON: SourceFrame.JSONView.ParsedJSON|null;
|
|
49
|
+
parsedXML: Document|null;
|
|
50
|
+
isTextContent: boolean;
|
|
51
|
+
hasTextContent: boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
55
|
+
|
|
56
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
57
|
+
// clang-format off
|
|
58
|
+
let previewTemplate: LitTemplate;
|
|
59
|
+
if (input.hasSignedExchange) {
|
|
60
|
+
previewTemplate = html`${widget(SignedExchangeInfoView, {request: input.request})}`;
|
|
61
|
+
} else if (input.error !== null) {
|
|
62
|
+
previewTemplate = html`${widget(UI.EmptyWidget.EmptyWidget, {
|
|
63
|
+
header: i18nString(UIStrings.failedToLoadResponseData),
|
|
64
|
+
text: input.error,
|
|
65
|
+
})}`;
|
|
66
|
+
} else if (input.parsedJSON) {
|
|
67
|
+
previewTemplate = html`${widget(SourceFrame.JSONView.SearchableJsonView, {parsedJSON: input.parsedJSON})}`;
|
|
68
|
+
} else if (input.htmlDataURL) {
|
|
69
|
+
previewTemplate = html`${widget(RequestHTMLView, {dataURL: input.htmlDataURL})}`;
|
|
70
|
+
} else if (input.resourceType === Common.ResourceType.resourceTypes.Image) {
|
|
71
|
+
previewTemplate = html`${widget(
|
|
72
|
+
(element: HTMLElement) => new SourceFrame.ImageView.ImageView(input.mimeType, input.request, element),
|
|
73
|
+
{showToolbar: true},
|
|
74
|
+
)}`;
|
|
75
|
+
} else if (input.resourceType === Common.ResourceType.resourceTypes.Font) {
|
|
76
|
+
previewTemplate = html`${widget(
|
|
77
|
+
(element: HTMLElement) => new SourceFrame.FontView.FontView(input.mimeType, input.request, element),
|
|
78
|
+
{showToolbar: true},
|
|
79
|
+
)}`;
|
|
80
|
+
} else if (!input.isTextContent) {
|
|
81
|
+
previewTemplate = html`${widget(UI.EmptyWidget.EmptyWidget, {
|
|
82
|
+
header: i18nString(UIStrings.previewNotAvailable),
|
|
83
|
+
text: '',
|
|
84
|
+
})}`;
|
|
85
|
+
} else if (!input.hasTextContent) {
|
|
86
|
+
previewTemplate = html`${widget(UI.EmptyWidget.EmptyWidget, {
|
|
87
|
+
header: i18nString(UIStrings.nothingToPreview),
|
|
88
|
+
text: '',
|
|
89
|
+
})}`;
|
|
90
|
+
} else if (input.parsedXML) {
|
|
91
|
+
const parsedXML = input.parsedXML;
|
|
92
|
+
previewTemplate = html`${widget(element => SourceFrame.XMLView.XMLView.createSearchableView(parsedXML, element))}`;
|
|
93
|
+
} else {
|
|
94
|
+
previewTemplate = html`${widget(
|
|
95
|
+
element => new SourceFrame.ResourceSourceFrame.SearchableContainer(
|
|
96
|
+
input.request, input.highlighterType, element),
|
|
97
|
+
)}`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
render(
|
|
101
|
+
html`${repeat([input.request], request => request, () => previewTemplate)}`,
|
|
102
|
+
target,
|
|
103
|
+
{
|
|
104
|
+
container: {
|
|
105
|
+
attributes: {
|
|
106
|
+
jslog: `${VisualLogging.pane('preview').track({resize: true})}`,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
);
|
|
111
|
+
// clang-format on
|
|
112
|
+
};
|
|
113
|
+
|
|
31
114
|
export class RequestPreviewView extends UI.Widget.VBox {
|
|
32
115
|
#request!: SDK.NetworkRequest.NetworkRequest;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
116
|
+
readonly #view: View;
|
|
117
|
+
#error: string|null = null;
|
|
118
|
+
#htmlDataURL: string|null = null;
|
|
119
|
+
#parsedJSON: SourceFrame.JSONView.ParsedJSON|null = null;
|
|
120
|
+
#parsedXML: Document|null = null;
|
|
121
|
+
#isTextContent = false;
|
|
122
|
+
#hasTextContent = false;
|
|
123
|
+
|
|
124
|
+
constructor(request?: SDK.NetworkRequest.NetworkRequest|HTMLElement, view: View = DEFAULT_VIEW) {
|
|
125
|
+
super(request instanceof HTMLElement ? request : undefined);
|
|
126
|
+
this.#view = view;
|
|
39
127
|
if (request && !(request instanceof HTMLElement)) {
|
|
40
128
|
this.#request = request;
|
|
41
129
|
}
|
|
@@ -50,80 +138,111 @@ export class RequestPreviewView extends UI.Widget.VBox {
|
|
|
50
138
|
return;
|
|
51
139
|
}
|
|
52
140
|
this.#request = request;
|
|
53
|
-
this
|
|
54
|
-
this.
|
|
55
|
-
this.element.removeChildren();
|
|
56
|
-
if (this.isShowing()) {
|
|
57
|
-
void this.doShowPreview();
|
|
58
|
-
}
|
|
141
|
+
this.#resetState();
|
|
142
|
+
this.requestUpdate();
|
|
59
143
|
}
|
|
60
144
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return view;
|
|
66
|
-
}
|
|
67
|
-
view.show(this.element);
|
|
68
|
-
await view.updateComplete;
|
|
69
|
-
if (!(view instanceof UI.View.SimpleView)) {
|
|
70
|
-
return view;
|
|
71
|
-
}
|
|
72
|
-
const toolbar = this.element.createChild('devtools-toolbar', 'network-item-preview-toolbar');
|
|
73
|
-
void view.toolbarItems().then(items => {
|
|
74
|
-
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
75
|
-
render(items, toolbar);
|
|
76
|
-
});
|
|
77
|
-
return view;
|
|
145
|
+
// Used by layout test
|
|
146
|
+
// http/tests/devtools/network/network-choose-preview-view.js
|
|
147
|
+
get contentViewPromise(): Promise<UI.Widget.AnyWidget|null> {
|
|
148
|
+
return this.updateComplete.then(() => this.children().at(-1) ?? null);
|
|
78
149
|
}
|
|
79
150
|
|
|
80
151
|
override wasShown(): void {
|
|
81
152
|
super.wasShown();
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private doShowPreview(): Promise<UI.Widget.AnyWidget> {
|
|
86
|
-
if (!this.contentViewPromise) {
|
|
87
|
-
this.contentViewPromise = this.showPreview();
|
|
88
|
-
}
|
|
89
|
-
return this.contentViewPromise;
|
|
153
|
+
this.requestUpdate();
|
|
90
154
|
}
|
|
91
155
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.failedToLoadResponseData), contentData.error);
|
|
156
|
+
override async performUpdate(): Promise<void> {
|
|
157
|
+
if (!this.#request) {
|
|
158
|
+
return;
|
|
96
159
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (
|
|
100
|
-
return
|
|
160
|
+
const request = this.#request;
|
|
161
|
+
await this.#loadPreviewData(request);
|
|
162
|
+
if (this.#request !== request) {
|
|
163
|
+
return;
|
|
101
164
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (jsonView) {
|
|
106
|
-
return jsonView;
|
|
165
|
+
let resourceType = Common.ResourceType.ResourceType.fromMimeType(request.mimeType);
|
|
166
|
+
if (resourceType === Common.ResourceType.resourceTypes.Other) {
|
|
167
|
+
resourceType = request.contentType();
|
|
107
168
|
}
|
|
169
|
+
const highlighterType = request.mimeType.replace(/;.*/, '') || request.contentType().canonicalMimeType();
|
|
170
|
+
this.#view(
|
|
171
|
+
{
|
|
172
|
+
request,
|
|
173
|
+
resourceType,
|
|
174
|
+
mimeType: request.mimeType,
|
|
175
|
+
highlighterType,
|
|
176
|
+
hasSignedExchange: Boolean(request.signedExchangeInfo()),
|
|
177
|
+
error: this.#error,
|
|
178
|
+
htmlDataURL: this.#htmlDataURL,
|
|
179
|
+
parsedJSON: this.#parsedJSON,
|
|
180
|
+
parsedXML: this.#parsedXML,
|
|
181
|
+
isTextContent: this.#isTextContent,
|
|
182
|
+
hasTextContent: this.#hasTextContent,
|
|
183
|
+
},
|
|
184
|
+
undefined,
|
|
185
|
+
this.contentElement,
|
|
186
|
+
);
|
|
187
|
+
}
|
|
108
188
|
|
|
109
|
-
|
|
189
|
+
#resetState(): void {
|
|
190
|
+
this.#error = null;
|
|
191
|
+
this.#htmlDataURL = null;
|
|
192
|
+
this.#parsedJSON = null;
|
|
193
|
+
this.#parsedXML = null;
|
|
194
|
+
this.#isTextContent = false;
|
|
195
|
+
this.#hasTextContent = false;
|
|
110
196
|
}
|
|
111
197
|
|
|
112
|
-
async
|
|
113
|
-
|
|
114
|
-
|
|
198
|
+
async #loadPreviewData(request: SDK.NetworkRequest.NetworkRequest): Promise<void> {
|
|
199
|
+
this.#resetState();
|
|
200
|
+
|
|
201
|
+
if (request.signedExchangeInfo()) {
|
|
202
|
+
return;
|
|
115
203
|
}
|
|
116
204
|
|
|
117
|
-
const
|
|
118
|
-
if (
|
|
119
|
-
return
|
|
205
|
+
const contentData = await request.requestContentData();
|
|
206
|
+
if (this.#request !== request) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (TextUtils.ContentData.ContentData.isError(contentData)) {
|
|
210
|
+
this.#error = contentData.error;
|
|
211
|
+
return;
|
|
120
212
|
}
|
|
121
213
|
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
|
|
214
|
+
const allowlist = new Set<string>(['text/html', 'text/plain', 'application/xhtml+xml']);
|
|
215
|
+
if (allowlist.has(request.mimeType)) {
|
|
216
|
+
// http://crbug.com/767393 - DevTools should recognize JSON regardless of
|
|
217
|
+
// the content type
|
|
218
|
+
const parsedJSON = await SourceFrame.JSONView.JSONView.parseJSON(contentData.text);
|
|
219
|
+
if (this.#request !== request) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (parsedJSON && typeof parsedJSON.data === 'object') {
|
|
223
|
+
this.#parsedJSON = parsedJSON;
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const dataURL = contentData.asDataUrl();
|
|
227
|
+
if (dataURL) {
|
|
228
|
+
this.#htmlDataURL = dataURL;
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
125
231
|
}
|
|
126
232
|
|
|
127
|
-
|
|
233
|
+
this.#isTextContent = contentData.isTextContent;
|
|
234
|
+
this.#hasTextContent = Boolean(contentData.isTextContent && contentData.text);
|
|
235
|
+
if (this.#hasTextContent) {
|
|
236
|
+
this.#parsedXML = SourceFrame.XMLView.XMLView.parseXML(contentData.text, contentData.mimeType);
|
|
237
|
+
if (!this.#parsedXML) {
|
|
238
|
+
const parsedJSON = await SourceFrame.JSONView.JSONView.parseJSON(contentData.text);
|
|
239
|
+
if (this.#request !== request) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (parsedJSON && typeof parsedJSON.data === 'object') {
|
|
243
|
+
this.#parsedJSON = parsedJSON;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
128
247
|
}
|
|
129
248
|
}
|
|
@@ -653,6 +653,13 @@ export class RequestTimingView extends UI.Widget.VBox {
|
|
|
653
653
|
}
|
|
654
654
|
|
|
655
655
|
set request(request: SDK.NetworkRequest.NetworkRequest) {
|
|
656
|
+
if (this.#request === request) {
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
659
|
+
if (this.isShowing()) {
|
|
660
|
+
this.#request?.removeEventListener(SDK.NetworkRequest.Events.TIMING_CHANGED, this.requestUpdate, this);
|
|
661
|
+
this.#request?.removeEventListener(SDK.NetworkRequest.Events.FINISHED_LOADING, this.requestUpdate, this);
|
|
662
|
+
}
|
|
656
663
|
this.#request = request;
|
|
657
664
|
if (this.isShowing()) {
|
|
658
665
|
this.#request.addEventListener(SDK.NetworkRequest.Events.TIMING_CHANGED, this.requestUpdate, this);
|
|
@@ -662,6 +669,13 @@ export class RequestTimingView extends UI.Widget.VBox {
|
|
|
662
669
|
}
|
|
663
670
|
|
|
664
671
|
set calculator(calculator: NetworkTimeCalculator.NetworkTimeCalculator) {
|
|
672
|
+
if (this.#calculator === calculator) {
|
|
673
|
+
return;
|
|
674
|
+
}
|
|
675
|
+
if (this.isShowing()) {
|
|
676
|
+
this.#calculator?.removeEventListener(NetworkTimeCalculator.Events.BOUNDARIES_CHANGED, this.#boundaryChanged,
|
|
677
|
+
this);
|
|
678
|
+
}
|
|
665
679
|
this.#calculator = calculator;
|
|
666
680
|
if (this.isShowing()) {
|
|
667
681
|
this.#calculator.addEventListener(NetworkTimeCalculator.Events.BOUNDARIES_CHANGED, this.#boundaryChanged, this);
|
|
@@ -685,8 +699,8 @@ export class RequestTimingView extends UI.Widget.VBox {
|
|
|
685
699
|
}
|
|
686
700
|
|
|
687
701
|
#boundaryChanged(): void {
|
|
688
|
-
const minimumBoundary = this
|
|
689
|
-
if (minimumBoundary !== this.#lastMinimumBoundary) {
|
|
702
|
+
const minimumBoundary = this.#calculator?.minimumBoundary();
|
|
703
|
+
if (minimumBoundary !== undefined && minimumBoundary !== this.#lastMinimumBoundary) {
|
|
690
704
|
this.#lastMinimumBoundary = minimumBoundary;
|
|
691
705
|
this.requestUpdate();
|
|
692
706
|
}
|