chrome-devtools-frontend 1.0.1664496 → 1.0.1665921
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/devtools-testing-guidance/SKILL.md +48 -0
- package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +3 -3
- package/.agents/skills/repro-flaky-tests/SKILL.md +2 -2
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +2 -0
- package/.agents/skills/version-control/SKILL.md +4 -3
- package/docs/ui_engineering.md +89 -0
- package/eslint.config.mjs +9 -2
- package/front_end/Images/rollup.config.mjs +1 -1
- package/front_end/Tests.js +15 -16
- package/front_end/core/common/Gzip.ts +2 -2
- package/front_end/core/common/Settings.ts +4 -20
- package/front_end/core/common/Srcset.ts +1 -1
- package/front_end/core/common/VersionController.ts +1 -1
- package/front_end/core/host/AidaClient.ts +19 -4
- package/front_end/core/host/AidaGcaTranslation.ts +2 -2
- package/front_end/core/host/GcaClient.ts +2 -2
- package/front_end/core/host/GdpClient.ts +3 -3
- package/front_end/core/host/InspectorFrontendHostStub.ts +1 -1
- package/front_end/core/host/ResourceLoader.ts +15 -15
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +1 -1
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +78 -3
- package/front_end/core/sdk/CSSMetadata.ts +17 -12
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +2 -2
- package/front_end/core/sdk/CSSRule.ts +3 -3
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +3 -3
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +1 -1
- package/front_end/core/sdk/Connections.ts +1 -1
- package/front_end/core/sdk/DebuggerModel.ts +13 -13
- package/front_end/core/sdk/NetworkManager.ts +19 -19
- package/front_end/core/sdk/NetworkRequest.ts +57 -57
- package/front_end/core/sdk/OverlayModel.ts +1 -1
- package/front_end/core/sdk/PageResourceLoader.ts +2 -2
- package/front_end/core/sdk/RehydratingConnection.ts +5 -5
- package/front_end/core/sdk/ScreenCaptureModel.ts +1 -1
- package/front_end/core/sdk/Script.ts +2 -2
- package/front_end/core/sdk/ServerTiming.ts +7 -7
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +1 -1
- package/front_end/core/sdk/ServiceWorkerManager.ts +11 -11
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +2 -2
- package/front_end/core/sdk/SourceMapScopesInfo.ts +1 -1
- package/front_end/core/sdk/StorageKeyManager.ts +1 -1
- package/front_end/core/sdk/sdk-meta.ts +98 -98
- package/front_end/devtools_compatibility.js +15 -13
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +4 -8
- package/front_end/entrypoints/main/MainImpl.ts +2 -3
- package/front_end/entrypoints/main/main-meta.ts +1 -16
- package/front_end/entrypoints/shell/shell.ts +1 -0
- package/front_end/entrypoints/trace_app/trace_app.ts +1 -0
- package/front_end/foundation/README.md +1 -1
- package/front_end/foundation/Universe.test.api.ts +73 -0
- package/front_end/foundation/Universe.ts +22 -0
- package/front_end/generated/InspectorBackendCommands.ts +2 -2
- package/front_end/generated/SupportedCSSProperties.js +1 -1
- package/front_end/generated/protocol.ts +19 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +1 -1
- package/front_end/models/ai_assistance/AiConversation.ts +1 -1
- package/front_end/models/ai_assistance/BuiltInAi.ts +1 -1
- package/front_end/models/ai_assistance/ChangeManager.ts +0 -70
- package/front_end/models/ai_assistance/ExtensionScope.ts +2 -36
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +9 -9
- package/front_end/models/ai_assistance/agents/AiAgent.ts +10 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +4 -4
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +21 -21
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +4 -4
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +0 -5
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +11 -4
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +8 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +14 -11
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +2 -2
- package/front_end/models/ai_assistance/performance/AICallTree.ts +2 -2
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +9 -2
- package/front_end/models/ai_assistance/tools/GetStyles.ts +4 -4
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +2 -5
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -2
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -2
- package/front_end/models/badges/badges-meta.ts +27 -0
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -3
- package/front_end/models/bindings/ContentProviderBasedProject.ts +1 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +6 -7
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +5 -4
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +72 -29
- package/front_end/models/bindings/ResourceMapping.ts +38 -32
- package/front_end/models/bindings/ResourceScriptMapping.ts +5 -7
- package/front_end/models/breakpoints/BreakpointManager.ts +2 -1
- package/front_end/models/har/Writer.ts +2 -2
- package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +1 -1
- package/front_end/models/issues_manager/GenericIssue.ts +1 -1
- package/front_end/models/issues_manager/IssuesManager.ts +14 -5
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +1 -1
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +2 -2
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +13 -2
- package/front_end/models/issues_manager/issues_manager.ts +0 -2
- package/front_end/models/live-metrics/LiveMetrics.ts +22 -5
- package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +1 -1
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +10 -4
- package/front_end/models/logs/logs-meta.ts +23 -16
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +2 -2
- package/front_end/models/persistence/IsolatedFileSystem.ts +1 -1
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +1 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +104 -86
- package/front_end/models/source_map_scopes/ScopeChainModel.ts +6 -2
- package/front_end/models/stack_trace/StackTraceModel.ts +1 -1
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +1 -1
- package/front_end/models/trace/handlers/UserTimingsHandler.ts +17 -6
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +1 -1
- package/front_end/models/trace/helpers/Timing.ts +1 -1
- package/front_end/models/trace/insights/Common.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +3 -3
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +2 -2
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +14 -9
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +2 -15
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -2
- package/front_end/panels/ai_assistance/components/ChatInput.ts +23 -19
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +9 -18
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -35
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +1 -1
- package/front_end/panels/ai_assistance/components/ExploreWidget.ts +4 -4
- package/front_end/panels/ai_assistance/components/ImageResize.ts +74 -0
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +2 -2
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +28 -29
- package/front_end/panels/animation/AnimationTimeline.ts +3 -3
- package/front_end/panels/animation/animationTimeline.css +0 -2
- package/front_end/panels/application/AppManifestView.ts +1 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +1 -1
- package/front_end/panels/application/CrashReportContextView.ts +3 -3
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +1 -1
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +1 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +1 -1
- package/front_end/panels/application/IndexedDBViews.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -1
- package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +6 -6
- package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
- package/front_end/panels/application/StorageItemsToolbar.ts +3 -3
- package/front_end/panels/application/WebMCPView.ts +7 -5
- package/front_end/panels/application/components/AdsView.ts +21 -6
- package/front_end/panels/application/components/BackForwardCacheView.ts +2 -2
- package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
- package/front_end/panels/application/components/StorageMetadataView.ts +1 -1
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
- package/front_end/panels/application/preloading/components/PreloadingString.ts +3 -3
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -1
- package/front_end/panels/autofill/AutofillView.ts +1 -1
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +2 -2
- package/front_end/panels/changes/ChangesSidebar.ts +2 -2
- package/front_end/panels/changes/ChangesView.ts +4 -5
- package/front_end/panels/changes/CombinedDiffView.ts +3 -3
- package/front_end/panels/changes/changes-meta.ts +2 -2
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +1 -1
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +3 -3
- package/front_end/panels/common/BadgeNotification.ts +8 -8
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +2 -2
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
- package/front_end/panels/common/aiCodeCompletionDisclaimer.css +0 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +1 -1
- package/front_end/panels/console/ConsolePinPane.ts +3 -3
- package/front_end/panels/console/ConsolePrompt.ts +6 -4
- package/front_end/panels/console/ConsoleSidebar.ts +8 -10
- package/front_end/panels/console_counters/WarningErrorCounter.ts +10 -11
- package/front_end/panels/coverage/CoverageView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +1 -1
- package/front_end/panels/elements/CSSRuleValidator.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +3 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +3 -3
- package/front_end/panels/elements/EventListenersWidget.ts +1 -3
- package/front_end/panels/elements/LayoutPane.ts +23 -13
- package/front_end/panels/elements/StandaloneStylesContainer.ts +7 -7
- package/front_end/panels/elements/StylePropertiesSection.ts +33 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -5
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +6 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -3
- package/front_end/panels/elements/elements-meta.ts +18 -2
- package/front_end/panels/emulation/DeviceModeToolbar.ts +100 -40
- package/front_end/panels/emulation/DeviceModeView.ts +5 -4
- package/front_end/panels/emulation/MediaQueryInspector.ts +35 -19
- package/front_end/panels/event_listeners/EventListenersView.ts +4 -4
- package/front_end/panels/explain/components/ConsoleInsight.ts +8 -9
- package/front_end/panels/explain/explain-meta.ts +3 -3
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +135 -167
- package/front_end/panels/layer_viewer/Layers3DView.ts +10 -23
- package/front_end/panels/layer_viewer/layer_viewer-meta.ts +27 -0
- package/front_end/panels/lighthouse/LighthouseController.ts +44 -55
- package/front_end/panels/lighthouse/LighthousePanel.ts +9 -9
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +9 -12
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +33 -33
- package/front_end/panels/lighthouse/RadioSetting.ts +1 -1
- package/front_end/panels/lighthouse/lighthouse-meta.ts +131 -1
- package/front_end/panels/media/EventDisplayTable.ts +67 -94
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/media/eventDisplayTable.css +9 -4
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +5 -5
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +1 -1
- package/front_end/panels/network/EventSourceMessagesView.ts +98 -107
- package/front_end/panels/network/NetworkLogViewColumns.ts +1 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +5 -5
- package/front_end/panels/network/RequestPayloadView.ts +4 -4
- package/front_end/panels/network/RequestTimingView.ts +2 -2
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +1 -1
- package/front_end/panels/network/eventSourceMessagesView.css +12 -3
- package/front_end/panels/network/networkTimingTable.css +2 -2
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -1
- package/front_end/panels/profiler/BottomUpProfileDataGrid.ts +25 -29
- package/front_end/panels/profiler/HeapProfileView.ts +308 -247
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +13 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +30 -10
- package/front_end/panels/profiler/HeapTimelineOverview.ts +5 -2
- package/front_end/panels/profiler/ProfileDataGrid.ts +128 -157
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +17 -5
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/profiler/TopDownProfileDataGrid.ts +17 -21
- package/front_end/panels/profiler/profilesPanel.css +9 -13
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +2 -2
- package/front_end/panels/recorder/CreateRecordingView.ts +4 -4
- package/front_end/panels/recorder/RecorderPanel.ts +6 -6
- package/front_end/panels/recorder/RecordingView.ts +1 -1
- package/front_end/panels/recorder/ReplaySection.ts +1 -1
- package/front_end/panels/recorder/StepView.ts +1 -1
- package/front_end/panels/recorder/injected/rollup.config.mjs +1 -1
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +54 -41
- package/front_end/panels/sensors/LocationsSettingsTab.ts +246 -233
- package/front_end/panels/sensors/SensorsView.ts +1 -1
- package/front_end/panels/settings/AISettingsTab.ts +11 -10
- package/front_end/panels/settings/SettingsScreen.ts +29 -24
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +5 -5
- package/front_end/panels/sources/BreakpointEditDialog.ts +2 -2
- package/front_end/panels/sources/BreakpointsView.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +2 -2
- package/front_end/panels/sources/DebuggerPausedMessage.ts +2 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +25 -22
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +3 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +7 -5
- package/front_end/panels/sources/sources-meta.ts +1 -1
- package/front_end/panels/timeline/CountersGraph.ts +1 -2
- package/front_end/panels/timeline/ExtensionTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelineDetailsView.ts +2 -2
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -2
- package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -4
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +53 -81
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +10 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +18 -4
- package/front_end/panels/timeline/TrackConfigBanner.ts +1 -1
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +1 -1
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +8 -9
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +1 -1
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +1 -1
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +1 -1
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +1 -1
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +5 -0
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +13 -8
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +1 -0
- package/front_end/panels/timeline/timeline-meta.ts +169 -0
- package/front_end/panels/timeline/timelineFlameChartView.css +5 -0
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
- package/front_end/panels/whats_new/resources/WNDT.md +7 -8
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +120 -19
- package/front_end/third_party/web-vitals/package/attribution.d.ts +16 -0
- package/front_end/third_party/web-vitals/package/attribution.js +18 -0
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.d.ts +1 -7
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +53 -32
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +43 -12
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +21 -3
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +30 -24
- package/front_end/third_party/web-vitals/package/dist/modules/lib/FCPEntryManager.d.ts +3 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/FCPEntryManager.js +18 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +2 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +18 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.d.ts +1 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.js +1 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/generateUniqueID.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +7 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +4 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +7 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.js +20 -11
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initUnique.js +8 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.d.ts +3 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +19 -4
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/softNavs.d.ts +3 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/softNavs.js +38 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +5 -1
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +30 -11
- package/front_end/third_party/web-vitals/package/dist/modules/onFCP.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/onFCP.js +36 -4
- package/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/onINP.js +42 -22
- package/front_end/third_party/web-vitals/package/dist/modules/onLCP.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/onLCP.js +109 -30
- package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.js +25 -7
- package/front_end/third_party/web-vitals/package/dist/modules/types/base.d.ts +24 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/fcp.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +14 -6
- package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/ttfb.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +26 -4
- package/front_end/third_party/web-vitals/package/package.json +21 -22
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +62 -39
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +52 -15
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +25 -7
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +43 -37
- package/front_end/third_party/web-vitals/package/src/lib/{polyfills/getFirstHiddenTimePolyfill.ts → FCPEntryManager.ts} +4 -14
- package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +22 -2
- package/front_end/third_party/web-vitals/package/src/lib/LCPEntryManager.ts +1 -0
- package/front_end/third_party/web-vitals/package/src/lib/bindReporter.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/generateUniqueID.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +11 -12
- package/front_end/third_party/web-vitals/package/src/lib/getSelector.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +4 -1
- package/front_end/third_party/web-vitals/package/src/lib/initMetric.ts +24 -11
- package/front_end/third_party/web-vitals/package/src/lib/initUnique.ts +12 -4
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +26 -5
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/softNavs.ts +48 -0
- package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +12 -4
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +75 -18
- package/front_end/third_party/web-vitals/package/src/onFCP.ts +66 -7
- package/front_end/third_party/web-vitals/package/src/onINP.ts +100 -39
- package/front_end/third_party/web-vitals/package/src/onLCP.ts +169 -34
- package/front_end/third_party/web-vitals/package/src/onTTFB.ts +50 -13
- package/front_end/third_party/web-vitals/package/src/types/base.ts +31 -10
- package/front_end/third_party/web-vitals/package/src/types/fcp.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +14 -6
- package/front_end/third_party/web-vitals/package/src/types/lcp.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/types/ttfb.ts +2 -2
- package/front_end/third_party/web-vitals/package/src/types.ts +32 -9
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +11 -11
- package/front_end/third_party/web-vitals/rebuild.sh +2 -2
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +2 -0
- package/front_end/ui/components/buttons/Button.ts +16 -0
- package/front_end/ui/components/dialogs/Dialog.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightManager.ts +6 -1
- package/front_end/ui/components/highlighting/highlighting.ts +1 -1
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +2 -2
- package/front_end/ui/components/settings/SettingCheckbox.ts +12 -7
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +2 -2
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +6 -6
- package/front_end/ui/components/text_editor/javascript.ts +3 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +12 -2
- package/front_end/ui/legacy/ListControl.ts +1 -1
- package/front_end/ui/legacy/SelectMenu.docs.ts +17 -19
- package/front_end/ui/legacy/Toolbar.ts +4 -1
- package/front_end/ui/legacy/Treeoutline.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/spectrum.css +1 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +50 -4
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +3 -1
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +4 -4
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +8 -7
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +14 -11
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +1 -1
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +15 -5
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +4 -4
- package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -1
- package/front_end/ui/lit/render.ts +1 -1
- package/front_end/ui/settings/SettingUIRegistration.ts +8 -3
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/front_end/ui/visual_logging/LoggingEvents.ts +1 -1
- package/inspector_overlay/main.ts +1 -1
- package/mcp/mcp.ts +5 -4
- package/package.json +13 -13
- package/front_end/models/ai_assistance/AgentProject.ts +0 -261
- package/front_end/models/ai_assistance/agents/PatchAgent.ts +0 -306
- package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +0 -45
- package/front_end/models/text_utils/text_utils.ts +0 -5
- package/front_end/panels/ai_assistance/PatchWidget.ts +0 -867
- package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +0 -368
- package/front_end/panels/ai_assistance/selectWorkspaceDialog.css +0 -92
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
import type * as CPUProfile from '../../models/cpu_profile/cpu_profile.js';
|
|
31
31
|
import type * as UI from '../../ui/legacy/legacy.js';
|
|
32
32
|
|
|
33
|
-
import {type Formatter,
|
|
33
|
+
import {type Formatter, ProfileDataGridTree, ProfileEntry} from './ProfileDataGrid.js';
|
|
34
34
|
|
|
35
|
-
export class
|
|
35
|
+
export class TopDownProfileEntry extends ProfileEntry {
|
|
36
36
|
remainingChildren: CPUProfile.ProfileTreeModel.ProfileNode[];
|
|
37
37
|
constructor(profileNode: CPUProfile.ProfileTreeModel.ProfileNode, owningTree: TopDownProfileDataGridTree) {
|
|
38
38
|
const hasChildren = Boolean(profileNode.children?.length);
|
|
@@ -42,21 +42,20 @@ export class TopDownProfileDataGridNode extends ProfileDataGridNode {
|
|
|
42
42
|
this.remainingChildren = profileNode.children;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
static sharedPopulate(container: TopDownProfileDataGridTree|
|
|
45
|
+
static sharedPopulate(container: TopDownProfileDataGridTree|TopDownProfileEntry): void {
|
|
46
46
|
const children = container.remainingChildren;
|
|
47
47
|
const childrenLength = children.length;
|
|
48
48
|
|
|
49
49
|
for (let i = 0; i < childrenLength; ++i) {
|
|
50
|
-
container.appendChild(
|
|
51
|
-
new TopDownProfileDataGridNode(children[i], (container.tree as TopDownProfileDataGridTree)));
|
|
50
|
+
container.appendChild(new TopDownProfileEntry(children[i], (container.tree as TopDownProfileDataGridTree)));
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
container.remainingChildren = [];
|
|
55
54
|
}
|
|
56
55
|
|
|
57
|
-
static excludeRecursively(container: TopDownProfileDataGridTree|
|
|
56
|
+
static excludeRecursively(container: TopDownProfileDataGridTree|TopDownProfileEntry, aCallUID: string): void {
|
|
58
57
|
if (container.remainingChildren.length > 0) {
|
|
59
|
-
(container as
|
|
58
|
+
(container as TopDownProfileEntry).populate();
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
container.save();
|
|
@@ -65,18 +64,18 @@ export class TopDownProfileDataGridNode extends ProfileDataGridNode {
|
|
|
65
64
|
let index = container.children.length;
|
|
66
65
|
|
|
67
66
|
while (index--) {
|
|
68
|
-
|
|
67
|
+
TopDownProfileEntry.excludeRecursively((children[index] as TopDownProfileEntry), aCallUID);
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
const child = container.childrenByCallUID.get(aCallUID);
|
|
72
71
|
|
|
73
72
|
if (child) {
|
|
74
|
-
|
|
73
|
+
ProfileEntry.merge(container, child, true);
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
override populateChildren(): void {
|
|
79
|
-
|
|
78
|
+
TopDownProfileEntry.sharedPopulate(this);
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
|
|
@@ -88,10 +87,10 @@ export class TopDownProfileDataGridTree extends ProfileDataGridTree {
|
|
|
88
87
|
rootProfileNode: CPUProfile.ProfileTreeModel.ProfileNode, total: number) {
|
|
89
88
|
super(formatter, searchableView, total);
|
|
90
89
|
this.remainingChildren = rootProfileNode.children;
|
|
91
|
-
|
|
90
|
+
ProfileEntry.populate(this);
|
|
92
91
|
}
|
|
93
92
|
|
|
94
|
-
override focus(profileDataGridNode:
|
|
93
|
+
override focus(profileDataGridNode: ProfileEntry): void {
|
|
95
94
|
if (!profileDataGridNode) {
|
|
96
95
|
return;
|
|
97
96
|
}
|
|
@@ -99,22 +98,19 @@ export class TopDownProfileDataGridTree extends ProfileDataGridTree {
|
|
|
99
98
|
this.save();
|
|
100
99
|
profileDataGridNode.savePosition();
|
|
101
100
|
|
|
102
|
-
this.
|
|
101
|
+
this.removeChildren();
|
|
102
|
+
this.appendChild(profileDataGridNode);
|
|
103
103
|
this.total = profileDataGridNode.total;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
override exclude(profileDataGridNode:
|
|
106
|
+
override exclude(profileDataGridNode: ProfileEntry): void {
|
|
107
107
|
if (!profileDataGridNode) {
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
this.save();
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (this.lastComparator) {
|
|
116
|
-
this.sort(this.lastComparator, true);
|
|
117
|
-
}
|
|
113
|
+
TopDownProfileEntry.excludeRecursively(this, profileDataGridNode.callUID);
|
|
118
114
|
}
|
|
119
115
|
|
|
120
116
|
override restore(): void {
|
|
@@ -122,12 +118,12 @@ export class TopDownProfileDataGridTree extends ProfileDataGridTree {
|
|
|
122
118
|
return;
|
|
123
119
|
}
|
|
124
120
|
|
|
125
|
-
this.children[0]
|
|
121
|
+
this.children[0]?.restorePosition();
|
|
126
122
|
|
|
127
123
|
super.restore();
|
|
128
124
|
}
|
|
129
125
|
|
|
130
126
|
override populateChildren(): void {
|
|
131
|
-
|
|
127
|
+
TopDownProfileEntry.sharedPopulate(this);
|
|
132
128
|
}
|
|
133
129
|
}
|
|
@@ -33,33 +33,29 @@
|
|
|
33
33
|
position: relative;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
36
|
+
.data-grid table.data {
|
|
37
37
|
background: var(--sys-color-cdt-base-container);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.
|
|
41
|
-
background-color: var(--sys-color-tonal-container);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.profile-view .data-grid tr:hover td:not(.bottom-filler-td) {
|
|
40
|
+
.data-grid tr:hover td:not(.bottom-filler-td) {
|
|
45
41
|
background-color: var(--sys-color-state-hover-on-subtle);
|
|
46
42
|
}
|
|
47
43
|
|
|
48
|
-
.
|
|
44
|
+
.data-grid td.numeric-column {
|
|
49
45
|
text-align: right;
|
|
50
46
|
}
|
|
51
47
|
|
|
52
|
-
.
|
|
48
|
+
.data-grid div.profile-multiple-values {
|
|
53
49
|
float: right;
|
|
54
50
|
}
|
|
55
51
|
|
|
56
|
-
.
|
|
52
|
+
.data-grid span.percent-column {
|
|
57
53
|
color: var(--sys-color-token-subtle);
|
|
58
54
|
width: 9ex;
|
|
59
55
|
display: inline-block;
|
|
60
56
|
}
|
|
61
57
|
|
|
62
|
-
.
|
|
58
|
+
.data-grid tr.selected span {
|
|
63
59
|
color: inherit;
|
|
64
60
|
}
|
|
65
61
|
|
|
@@ -83,13 +79,13 @@
|
|
|
83
79
|
overflow: hidden;
|
|
84
80
|
}
|
|
85
81
|
|
|
86
|
-
.
|
|
82
|
+
.data-grid {
|
|
87
83
|
border: none;
|
|
88
84
|
flex: auto;
|
|
89
85
|
}
|
|
90
86
|
|
|
91
|
-
.
|
|
92
|
-
.
|
|
87
|
+
.data-grid th.self-column,
|
|
88
|
+
.data-grid th.total-column {
|
|
93
89
|
text-align: center;
|
|
94
90
|
}
|
|
95
91
|
|
|
@@ -351,7 +351,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
351
351
|
${widgetRef(JSONEditor, e => {output.editorWidget = e;})}>
|
|
352
352
|
</devtools-widget>
|
|
353
353
|
</devtools-split-view>`,
|
|
354
|
-
target
|
|
354
|
+
target,
|
|
355
355
|
);
|
|
356
356
|
// clang-format on
|
|
357
357
|
};
|
|
@@ -476,7 +476,7 @@ export class ProtocolMonitorImpl extends UI.Panel.Panel implements SDK.TargetMan
|
|
|
476
476
|
const viewOutput = {
|
|
477
477
|
set editorWidget(value: JSONEditor) {
|
|
478
478
|
that.#editorWidget = value;
|
|
479
|
-
}
|
|
479
|
+
},
|
|
480
480
|
};
|
|
481
481
|
this.#view(viewInput, viewOutput, this.contentElement);
|
|
482
482
|
}
|
|
@@ -137,7 +137,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
137
137
|
onUpdate,
|
|
138
138
|
onRecordingStarted,
|
|
139
139
|
onRecordingCancelled,
|
|
140
|
-
onErrorReset
|
|
140
|
+
onErrorReset,
|
|
141
141
|
} = input;
|
|
142
142
|
|
|
143
143
|
const nameInputRef = createRef<HTMLInputElement>();
|
|
@@ -207,7 +207,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
207
207
|
id="user-flow-name"
|
|
208
208
|
${ref(nameInputRef)}
|
|
209
209
|
@input=${(e:Event) => onUpdate({
|
|
210
|
-
name: (e.target as HTMLInputElement).value.trim()
|
|
210
|
+
name: (e.target as HTMLInputElement).value.trim(),
|
|
211
211
|
})}
|
|
212
212
|
/>
|
|
213
213
|
<label class="row-label" for="selector-attribute">
|
|
@@ -228,7 +228,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
228
228
|
class="devtools-text-input"
|
|
229
229
|
id="selector-attribute"
|
|
230
230
|
@input=${(e:Event) => onUpdate({
|
|
231
|
-
selectorAttribute: (e.target as HTMLInputElement).value.trim()
|
|
231
|
+
selectorAttribute: (e.target as HTMLInputElement).value.trim(),
|
|
232
232
|
})}
|
|
233
233
|
/>
|
|
234
234
|
<label class="row-label">
|
|
@@ -253,7 +253,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
253
253
|
type="checkbox"
|
|
254
254
|
@change=${(e:Event) => onUpdate({
|
|
255
255
|
selectorType: item.selectorType,
|
|
256
|
-
checked: (e.target as HTMLInputElement).checked
|
|
256
|
+
checked: (e.target as HTMLInputElement).checked,
|
|
257
257
|
})}
|
|
258
258
|
/>
|
|
259
259
|
${selectorTypeToLabel.get(item.selectorType) || item.selectorType}
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
type PlayRecordingEvent as ViewPlayRecordingEvent,
|
|
35
35
|
RecordingView,
|
|
36
36
|
type ReplayState,
|
|
37
|
-
TargetPanel
|
|
37
|
+
TargetPanel,
|
|
38
38
|
} from './RecordingView.js';
|
|
39
39
|
import {
|
|
40
40
|
AddStepPosition,
|
|
@@ -146,7 +146,7 @@ const UIStrings = {
|
|
|
146
146
|
* @example {allow importing} PH1
|
|
147
147
|
*/
|
|
148
148
|
doNotImport:
|
|
149
|
-
'Don’t import recordings you don’t understand or haven’t reviewed yourself into DevTools. This could allow attackers to steal your identity or take control of your computer. Type
|
|
149
|
+
'Don’t import recordings you don’t understand or haven’t reviewed yourself into DevTools. This could allow attackers to steal your identity or take control of your computer. Type "{PH1}" below to allow importing.',
|
|
150
150
|
/**
|
|
151
151
|
* @description Text a user needs to type in order to confirm that they
|
|
152
152
|
* are aware of the danger of importing code into the Recorder panel.
|
|
@@ -156,7 +156,7 @@ const UIStrings = {
|
|
|
156
156
|
* @description Input box placeholder which instructs the user to type 'allow importing' into the input box. IMPORTANT: keep double quotes around PH1 and do not use single quotes.
|
|
157
157
|
* @example {allow importing} PH1
|
|
158
158
|
*/
|
|
159
|
-
typeAllowImporting: 'Type
|
|
159
|
+
typeAllowImporting: 'Type "{PH1}"',
|
|
160
160
|
} as const;
|
|
161
161
|
const str_ = i18n.i18n.registerUIStrings('panels/recorder/RecorderPanel.ts', UIStrings);
|
|
162
162
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -1016,7 +1016,7 @@ export class RecorderPanel extends UI.Widget.VBox<DocumentFragment> {
|
|
|
1016
1016
|
{
|
|
1017
1017
|
...step,
|
|
1018
1018
|
title: preset.i18nTitleKey || '',
|
|
1019
|
-
key: `step_${i}_recorder_key` as SDK.NetworkManager.UserDefinedThrottlingConditionKey
|
|
1019
|
+
key: `step_${i}_recorder_key` as SDK.NetworkManager.UserDefinedThrottlingConditionKey,
|
|
1020
1020
|
})) {
|
|
1021
1021
|
settings.networkConditionsSettings.title = preset.title instanceof Function ? preset.title() : preset.title;
|
|
1022
1022
|
settings.networkConditionsSettings.i18nTitleKey = preset.i18nTitleKey;
|
|
@@ -1805,7 +1805,7 @@ export class RecorderPanel extends UI.Widget.VBox<DocumentFragment> {
|
|
|
1805
1805
|
},
|
|
1806
1806
|
{
|
|
1807
1807
|
title: i18nString(UIStrings.copyShortcut),
|
|
1808
|
-
rows: Host.Platform.isMac() ? [[{key: '⌘'}, {key: 'C'}]] : [[{key: 'Ctrl'}, {key: 'C'}]]
|
|
1808
|
+
rows: Host.Platform.isMac() ? [[{key: '⌘'}, {key: 'C'}]] : [[{key: 'Ctrl'}, {key: 'C'}]],
|
|
1809
1809
|
},
|
|
1810
1810
|
{
|
|
1811
1811
|
title: i18nString(UIStrings.toggleCode),
|
|
@@ -1843,7 +1843,7 @@ export class RecorderPanel extends UI.Widget.VBox<DocumentFragment> {
|
|
|
1843
1843
|
},
|
|
1844
1844
|
set createRecordingView(widget: CreateRecordingView) {
|
|
1845
1845
|
that.#createRecordingView = widget;
|
|
1846
|
-
}
|
|
1846
|
+
},
|
|
1847
1847
|
};
|
|
1848
1848
|
this.#view({
|
|
1849
1849
|
recordings,
|
|
@@ -274,7 +274,7 @@ export class ReplaySection extends UI.Widget.Widget {
|
|
|
274
274
|
buttonLabel: () => i18nString(UIStrings.ReplayExtremelySlowButtonLabel),
|
|
275
275
|
label: () => i18nString(UIStrings.ReplayExtremelySlowItemLabel),
|
|
276
276
|
},
|
|
277
|
-
]
|
|
277
|
+
],
|
|
278
278
|
}];
|
|
279
279
|
if (this.#replayExtensions.length) {
|
|
280
280
|
groups.push({
|
|
@@ -416,7 +416,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
416
416
|
</devtools-widget>
|
|
417
417
|
</div>
|
|
418
418
|
`,
|
|
419
|
-
target, {container: {classes: ['step-view-widget']}}
|
|
419
|
+
target, {container: {classes: ['step-view-widget']}},
|
|
420
420
|
);
|
|
421
421
|
// clang-format on
|
|
422
422
|
};
|
|
@@ -10,9 +10,10 @@ import type * as Platform from '../../core/platform/platform.js';
|
|
|
10
10
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
11
|
import * as Protocol from '../../generated/protocol.js';
|
|
12
12
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
13
|
+
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
13
14
|
import {createIcon, type Icon} from '../../ui/kit/kit.js';
|
|
14
15
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
15
|
-
import {html, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
16
|
+
import {Directives, html, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
16
17
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
17
18
|
|
|
18
19
|
import lockIconStyles from './lockIcon.css.js';
|
|
@@ -235,7 +236,7 @@ const UIStrings = {
|
|
|
235
236
|
/**
|
|
236
237
|
* @description Description of the security explanation when the page includes a form with a non-secure action attribute.
|
|
237
238
|
*/
|
|
238
|
-
thisPageIncludesAFormWithA: 'This page includes a form with a non-secure
|
|
239
|
+
thisPageIncludesAFormWithA: 'This page includes a form with a non-secure `action` attribute.',
|
|
239
240
|
/**
|
|
240
241
|
* @description Summary phrase in the Security panel when active content with certificate errors was run on the site.
|
|
241
242
|
*/
|
|
@@ -1311,6 +1312,39 @@ export class SecurityMainView extends UI.Widget.VBox {
|
|
|
1311
1312
|
}
|
|
1312
1313
|
}
|
|
1313
1314
|
|
|
1315
|
+
const SAN_NUM_SHOWN_WHEN_TRUNCATED = 2;
|
|
1316
|
+
|
|
1317
|
+
function renderSan(sanList: string[], isSanListTruncatable: boolean, isSanListTruncated: boolean,
|
|
1318
|
+
onToggleTruncation: () => void): TemplateResult {
|
|
1319
|
+
if (sanList.length === 0) {
|
|
1320
|
+
return html`<div class="san empty-san">${i18nString(UIStrings.na)}</div>`;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
const toggleButtonText =
|
|
1324
|
+
isSanListTruncated ? i18nString(UIStrings.showMoreSTotal, {PH1: sanList.length}) : i18nString(UIStrings.showLess);
|
|
1325
|
+
|
|
1326
|
+
// clang-format off
|
|
1327
|
+
return html`
|
|
1328
|
+
<div class=${Directives.classMap({ san: true, 'truncated-san': isSanListTruncated })}>
|
|
1329
|
+
${sanList.map((san, index) => {
|
|
1330
|
+
return html`
|
|
1331
|
+
<span class=${Directives.classMap({
|
|
1332
|
+
'san-entry': true,
|
|
1333
|
+
'truncated-entry': isSanListTruncatable && index >= SAN_NUM_SHOWN_WHEN_TRUNCATED,
|
|
1334
|
+
})}>${san}</span>`;
|
|
1335
|
+
})}
|
|
1336
|
+
${isSanListTruncatable ? html`
|
|
1337
|
+
<devtools-button
|
|
1338
|
+
.variant=${Buttons.Button.Variant.OUTLINED}
|
|
1339
|
+
.accessibleLabel=${toggleButtonText}
|
|
1340
|
+
.accessibleExpanded=${!isSanListTruncated}
|
|
1341
|
+
.jslogContext=${'security.toggle-san-truncation'}
|
|
1342
|
+
@click=${onToggleTruncation}>${toggleButtonText}
|
|
1343
|
+
</devtools-button>` : nothing}
|
|
1344
|
+
</div>`;
|
|
1345
|
+
// clang-format on
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1314
1348
|
export class SecurityOriginView extends UI.Widget.VBox {
|
|
1315
1349
|
readonly #origin: Platform.DevToolsPath.UrlString;
|
|
1316
1350
|
readonly #originDisplay: HTMLElement;
|
|
@@ -1415,7 +1449,7 @@ export class SecurityOriginView extends UI.Widget.VBox {
|
|
|
1415
1449
|
UI.ARIAUtils.markAsHeading(sctDiv, 2);
|
|
1416
1450
|
}
|
|
1417
1451
|
|
|
1418
|
-
const sanDiv = this
|
|
1452
|
+
const sanDiv = this.#createSanDiv(originState.securityDetails.sanList);
|
|
1419
1453
|
const validFromString = new Date(1000 * originState.securityDetails.validFrom).toUTCString();
|
|
1420
1454
|
const validUntilString = new Date(1000 * originState.securityDetails.validTo).toUTCString();
|
|
1421
1455
|
|
|
@@ -1527,44 +1561,23 @@ export class SecurityOriginView extends UI.Widget.VBox {
|
|
|
1527
1561
|
}
|
|
1528
1562
|
}
|
|
1529
1563
|
|
|
1530
|
-
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
const isTruncated = sanDiv.classList.contains('truncated-san');
|
|
1548
|
-
let buttonText;
|
|
1549
|
-
if (isTruncated) {
|
|
1550
|
-
sanDiv.classList.remove('truncated-san');
|
|
1551
|
-
buttonText = i18nString(UIStrings.showLess);
|
|
1552
|
-
} else {
|
|
1553
|
-
sanDiv.classList.add('truncated-san');
|
|
1554
|
-
buttonText = i18nString(UIStrings.showMoreSTotal, {PH1: sanList.length});
|
|
1555
|
-
}
|
|
1556
|
-
truncatedSANToggle.textContent = buttonText;
|
|
1557
|
-
UI.ARIAUtils.setLabel(truncatedSANToggle, buttonText);
|
|
1558
|
-
UI.ARIAUtils.setExpanded(truncatedSANToggle, isTruncated);
|
|
1559
|
-
}
|
|
1560
|
-
const truncatedSANToggle = UI.UIUtils.createTextButton(
|
|
1561
|
-
i18nString(UIStrings.showMoreSTotal, {PH1: sanList.length}), toggleSANTruncation,
|
|
1562
|
-
{jslogContext: 'security.toggle-san-truncation'});
|
|
1563
|
-
sanDiv.appendChild(truncatedSANToggle);
|
|
1564
|
-
toggleSANTruncation();
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
return sanDiv;
|
|
1564
|
+
#createSanDiv(sanList: string[]): Element {
|
|
1565
|
+
const container = document.createElement('div');
|
|
1566
|
+
const isSanListTruncatable = sanList.length > SAN_NUM_SHOWN_WHEN_TRUNCATED + 1;
|
|
1567
|
+
let isSanListTruncated = isSanListTruncatable;
|
|
1568
|
+
|
|
1569
|
+
const onToggleTruncation = (): void => {
|
|
1570
|
+
isSanListTruncated = !isSanListTruncated;
|
|
1571
|
+
updateSan();
|
|
1572
|
+
};
|
|
1573
|
+
|
|
1574
|
+
const updateSan = (): void => {
|
|
1575
|
+
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
1576
|
+
render(renderSan(sanList, isSanListTruncatable, isSanListTruncated, onToggleTruncation), container);
|
|
1577
|
+
};
|
|
1578
|
+
|
|
1579
|
+
updateSan();
|
|
1580
|
+
return container;
|
|
1568
1581
|
}
|
|
1569
1582
|
|
|
1570
1583
|
setSecurityState(newSecurityState: Protocol.Security.SecurityState): void {
|