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,50 +1,93 @@
|
|
|
1
1
|
// Copyright 2021 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 * as i18n from '../../core/i18n/i18n.js';
|
|
7
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
7
|
import * as Protocol from '../../generated/protocol.js';
|
|
9
8
|
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
9
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
10
10
|
|
|
11
|
-
import {AffectedResourcesView} from './AffectedResourcesView.js';
|
|
11
|
+
import {AffectedResourcesView, type FrameCellData, renderFrameCell} from './AffectedResourcesView.js';
|
|
12
|
+
import type {IssueView} from './IssueView.js';
|
|
13
|
+
|
|
14
|
+
export type {FrameCellData};
|
|
15
|
+
|
|
16
|
+
export interface HeavyAdRow {
|
|
17
|
+
reason: string;
|
|
18
|
+
status: string;
|
|
19
|
+
frame: FrameCellData;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ViewInput {
|
|
23
|
+
rows: HeavyAdRow[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type View = (input: ViewInput, _output: undefined, target: HTMLElement) => void;
|
|
27
|
+
|
|
28
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
29
|
+
// clang-format off
|
|
30
|
+
render(html`
|
|
31
|
+
<tr>
|
|
32
|
+
<td class="affected-resource-header">${i18nString(UIStrings.limitExceeded)}</td>
|
|
33
|
+
<td class="affected-resource-header">${i18nString(UIStrings.resolutionStatus)}</td>
|
|
34
|
+
<td class="affected-resource-header">${i18nString(UIStrings.frameUrl)}</td>
|
|
35
|
+
</tr>
|
|
36
|
+
${input.rows.map(row => html`
|
|
37
|
+
<tr class="affected-resource-heavy-ad">
|
|
38
|
+
<td class="affected-resource-heavy-ad-info">${row.reason}</td>
|
|
39
|
+
<td class="affected-resource-heavy-ad-info">${row.status}</td>
|
|
40
|
+
${renderFrameCell(row.frame)}
|
|
41
|
+
</tr>
|
|
42
|
+
`)}
|
|
43
|
+
`, target);
|
|
44
|
+
// clang-format on
|
|
45
|
+
};
|
|
12
46
|
|
|
13
47
|
const UIStrings = {
|
|
14
48
|
/**
|
|
15
|
-
* @description Label in the Issues panel for the number of affected heavy ad
|
|
49
|
+
* @description Label in the Issues panel for the number of affected heavy ad
|
|
50
|
+
* resources.
|
|
16
51
|
*/
|
|
17
52
|
nResources: '{n, plural, =1 {# resource} other {# resources}}',
|
|
18
53
|
/**
|
|
19
|
-
* @description Column header in the Issues panel for the exceeded limit type
|
|
54
|
+
* @description Column header in the Issues panel for the exceeded limit type
|
|
55
|
+
* in the heavy ads affected resources table.
|
|
20
56
|
*/
|
|
21
57
|
limitExceeded: 'Limit exceeded',
|
|
22
58
|
/**
|
|
23
|
-
* @description Column header in the Issues panel for the resolution status in
|
|
59
|
+
* @description Column header in the Issues panel for the resolution status in
|
|
60
|
+
* the heavy ads affected resources table.
|
|
24
61
|
*/
|
|
25
62
|
resolutionStatus: 'Resolution status',
|
|
26
63
|
/**
|
|
27
|
-
* @description Column header in the Issues panel for the frame URL in the
|
|
64
|
+
* @description Column header in the Issues panel for the frame URL in the
|
|
65
|
+
* heavy ads affected resources table.
|
|
28
66
|
*/
|
|
29
67
|
frameUrl: 'Frame URL',
|
|
30
68
|
/**
|
|
31
|
-
* @description Resolution status in the Issues panel indicating that a heavy
|
|
69
|
+
* @description Resolution status in the Issues panel indicating that a heavy
|
|
70
|
+
* ad was removed.
|
|
32
71
|
*/
|
|
33
72
|
removed: 'Removed',
|
|
34
73
|
/**
|
|
35
|
-
* @description Resolution status in the Issues panel indicating that a heavy
|
|
74
|
+
* @description Resolution status in the Issues panel indicating that a heavy
|
|
75
|
+
* ad received a warning.
|
|
36
76
|
*/
|
|
37
77
|
warned: 'Warned',
|
|
38
78
|
/**
|
|
39
|
-
* @description Reason in the Issues panel for a heavy ad issue indicating
|
|
79
|
+
* @description Reason in the Issues panel for a heavy ad issue indicating
|
|
80
|
+
* peak CPU usage limit was exceeded.
|
|
40
81
|
*/
|
|
41
82
|
cpuPeakLimit: 'CPU peak limit',
|
|
42
83
|
/**
|
|
43
|
-
* @description Reason in the Issues panel for a heavy ad issue indicating
|
|
84
|
+
* @description Reason in the Issues panel for a heavy ad issue indicating
|
|
85
|
+
* total CPU usage limit was exceeded.
|
|
44
86
|
*/
|
|
45
87
|
cpuTotalLimit: 'CPU total limit',
|
|
46
88
|
/**
|
|
47
|
-
* @description Reason in the Issues panel for a heavy ad issue indicating
|
|
89
|
+
* @description Reason in the Issues panel for a heavy ad issue indicating
|
|
90
|
+
* total network bandwidth limit was exceeded.
|
|
48
91
|
*/
|
|
49
92
|
networkLimit: 'Network limit',
|
|
50
93
|
} as const;
|
|
@@ -52,20 +95,27 @@ const str_ = i18n.i18n.registerUIStrings('panels/issues/AffectedHeavyAdView.ts',
|
|
|
52
95
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
53
96
|
|
|
54
97
|
export class AffectedHeavyAdView extends AffectedResourcesView {
|
|
55
|
-
#
|
|
56
|
-
const header = document.createElement('tr');
|
|
57
|
-
this.appendColumnTitle(header, i18nString(UIStrings.limitExceeded));
|
|
58
|
-
this.appendColumnTitle(header, i18nString(UIStrings.resolutionStatus));
|
|
59
|
-
this.appendColumnTitle(header, i18nString(UIStrings.frameUrl));
|
|
98
|
+
readonly #view: View;
|
|
60
99
|
|
|
61
|
-
|
|
100
|
+
constructor(parent: IssueView, issue: IssuesManager.IssueAggregator.AggregatedIssue, jslogContext: string,
|
|
101
|
+
view: View = DEFAULT_VIEW) {
|
|
102
|
+
super(parent, issue, jslogContext);
|
|
103
|
+
this.#view = view;
|
|
104
|
+
}
|
|
62
105
|
|
|
63
|
-
|
|
106
|
+
#appendAffectedHeavyAds(heavyAds: Iterable<IssuesManager.HeavyAdIssue.HeavyAdIssue>): void {
|
|
107
|
+
const rows: HeavyAdRow[] = [];
|
|
108
|
+
const issueCategory = this.issue.getCategory();
|
|
64
109
|
for (const heavyAd of heavyAds) {
|
|
65
|
-
|
|
66
|
-
|
|
110
|
+
const details = heavyAd.details();
|
|
111
|
+
rows.push({
|
|
112
|
+
reason: this.#limitToString(details.reason),
|
|
113
|
+
status: this.#statusToString(details.resolution),
|
|
114
|
+
frame: this.createFrameCellData(details.frame.frameId, issueCategory),
|
|
115
|
+
});
|
|
67
116
|
}
|
|
68
|
-
this.
|
|
117
|
+
this.#view({rows}, undefined, this.affectedResources);
|
|
118
|
+
this.updateAffectedResourceCount(rows.length);
|
|
69
119
|
}
|
|
70
120
|
|
|
71
121
|
protected getResourceNameWithCount(count: number): Platform.UIString.LocalizedString {
|
|
@@ -94,29 +144,8 @@ export class AffectedHeavyAdView extends AffectedResourcesView {
|
|
|
94
144
|
return '';
|
|
95
145
|
}
|
|
96
146
|
|
|
97
|
-
#appendAffectedHeavyAd(heavyAd: Protocol.Audits.HeavyAdIssueDetails): void {
|
|
98
|
-
const element = document.createElement('tr');
|
|
99
|
-
element.classList.add('affected-resource-heavy-ad');
|
|
100
|
-
|
|
101
|
-
const reason = document.createElement('td');
|
|
102
|
-
reason.classList.add('affected-resource-heavy-ad-info');
|
|
103
|
-
reason.textContent = this.#limitToString(heavyAd.reason);
|
|
104
|
-
element.appendChild(reason);
|
|
105
|
-
|
|
106
|
-
const status = document.createElement('td');
|
|
107
|
-
status.classList.add('affected-resource-heavy-ad-info');
|
|
108
|
-
status.textContent = this.#statusToString(heavyAd.resolution);
|
|
109
|
-
element.appendChild(status);
|
|
110
|
-
|
|
111
|
-
const frameId = heavyAd.frame.frameId;
|
|
112
|
-
const frameUrl = this.createFrameCell(frameId, this.issue.getCategory());
|
|
113
|
-
element.appendChild(frameUrl);
|
|
114
|
-
|
|
115
|
-
this.affectedResources.appendChild(element);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
147
|
update(): void {
|
|
119
|
-
this.clear();
|
|
148
|
+
this.requestResolver.clear();
|
|
120
149
|
this.#appendAffectedHeavyAds(this.issue.getHeavyAdIssues());
|
|
121
150
|
}
|
|
122
151
|
}
|
|
@@ -13,11 +13,12 @@ import type * as Protocol from '../../generated/protocol.js';
|
|
|
13
13
|
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
14
14
|
import * as Logs from '../../models/logs/logs.js';
|
|
15
15
|
import type * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
16
|
+
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
16
17
|
import * as RequestLinkIcon from '../../ui/components/request_link_icon/request_link_icon.js';
|
|
17
18
|
import {Icon} from '../../ui/kit/kit.js';
|
|
18
19
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
19
20
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
20
|
-
import {render} from '../../ui/lit/lit.js';
|
|
21
|
+
import {html, type LitTemplate, nothing, render} from '../../ui/lit/lit.js';
|
|
21
22
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
22
23
|
import * as PanelsCommon from '../common/common.js';
|
|
23
24
|
|
|
@@ -61,6 +62,46 @@ export interface CreateRequestCellOptions {
|
|
|
61
62
|
additionalOnClickAction?: () => void;
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
export interface FrameCellData {
|
|
66
|
+
url: string;
|
|
67
|
+
hasFrame: boolean;
|
|
68
|
+
onReveal: () => void;
|
|
69
|
+
onMouseEnter: () => void;
|
|
70
|
+
onMouseLeave: () => void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function renderFrameCell(frame: FrameCellData|undefined): LitTemplate {
|
|
74
|
+
if (!frame) {
|
|
75
|
+
return html`<td></td>`;
|
|
76
|
+
}
|
|
77
|
+
// clang-format off
|
|
78
|
+
return html`
|
|
79
|
+
<td class="affected-resource-cell"
|
|
80
|
+
@mouseenter=${frame.onMouseEnter}
|
|
81
|
+
@mouseleave=${frame.onMouseLeave}>
|
|
82
|
+
${frame.hasFrame ? html`
|
|
83
|
+
<devtools-button
|
|
84
|
+
class="elements-panel"
|
|
85
|
+
.data=${{
|
|
86
|
+
variant: Buttons.Button.Variant.ICON,
|
|
87
|
+
iconName: 'code-circle',
|
|
88
|
+
// On devtools-button (ui/components/buttons/button.css), Size.MICRO sets both
|
|
89
|
+
// --button-width/--button-height and --icon-size to --sys-size-8 (16x16),
|
|
90
|
+
// matching the previous 16x16 medium icon size.
|
|
91
|
+
size: Buttons.Button.Size.MICRO,
|
|
92
|
+
title: i18nString(UIStrings.clickToRevealTheFramesDomNodeIn),
|
|
93
|
+
accessibleLabel: i18nString(UIStrings.clickToRevealTheFramesDomNodeIn),
|
|
94
|
+
jslogContext: 'elements-panel',
|
|
95
|
+
} as Buttons.Button.ButtonData}
|
|
96
|
+
@click=${frame.onReveal}>
|
|
97
|
+
</devtools-button>
|
|
98
|
+
` : nothing}
|
|
99
|
+
${frame.url}
|
|
100
|
+
</td>
|
|
101
|
+
`;
|
|
102
|
+
// clang-format on
|
|
103
|
+
}
|
|
104
|
+
|
|
64
105
|
/**
|
|
65
106
|
* The base class for all affected resource views. It provides basic scaffolding
|
|
66
107
|
* as well as machinery for resolving request and frame ids to SDK objects.
|
|
@@ -174,8 +215,37 @@ export abstract class AffectedResourcesView extends UI.TreeOutline.TreeElement {
|
|
|
174
215
|
}
|
|
175
216
|
}
|
|
176
217
|
|
|
177
|
-
protected
|
|
178
|
-
|
|
218
|
+
protected createFrameCellData(frameId: Protocol.Page.FrameId,
|
|
219
|
+
issueCategory: IssuesManager.Issue.IssueCategory): FrameCellData {
|
|
220
|
+
const frame = this.#resolveFrameId(frameId);
|
|
221
|
+
const url = frame && (frame.unreachableUrl() || frame.url) || i18nString(UIStrings.unknown);
|
|
222
|
+
return {
|
|
223
|
+
url,
|
|
224
|
+
hasFrame: Boolean(frame),
|
|
225
|
+
onReveal: async () => {
|
|
226
|
+
Host.userMetrics.issuesPanelResourceOpened(issueCategory, AffectedItem.ELEMENT);
|
|
227
|
+
const currentFrame = SDK.FrameManager.FrameManager.instance().getFrame(frameId);
|
|
228
|
+
if (currentFrame) {
|
|
229
|
+
const ownerNode = await currentFrame.getOwnerDOMNodeOrDocument();
|
|
230
|
+
if (ownerNode) {
|
|
231
|
+
void Common.Revealer.reveal(ownerNode);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
onMouseEnter: () => {
|
|
236
|
+
const currentFrame = SDK.FrameManager.FrameManager.instance().getFrame(frameId);
|
|
237
|
+
if (currentFrame) {
|
|
238
|
+
void currentFrame.highlight();
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
onMouseLeave: () => {
|
|
242
|
+
SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight(SDK.TargetManager.TargetManager.instance());
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
protected createFrameCell(frameId: Protocol.Page.FrameId,
|
|
248
|
+
issueCategory: IssuesManager.Issue.IssueCategory): HTMLElement {
|
|
179
249
|
const frame = this.#resolveFrameId(frameId);
|
|
180
250
|
const url = frame && (frame.unreachableUrl() || frame.url) || i18nString(UIStrings.unknown);
|
|
181
251
|
|
|
@@ -210,8 +280,8 @@ export abstract class AffectedResourcesView extends UI.TreeOutline.TreeElement {
|
|
|
210
280
|
return frameCell;
|
|
211
281
|
}
|
|
212
282
|
|
|
213
|
-
protected createRequestCell(affectedRequest: Protocol.Audits.AffectedRequest,
|
|
214
|
-
|
|
283
|
+
protected createRequestCell(affectedRequest: Protocol.Audits.AffectedRequest,
|
|
284
|
+
options: CreateRequestCellOptions = {}): HTMLElement {
|
|
215
285
|
const requestCell = document.createElement('td');
|
|
216
286
|
requestCell.classList.add('affected-resource-cell');
|
|
217
287
|
const requestLinkIcon = new RequestLinkIcon.RequestLinkIcon.RequestLinkIcon();
|
|
@@ -220,9 +290,8 @@ export abstract class AffectedResourcesView extends UI.TreeOutline.TreeElement {
|
|
|
220
290
|
return requestCell;
|
|
221
291
|
}
|
|
222
292
|
|
|
223
|
-
protected async createElementCell(
|
|
224
|
-
|
|
225
|
-
issueCategory: IssuesManager.Issue.IssueCategory): Promise<Element> {
|
|
293
|
+
protected async createElementCell({backendNodeId, nodeName, target}: IssuesManager.Issue.AffectedElement,
|
|
294
|
+
issueCategory: IssuesManager.Issue.IssueCategory): Promise<Element> {
|
|
226
295
|
if (!target) {
|
|
227
296
|
const cellElement = document.createElement('td');
|
|
228
297
|
cellElement.textContent = nodeName || i18nString(UIStrings.unavailable);
|
|
@@ -270,8 +339,8 @@ export abstract class AffectedResourcesView extends UI.TreeOutline.TreeElement {
|
|
|
270
339
|
header.appendChild(info);
|
|
271
340
|
}
|
|
272
341
|
|
|
273
|
-
protected createIssueDetailCell(textContent: string|HTMLElement,
|
|
274
|
-
|
|
342
|
+
protected createIssueDetailCell(textContent: string|HTMLElement,
|
|
343
|
+
additionalClass: string|null = null): HTMLTableDataCellElement {
|
|
275
344
|
const cell = document.createElement('td');
|
|
276
345
|
|
|
277
346
|
if (typeof textContent === 'string') {
|
|
@@ -286,9 +355,8 @@ export abstract class AffectedResourcesView extends UI.TreeOutline.TreeElement {
|
|
|
286
355
|
return cell;
|
|
287
356
|
}
|
|
288
357
|
|
|
289
|
-
protected appendIssueDetailCell(
|
|
290
|
-
|
|
291
|
-
additionalClass: string|null = null): HTMLTableDataCellElement {
|
|
358
|
+
protected appendIssueDetailCell(element: HTMLElement, textContent: string|HTMLElement,
|
|
359
|
+
additionalClass: string|null = null): HTMLTableDataCellElement {
|
|
292
360
|
const cell = this.createIssueDetailCell(textContent, additionalClass);
|
|
293
361
|
element.appendChild(cell);
|
|
294
362
|
return cell;
|
|
@@ -1,78 +1,152 @@
|
|
|
1
1
|
// Copyright 2021 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
|
|
|
5
|
+
import * as Host from '../../core/host/host.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
9
|
import * as Protocol from '../../generated/protocol.js';
|
|
9
10
|
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
11
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
|
+
import {html, type LitTemplate, nothing, render} from '../../ui/lit/lit.js';
|
|
13
|
+
import * as PanelsCommon from '../common/common.js';
|
|
10
14
|
|
|
11
|
-
import {AffectedResourcesView} from './AffectedResourcesView.js';
|
|
15
|
+
import {AffectedItem, AffectedResourcesView, type FrameCellData, renderFrameCell} from './AffectedResourcesView.js';
|
|
16
|
+
import type {IssueView} from './IssueView.js';
|
|
17
|
+
|
|
18
|
+
const {widget} = UI.Widget;
|
|
19
|
+
|
|
20
|
+
export type {FrameCellData};
|
|
12
21
|
|
|
13
22
|
const UIStrings = {
|
|
14
23
|
/**
|
|
15
|
-
* @description Label in the Issues panel for the number of affected resources
|
|
24
|
+
* @description Label in the Issues panel for the number of affected resources
|
|
25
|
+
* in the generic issue affected resources table.
|
|
16
26
|
*/
|
|
17
27
|
nResources: '{n, plural, =1 {# resource} other {# resources}}',
|
|
18
28
|
/**
|
|
19
|
-
* @description Column header in the Issues panel for frames in the generic
|
|
29
|
+
* @description Column header in the Issues panel for frames in the generic
|
|
30
|
+
* issue affected resources table.
|
|
20
31
|
*/
|
|
21
32
|
frameId: 'Frame',
|
|
22
33
|
/**
|
|
23
|
-
* @description Link text in the Issues panel for the violating DOM node in
|
|
34
|
+
* @description Link text in the Issues panel for the violating DOM node in
|
|
35
|
+
* the generic issue affected resources table.
|
|
24
36
|
*/
|
|
25
37
|
violatingNode: 'Violating node',
|
|
38
|
+
/**
|
|
39
|
+
* @description Fallback text in the Issues panel when an HTML element is
|
|
40
|
+
* unavailable in the affected resources table.
|
|
41
|
+
*/
|
|
42
|
+
unavailable: 'Unavailable',
|
|
26
43
|
} as const;
|
|
27
44
|
|
|
28
45
|
const str_ = i18n.i18n.registerUIStrings('panels/issues/GenericIssueDetailsView.ts', UIStrings);
|
|
29
46
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
30
47
|
|
|
48
|
+
export interface ElementCellData {
|
|
49
|
+
nodeName: string;
|
|
50
|
+
// Resolved in the presenter; `undefined` when the issue has no target.
|
|
51
|
+
deferredNode?: SDK.DOMModel.DeferredDOMNode;
|
|
52
|
+
onElementClick: () => void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface GenericIssueRow {
|
|
56
|
+
frame?: FrameCellData;
|
|
57
|
+
element?: ElementCellData;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ViewInput {
|
|
61
|
+
showFrameHeader: boolean;
|
|
62
|
+
rows: GenericIssueRow[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type View = (input: ViewInput, _output: undefined, target: HTMLElement) => void;
|
|
66
|
+
|
|
67
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
68
|
+
const renderElementCell = (element: ElementCellData): LitTemplate => {
|
|
69
|
+
const {deferredNode} = element;
|
|
70
|
+
if (!deferredNode) {
|
|
71
|
+
return html`<td>${element.nodeName || i18nString(UIStrings.unavailable)}</td>`;
|
|
72
|
+
}
|
|
73
|
+
// clang-format off
|
|
74
|
+
return html`
|
|
75
|
+
<td class="affected-resource-element devtools-link">
|
|
76
|
+
${widget(PanelsCommon.DOMLinkifier.DeferredDOMNodeLink, {
|
|
77
|
+
deferredNode,
|
|
78
|
+
options: {textContent: element.nodeName || undefined, onClick: element.onElementClick},
|
|
79
|
+
})}
|
|
80
|
+
</td>
|
|
81
|
+
`;
|
|
82
|
+
// clang-format on
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// clang-format off
|
|
86
|
+
render(html`
|
|
87
|
+
${input.showFrameHeader ? html`
|
|
88
|
+
<tr>
|
|
89
|
+
<td class="affected-resource-header">${i18nString(UIStrings.frameId)}</td>
|
|
90
|
+
</tr>
|
|
91
|
+
` : nothing}
|
|
92
|
+
${input.rows.map(row => html`
|
|
93
|
+
<tr class="affected-resource-directive">
|
|
94
|
+
${row.frame ? renderFrameCell(row.frame) : nothing}
|
|
95
|
+
${row.element ? renderElementCell(row.element) : nothing}
|
|
96
|
+
</tr>
|
|
97
|
+
`)}
|
|
98
|
+
`, target);
|
|
99
|
+
// clang-format on
|
|
100
|
+
};
|
|
101
|
+
|
|
31
102
|
export class GenericIssueDetailsView extends AffectedResourcesView {
|
|
32
|
-
|
|
103
|
+
readonly #view: View;
|
|
104
|
+
|
|
105
|
+
constructor(parent: IssueView, issue: IssuesManager.IssueAggregator.AggregatedIssue, jslogContext: string,
|
|
106
|
+
view: View = DEFAULT_VIEW) {
|
|
107
|
+
super(parent, issue, jslogContext);
|
|
108
|
+
this.#view = view;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
protected override getResourceNameWithCount(count: number): Platform.UIString.LocalizedString {
|
|
33
112
|
return i18nString(UIStrings.nResources, {n: count});
|
|
34
113
|
}
|
|
35
114
|
|
|
36
115
|
#appendDetails(genericIssues: ReadonlySet<IssuesManager.GenericIssue.GenericIssue>): void {
|
|
37
|
-
const header = document.createElement('tr');
|
|
38
|
-
|
|
39
116
|
const sampleIssueDetails = genericIssues.values().next().value?.details();
|
|
40
|
-
|
|
41
|
-
this.appendColumnTitle(header, i18nString(UIStrings.frameId));
|
|
42
|
-
}
|
|
117
|
+
const showFrameHeader = Boolean(sampleIssueDetails?.frameId);
|
|
43
118
|
|
|
44
119
|
// Only some `GenericIssueDetails` have information for the 'affected
|
|
45
|
-
// resources' view. We'll count them and only call `#
|
|
120
|
+
// resources' view. We'll count them and only call `#createDetailRow` for
|
|
46
121
|
// those. `updateAffectedResourceCount` will hide the section if the
|
|
47
122
|
// count is zero.
|
|
48
|
-
|
|
49
|
-
let count = 0;
|
|
123
|
+
const rows: GenericIssueRow[] = [];
|
|
50
124
|
for (const genericIssue of genericIssues) {
|
|
51
125
|
const hasAffectedResource = genericIssue.details().frameId || genericIssue.details().violatingNodeId;
|
|
52
126
|
if (hasAffectedResource) {
|
|
53
|
-
|
|
54
|
-
void this.#appendDetail(genericIssue);
|
|
127
|
+
rows.push(this.#createDetailRow(genericIssue));
|
|
55
128
|
}
|
|
56
129
|
}
|
|
57
|
-
this.
|
|
130
|
+
this.#view({showFrameHeader, rows}, undefined, this.affectedResources);
|
|
131
|
+
this.updateAffectedResourceCount(rows.length);
|
|
58
132
|
}
|
|
59
133
|
|
|
60
|
-
|
|
61
|
-
const element = document.createElement('tr');
|
|
62
|
-
element.classList.add('affected-resource-directive');
|
|
63
|
-
|
|
134
|
+
#createDetailRow(genericIssue: IssuesManager.GenericIssue.GenericIssue): GenericIssueRow {
|
|
64
135
|
const details = genericIssue.details();
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
136
|
+
const category = genericIssue.getCategory();
|
|
137
|
+
const frame = details.frameId ? this.createFrameCellData(details.frameId, category) : undefined;
|
|
138
|
+
let element: ElementCellData|undefined;
|
|
68
139
|
if (details.violatingNodeId) {
|
|
69
|
-
const target = genericIssue.model()?.target()
|
|
70
|
-
element
|
|
71
|
-
|
|
72
|
-
|
|
140
|
+
const target = genericIssue.model()?.target();
|
|
141
|
+
element = {
|
|
142
|
+
nodeName: this.#violatingNodeIdName(details.errorType),
|
|
143
|
+
deferredNode: target ? new SDK.DOMModel.DeferredDOMNode(target, details.violatingNodeId) : undefined,
|
|
144
|
+
onElementClick: () => {
|
|
145
|
+
Host.userMetrics.issuesPanelResourceOpened(category, AffectedItem.ELEMENT);
|
|
146
|
+
},
|
|
147
|
+
};
|
|
73
148
|
}
|
|
74
|
-
|
|
75
|
-
this.affectedResources.appendChild(element);
|
|
149
|
+
return {frame, element};
|
|
76
150
|
}
|
|
77
151
|
|
|
78
152
|
#violatingNodeIdName(errorType: Protocol.Audits.GenericIssueErrorType): Platform.UIString.LocalizedString {
|
|
@@ -86,12 +160,18 @@ export class GenericIssueDetailsView extends AffectedResourcesView {
|
|
|
86
160
|
}
|
|
87
161
|
}
|
|
88
162
|
|
|
89
|
-
|
|
90
|
-
this.clear();
|
|
163
|
+
override clear(): void {
|
|
164
|
+
this.requestResolver.clear();
|
|
165
|
+
this.#view({showFrameHeader: false, rows: []}, undefined, this.affectedResources);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
override update(): void {
|
|
169
|
+
this.requestResolver.clear();
|
|
91
170
|
const issues = this.issue.getGenericIssues();
|
|
92
171
|
if (issues.size > 0) {
|
|
93
172
|
this.#appendDetails(issues);
|
|
94
173
|
} else {
|
|
174
|
+
this.#view({showFrameHeader: false, rows: []}, undefined, this.affectedResources);
|
|
95
175
|
this.updateAffectedResourceCount(0);
|
|
96
176
|
}
|
|
97
177
|
}
|
|
@@ -7,6 +7,7 @@ import * as AffectedElementsView from './AffectedElementsView.js';
|
|
|
7
7
|
import * as AffectedLazyLoadImagesView from './AffectedLazyLoadImagesView.js';
|
|
8
8
|
import * as AffectedMetadataAllowedSitesView from './AffectedMetadataAllowedSitesView.js';
|
|
9
9
|
import * as AffectedSelectivePermissionsInterventionView from './AffectedSelectivePermissionsInterventionView.js';
|
|
10
|
+
import * as GenericIssueDetailsView from './GenericIssueDetailsView.js';
|
|
10
11
|
import * as IssueRevealer from './IssueRevealer.js';
|
|
11
12
|
import * as IssuesPane from './IssuesPane.js';
|
|
12
13
|
import * as IssueView from './IssueView.js';
|
|
@@ -17,6 +18,7 @@ export {
|
|
|
17
18
|
AffectedLazyLoadImagesView,
|
|
18
19
|
AffectedMetadataAllowedSitesView,
|
|
19
20
|
AffectedSelectivePermissionsInterventionView,
|
|
21
|
+
GenericIssueDetailsView,
|
|
20
22
|
IssueRevealer,
|
|
21
23
|
IssuesPane,
|
|
22
24
|
IssueView,
|
|
@@ -309,7 +309,7 @@ ul > li.plain-enum::before {
|
|
|
309
309
|
|
|
310
310
|
.affected-resource-request {
|
|
311
311
|
font-size: var(--sys-typescale-body4-size);
|
|
312
|
-
line-height:
|
|
312
|
+
line-height: var(--sys-typescale-body4-line-height);
|
|
313
313
|
border: 0;
|
|
314
314
|
border-collapse: collapse;
|
|
315
315
|
}
|
|
@@ -390,7 +390,7 @@ ul > li.plain-enum::before {
|
|
|
390
390
|
|
|
391
391
|
.affected-resources > .parent {
|
|
392
392
|
margin-top: 0;
|
|
393
|
-
padding: var(--sys-size-2)
|
|
393
|
+
padding: var(--sys-size-2) var(--sys-size-3) 0;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
.affected-resources > .parent.expanded {
|
|
@@ -440,6 +440,13 @@ devtools-icon.network-panel {
|
|
|
440
440
|
height: var(--sys-size-7);
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
+
devtools-button.elements-panel {
|
|
444
|
+
margin-right: var(--sys-size-3);
|
|
445
|
+
vertical-align: sub;
|
|
446
|
+
|
|
447
|
+
--override-button-icon-color: var(--icon-link);
|
|
448
|
+
}
|
|
449
|
+
|
|
443
450
|
@media (forced-colors: active) {
|
|
444
451
|
.title {
|
|
445
452
|
color: ButtonText;
|
|
@@ -290,19 +290,37 @@ const LayerDetailsViewBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof U
|
|
|
290
290
|
);
|
|
291
291
|
|
|
292
292
|
export class LayerDetailsView extends LayerDetailsViewBase implements LayerView {
|
|
293
|
-
|
|
294
|
-
private layerSnapshotMap: Map<SDK.LayerTreeBase.Layer, SnapshotSelection
|
|
293
|
+
#layerViewHost?: LayerViewHost;
|
|
294
|
+
private layerSnapshotMap: Map<SDK.LayerTreeBase.Layer, SnapshotSelection> = new Map();
|
|
295
295
|
private selection: Selection|null;
|
|
296
296
|
private compositingReasons: string[] = [];
|
|
297
297
|
private readonly view: typeof DEFAULT_VIEW;
|
|
298
298
|
|
|
299
|
-
constructor(layerViewHost
|
|
300
|
-
super({useShadowDom: 'pure'});
|
|
299
|
+
constructor(layerViewHost?: LayerViewHost|HTMLElement, view: typeof DEFAULT_VIEW = DEFAULT_VIEW) {
|
|
300
|
+
super(layerViewHost instanceof HTMLElement ? layerViewHost : undefined, {useShadowDom: 'pure'});
|
|
301
301
|
this.view = view;
|
|
302
|
-
this.layerViewHost = layerViewHost;
|
|
303
|
-
this.layerViewHost.registerView(this);
|
|
304
|
-
this.layerSnapshotMap = this.layerViewHost.getLayerSnapshotMap();
|
|
305
302
|
this.selection = null;
|
|
303
|
+
if (layerViewHost && !(layerViewHost instanceof HTMLElement)) {
|
|
304
|
+
this.layerViewHost = layerViewHost;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
get layerViewHost(): LayerViewHost|undefined {
|
|
309
|
+
return this.#layerViewHost;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
set layerViewHost(layerViewHost: LayerViewHost|undefined) {
|
|
313
|
+
if (this.#layerViewHost === layerViewHost) {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
this.#layerViewHost = layerViewHost;
|
|
317
|
+
if (this.#layerViewHost) {
|
|
318
|
+
this.#layerViewHost.registerView(this);
|
|
319
|
+
this.layerSnapshotMap = this.#layerViewHost.getLayerSnapshotMap();
|
|
320
|
+
if (this.isShowing()) {
|
|
321
|
+
this.update();
|
|
322
|
+
}
|
|
323
|
+
}
|
|
306
324
|
}
|
|
307
325
|
|
|
308
326
|
hoverObject(_selection: Selection|null): void {
|
|
@@ -330,7 +348,7 @@ export class LayerDetailsView extends LayerDetailsViewBase implements LayerView
|
|
|
330
348
|
if (!this.selection) {
|
|
331
349
|
return;
|
|
332
350
|
}
|
|
333
|
-
this
|
|
351
|
+
this.#layerViewHost?.selectObject(new ScrollRectSelection(this.selection.layer(), index));
|
|
334
352
|
}
|
|
335
353
|
|
|
336
354
|
private invokeProfilerLink(): void {
|
|
@@ -366,15 +384,14 @@ export class LayerDetailsView extends LayerDetailsViewBase implements LayerView
|
|
|
366
384
|
(layer ? this.layerSnapshotMap.get(layer) : null)) ||
|
|
367
385
|
null;
|
|
368
386
|
|
|
369
|
-
this.view(
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
undefined, this.contentElement);
|
|
387
|
+
this.view({
|
|
388
|
+
layer,
|
|
389
|
+
snapshotSelection,
|
|
390
|
+
compositingReasons: this.compositingReasons,
|
|
391
|
+
onScrollRectClick: this.onScrollRectClicked.bind(this),
|
|
392
|
+
onPaintProfilerRequested: this.invokeProfilerLink.bind(this),
|
|
393
|
+
},
|
|
394
|
+
undefined, this.contentElement);
|
|
378
395
|
}
|
|
379
396
|
}
|
|
380
397
|
|