chrome-devtools-frontend 1.0.1662289 → 1.0.1664496
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/{creating-a-model → devtools-model-management}/SKILL.md +0 -1
- package/.agents/skills/devtools-unicode-escaping/SKILL.md +64 -0
- package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +2 -1
- package/.agents/skills/fixing-skipped-tests/SKILL.md +3 -3
- package/.agents/skills/merging-devtools-module/SKILL.md +1 -1
- package/.agents/skills/migrate-chromium-test/SKILL.md +32 -6
- package/.agents/skills/repro-flaky-tests/SKILL.md +71 -31
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +1 -0
- package/docs/ui_engineering.md +2 -0
- package/eslint.config.mjs +1 -0
- package/front_end/core/common/SettingRegistration.ts +0 -5
- package/front_end/core/common/Settings.ts +144 -3
- package/front_end/core/platform/StringUtilities.ts +38 -6
- package/front_end/core/protocol_client/PuppeteerDevToolsConnection.ts +112 -0
- package/front_end/core/sdk/CPUProfilerModel.ts +21 -13
- package/front_end/core/sdk/CSSContainerQuery.ts +1 -1
- package/front_end/core/sdk/CSSLayer.ts +1 -1
- package/front_end/core/sdk/CSSMedia.ts +1 -1
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSNavigation.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/CSSQuery.ts +1 -1
- package/front_end/core/sdk/CSSRule.ts +1 -1
- package/front_end/core/sdk/CSSScope.ts +1 -1
- package/front_end/core/sdk/CSSStartingStyle.ts +1 -1
- package/front_end/core/sdk/CSSStyleDeclaration.ts +1 -1
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +1 -1
- package/front_end/core/sdk/CSSSupports.ts +1 -1
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +1 -1
- package/front_end/core/sdk/NetworkRequest.ts +7 -7
- package/front_end/core/sdk/Resource.ts +1 -1
- package/front_end/core/sdk/ScopeTreeCache.ts +1 -1
- package/front_end/core/sdk/Script.ts +1 -1
- package/front_end/core/sdk/ServerSentEvents.ts +1 -1
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -10
- package/front_end/core/sdk/SourceMap.ts +1 -1
- package/front_end/core/sdk/SourceMapScopesInfo.ts +1 -1
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -10
- package/front_end/core/sdk/sdk-meta.ts +3 -4
- package/front_end/{models → core}/text_utils/ContentProvider.ts +4 -6
- package/front_end/{models → core}/text_utils/StaticContentProvider.ts +4 -6
- package/front_end/{models → core}/text_utils/StreamingContentData.ts +1 -2
- package/front_end/{models → core}/text_utils/TextRange.ts +6 -3
- package/front_end/{models → core}/text_utils/TextUtils.ts +7 -7
- package/front_end/{models → core}/text_utils/WasmDisassembly.ts +2 -2
- package/front_end/core/text_utils/text_utils.ts +27 -0
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +1 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +1 -1
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +0 -13
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +8 -3
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +21 -3
- package/front_end/foundation/Universe.ts +16 -0
- package/front_end/generated/InspectorBackendCommands.ts +2 -14
- package/front_end/generated/protocol-mapping.d.ts +0 -53
- package/front_end/generated/protocol-proxy-api.d.ts +0 -46
- package/front_end/generated/protocol.ts +0 -148
- package/front_end/models/ai_assistance/AgentProject.ts +1 -1
- package/front_end/models/ai_assistance/AiAgent2.ts +3 -3
- package/front_end/models/ai_assistance/AiConversation.ts +21 -10
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +21 -10
- package/front_end/models/ai_assistance/ChangeManager.ts +2 -2
- package/front_end/models/ai_assistance/ExtensionScope.ts +6 -2
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +4 -7
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +19 -11
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +23 -10
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +19 -18
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -4
- package/front_end/models/ai_assistance/contexts/FileContext.ts +7 -3
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +39 -11
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +6 -3
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +4 -4
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +76 -3
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +11 -1
- package/front_end/models/badges/AiExplorerBadge.ts +8 -3
- package/front_end/models/badges/Badge.ts +1 -0
- package/front_end/models/badges/UserBadges.ts +43 -23
- package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
- package/front_end/models/bindings/ContentProviderBasedProject.ts +1 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +2 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
- package/front_end/models/bindings/DefaultScriptMapping.ts +1 -1
- package/front_end/models/bindings/FileUtils.ts +1 -1
- package/front_end/models/bindings/NetworkProject.ts +16 -4
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +7 -10
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/bindings/ResourceScriptMapping.ts +1 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +1 -1
- package/front_end/models/bindings/StylesSourceMapping.ts +1 -1
- package/front_end/models/breakpoints/BreakpointManager.ts +1 -1
- package/front_end/models/crux-manager/CrUXManager.ts +1 -1
- package/front_end/models/emulation/DeviceModeModel.ts +67 -5
- package/front_end/models/emulation/EmulatedDevices.ts +3 -2
- package/front_end/models/extensions/RecorderPluginManager.ts +10 -6
- package/front_end/models/har/Importer.ts +1 -1
- package/front_end/models/har/Log.snapshot.txt +193 -0
- package/front_end/models/har/Log.ts +3 -2
- package/front_end/models/har/Writer.ts +1 -1
- package/front_end/models/issues_manager/IssueAggregator.ts +9 -0
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/LazyLoadImageIssue.ts +76 -0
- package/front_end/models/issues_manager/descriptions/lazyLoadImageZeroSize.md +7 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +9 -10
- package/front_end/models/live-metrics/LiveMetrics.ts +2 -3
- package/front_end/models/logs/NetworkLog.ts +4 -3
- package/front_end/models/logs/logs-meta.ts +3 -3
- package/front_end/models/network_time_calculator/NetworkTimeCalculator.ts +4 -4
- package/front_end/models/persistence/Automapping.ts +1 -1
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +2 -2
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +1 -1
- package/front_end/models/persistence/IsolatedFileSystem.ts +2 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +1 -1
- package/front_end/models/persistence/PersistenceImpl.ts +1 -1
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +8 -6
- package/front_end/models/source_map_scopes/NamesResolver.ts +37 -31
- package/front_end/models/stack_trace/StackTrace.ts +17 -0
- package/front_end/models/text_utils/text_utils.ts +2 -24
- package/front_end/models/trace/insights/ImageDelivery.ts +2 -2
- package/front_end/models/trace/insights/LegacyJavaScript.ts +1 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/ThirdParties.ts +1 -1
- package/front_end/models/workspace/FileManager.ts +1 -1
- package/front_end/models/workspace/UISourceCode.ts +1 -1
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -1
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityStrings.ts +2 -2
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -1
- package/front_end/panels/ai_assistance/ExportConversation.ts +1 -1
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +1 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +4 -4
- package/front_end/panels/application/ApplicationPanelSidebar.ts +1 -2
- package/front_end/panels/application/CrashReportContextView.ts +1 -1
- package/front_end/panels/application/DOMStorageItemsView.ts +1 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +4 -4
- package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/IndexedDBModel.ts +0 -10
- package/front_end/panels/application/IndexedDBViews.ts +240 -164
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +12 -2
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/SharedStorageModel.ts +0 -10
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/components/AdsView.ts +23 -0
- package/front_end/panels/application/components/BackForwardCacheView.ts +21 -5
- package/front_end/panels/application/components/CrashReportContextGrid.ts +1 -1
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +2 -2
- package/front_end/panels/application/components/adsView.css +21 -1
- package/front_end/panels/application/indexedDBViews.css +1 -1
- package/front_end/panels/application/preloading/PreloadingView.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -4
- package/front_end/panels/autofill/AutofillView.ts +1 -1
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +1 -1
- package/front_end/panels/common/ExtensionServer.ts +1 -1
- package/front_end/panels/console/ConsoleFilter.ts +1 -1
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageDecorationManager.ts +9 -1
- package/front_end/panels/coverage/CoverageModel.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +1 -1
- package/front_end/panels/elements/AccessibilityTreeView.ts +38 -3
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +1 -1
- package/front_end/panels/elements/ElementIssueUtils.ts +2 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +10 -3
- package/front_end/panels/elements/StandaloneStylesContainer.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +1 -1
- package/front_end/panels/elements/StylesContainer.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +1 -1
- package/front_end/panels/explain/components/ConsoleInsight.ts +2 -2
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +76 -0
- package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
- package/front_end/panels/issues/CorsIssueDetailsView.ts +1 -1
- package/front_end/panels/issues/IssueView.ts +2 -0
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/layer_viewer/Layers3DView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +5 -0
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
- package/front_end/panels/network/BinaryResourceView.ts +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +72 -8
- package/front_end/panels/network/NetworkLogView.ts +1 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +6 -6
- package/front_end/panels/network/NetworkPanel.ts +4 -4
- package/front_end/panels/network/NetworkSearchScope.ts +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +1 -1
- package/front_end/panels/network/RequestHTMLView.ts +1 -1
- package/front_end/panels/network/RequestInitiatorView.ts +24 -2
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestPreviewView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/ResourceChunkView.ts +1 -1
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -1
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -1
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/network/forward/UIRequestLocation.ts +1 -1
- package/front_end/panels/network/network-meta.ts +3 -3
- package/front_end/panels/network/networkLogView.css +5 -0
- package/front_end/panels/network/requestInitiatorViewTree.css +5 -0
- package/front_end/panels/profiler/HeapProfileView.ts +200 -81
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -1
- package/front_end/panels/profiler/ProfileDataGrid.ts +12 -8
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -1
- package/front_end/panels/recorder/README.md +1 -2
- package/front_end/panels/recorder/RecorderPanel.ts +1861 -17
- package/front_end/panels/recorder/RecordingListView.ts +8 -37
- package/front_end/panels/recorder/RecordingView.ts +54 -27
- package/front_end/panels/recorder/SelectorPicker.ts +0 -13
- package/front_end/panels/recorder/StepEditor.ts +6 -14
- package/front_end/panels/recorder/StepView.ts +36 -105
- package/front_end/panels/recorder/recorder.ts +0 -2
- package/front_end/panels/search/SearchResultsPane.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +3 -3
- package/front_end/panels/settings/AISettingsTab.ts +17 -4
- package/front_end/panels/settings/components/SyncSection.ts +4 -4
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +3 -3
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
- package/front_end/panels/sources/BreakpointsView.ts +1 -1
- package/front_end/panels/sources/CoveragePlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +4 -4
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +27 -3
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/PersistenceActions.ts +1 -1
- package/front_end/panels/sources/SourcesNavigator.ts +1 -1
- package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +3 -3
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/sources/components/HeadersView.ts +1 -1
- package/front_end/panels/sources/filteredUISourceCodeListProvider.css +12 -1
- package/front_end/panels/sources/sources-meta.ts +1 -1
- package/front_end/panels/timeline/StatusDialog.ts +1 -1
- package/front_end/panels/timeline/TimelineController.ts +24 -3
- package/front_end/panels/timeline/TimelinePanel.ts +116 -25
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -1
- package/front_end/panels/timeline/components/CWVMetrics.ts +1 -1
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
- package/front_end/panels/timeline/timeline-meta.ts +13 -0
- package/front_end/services/tracing/TracingManager.ts +27 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1418 -1413
- package/front_end/third_party/lighthouse/locales/en-US.json +12 -6
- package/front_end/third_party/lighthouse/locales/en-XL.json +12 -6
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/third_party/puppeteer/puppeteer.ts +20 -1
- package/front_end/ui/components/highlighting/HighlightElement.ts +4 -1
- package/front_end/ui/components/highlighting/HighlightManager.ts +1 -1
- package/front_end/ui/components/highlighting/MarkupHighlight.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownView.ts +46 -2
- package/front_end/ui/components/markdown_view/markdownView.css +23 -0
- package/front_end/ui/components/spinners/Spinner.ts +29 -32
- package/front_end/ui/components/spinners/spinner.css +32 -84
- package/front_end/ui/components/text_editor/config.ts +1 -1
- package/front_end/ui/components/tree_outline/TreeOutline.ts +7 -1
- package/front_end/ui/legacy/Infobar.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +12 -7
- package/front_end/ui/legacy/SuggestBox.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/Toolbar.ts +5 -2
- package/front_end/ui/legacy/Treeoutline.ts +40 -13
- package/front_end/ui/legacy/UIUtils.ts +25 -10
- package/front_end/ui/legacy/Widget.ts +17 -10
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +37 -8
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +27 -13
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +5 -2
- package/front_end/ui/legacy/components/inline_editor/CSSLinearEasingModel.ts +23 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +223 -121
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/objectValue.css +2 -1
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +105 -115
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +5 -1
- package/front_end/ui/legacy/components/source_frame/jsonView.css +4 -0
- package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +10 -6
- package/front_end/ui/lit/lit.ts +1 -0
- package/front_end/ui/lit/render.ts +44 -10
- package/front_end/ui/lit/strip-whitespace.ts +23 -2
- package/front_end/ui/settings/SettingUIRegistration.ts +105 -0
- package/front_end/ui/settings/settings.ts +9 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +13 -0
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- package/front_end/panels/recorder/RecorderController.ts +0 -1759
- /package/.agents/skills/{verification → devtools-verification}/SKILL.md +0 -0
- /package/front_end/{models → core}/text_utils/CodeMirrorUtils.ts +0 -0
- /package/front_end/{models → core}/text_utils/ContentData.ts +0 -0
- /package/front_end/{models → core}/text_utils/Text.ts +0 -0
- /package/front_end/{models → core}/text_utils/TextCursor.ts +0 -0
- /package/front_end/{models → core}/text_utils/TextUtils.snapshot.txt +0 -0
- /package/front_end/panels/recorder/{recorderController.css → recorderPanel.css} +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
|
+
import type * as Platform from '../../core/platform/platform.js';
|
|
7
|
+
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
8
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
9
|
+
|
|
10
|
+
import {AffectedResourcesView} from './AffectedResourcesView.js';
|
|
11
|
+
import type {IssueView} from './IssueView.js';
|
|
12
|
+
|
|
13
|
+
const UIStrings = {
|
|
14
|
+
/**
|
|
15
|
+
* @description Noun for singular or plural number of affected element resource indication in issue view.
|
|
16
|
+
*/
|
|
17
|
+
nElements: '{n, plural, =1 {# element} other {# elements}}',
|
|
18
|
+
} as const;
|
|
19
|
+
const str_ = i18n.i18n.registerUIStrings('panels/issues/AffectedLazyLoadImagesView.ts', UIStrings);
|
|
20
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
21
|
+
|
|
22
|
+
export interface ViewInput {
|
|
23
|
+
issues: Iterable<IssuesManager.LazyLoadImageIssue.LazyLoadImageIssue>;
|
|
24
|
+
issueCategory: IssuesManager.Issue.IssueCategory;
|
|
25
|
+
createElementCell: (element: IssuesManager.Issue.AffectedElement,
|
|
26
|
+
category: IssuesManager.Issue.IssueCategory) => Promise<Element>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => Promise<void>;
|
|
30
|
+
|
|
31
|
+
export const DEFAULT_VIEW: View = async (input, _output, target) => {
|
|
32
|
+
const templates = [];
|
|
33
|
+
for (const issue of input.issues) {
|
|
34
|
+
for (const element of issue.elements()) {
|
|
35
|
+
templates.push(html`<tr>
|
|
36
|
+
${await input.createElementCell(element, input.issueCategory)}
|
|
37
|
+
</tr>`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
render(html`${templates}`, target);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export class AffectedLazyLoadImagesView extends AffectedResourcesView {
|
|
44
|
+
readonly #view: View;
|
|
45
|
+
|
|
46
|
+
constructor(parent: IssueView, issue: IssuesManager.IssueAggregator.AggregatedIssue, jslogContext: string,
|
|
47
|
+
view = DEFAULT_VIEW) {
|
|
48
|
+
super(parent, issue, jslogContext);
|
|
49
|
+
this.#view = view;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
override update(): void {
|
|
53
|
+
this.requestResolver.clear();
|
|
54
|
+
void this.#render();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
protected override getResourceNameWithCount(count: number): Platform.UIString.LocalizedString {
|
|
58
|
+
return i18nString(UIStrings.nElements, {n: count});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async #render(): Promise<void> {
|
|
62
|
+
const issues = this.issue.getLazyLoadImageIssues();
|
|
63
|
+
let count = 0;
|
|
64
|
+
for (const issue of issues) {
|
|
65
|
+
count += issue.elementCount();
|
|
66
|
+
}
|
|
67
|
+
this.updateAffectedResourceCount(count);
|
|
68
|
+
|
|
69
|
+
const input = {
|
|
70
|
+
issues,
|
|
71
|
+
issueCategory: this.issue.getCategory(),
|
|
72
|
+
createElementCell: this.createElementCell.bind(this),
|
|
73
|
+
};
|
|
74
|
+
await this.#view(input, {}, this.affectedResources);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -31,7 +31,7 @@ const UIStrings = {
|
|
|
31
31
|
/**
|
|
32
32
|
* @description Tooltip for button linking to the Elements panel
|
|
33
33
|
*/
|
|
34
|
-
clickToRevealTheFramesDomNodeIn: 'Click to reveal the frame
|
|
34
|
+
clickToRevealTheFramesDomNodeIn: 'Click to reveal the frame’s DOM node in the Elements panel',
|
|
35
35
|
/**
|
|
36
36
|
* @description Replacement text for a link to an HTML element which is not available (anymore).
|
|
37
37
|
*/
|
|
@@ -93,7 +93,7 @@ const UIStrings = {
|
|
|
93
93
|
/**
|
|
94
94
|
* @description Content for the problem column in the affected resources table for a CORS issue that indicates that the HTTP status the preflight request was not successful.
|
|
95
95
|
*/
|
|
96
|
-
preflightInvalidStatus: 'HTTP status of preflight request didn
|
|
96
|
+
preflightInvalidStatus: 'HTTP status of preflight request didn’t indicate success',
|
|
97
97
|
/**
|
|
98
98
|
* @description Title for a column in the affected resources for a CORS issue showing the origin that was allowed according to CORS headers.
|
|
99
99
|
*/
|
|
@@ -25,6 +25,7 @@ import {AffectedDirectivesView} from './AffectedDirectivesView.js';
|
|
|
25
25
|
import {AffectedDocumentsInQuirksModeView} from './AffectedDocumentsInQuirksModeView.js';
|
|
26
26
|
import {AffectedElementsView} from './AffectedElementsView.js';
|
|
27
27
|
import {AffectedHeavyAdView} from './AffectedHeavyAdView.js';
|
|
28
|
+
import {AffectedLazyLoadImagesView} from './AffectedLazyLoadImagesView.js';
|
|
28
29
|
import {AffectedMetadataAllowedSitesView} from './AffectedMetadataAllowedSitesView.js';
|
|
29
30
|
import {AffectedPartitioningBlobURLView} from './AffectedPartitioningBlobURLView.js';
|
|
30
31
|
import {AffectedPermissionElementsView} from './AffectedPermissionElementsView.js';
|
|
@@ -259,6 +260,7 @@ export class IssueView extends UI.TreeOutline.TreeElement {
|
|
|
259
260
|
new AffectedDescendantsWithinSelectElementView(this, this.#issue, 'disallowed-select-descendants-details'),
|
|
260
261
|
new AffectedPartitioningBlobURLView(this, this.#issue, 'partitioning-blob-url-details'),
|
|
261
262
|
new AffectedPermissionElementsView(this, this.#issue, 'permission-element-elements'),
|
|
263
|
+
new AffectedLazyLoadImagesView(this, this.#issue, 'lazy-load-image-details'),
|
|
262
264
|
new AffectedSelectivePermissionsInterventionView(this, this.#issue, 'selective-permissions-intervention-details'),
|
|
263
265
|
];
|
|
264
266
|
this.#hiddenIssuesMenu = new Components.HideIssuesMenu.HideIssuesMenu();
|
|
@@ -2,12 +2,14 @@
|
|
|
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
4
|
|
|
5
|
+
import * as AffectedLazyLoadImagesView from './AffectedLazyLoadImagesView.js';
|
|
5
6
|
import * as AffectedSelectivePermissionsInterventionView from './AffectedSelectivePermissionsInterventionView.js';
|
|
6
7
|
import * as IssueRevealer from './IssueRevealer.js';
|
|
7
8
|
import * as IssuesPane from './IssuesPane.js';
|
|
8
9
|
import * as IssueView from './IssueView.js';
|
|
9
10
|
|
|
10
11
|
export {
|
|
12
|
+
AffectedLazyLoadImagesView,
|
|
11
13
|
AffectedSelectivePermissionsInterventionView,
|
|
12
14
|
IssueRevealer,
|
|
13
15
|
IssuesPane,
|
|
@@ -900,3 +900,8 @@ export interface EventTypes {
|
|
|
900
900
|
[Events.PageWarningsChanged]: PageWarningsChangedEvent;
|
|
901
901
|
[Events.AuditProgressChanged]: AuditProgressChangedEvent;
|
|
902
902
|
}
|
|
903
|
+
|
|
904
|
+
export function clearSettingsCacheForTest(): void {
|
|
905
|
+
runtimeSettings = null;
|
|
906
|
+
presets = null;
|
|
907
|
+
}
|
|
@@ -7,8 +7,8 @@ import * as Common from '../../core/common/common.js';
|
|
|
7
7
|
import * as Host from '../../core/host/host.js';
|
|
8
8
|
import * as Platform from '../../core/platform/platform.js';
|
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
10
11
|
import type * as LighthouseModel from '../../models/lighthouse/lighthouse.js';
|
|
11
|
-
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
12
12
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
13
13
|
import * as LighthouseReport from '../../third_party/lighthouse/report/report.js';
|
|
14
14
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
@@ -9,7 +9,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
9
9
|
import * as Host from '../../core/host/host.js';
|
|
10
10
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
11
11
|
import type * as Platform from '../../core/platform/platform.js';
|
|
12
|
-
import type * as TextUtils from '../../
|
|
12
|
+
import type * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
13
13
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
14
14
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
15
15
|
|
|
@@ -47,6 +47,7 @@ import * as Bindings from '../../models/bindings/bindings.js';
|
|
|
47
47
|
import type * as HAR from '../../models/har/har.js';
|
|
48
48
|
import * as Logs from '../../models/logs/logs.js';
|
|
49
49
|
import type * as NetworkTimeCalculator from '../../models/network_time_calculator/network_time_calculator.js';
|
|
50
|
+
import * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
50
51
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
51
52
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
52
53
|
import {createIcon} from '../../ui/kit/kit.js';
|
|
@@ -107,7 +108,7 @@ const UIStrings = {
|
|
|
107
108
|
/**
|
|
108
109
|
* @description Reason why a request was blocked shown in the Network panel
|
|
109
110
|
*/
|
|
110
|
-
coopSandboxedIframeCannotNavigateToCoopPage: 'Sandboxed iframe
|
|
111
|
+
coopSandboxedIframeCannotNavigateToCoopPage: 'Sandboxed iframe’s popup cannot navigate to COOP page',
|
|
111
112
|
/**
|
|
112
113
|
* @description Reason why a request was blocked shown in the Network panel
|
|
113
114
|
*/
|
|
@@ -343,6 +344,16 @@ const UIStrings = {
|
|
|
343
344
|
* @description Text in Network Data Grid Node of the Network panel. Noun. Refers to a potentially blocking resource.
|
|
344
345
|
*/
|
|
345
346
|
potentiallyBlocking: 'Potentially blocking',
|
|
347
|
+
/**
|
|
348
|
+
* @description Text indicating a request originated from the DevTools console. Used as a subtitle in the
|
|
349
|
+
* Initiator column.
|
|
350
|
+
*/
|
|
351
|
+
console: 'Console',
|
|
352
|
+
/**
|
|
353
|
+
* @description Tooltip for the console icon in the Network panel, indicating a request was initiated
|
|
354
|
+
* from the Console.
|
|
355
|
+
*/
|
|
356
|
+
requestOriginatedFromConsole: 'Request originated from Console',
|
|
346
357
|
|
|
347
358
|
} as const;
|
|
348
359
|
const str_ = i18n.i18n.registerUIStrings('panels/network/NetworkDataGridNode.ts', UIStrings);
|
|
@@ -599,6 +610,27 @@ export const _backgroundColors: Record<string, string> = {
|
|
|
599
610
|
FromFrame: '--network-grid-from-frame-color',
|
|
600
611
|
};
|
|
601
612
|
|
|
613
|
+
// name/path/url are the primary cells that own the request icon, the Ask AI
|
|
614
|
+
// button and the row click handlers. The first visible one is decorated, which
|
|
615
|
+
// is not necessarily visible index 0 (the pinned request-number column can come
|
|
616
|
+
// first).
|
|
617
|
+
const PRIMARY_COLUMNS = new Set(['name', 'path', 'url']);
|
|
618
|
+
|
|
619
|
+
function firstPrimaryColumn(dataGrid: DataGrid.DataGrid.DataGridImpl<unknown>|null): DataGrid.DataGrid.ColumnDescriptor|
|
|
620
|
+
undefined {
|
|
621
|
+
return dataGrid?.visibleColumnsArray.find(column => PRIMARY_COLUMNS.has(column.id));
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
function isFirstPrimaryColumn(dataGrid: DataGrid.DataGrid.DataGridImpl<unknown>|null, columnId: string): boolean {
|
|
625
|
+
const firstPrimary = firstPrimaryColumn(dataGrid);
|
|
626
|
+
// When the node is not attached to a grid yet there are no visible columns to
|
|
627
|
+
// inspect, so fall back to treating any primary column as the first one.
|
|
628
|
+
if (!firstPrimary) {
|
|
629
|
+
return PRIMARY_COLUMNS.has(columnId);
|
|
630
|
+
}
|
|
631
|
+
return firstPrimary.id === columnId;
|
|
632
|
+
}
|
|
633
|
+
|
|
602
634
|
export class NetworkRequestNode extends NetworkNode {
|
|
603
635
|
private initiatorCell: Element|null;
|
|
604
636
|
private requestInternal: SDK.NetworkRequest.NetworkRequest;
|
|
@@ -1009,6 +1041,29 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1009
1041
|
return aValue.localeCompare(bValue) || aRequest.identityCompare(bRequest);
|
|
1010
1042
|
}
|
|
1011
1043
|
|
|
1044
|
+
static isConsoleOriginated(request: SDK.NetworkRequest.NetworkRequest): boolean {
|
|
1045
|
+
const resourceType = request.resourceType();
|
|
1046
|
+
if (resourceType !== Common.ResourceType.resourceTypes.Fetch &&
|
|
1047
|
+
resourceType !== Common.ResourceType.resourceTypes.XHR) {
|
|
1048
|
+
return false;
|
|
1049
|
+
}
|
|
1050
|
+
const initiator = request.initiator();
|
|
1051
|
+
if (!initiator || initiator.type !== Protocol.Network.InitiatorType.Script) {
|
|
1052
|
+
return false;
|
|
1053
|
+
}
|
|
1054
|
+
if (initiator.url) {
|
|
1055
|
+
return false;
|
|
1056
|
+
}
|
|
1057
|
+
if (!initiator.stack) {
|
|
1058
|
+
return false;
|
|
1059
|
+
}
|
|
1060
|
+
return StackTrace.StackTrace.isConsoleOriginated(initiator.stack);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
private isConsoleOriginated(): boolean {
|
|
1064
|
+
return NetworkRequestNode.isConsoleOriginated(this.requestInternal);
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1012
1067
|
override showingInitiatorChainChanged(): void {
|
|
1013
1068
|
const showInitiatorChain = this.showingInitiatorChain();
|
|
1014
1069
|
|
|
@@ -1317,9 +1372,8 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1317
1372
|
}
|
|
1318
1373
|
|
|
1319
1374
|
private renderPrimaryCell(cell: HTMLElement, columnId: string, text?: string): void {
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1322
|
-
if (isFirstCell) {
|
|
1375
|
+
const dataGrid = this.dataGrid as DataGrid.DataGrid.DataGridImpl<unknown>| null;
|
|
1376
|
+
if (isFirstPrimaryColumn(dataGrid, columnId)) {
|
|
1323
1377
|
const leftPadding = this.leftPadding ? this.leftPadding + 'px' : '';
|
|
1324
1378
|
cell.style.setProperty('padding-left', leftPadding);
|
|
1325
1379
|
cell.tabIndex = -1;
|
|
@@ -1340,6 +1394,13 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1340
1394
|
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
1341
1395
|
render(iconElement, cell);
|
|
1342
1396
|
|
|
1397
|
+
// render Console icon if this request originated from Console
|
|
1398
|
+
if (this.isConsoleOriginated()) {
|
|
1399
|
+
const consoleIcon = createIcon('terminal', 'network-console-icon');
|
|
1400
|
+
UI.Tooltip.Tooltip.install(consoleIcon, i18nString(UIStrings.requestOriginatedFromConsole));
|
|
1401
|
+
cell.appendChild(consoleIcon);
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1343
1404
|
// render Ask AI button
|
|
1344
1405
|
const aiButtonContainer = this.createAiButtonIfAvailable();
|
|
1345
1406
|
if (aiButtonContainer) {
|
|
@@ -1590,7 +1651,8 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1590
1651
|
}
|
|
1591
1652
|
UI.Tooltip.Tooltip.install((this.linkifiedInitiatorAnchor), '');
|
|
1592
1653
|
cell.appendChild(this.linkifiedInitiatorAnchor);
|
|
1593
|
-
this.appendSubtitle(cell,
|
|
1654
|
+
this.appendSubtitle(cell,
|
|
1655
|
+
this.isConsoleOriginated() ? i18nString(UIStrings.console) : i18nString(UIStrings.script));
|
|
1594
1656
|
cell.classList.add('network-script-initiated');
|
|
1595
1657
|
break;
|
|
1596
1658
|
}
|
|
@@ -1772,7 +1834,8 @@ export class NetworkRequestNode extends NetworkNode {
|
|
|
1772
1834
|
export class NetworkGroupNode extends NetworkNode {
|
|
1773
1835
|
override createCells(element: Element): void {
|
|
1774
1836
|
super.createCells(element);
|
|
1775
|
-
const
|
|
1837
|
+
const dataGrid = this.dataGrid as DataGrid.DataGrid.DataGridImpl<unknown>;
|
|
1838
|
+
const primaryColumn = firstPrimaryColumn(dataGrid) ?? dataGrid.visibleColumnsArray[0];
|
|
1776
1839
|
const localizedTitle = `${primaryColumn.title}`;
|
|
1777
1840
|
const localizedLevel = i18nString(UIStrings.level);
|
|
1778
1841
|
this.nodeAccessibleText =
|
|
@@ -1780,8 +1843,9 @@ export class NetworkGroupNode extends NetworkNode {
|
|
|
1780
1843
|
}
|
|
1781
1844
|
|
|
1782
1845
|
override renderCell(c: Element, columnId: string): void {
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1846
|
+
const dataGrid = this.dataGrid as DataGrid.DataGrid.DataGridImpl<unknown>;
|
|
1847
|
+
const primaryColumn = firstPrimaryColumn(dataGrid) ?? dataGrid.visibleColumnsArray[0];
|
|
1848
|
+
if (primaryColumn.id === columnId) {
|
|
1785
1849
|
const cell = (c as HTMLElement);
|
|
1786
1850
|
const leftPadding = this.leftPadding ? this.leftPadding + 'px' : '';
|
|
1787
1851
|
cell.style.setProperty('padding-left', leftPadding);
|
|
@@ -40,13 +40,13 @@ import * as Host from '../../core/host/host.js';
|
|
|
40
40
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
41
41
|
import * as Platform from '../../core/platform/platform.js';
|
|
42
42
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
43
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
43
44
|
import * as Protocol from '../../generated/protocol.js';
|
|
44
45
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
45
46
|
import * as HAR from '../../models/har/har.js';
|
|
46
47
|
import * as Logs from '../../models/logs/logs.js';
|
|
47
48
|
import * as NetworkTimeCalculator from '../../models/network_time_calculator/network_time_calculator.js';
|
|
48
49
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
49
|
-
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
50
50
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
51
51
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
52
52
|
import * as Sources from '../../panels/sources/sources.js';
|
|
@@ -980,6 +980,12 @@ const DEFAULT_COLUMN_CONFIG = {
|
|
|
980
980
|
};
|
|
981
981
|
|
|
982
982
|
const DEFAULT_COLUMNS = [
|
|
983
|
+
{
|
|
984
|
+
id: 'request-number',
|
|
985
|
+
title: i18nLazyString(UIStrings.requestNumber),
|
|
986
|
+
align: DataGrid.DataGrid.Align.RIGHT,
|
|
987
|
+
sortingFunction: NetworkRequestNode.RequestNumberComparator,
|
|
988
|
+
},
|
|
983
989
|
{
|
|
984
990
|
id: 'name',
|
|
985
991
|
title: i18nLazyString(UIStrings.name),
|
|
@@ -1004,12 +1010,6 @@ const DEFAULT_COLUMNS = [
|
|
|
1004
1010
|
hideableGroup: 'path',
|
|
1005
1011
|
sortingFunction: NetworkRequestNode.RequestURLComparator,
|
|
1006
1012
|
},
|
|
1007
|
-
{
|
|
1008
|
-
id: 'request-number',
|
|
1009
|
-
title: i18nLazyString(UIStrings.requestNumber),
|
|
1010
|
-
align: DataGrid.DataGrid.Align.RIGHT,
|
|
1011
|
-
sortingFunction: NetworkRequestNode.RequestNumberComparator,
|
|
1012
|
-
},
|
|
1013
1013
|
{
|
|
1014
1014
|
id: 'method',
|
|
1015
1015
|
title: i18nLazyString(UIStrings.method),
|
|
@@ -71,13 +71,13 @@ const UIStrings = {
|
|
|
71
71
|
*/
|
|
72
72
|
search: 'Search',
|
|
73
73
|
/**
|
|
74
|
-
* @description Tooltip text that appears on the setting to
|
|
74
|
+
* @description Tooltip text that appears on the setting to keep log when hovering over the item.
|
|
75
75
|
*/
|
|
76
|
-
doNotClearLogOnPageReload: '
|
|
76
|
+
doNotClearLogOnPageReload: 'Don’t clear log on page reload / navigation',
|
|
77
77
|
/**
|
|
78
|
-
* @description Text to
|
|
78
|
+
* @description Text to keep the log after refreshing.
|
|
79
79
|
*/
|
|
80
|
-
preserveLog: '
|
|
80
|
+
preserveLog: 'Keep log',
|
|
81
81
|
/**
|
|
82
82
|
* @description Text to disable cache while DevTools is open
|
|
83
83
|
*/
|
|
@@ -6,8 +6,8 @@ import type * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
9
10
|
import type * as Logs from '../../models/logs/logs.js';
|
|
10
|
-
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
11
11
|
import type * as Workspace from '../../models/workspace/workspace.js';
|
|
12
12
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
13
13
|
import type * as Search from '../search/search.js';
|
|
@@ -46,7 +46,7 @@ const UIStrings = {
|
|
|
46
46
|
* @example {Learn more} PH1
|
|
47
47
|
*/
|
|
48
48
|
noThrottlingOrBlockingPattern:
|
|
49
|
-
`To throttle or block a network request, add a rule here manually or via the network panel
|
|
49
|
+
`To throttle or block a network request, add a rule here manually or via the network panel’s context menu. {PH1}`,
|
|
50
50
|
/**
|
|
51
51
|
* @description Text in Blocked URLs Pane of the Network panel
|
|
52
52
|
* @example {4} PH1
|
|
@@ -2,7 +2,7 @@
|
|
|
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
4
|
|
|
5
|
-
import type * as TextUtils from '../../
|
|
5
|
+
import type * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
6
6
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
7
|
import {html, nothing, render} from '../../ui/lit/lit.js';
|
|
8
8
|
|
|
@@ -12,6 +12,7 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
|
12
12
|
import {Directives, html, type LitTemplate, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
13
13
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
14
14
|
|
|
15
|
+
import {NetworkRequestNode} from './NetworkDataGridNode.js';
|
|
15
16
|
import requestInitiatorViewStyles from './requestInitiatorView.css.js';
|
|
16
17
|
import requestInitiatorViewTreeStyles from './requestInitiatorViewTree.css.js';
|
|
17
18
|
|
|
@@ -30,6 +31,10 @@ const UIStrings = {
|
|
|
30
31
|
* @description Title of a section in Request Initiator view of the Network Panel
|
|
31
32
|
*/
|
|
32
33
|
requestInitiatorChain: 'Request initiator chain',
|
|
34
|
+
/**
|
|
35
|
+
* @description Label shown in the initiator chain when a request was initiated from the Console.
|
|
36
|
+
*/
|
|
37
|
+
console: 'Console',
|
|
33
38
|
} as const;
|
|
34
39
|
const str_ = i18n.i18n.registerUIStrings('panels/network/RequestInitiatorView.ts', UIStrings);
|
|
35
40
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -51,6 +56,7 @@ export interface ViewInput {
|
|
|
51
56
|
initiatorGraph: Logs.NetworkLog.InitiatorGraph;
|
|
52
57
|
stackTrace: StackTrace.StackTrace.StackTrace|null;
|
|
53
58
|
request: SDK.NetworkRequest.NetworkRequest;
|
|
59
|
+
isConsoleOriginated: boolean;
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
|
|
@@ -83,6 +89,11 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
83
89
|
stackTrace: input.stackTrace,
|
|
84
90
|
})}
|
|
85
91
|
</li>
|
|
92
|
+
${input.isConsoleOriginated ? html`
|
|
93
|
+
<li role="treeitem" class="console-origin-label">
|
|
94
|
+
${i18nString(UIStrings.console)}
|
|
95
|
+
</li>
|
|
96
|
+
` : nothing}
|
|
86
97
|
</ul>
|
|
87
98
|
</li>
|
|
88
99
|
`;
|
|
@@ -167,13 +178,21 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
167
178
|
${i18nString(UIStrings.requestInitiatorChain)}
|
|
168
179
|
${hasInitiatorChain ? html`
|
|
169
180
|
<ul role="group">
|
|
170
|
-
${
|
|
181
|
+
${input.isConsoleOriginated ? html`
|
|
182
|
+
<li role="treeitem" aria-expanded="true" open>
|
|
183
|
+
<span>${i18nString(UIStrings.console)}</span>
|
|
184
|
+
<ul role="group">
|
|
185
|
+
${renderInitiatorNodes(initiators, 0, initiatorGraph.initiated, visited)}
|
|
186
|
+
</ul>
|
|
187
|
+
</li>` :
|
|
188
|
+
renderInitiatorNodes(initiators, 0, initiatorGraph.initiated, visited)}
|
|
171
189
|
</ul>` : nothing}
|
|
172
190
|
</li>`;
|
|
173
191
|
// clang-format on
|
|
174
192
|
};
|
|
175
193
|
|
|
176
|
-
const hasInitiatorChain =
|
|
194
|
+
const hasInitiatorChain =
|
|
195
|
+
input.initiatorGraph.initiators.size > 1 || input.initiatorGraph.initiated.size > 1 || input.isConsoleOriginated;
|
|
177
196
|
|
|
178
197
|
// clang-format off
|
|
179
198
|
render(html`
|
|
@@ -242,10 +261,13 @@ export class RequestInitiatorView extends UI.Widget.VBox {
|
|
|
242
261
|
.createStackTraceFromProtocolRuntime(rawStack, target);
|
|
243
262
|
}
|
|
244
263
|
|
|
264
|
+
const isConsoleOriginated = NetworkRequestNode.isConsoleOriginated(this.request);
|
|
265
|
+
|
|
245
266
|
const viewInput: ViewInput = {
|
|
246
267
|
initiatorGraph,
|
|
247
268
|
stackTrace,
|
|
248
269
|
request: this.request,
|
|
270
|
+
isConsoleOriginated,
|
|
249
271
|
};
|
|
250
272
|
|
|
251
273
|
this.#view(viewInput, undefined, this.contentElement);
|
|
@@ -37,7 +37,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
37
37
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
38
38
|
import * as Platform from '../../core/platform/platform.js';
|
|
39
39
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
40
|
-
import * as TextUtils from '../../
|
|
40
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
41
41
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
42
42
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
43
43
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
@@ -7,7 +7,7 @@ import '../../ui/legacy/legacy.js';
|
|
|
7
7
|
|
|
8
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
9
9
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
10
|
-
import * as TextUtils from '../../
|
|
10
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
11
11
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
12
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
13
|
import {render} from '../../ui/lit/lit.js';
|
|
@@ -6,7 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
8
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
-
import * as TextUtils from '../../
|
|
9
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
10
10
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
11
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
12
|
import * as Lit from '../../ui/lit/lit.js';
|
|
@@ -9,7 +9,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
9
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
10
10
|
import * as Platform from '../../core/platform/platform.js';
|
|
11
11
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
12
|
-
import * as TextUtils from '../../
|
|
12
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
13
13
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
14
14
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
15
15
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
@@ -7,7 +7,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
8
|
import * as Platform from '../../core/platform/platform.js';
|
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
|
-
import * as TextUtils from '../../
|
|
10
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
11
11
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
12
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
13
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -25,7 +25,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
25
25
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
26
26
|
import * as Platform from '../../core/platform/platform.js';
|
|
27
27
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
28
|
-
import * as TextUtils from '../../
|
|
28
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
29
29
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
30
30
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
31
31
|
|
|
@@ -9,10 +9,10 @@ import * as i18n from '../../../core/i18n/i18n.js';
|
|
|
9
9
|
import * as Platform from '../../../core/platform/platform.js';
|
|
10
10
|
import type {NameValue} from '../../../core/sdk/NetworkRequest.js';
|
|
11
11
|
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
12
|
+
import * as TextUtils from '../../../core/text_utils/text_utils.js';
|
|
12
13
|
import * as Protocol from '../../../generated/protocol.js';
|
|
13
14
|
import * as IssuesManager from '../../../models/issues_manager/issues_manager.js';
|
|
14
15
|
import * as Persistence from '../../../models/persistence/persistence.js';
|
|
15
|
-
import * as TextUtils from '../../../models/text_utils/text_utils.js';
|
|
16
16
|
import type * as Workspace from '../../../models/workspace/workspace.js';
|
|
17
17
|
import * as NetworkForward from '../../../panels/network/forward/forward.js';
|
|
18
18
|
import * as Sources from '../../../panels/sources/sources.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
6
|
-
import type * as TextUtils from '../../../
|
|
6
|
+
import type * as TextUtils from '../../../core/text_utils/text_utils.js';
|
|
7
7
|
|
|
8
8
|
export const enum UIHeaderSection {
|
|
9
9
|
GENERAL = 'General',
|
|
@@ -110,7 +110,7 @@ const UIStrings = {
|
|
|
110
110
|
/**
|
|
111
111
|
* @description Title of a setting under the Network category that can be invoked through the Command Menu
|
|
112
112
|
*/
|
|
113
|
-
dontGroupNetworkLogItemsByFrame: 'Don
|
|
113
|
+
dontGroupNetworkLogItemsByFrame: 'Don’t group network log items by frame',
|
|
114
114
|
/**
|
|
115
115
|
* @description Title of a button for clearing the network log
|
|
116
116
|
*/
|
|
@@ -132,13 +132,13 @@ const UIStrings = {
|
|
|
132
132
|
* @description Title of an action in the Network panel that disables options in the UI to copy or export
|
|
133
133
|
* HAR (not translatable) with sensitive data.
|
|
134
134
|
*/
|
|
135
|
-
dontAllowToGenerateHarWithSensitiveData: 'Don
|
|
135
|
+
dontAllowToGenerateHarWithSensitiveData: 'Don’t allow to generate `HAR` with sensitive data',
|
|
136
136
|
/**
|
|
137
137
|
* @description Tooltip shown as documentation when hovering the (?) icon next to the "Allow to generate
|
|
138
138
|
* HAR with sensitive data" option in the Settings panel.
|
|
139
139
|
*/
|
|
140
140
|
allowToGenerateHarWithSensitiveDataDocumentation:
|
|
141
|
-
'By default generated HAR logs are sanitized and don
|
|
141
|
+
'By default generated HAR logs are sanitized and don’t include `Cookie`, `Set-Cookie`, or `Authorization` HTTP headers. When this setting is enabled, options to export/copy HAR with sensitive data are provided.',
|
|
142
142
|
} as const;
|
|
143
143
|
const str_ = i18n.i18n.registerUIStrings('panels/network/network-meta.ts', UIStrings);
|
|
144
144
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
@@ -262,12 +262,17 @@ td.time-column {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
.data-grid-data-grid-node devtools-icon[name="arrow-up-down-circle"],
|
|
265
|
+
.data-grid-data-grid-node devtools-icon.network-console-icon,
|
|
265
266
|
.network-log-grid.data-grid.small .icon {
|
|
266
267
|
width: 16px;
|
|
267
268
|
height: 16px;
|
|
268
269
|
vertical-align: sub;
|
|
269
270
|
}
|
|
270
271
|
|
|
272
|
+
.data-grid-data-grid-node devtools-icon.network-console-icon {
|
|
273
|
+
margin-right: 3px;
|
|
274
|
+
}
|
|
275
|
+
|
|
271
276
|
.image-network-icon-preview {
|
|
272
277
|
inset: 0;
|
|
273
278
|
margin: auto;
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
padding: 4px;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
.console-origin-label {
|
|
21
|
+
color: var(--sys-color-token-subtle);
|
|
22
|
+
padding: 2px 4px 2px 20px;
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
.request-initiator-view-section-title:focus-visible {
|
|
21
26
|
background-color: var(--sys-color-state-focus-highlight);
|
|
22
27
|
}
|