chrome-devtools-frontend 1.0.1662965 → 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-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 +3 -2
- 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/Settings.ts +75 -0
- 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/SourceMap.ts +1 -1
- package/front_end/core/sdk/SourceMapScopesInfo.ts +1 -1
- package/front_end/core/sdk/sdk-meta.ts +3 -3
- 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/main/MainImpl.ts +14 -1
- package/front_end/foundation/Universe.ts +1 -1
- package/front_end/models/ai_assistance/AgentProject.ts +1 -1
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +3 -6
- package/front_end/models/ai_assistance/agents/AiAgent.ts +1 -1
- 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 +2 -3
- 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 +11 -5
- 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/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/EmulatedDevices.ts +3 -2
- package/front_end/models/har/Importer.ts +1 -1
- 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 +1 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +1 -1
- 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/ServiceWorkerCacheTreeElement.ts +12 -2
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/application.ts +2 -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/TrustTokensView.ts +2 -2
- 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 +29 -7
- 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/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/profiler/HeapProfileView.ts +6 -6
- 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/RecorderPanel.ts +493 -381
- 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/search/SearchResultsPane.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +3 -3
- package/front_end/panels/settings/AISettingsTab.ts +4 -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/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 +26 -7
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +1 -1
- 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 +161 -54
- 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 +6 -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/.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/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt
CHANGED
|
@@ -480,7 +480,7 @@ Available insights:
|
|
|
480
480
|
example question: How do I decrease the initial loading time of my page?
|
|
481
481
|
example question: Did anything slow down the request for this document?
|
|
482
482
|
- insight name: ThirdParties
|
|
483
|
-
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page
|
|
483
|
+
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page’s content.
|
|
484
484
|
relevant trace bounds: {min: 1020034871372µs, max: 1020035171789µs}
|
|
485
485
|
example question: Which third parties are having the largest impact on my page performance?
|
|
486
486
|
- insight name: CharacterSet
|
|
@@ -542,7 +542,7 @@ Available insights:
|
|
|
542
542
|
estimated metric savings: FCP 20 ms
|
|
543
543
|
example question: How can I update my CSS to avoid layout shifts caused by incorrect `font-display` properties?
|
|
544
544
|
- insight name: ThirdParties
|
|
545
|
-
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page
|
|
545
|
+
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page’s content.
|
|
546
546
|
relevant trace bounds: {min: 157423742399µs, max: 157427273902µs}
|
|
547
547
|
example question: Which third parties are having the largest impact on my page performance?
|
|
548
548
|
- insight name: Cache
|
|
@@ -552,7 +552,7 @@ Available insights:
|
|
|
552
552
|
estimated wasted bytes: 847.4 kB
|
|
553
553
|
example question: What caching strategies can I apply to improve my page performance?
|
|
554
554
|
- insight name: LegacyJavaScript
|
|
555
|
-
description: Polyfills and transforms enable older browsers to use new JavaScript features. However, many aren
|
|
555
|
+
description: Polyfills and transforms enable older browsers to use new JavaScript features. However, many aren’t necessary for modern browsers. Consider modifying your JavaScript build process to not transpile [Baseline](https://web.dev/articles/baseline-and-polyfills) features, unless you know you must support older browsers. [Learn why most sites can deploy ES6+ code without transpiling](https://developer.chrome.com/docs/performance/insights/legacy-javascript)
|
|
556
556
|
relevant trace bounds: {min: 157423489126µs, max: 157426132225µs}
|
|
557
557
|
estimated metric savings: FCP 0 ms, LCP 0 ms
|
|
558
558
|
estimated wasted bytes: 126.9 kB
|
|
@@ -590,7 +590,7 @@ Available insights:
|
|
|
590
590
|
example question: Which LCP subpart was most problematic?
|
|
591
591
|
example question: What can I do to reduce the LCP time for this page load?
|
|
592
592
|
- insight name: RenderBlocking
|
|
593
|
-
description: Requests are blocking the page
|
|
593
|
+
description: Requests are blocking the page’s initial render, which may delay LCP. [Deferring or inlining](https://developer.chrome.com/docs/performance/insights/render-blocking) can move these network requests out of the critical path.
|
|
594
594
|
relevant trace bounds: {min: 171608170438µs, max: 171608877165µs}
|
|
595
595
|
example question: Show me the most impactful render-blocking requests that I should focus on
|
|
596
596
|
example question: How can I reduce the number of render-blocking requests?
|
|
@@ -618,7 +618,7 @@ Available insights:
|
|
|
618
618
|
example question: Which LCP subpart was most problematic?
|
|
619
619
|
example question: What can I do to reduce the LCP time for this page load?
|
|
620
620
|
- insight name: RenderBlocking
|
|
621
|
-
description: Requests are blocking the page
|
|
621
|
+
description: Requests are blocking the page’s initial render, which may delay LCP. [Deferring or inlining](https://developer.chrome.com/docs/performance/insights/render-blocking) can move these network requests out of the critical path.
|
|
622
622
|
relevant trace bounds: {min: 171614330544µs, max: 171615043224µs}
|
|
623
623
|
example question: Show me the most impactful render-blocking requests that I should focus on
|
|
624
624
|
example question: How can I reduce the number of render-blocking requests?
|
|
@@ -696,7 +696,7 @@ Available insights:
|
|
|
696
696
|
estimated metric savings: INP 0 ms
|
|
697
697
|
example question: How do I make sure my page is optimized for mobile viewing?
|
|
698
698
|
- insight name: ThirdParties
|
|
699
|
-
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page
|
|
699
|
+
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page’s content.
|
|
700
700
|
relevant trace bounds: {min: 59728701403µs, max: 59729465969µs}
|
|
701
701
|
example question: Which third parties are having the largest impact on my page performance?
|
|
702
702
|
- insight name: CharacterSet
|
|
@@ -780,7 +780,7 @@ Available insights:
|
|
|
780
780
|
estimated metric savings: INP 0 ms
|
|
781
781
|
example question: How do I make sure my page is optimized for mobile viewing?
|
|
782
782
|
- insight name: ThirdParties
|
|
783
|
-
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page
|
|
783
|
+
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page’s content.
|
|
784
784
|
relevant trace bounds: {min: 59728701403µs, max: 59729465969µs}
|
|
785
785
|
example question: Which third parties are having the largest impact on my page performance?
|
|
786
786
|
- insight name: CharacterSet
|
|
@@ -816,7 +816,7 @@ Available insights:
|
|
|
816
816
|
example question: Why is a large INP score problematic?
|
|
817
817
|
example question: What's the biggest contributor to my longest interaction?
|
|
818
818
|
- insight name: ThirdParties
|
|
819
|
-
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page
|
|
819
|
+
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page’s content.
|
|
820
820
|
relevant trace bounds: {min: 337944792445µs, max: 337944809570µs}
|
|
821
821
|
example question: Which third parties are having the largest impact on my page performance?
|
|
822
822
|
=== end content
|
|
@@ -39,12 +39,19 @@ export class PerformanceTraceFormatter {
|
|
|
39
39
|
(url: Platform.DevToolsPath.UrlString, line: number,
|
|
40
40
|
column: number) => Promise<SourceMapScopes.FunctionCodeResolver.FunctionCode|null>;
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
readonly #cruxManager: CrUXManager.CrUXManager;
|
|
43
|
+
|
|
44
|
+
constructor(
|
|
45
|
+
focus: AgentFocus,
|
|
46
|
+
deviceScope: CrUXManager.DeviceScope|null = null,
|
|
47
|
+
cruxManager: CrUXManager.CrUXManager = CrUXManager.CrUXManager.instance(),
|
|
48
|
+
) {
|
|
43
49
|
this.#focus = focus;
|
|
44
50
|
this.#parsedTrace = focus.parsedTrace;
|
|
45
51
|
this.#insightSet = focus.primaryInsightSet;
|
|
46
52
|
this.#eventsSerializer = focus.eventsSerializer;
|
|
47
53
|
this.#deviceScope = deviceScope;
|
|
54
|
+
this.#cruxManager = cruxManager;
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
serializeEvent(event: Trace.Types.Events.Event): string {
|
|
@@ -65,8 +72,8 @@ export class PerformanceTraceFormatter {
|
|
|
65
72
|
return [];
|
|
66
73
|
}
|
|
67
74
|
try {
|
|
68
|
-
const cruxScope: CrUXManager.Scope =
|
|
69
|
-
|
|
75
|
+
const cruxScope: CrUXManager.Scope =
|
|
76
|
+
this.#deviceScope ? {pageScope: 'url', deviceScope: this.#deviceScope} : this.#cruxManager.getSelectedScope();
|
|
70
77
|
const parts: string[] = [];
|
|
71
78
|
const fieldMetrics =
|
|
72
79
|
Trace.Insights.Common.getFieldMetricsForInsightSet(insightSet, this.#parsedTrace.metadata, cruxScope);
|
|
@@ -229,6 +236,22 @@ export class PerformanceTraceFormatter {
|
|
|
229
236
|
}
|
|
230
237
|
}
|
|
231
238
|
|
|
239
|
+
const extensionTrackData = parsedTrace.data.ExtensionTraceData?.extensionTrackData;
|
|
240
|
+
if (extensionTrackData && extensionTrackData.length > 0) {
|
|
241
|
+
parts.push('\n# Custom tracks\n');
|
|
242
|
+
parts.push('The following is a list of custom tracks or track groups from the extensibility API.');
|
|
243
|
+
for (const trackData of extensionTrackData) {
|
|
244
|
+
if (trackData.isTrackGroup) {
|
|
245
|
+
parts.push(`\n## Group: ${trackData.name}\n`);
|
|
246
|
+
for (const trackName of Object.keys(trackData.entriesByTrack)) {
|
|
247
|
+
parts.push(` - Track: ${trackName}`);
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
parts.push(`\n## Track: ${trackData.name}\n`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
232
255
|
return parts.join('\n');
|
|
233
256
|
}
|
|
234
257
|
|
|
@@ -507,6 +530,56 @@ export class PerformanceTraceFormatter {
|
|
|
507
530
|
return results.join('\n\n');
|
|
508
531
|
}
|
|
509
532
|
|
|
533
|
+
formatExtensionTrackSummary(bounds: Trace.Types.Timing.TraceWindowMicro): string {
|
|
534
|
+
const extensionTrackData = this.#parsedTrace.data.ExtensionTraceData?.extensionTrackData;
|
|
535
|
+
if (!extensionTrackData || extensionTrackData.length === 0) {
|
|
536
|
+
return 'No custom track activity found';
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
const results: string[] = [];
|
|
540
|
+
|
|
541
|
+
for (const trackData of extensionTrackData) {
|
|
542
|
+
const trackLines: string[] = [];
|
|
543
|
+
const header = trackData.isTrackGroup ? `# Track Group: ${trackData.name}` : `# Track: ${trackData.name}`;
|
|
544
|
+
trackLines.push(header);
|
|
545
|
+
|
|
546
|
+
let hasEntriesInBounds = false;
|
|
547
|
+
for (const trackName of Object.keys(trackData.entriesByTrack)) {
|
|
548
|
+
const entries = trackData.entriesByTrack[trackName];
|
|
549
|
+
const filteredEntries = entries.filter(entry => Trace.Helpers.Timing.eventIsInBounds(entry, bounds));
|
|
550
|
+
if (filteredEntries.length === 0) {
|
|
551
|
+
continue;
|
|
552
|
+
}
|
|
553
|
+
hasEntriesInBounds = true;
|
|
554
|
+
if (trackData.isTrackGroup) {
|
|
555
|
+
trackLines.push(`## Track: ${trackName}`);
|
|
556
|
+
}
|
|
557
|
+
for (const entry of filteredEntries) {
|
|
558
|
+
const entryKey = this.serializeEvent(entry);
|
|
559
|
+
const parts = [
|
|
560
|
+
`Name: ${entry.name}`,
|
|
561
|
+
`eventKey: ${entryKey}`,
|
|
562
|
+
`duration: ${micros(entry.dur ?? Trace.Types.Timing.Micro(0))}`,
|
|
563
|
+
];
|
|
564
|
+
if (entry.devtoolsObj.properties) {
|
|
565
|
+
const props = entry.devtoolsObj.properties.map(prop => `${prop[0]}: ${JSON.stringify(prop[1])}`).join(', ');
|
|
566
|
+
parts.push(`properties: {${props}}`);
|
|
567
|
+
}
|
|
568
|
+
trackLines.push(`- ${parts.join(', ')}`);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
if (hasEntriesInBounds) {
|
|
572
|
+
results.push(trackLines.join('\n'));
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
if (results.length === 0) {
|
|
577
|
+
return 'No custom track activity found in the given bounds';
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
return results.join('\n\n');
|
|
581
|
+
}
|
|
582
|
+
|
|
510
583
|
async formatCallTree(tree: AICallTree, headerLevel = 1): Promise<string> {
|
|
511
584
|
let result = `${tree.serialize(headerLevel)}\n\nIMPORTANT: Never show eventKey to the user.\n`;
|
|
512
585
|
|
|
@@ -41,6 +41,16 @@ export class ListNetworkRequestsTool implements
|
|
|
41
41
|
readonly name = ToolName.LIST_NETWORK_REQUESTS;
|
|
42
42
|
readonly description = 'Gives a list of network requests including URL, status code, and duration.';
|
|
43
43
|
|
|
44
|
+
readonly #networkLog?: Logs.NetworkLog.NetworkLog;
|
|
45
|
+
|
|
46
|
+
constructor(networkLog?: Logs.NetworkLog.NetworkLog) {
|
|
47
|
+
this.#networkLog = networkLog;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#getNetworkLog(): Logs.NetworkLog.NetworkLog {
|
|
51
|
+
return this.#networkLog ?? Logs.NetworkLog.NetworkLog.instance();
|
|
52
|
+
}
|
|
53
|
+
|
|
44
54
|
readonly parameters: Host.AidaClient.FunctionObjectParam<never> = {
|
|
45
55
|
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
46
56
|
description: '',
|
|
@@ -81,7 +91,7 @@ export class ListNetworkRequestsTool implements
|
|
|
81
91
|
|
|
82
92
|
let hasCrossOriginRequest = false;
|
|
83
93
|
const requestsToShow: SDK.NetworkRequest.NetworkRequest[] = [];
|
|
84
|
-
for (const request of
|
|
94
|
+
for (const request of this.#getNetworkLog().requests()) {
|
|
85
95
|
// To prevent cross-origin prompt injection attacks, HAR-imported requests
|
|
86
96
|
// are assigned a virtual origin (e.g., `imported-har://${domain}`) rather than
|
|
87
97
|
// sharing the origin of live pages.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
|
|
7
|
-
import {Badge, BadgeAction} from './Badge.js';
|
|
7
|
+
import {Badge, BadgeAction, type BadgeContext} from './Badge.js';
|
|
8
8
|
|
|
9
9
|
const AI_EXPLORER_BADGE_URI = new URL('../../Images/ai-explorer-badge.svg', import.meta.url).toString();
|
|
10
10
|
const AI_CONVERSATION_COUNT_SETTING_NAME = 'gdp.ai-conversation-count';
|
|
@@ -16,13 +16,18 @@ export class AiExplorerBadge extends Badge {
|
|
|
16
16
|
override readonly title = 'AI Explorer';
|
|
17
17
|
override readonly jslogContext = 'ai-explorer';
|
|
18
18
|
override readonly imageUri = AI_EXPLORER_BADGE_URI;
|
|
19
|
-
#aiConversationCountSetting: Common.Settings.Setting<number
|
|
20
|
-
AI_CONVERSATION_COUNT_SETTING_NAME, 0, Common.Settings.SettingStorageType.SYNCED);
|
|
19
|
+
readonly #aiConversationCountSetting: Common.Settings.Setting<number>;
|
|
21
20
|
|
|
22
21
|
override readonly interestedActions = [
|
|
23
22
|
BadgeAction.STARTED_AI_CONVERSATION,
|
|
24
23
|
] as const;
|
|
25
24
|
|
|
25
|
+
constructor(badgeContext: BadgeContext) {
|
|
26
|
+
super(badgeContext);
|
|
27
|
+
this.#aiConversationCountSetting = badgeContext.settings.createSetting(AI_CONVERSATION_COUNT_SETTING_NAME, 0,
|
|
28
|
+
Common.Settings.SettingStorageType.SYNCED);
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
handleAction(_action: BadgeAction): void {
|
|
27
32
|
const currentCount = this.#aiConversationCountSetting.get();
|
|
28
33
|
if (currentCount >= AI_CONVERSATION_COUNT_LIMIT) {
|
|
@@ -26,6 +26,7 @@ export type BadgeActionEvents = Record<BadgeAction, void>;
|
|
|
26
26
|
export interface BadgeContext {
|
|
27
27
|
onTriggerBadge: (badge: Badge) => void;
|
|
28
28
|
badgeActionEventTarget: Common.ObjectWrapper.ObjectWrapper<BadgeActionEvents>;
|
|
29
|
+
settings: Common.Settings.Settings;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export interface TriggerOptions {
|
|
@@ -45,6 +45,7 @@ export class UserBadges extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
45
45
|
|
|
46
46
|
readonly #settings: Common.Settings.Settings;
|
|
47
47
|
readonly #gdpClient: Host.GdpClient.GdpClient;
|
|
48
|
+
readonly #inspectorFrontendHost: Host.InspectorFrontendHostAPI.InspectorFrontendHostAPI;
|
|
48
49
|
|
|
49
50
|
static readonly BADGE_REGISTRY: BadgeClass[] = [
|
|
50
51
|
StarterBadge,
|
|
@@ -57,11 +58,13 @@ export class UserBadges extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
57
58
|
constructor(
|
|
58
59
|
settings: Common.Settings.Settings,
|
|
59
60
|
gdpClient: Host.GdpClient.GdpClient,
|
|
61
|
+
inspectorFrontendHost: Host.InspectorFrontendHostAPI.InspectorFrontendHostAPI,
|
|
60
62
|
) {
|
|
61
63
|
super();
|
|
62
64
|
|
|
63
65
|
this.#settings = settings;
|
|
64
66
|
this.#gdpClient = gdpClient;
|
|
67
|
+
this.#inspectorFrontendHost = inspectorFrontendHost;
|
|
65
68
|
|
|
66
69
|
this.#receiveBadgesSetting = this.#settings.moduleSetting('receive-gdp-badges');
|
|
67
70
|
if (!Host.GdpClient.isBadgesEnabled()) {
|
|
@@ -76,10 +79,12 @@ export class UserBadges extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
76
79
|
this.#starterBadgeDismissed =
|
|
77
80
|
this.#settings.createSetting('starter-badge-dismissed', false, Common.Settings.SettingStorageType.SYNCED);
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
const badgeContext: BadgeContext = {
|
|
83
|
+
onTriggerBadge: this.#onTriggerBadge.bind(this),
|
|
84
|
+
badgeActionEventTarget: this.#badgeActionEventTarget,
|
|
85
|
+
settings: this.#settings,
|
|
86
|
+
};
|
|
87
|
+
this.#allBadges = UserBadges.BADGE_REGISTRY.map(badgeCtor => new badgeCtor(badgeContext));
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
static instance({forceNew}: {forceNew: boolean} = {forceNew: false}): UserBadges {
|
|
@@ -89,6 +94,7 @@ export class UserBadges extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
89
94
|
new UserBadges(
|
|
90
95
|
Common.Settings.Settings.instance(),
|
|
91
96
|
Host.GdpClient.GdpClient.instance(),
|
|
97
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance,
|
|
92
98
|
),
|
|
93
99
|
);
|
|
94
100
|
}
|
|
@@ -195,7 +201,7 @@ export class UserBadges extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
195
201
|
|
|
196
202
|
async #reconcileBadges(): Promise<void> {
|
|
197
203
|
const syncInfo = await new Promise<Host.InspectorFrontendHostAPI.SyncInformation>(
|
|
198
|
-
resolve =>
|
|
204
|
+
resolve => this.#inspectorFrontendHost.getSyncInformation(resolve));
|
|
199
205
|
// If the user is not signed in, do not activate any badges.
|
|
200
206
|
if (!syncInfo.accountEmail) {
|
|
201
207
|
this.#deactivateAllBadges();
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
8
9
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
9
10
|
import * as StackTraceImpl from '../stack_trace/stack_trace_impl.js';
|
|
10
|
-
import * as TextUtils from '../text_utils/text_utils.js';
|
|
11
11
|
import * as Workspace from '../workspace/workspace.js';
|
|
12
12
|
|
|
13
13
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
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
|
-
import * as TextUtils from '
|
|
8
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
9
9
|
import * as Workspace from '../workspace/workspace.js';
|
|
10
10
|
|
|
11
11
|
const UIStrings = {
|
|
@@ -8,10 +8,10 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
8
8
|
import type * as Platform from '../../core/platform/platform.js';
|
|
9
9
|
import {assertNotNullOrUndefined} from '../../core/platform/platform.js';
|
|
10
10
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
11
12
|
import * as Protocol from '../../generated/protocol.js';
|
|
12
13
|
import * as StackTrace from '../stack_trace/stack_trace.js';
|
|
13
14
|
import type * as StackTraceImpl from '../stack_trace/stack_trace_impl.js';
|
|
14
|
-
import * as TextUtils from '../text_utils/text_utils.js';
|
|
15
15
|
import * as Workspace from '../workspace/workspace.js';
|
|
16
16
|
|
|
17
17
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
|
@@ -43,7 +43,7 @@ const UIStrings = {
|
|
|
43
43
|
* @example {C/C++ DevTools Support (DWARF)} PH1
|
|
44
44
|
* @example {http://web.dev/file.wasm} PH2
|
|
45
45
|
*/
|
|
46
|
-
loadedDebugSymbolsForButDidnt: '[{PH1}] Loaded debug symbols for {PH2}, but didn
|
|
46
|
+
loadedDebugSymbolsForButDidnt: '[{PH1}] Loaded debug symbols for {PH2}, but didn’t find any source files',
|
|
47
47
|
/**
|
|
48
48
|
* @description Status message that is shown in the Console when debugging information is successfully loaded
|
|
49
49
|
* @example {C/C++ DevTools Support (DWARF)} PH1
|
|
@@ -6,11 +6,11 @@ import type * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as Root from '../../core/root/root.js';
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
+
import type * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
9
10
|
import * as Protocol from '../../generated/protocol.js';
|
|
10
11
|
import type * as StackTrace from '../stack_trace/stack_trace.js';
|
|
11
12
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
12
13
|
import * as StackTraceImpl from '../stack_trace/stack_trace_impl.js';
|
|
13
|
-
import type * as TextUtils from '../text_utils/text_utils.js';
|
|
14
14
|
import * as Workspace from '../workspace/workspace.js';
|
|
15
15
|
|
|
16
16
|
import {CompilerScriptMapping} from './CompilerScriptMapping.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
-
import type * as TextUtils from '
|
|
8
|
+
import type * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
9
9
|
import * as Workspace from '../workspace/workspace.js';
|
|
10
10
|
|
|
11
11
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
|
-
import * as TextUtils from '
|
|
7
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
8
8
|
import * as Workspace from '../workspace/workspace.js';
|
|
9
9
|
|
|
10
10
|
export interface ChunkedReader {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import type * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
8
9
|
import * as Protocol from '../../generated/protocol.js';
|
|
9
|
-
import * as TextUtils from '../text_utils/text_utils.js';
|
|
10
10
|
import * as Workspace from '../workspace/workspace.js';
|
|
11
11
|
|
|
12
12
|
import {CSSWorkspaceBinding} from './CSSWorkspaceBinding.js';
|
|
@@ -63,15 +63,12 @@ export class PresentationSourceFrameMessageManager implements
|
|
|
63
63
|
export class PresentationConsoleMessageManager {
|
|
64
64
|
#sourceFrameMessageManager = new PresentationSourceFrameMessageManager();
|
|
65
65
|
|
|
66
|
-
constructor() {
|
|
67
|
-
SDK.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
SDK.ConsoleModel.ConsoleModel
|
|
71
|
-
|
|
72
|
-
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
73
|
-
SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.ConsoleCleared,
|
|
74
|
-
() => this.#sourceFrameMessageManager.clear());
|
|
66
|
+
constructor(targetManager: SDK.TargetManager.TargetManager) {
|
|
67
|
+
targetManager.addModelListener(SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded,
|
|
68
|
+
event => this.consoleMessageAdded(event.data));
|
|
69
|
+
SDK.ConsoleModel.ConsoleModel.allMessagesUnordered(targetManager).forEach(this.consoleMessageAdded, this);
|
|
70
|
+
targetManager.addModelListener(SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.ConsoleCleared,
|
|
71
|
+
() => this.#sourceFrameMessageManager.clear());
|
|
75
72
|
}
|
|
76
73
|
|
|
77
74
|
private consoleMessageAdded(consoleMessage: SDK.ConsoleModel.ConsoleMessage): void {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
8
9
|
import * as Formatter from '../formatter/formatter.js';
|
|
9
|
-
import * as TextUtils from '../text_utils/text_utils.js';
|
|
10
10
|
import * as Workspace from '../workspace/workspace.js';
|
|
11
11
|
|
|
12
12
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
|
@@ -7,9 +7,9 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
7
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as Root from '../../core/root/root.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 * as Protocol from '../../generated/protocol.js';
|
|
11
12
|
import * as Formatter from '../formatter/formatter.js';
|
|
12
|
-
import * as TextUtils from '../text_utils/text_utils.js';
|
|
13
13
|
import * as Workspace from '../workspace/workspace.js';
|
|
14
14
|
|
|
15
15
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
8
9
|
import type * as Protocol from '../../generated/protocol.js';
|
|
9
|
-
import * as TextUtils from '../text_utils/text_utils.js';
|
|
10
10
|
import * as Workspace from '../workspace/workspace.js';
|
|
11
11
|
|
|
12
12
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
-
import * as TextUtils from '
|
|
8
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
9
9
|
import * as Workspace from '../workspace/workspace.js';
|
|
10
10
|
|
|
11
11
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
|
@@ -7,11 +7,11 @@ import type * as Platform from '../../core/platform/platform.js';
|
|
|
7
7
|
import {assertNotNullOrUndefined} from '../../core/platform/platform.js';
|
|
8
8
|
import * as Root from '../../core/root/root.js';
|
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
|
+
import type * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
10
11
|
import * as Protocol from '../../generated/protocol.js';
|
|
11
12
|
import * as Bindings from '../bindings/bindings.js';
|
|
12
13
|
import * as Formatter from '../formatter/formatter.js';
|
|
13
14
|
import * as SourceMapScopes from '../source_map_scopes/source_map_scopes.js';
|
|
14
|
-
import type * as TextUtils from '../text_utils/text_utils.js';
|
|
15
15
|
import * as Workspace from '../workspace/workspace.js';
|
|
16
16
|
|
|
17
17
|
const INITIAL_RESTORE_BREAKPOINT_COUNT = 100;
|
|
@@ -12,7 +12,7 @@ const UIStrings = {
|
|
|
12
12
|
/**
|
|
13
13
|
* @description Warning message indicating that the user will see real user data for a URL which is different from the URL they are currently looking at.
|
|
14
14
|
*/
|
|
15
|
-
fieldOverrideWarning: 'Field metrics are
|
|
15
|
+
fieldOverrideWarning: 'Field metrics are for a different URL than the current page.',
|
|
16
16
|
} as const;
|
|
17
17
|
|
|
18
18
|
const str_ = i18n.i18n.registerUIStrings('models/crux-manager/CrUXManager.ts', UIStrings);
|
|
@@ -581,7 +581,7 @@ export class EmulatedDevicesList extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
581
581
|
#standard: Set<EmulatedDevice>;
|
|
582
582
|
readonly #customSetting: Common.Settings.Setting<any[]>;
|
|
583
583
|
readonly #custom: Set<EmulatedDevice>;
|
|
584
|
-
constructor(settings: Common.Settings.Settings
|
|
584
|
+
constructor(settings: Common.Settings.Settings) {
|
|
585
585
|
super();
|
|
586
586
|
|
|
587
587
|
this.#standardSetting = settings.createSetting('standard-emulated-device-list', []);
|
|
@@ -598,7 +598,8 @@ export class EmulatedDevicesList extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
598
598
|
|
|
599
599
|
static instance(): EmulatedDevicesList {
|
|
600
600
|
if (!Root.DevToolsContext.globalInstance().has(EmulatedDevicesList)) {
|
|
601
|
-
Root.DevToolsContext.globalInstance().set(EmulatedDevicesList,
|
|
601
|
+
Root.DevToolsContext.globalInstance().set(EmulatedDevicesList,
|
|
602
|
+
new EmulatedDevicesList(Common.Settings.Settings.instance()));
|
|
602
603
|
}
|
|
603
604
|
return Root.DevToolsContext.globalInstance().get(EmulatedDevicesList);
|
|
604
605
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
8
9
|
import * as Protocol from '../../generated/protocol.js';
|
|
9
|
-
import * as TextUtils from '../text_utils/text_utils.js';
|
|
10
10
|
|
|
11
11
|
import type {HARCookie, HAREntry, HARLog, HARPage, HARTimings} from './HARFormat.js';
|
|
12
12
|
|
|
@@ -36,7 +36,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
36
36
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
37
37
|
import * as Platform from '../../core/platform/platform.js';
|
|
38
38
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
39
|
-
import * as TextUtils from '
|
|
39
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
40
40
|
|
|
41
41
|
import {type BuildOptions, type EntryDTO, Log} from './Log.js';
|
|
42
42
|
|
|
@@ -16,6 +16,7 @@ import {HeavyAdIssue} from './HeavyAdIssue.js';
|
|
|
16
16
|
import {Issue, IssueCategory, IssueKind, unionIssueKind} from './Issue.js';
|
|
17
17
|
import type {EventTypes as IssuesManagerEventsTypes, IssueAddedEvent} from './IssuesManager.js';
|
|
18
18
|
import {Events as IssuesManagerEvents} from './IssuesManagerEvents.js';
|
|
19
|
+
import {LazyLoadImageIssue} from './LazyLoadImageIssue.js';
|
|
19
20
|
import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
|
|
20
21
|
import {MixedContentIssue} from './MixedContentIssue.js';
|
|
21
22
|
import {PartitioningBlobURLIssue} from './PartitioningBlobURLIssue.js';
|
|
@@ -67,6 +68,7 @@ export class AggregatedIssue extends Issue {
|
|
|
67
68
|
#mixedContentIssues = new Set<MixedContentIssue>();
|
|
68
69
|
#partitioningBlobURLIssues = new Set<PartitioningBlobURLIssue>();
|
|
69
70
|
#permissionElementIssues = new Set<PermissionElementIssue>();
|
|
71
|
+
#lazyLoadImageIssues = new Set<LazyLoadImageIssue>();
|
|
70
72
|
#selectivePermissionsInterventionIssues = new Set<SelectivePermissionsInterventionIssue>();
|
|
71
73
|
#sharedArrayBufferIssues = new Set<SharedArrayBufferIssue>();
|
|
72
74
|
#quirksModeIssues = new Set<QuirksModeIssue>();
|
|
@@ -190,6 +192,10 @@ export class AggregatedIssue extends Issue {
|
|
|
190
192
|
return this.#permissionElementIssues;
|
|
191
193
|
}
|
|
192
194
|
|
|
195
|
+
getLazyLoadImageIssues(): Iterable<LazyLoadImageIssue> {
|
|
196
|
+
return this.#lazyLoadImageIssues;
|
|
197
|
+
}
|
|
198
|
+
|
|
193
199
|
/**
|
|
194
200
|
* Produces a primary key for a cookie. Use this instead of `JSON.stringify` in
|
|
195
201
|
* case new fields are added to `AffectedCookie`.
|
|
@@ -279,6 +285,9 @@ export class AggregatedIssue extends Issue {
|
|
|
279
285
|
if (issue instanceof PermissionElementIssue) {
|
|
280
286
|
this.#permissionElementIssues.add(issue);
|
|
281
287
|
}
|
|
288
|
+
if (issue instanceof LazyLoadImageIssue) {
|
|
289
|
+
this.#lazyLoadImageIssues.add(issue);
|
|
290
|
+
}
|
|
282
291
|
if (issue instanceof SelectivePermissionsInterventionIssue) {
|
|
283
292
|
this.#selectivePermissionsInterventionIssues.add(issue);
|
|
284
293
|
}
|
|
@@ -23,6 +23,7 @@ import {GenericIssue} from './GenericIssue.js';
|
|
|
23
23
|
import {HeavyAdIssue} from './HeavyAdIssue.js';
|
|
24
24
|
import type {Issue, IssueKind} from './Issue.js';
|
|
25
25
|
import {Events} from './IssuesManagerEvents.js';
|
|
26
|
+
import {LazyLoadImageIssue} from './LazyLoadImageIssue.js';
|
|
26
27
|
import {MixedContentIssue} from './MixedContentIssue.js';
|
|
27
28
|
import {PartitioningBlobURLIssue} from './PartitioningBlobURLIssue.js';
|
|
28
29
|
import {PermissionElementIssue} from './PermissionElementIssue.js';
|
|
@@ -154,6 +155,10 @@ const issueCodeHandlers =
|
|
|
154
155
|
Protocol.Audits.InspectorIssueCode.SelectivePermissionsInterventionIssue,
|
|
155
156
|
SelectivePermissionsInterventionIssue.fromInspectorIssue,
|
|
156
157
|
],
|
|
158
|
+
[
|
|
159
|
+
Protocol.Audits.InspectorIssueCode.LazyLoadImageIssue,
|
|
160
|
+
LazyLoadImageIssue.fromInspectorIssue,
|
|
161
|
+
],
|
|
157
162
|
]);
|
|
158
163
|
|
|
159
164
|
export function isIssueCodeSupported(code: Protocol.Audits.InspectorIssueCode): boolean {
|