chrome-devtools-frontend 1.0.1681498 → 1.0.1682249
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/eslint.config.mjs +8 -3
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/PreloadingModel.ts +44 -22
- package/front_end/core/sdk/RemoteObject.ts +4 -1
- package/front_end/core/sdk/RuntimeModel.ts +5 -5
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -1
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -5
- package/front_end/entrypoints/main/MainImpl.ts +9 -10
- package/front_end/entrypoints/shell/shell.ts +0 -2
- package/front_end/entrypoints/trace_app/trace_app.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +2 -0
- package/front_end/generated/protocol-mapping.d.ts +16 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +12 -0
- package/front_end/models/ai_assistance/ExtensionScope.ts +11 -12
- package/front_end/models/ai_assistance/agents/AiAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +2 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +8 -8
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -0
- package/front_end/models/formatter/ScriptFormatter.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +4 -4
- package/front_end/models/logs/NetworkLog.ts +8 -1
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +4 -2
- package/front_end/models/stack_trace/StackTraceImpl.ts +1 -0
- package/front_end/models/trace/Name.ts +5 -5
- package/front_end/models/trace/Styles.ts +115 -115
- package/front_end/models/trace/extras/TraceTree.ts +2 -1
- package/front_end/models/trace/helpers/Network.ts +4 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +4 -2
- package/front_end/models/trace/insights/CharacterSet.ts +3 -3
- package/front_end/models/trace/insights/DOMSize.ts +1 -1
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +6 -2
- package/front_end/models/trace/insights/FontDisplay.ts +9 -3
- package/front_end/models/trace/insights/ForcedReflow.ts +4 -4
- package/front_end/models/trace/insights/INPBreakdown.ts +3 -4
- package/front_end/models/trace/insights/ImageDelivery.ts +2 -2
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +5 -5
- package/front_end/models/trace/insights/LegacyJavaScript.ts +7 -3
- package/front_end/models/trace/insights/ModernHTTP.ts +3 -3
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +13 -9
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/SlowCSSSelector.ts +29 -25
- package/front_end/models/trace/insights/ThirdParties.ts +13 -5
- package/front_end/models/trace/insights/Viewport.ts +4 -2
- package/front_end/models/workspace/IgnoreListManager.ts +53 -17
- package/front_end/panels/accessibility/ARIAAttributesView.ts +11 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +67 -53
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -2
- package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +2 -2
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +5 -5
- package/front_end/panels/animation/AnimationTimeline.ts +2 -0
- package/front_end/panels/application/preloading/PreloadingView.ts +9 -3
- package/front_end/panels/application/preloading/components/components.ts +2 -0
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +10 -11
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/common/ExtensionServer.ts +9 -10
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -4
- package/front_end/panels/elements/ElementStatePaneWidget.ts +3 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +7 -1
- package/front_end/panels/elements/EventListenersWidget.ts +10 -11
- package/front_end/panels/issues/IssueView.ts +5 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -1
- package/front_end/panels/media/PlayerPropertiesView.ts +309 -416
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/network/NetworkPanel.ts +2 -1
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -2
- package/front_end/panels/network/network-meta.ts +6 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -1
- package/front_end/panels/recorder/RecordingView.ts +89 -73
- package/front_end/panels/recorder/ReplaySection.ts +59 -40
- package/front_end/panels/recorder/injected/injected.ts +4 -0
- package/front_end/panels/security/SecurityPanel.ts +5 -6
- package/front_end/panels/security/SecurityPanelSidebar.ts +244 -204
- package/front_end/panels/security/security.ts +0 -4
- package/front_end/panels/settings/EditFileSystemView.ts +8 -7
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -14
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +10 -11
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +5 -5
- package/front_end/panels/timeline/components/CWVMetrics.ts +1 -2
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +5 -5
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
- package/front_end/panels/timeline/components/Sidebar.ts +3 -3
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +3 -1
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +1 -2
- package/front_end/panels/timeline/components/insights/Cache.ts +1 -2
- package/front_end/panels/timeline/components/insights/CharacterSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -2
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -2
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +1 -2
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +1 -2
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +1 -2
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +13 -13
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +4 -4
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +1 -2
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +10 -8
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +3 -1
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +1 -2
- package/front_end/panels/timeline/components/insights/Viewport.ts +1 -2
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -2
- package/front_end/panels/timeline/timeline.ts +0 -2
- package/front_end/panels/web_audio/WebAudioView.ts +7 -7
- package/front_end/panels/webauthn/WebauthnPane.ts +9 -9
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/diff_view/DiffView.ts +2 -1
- package/front_end/ui/components/report_view/ReportView.docs.ts +2 -2
- package/front_end/ui/components/text_editor/javascript.ts +12 -13
- package/front_end/ui/legacy/GlassPane.ts +38 -14
- package/front_end/ui/legacy/Treeoutline.ts +14 -3
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +21 -30
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +3 -8
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +15 -16
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +4 -4
- package/front_end/ui/legacy/components/utils/Linkifier.ts +8 -10
- package/front_end/ui/settings/InspectorMainSettings.ts +12 -0
- package/front_end/ui/settings/settings.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +21 -0
- package/mcp/mcp.ts +0 -6
- package/package.json +1 -1
- package/front_end/models/logs/logs-meta.ts +0 -24
- package/front_end/models/workspace/workspace-meta.ts +0 -40
- package/front_end/panels/security/OriginTreeElement.ts +0 -60
- package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +0 -30
package/eslint.config.mjs
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import stylisticPlugin from '@stylistic/eslint-plugin';
|
|
6
|
-
import {
|
|
6
|
+
import {defineConfig, globalIgnores} from 'eslint/config';
|
|
7
7
|
import eslintPlugin from 'eslint-plugin-eslint-plugin';
|
|
8
8
|
import importPlugin from 'eslint-plugin-import';
|
|
9
9
|
import jsdocPlugin from 'eslint-plugin-jsdoc';
|
|
10
10
|
import litPlugin from 'eslint-plugin-lit';
|
|
11
11
|
import mochaPlugin from 'eslint-plugin-mocha';
|
|
12
12
|
import globals from 'globals';
|
|
13
|
-
import {
|
|
13
|
+
import {join} from 'node:path';
|
|
14
14
|
import typescriptEslint from 'typescript-eslint';
|
|
15
15
|
|
|
16
16
|
import devToolsPlugin from './scripts/eslint_rules/plugin.mjs';
|
|
@@ -731,8 +731,10 @@ export default defineConfig([
|
|
|
731
731
|
name: 'TypeScript test files',
|
|
732
732
|
files: [
|
|
733
733
|
'*.test.ts',
|
|
734
|
+
'*.docs.ts',
|
|
734
735
|
// This makes the specificity greater than the front-end ts files
|
|
735
736
|
'front_end/**/*.test.ts',
|
|
737
|
+
'front_end/**/*.docs.ts',
|
|
736
738
|
'test/**/*.ts',
|
|
737
739
|
'**/testing/*.ts',
|
|
738
740
|
'scripts/eslint_rules/test/**/*',
|
|
@@ -870,7 +872,10 @@ export default defineConfig([
|
|
|
870
872
|
{
|
|
871
873
|
name: 'Keep models/trace isolated',
|
|
872
874
|
files: ['front_end/models/trace/**/*.ts'],
|
|
873
|
-
ignores: [
|
|
875
|
+
ignores: [
|
|
876
|
+
'front_end/models/trace/**/*.test.ts',
|
|
877
|
+
'front_end/models/trace/**/*.docs.ts',
|
|
878
|
+
],
|
|
874
879
|
rules: {
|
|
875
880
|
'@devtools/no-imports-in-directory': [
|
|
876
881
|
'error',
|
|
@@ -145,7 +145,7 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
145
145
|
async evaluateCommandInConsole(
|
|
146
146
|
executionContext: ExecutionContext, originatingMessage: ConsoleMessage, expression: string,
|
|
147
147
|
useCommandLineAPI: boolean): Promise<void> {
|
|
148
|
-
const result = await executionContext.
|
|
148
|
+
const result = await executionContext.evaluateWithSelectedFrameFallback(
|
|
149
149
|
{
|
|
150
150
|
expression,
|
|
151
151
|
objectGroup: 'console',
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
|
6
6
|
import * as Protocol from '../../generated/protocol.js';
|
|
7
|
-
import
|
|
8
|
-
import {MapWithDefault} from '../common/MapWithDefault.js';
|
|
7
|
+
import * as Common from '../common/common.js';
|
|
9
8
|
import {assertNotNullOrUndefined} from '../platform/platform.js';
|
|
10
9
|
|
|
11
10
|
import {
|
|
@@ -652,12 +651,15 @@ class PreloadingAttemptRegistry {
|
|
|
652
651
|
private map: Map<PreloadingAttemptId, PreloadingAttemptInternal> =
|
|
653
652
|
new Map<PreloadingAttemptId, PreloadingAttemptInternal>();
|
|
654
653
|
private pipelines:
|
|
655
|
-
MapWithDefault<Protocol.Preload.PreloadPipelineId,
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
654
|
+
Common.MapWithDefault.MapWithDefault<Protocol.Preload.PreloadPipelineId,
|
|
655
|
+
Map<Protocol.Preload.SpeculationAction, PreloadingAttemptId>> =
|
|
656
|
+
new Common.MapWithDefault.MapWithDefault<Protocol.Preload.PreloadPipelineId,
|
|
657
|
+
Map<Protocol.Preload.SpeculationAction, PreloadingAttemptId>>();
|
|
658
|
+
|
|
659
|
+
private enrich(
|
|
660
|
+
attempt: PreloadingAttemptInternal,
|
|
661
|
+
source: Protocol.Preload.PreloadingAttemptSource|null,
|
|
662
|
+
): PreloadingAttempt {
|
|
661
663
|
let ruleSetIds: Protocol.Preload.RuleSetId[] = [];
|
|
662
664
|
let nodeIds: Protocol.DOM.BackendNodeId[] = [];
|
|
663
665
|
if (source !== null) {
|
|
@@ -706,12 +708,17 @@ class PreloadingAttemptRegistry {
|
|
|
706
708
|
if (pipeline.size === 0) {
|
|
707
709
|
throw new Error('unreachable');
|
|
708
710
|
}
|
|
709
|
-
return [...pipeline.keys()].every(
|
|
711
|
+
return [...pipeline.keys()].every(
|
|
712
|
+
action => getSortKey(action) <= getSortKey(attempt.action),
|
|
713
|
+
);
|
|
710
714
|
}
|
|
711
715
|
|
|
712
716
|
// Returns reference. Don't save returned values.
|
|
713
717
|
// Returned values may or may not be updated as the time grows.
|
|
714
|
-
getById(
|
|
718
|
+
getById(
|
|
719
|
+
id: PreloadingAttemptId,
|
|
720
|
+
sources: SourceRegistry,
|
|
721
|
+
): PreloadingAttempt|null {
|
|
715
722
|
const attempt = this.map.get(id) || null;
|
|
716
723
|
if (attempt === null) {
|
|
717
724
|
return null;
|
|
@@ -725,16 +732,23 @@ class PreloadingAttemptRegistry {
|
|
|
725
732
|
//
|
|
726
733
|
// Returns reference. Don't save returned values.
|
|
727
734
|
// Returned values may or may not be updated as the time grows.
|
|
728
|
-
getAllRepresentative(
|
|
729
|
-
|
|
735
|
+
getAllRepresentative(
|
|
736
|
+
ruleSetId: Protocol.Preload.RuleSetId|null,
|
|
737
|
+
sources: SourceRegistry,
|
|
738
|
+
): Array<WithId<PreloadingAttemptId, PreloadingAttempt>> {
|
|
730
739
|
return [...this.map.entries()]
|
|
731
|
-
.map(([id, value]) => ({
|
|
740
|
+
.map(([id, value]) => ({
|
|
741
|
+
id,
|
|
742
|
+
value: this.enrich(value, sources.getById(id)),
|
|
743
|
+
}))
|
|
732
744
|
.filter(({value}) => !ruleSetId || value.ruleSetIds.includes(ruleSetId))
|
|
733
745
|
.filter(({value}) => this.isAttemptRepresentative(value));
|
|
734
746
|
}
|
|
735
747
|
|
|
736
|
-
getPipeline(
|
|
737
|
-
|
|
748
|
+
getPipeline(
|
|
749
|
+
pipelineId: Protocol.Preload.PreloadPipelineId,
|
|
750
|
+
sources: SourceRegistry,
|
|
751
|
+
): Map<Protocol.Preload.SpeculationAction, PreloadingAttempt>|null {
|
|
738
752
|
const pipeline = this.pipelines.get(pipelineId);
|
|
739
753
|
|
|
740
754
|
if (pipeline === undefined || pipeline.size === 0) {
|
|
@@ -745,11 +759,13 @@ class PreloadingAttemptRegistry {
|
|
|
745
759
|
for (const [id, attempt] of this.map.entries()) {
|
|
746
760
|
map[id] = attempt;
|
|
747
761
|
}
|
|
748
|
-
return new Map(
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
762
|
+
return new Map(
|
|
763
|
+
pipeline.entries().map(([action, id]) => {
|
|
764
|
+
const attempt = this.getById(id, sources);
|
|
765
|
+
assertNotNullOrUndefined(attempt);
|
|
766
|
+
return [action, attempt];
|
|
767
|
+
}),
|
|
768
|
+
);
|
|
753
769
|
}
|
|
754
770
|
|
|
755
771
|
upsert(attempt: PreloadingAttemptInternal): void {
|
|
@@ -770,7 +786,10 @@ class PreloadingAttemptRegistry {
|
|
|
770
786
|
continue;
|
|
771
787
|
}
|
|
772
788
|
|
|
773
|
-
const pipeline = this.pipelines.getOrInsertComputed(
|
|
789
|
+
const pipeline = this.pipelines.getOrInsertComputed(
|
|
790
|
+
attempt.pipelineId,
|
|
791
|
+
() => new Map(),
|
|
792
|
+
);
|
|
774
793
|
pipeline.set(attempt.action, id);
|
|
775
794
|
}
|
|
776
795
|
}
|
|
@@ -830,7 +849,10 @@ class PreloadingAttemptRegistry {
|
|
|
830
849
|
// Removes keys in `this.map` that are not in `sources`. This is used to
|
|
831
850
|
// remove attempts that no longer have a matching speculation rule.
|
|
832
851
|
cleanUpRemovedAttempts(sources: SourceRegistry): void {
|
|
833
|
-
const keysToRemove = Array.from(this.map.keys())
|
|
852
|
+
const keysToRemove = Array.from(this.map.keys())
|
|
853
|
+
.filter(
|
|
854
|
+
key => !sources.getById(key),
|
|
855
|
+
);
|
|
834
856
|
for (const key of keysToRemove) {
|
|
835
857
|
this.map.delete(key);
|
|
836
858
|
}
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
|
6
6
|
import * as Protocol from '../../generated/protocol.js';
|
|
7
|
-
import type
|
|
7
|
+
import type * as Common from '../common/common.js';
|
|
8
8
|
|
|
9
9
|
import type {DebuggerModel, FunctionDetails} from './DebuggerModel.js';
|
|
10
10
|
import type {RuntimeModel} from './RuntimeModel.js';
|
|
11
11
|
|
|
12
|
+
type DOMPinnedWebIDLProp = Common.JavaScriptMetaData.DOMPinnedWebIDLProp;
|
|
13
|
+
type DOMPinnedWebIDLType = Common.JavaScriptMetaData.DOMPinnedWebIDLType;
|
|
14
|
+
|
|
12
15
|
/** This cannot be an interface due to "instanceof RemoteObject" checks in the code. **/
|
|
13
16
|
export abstract class RemoteObject {
|
|
14
17
|
static fromLocalObject(value: unknown): RemoteObject {
|
|
@@ -589,12 +589,13 @@ export class ExecutionContext {
|
|
|
589
589
|
return a.name.localeCompare(b.name);
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
-
async
|
|
592
|
+
async evaluateWithSelectedFrameFallback(options: EvaluationOptions, userGesture: boolean,
|
|
593
|
+
awaitPromise: boolean): Promise<EvaluationResult> {
|
|
593
594
|
// FIXME: It will be moved to separate ExecutionContext.
|
|
594
595
|
if (this.debuggerModel.selectedCallFrame()) {
|
|
595
596
|
return await this.debuggerModel.evaluateOnSelectedCallFrame(options);
|
|
596
597
|
}
|
|
597
|
-
return await this.
|
|
598
|
+
return await this.evaluate(options, userGesture, awaitPromise);
|
|
598
599
|
}
|
|
599
600
|
|
|
600
601
|
globalObject(objectGroup: string, generatePreview: boolean): Promise<EvaluationResult> {
|
|
@@ -606,7 +607,7 @@ export class ExecutionContext {
|
|
|
606
607
|
returnByValue: false,
|
|
607
608
|
generatePreview,
|
|
608
609
|
};
|
|
609
|
-
return this.
|
|
610
|
+
return this.evaluate((evaluationOptions as EvaluationOptions), false, false);
|
|
610
611
|
}
|
|
611
612
|
|
|
612
613
|
async callFunctionOn(options: CallFunctionOptions): Promise<EvaluationResult> {
|
|
@@ -629,8 +630,7 @@ export class ExecutionContext {
|
|
|
629
630
|
return {object: this.runtimeModel.createRemoteObject(response.result), exceptionDetails: response.exceptionDetails};
|
|
630
631
|
}
|
|
631
632
|
|
|
632
|
-
|
|
633
|
-
Promise<EvaluationResult> {
|
|
633
|
+
async evaluate(options: EvaluationOptions, userGesture: boolean, awaitPromise: boolean): Promise<EvaluationResult> {
|
|
634
634
|
if (!options.expression) {
|
|
635
635
|
// There is no expression, so the completion should happen against global properties.
|
|
636
636
|
options.expression = 'this';
|
|
@@ -67,6 +67,7 @@ import * as PaintProfiler from './PaintProfiler.js';
|
|
|
67
67
|
import * as PerformanceMetricsModel from './PerformanceMetricsModel.js';
|
|
68
68
|
import * as PreloadingModel from './PreloadingModel.js';
|
|
69
69
|
import * as RehydratingConnection from './RehydratingConnection.js';
|
|
70
|
+
import * as RehydratingObject from './RehydratingObject.js';
|
|
70
71
|
import * as RemoteObject from './RemoteObject.js';
|
|
71
72
|
import * as Resource from './Resource.js';
|
|
72
73
|
import * as ResourceTreeModel from './ResourceTreeModel.js';
|
|
@@ -153,6 +154,7 @@ export {
|
|
|
153
154
|
PerformanceMetricsModel,
|
|
154
155
|
PreloadingModel,
|
|
155
156
|
RehydratingConnection, // TODO(crbug.com/444191656): Exported for tests.
|
|
157
|
+
RehydratingObject,
|
|
156
158
|
RemoteObject,
|
|
157
159
|
Resource,
|
|
158
160
|
ResourceTreeModel,
|
|
@@ -6,7 +6,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
6
6
|
import * as Root from '../../core/root/root.js';
|
|
7
7
|
// This file is required to bring some types into scope, even though it
|
|
8
8
|
// is not used.
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @devtools/es-modules-import
|
|
10
10
|
import type * as CodeMirrorModule from '../../third_party/codemirror/codemirror-legacy.js';
|
|
11
11
|
|
|
12
12
|
import {CSSFormatter} from './CSSFormatter.js';
|
|
@@ -12,6 +12,7 @@ import * as MobileThrottling from '../../panels/mobile_throttling/mobile_throttl
|
|
|
12
12
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
13
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
14
14
|
import * as Lit from '../../ui/lit/lit.js';
|
|
15
|
+
import * as SettingsUI from '../../ui/settings/settings.js';
|
|
15
16
|
|
|
16
17
|
import nodeIconStyles from './nodeIcon.css.js';
|
|
17
18
|
|
|
@@ -251,7 +252,8 @@ export class BackendSettingsSync implements SDK.TargetManager.Observer {
|
|
|
251
252
|
this.#autoAttachSetting.addChangeListener(this.#updateAutoAttach, this);
|
|
252
253
|
this.#updateAutoAttach();
|
|
253
254
|
|
|
254
|
-
this.#adBlockEnabledSetting = Common.Settings.Settings.instance().
|
|
255
|
+
this.#adBlockEnabledSetting = Common.Settings.Settings.instance().resolve(
|
|
256
|
+
SettingsUI.InspectorMainSettings.adBlockingEnabledSettingDescriptor);
|
|
255
257
|
this.#adBlockEnabledSetting.addChangeListener(this.#update, this);
|
|
256
258
|
|
|
257
259
|
this.#emulatePageFocusSetting =
|
|
@@ -447,13 +447,9 @@ UI.ActionRegistration.registerActionExtension({
|
|
|
447
447
|
},
|
|
448
448
|
});
|
|
449
449
|
|
|
450
|
-
|
|
450
|
+
SettingsUI.SettingUIRegistration.register(SettingsUI.InspectorMainSettings.adBlockingEnabledSettingDescriptor, {
|
|
451
451
|
category: Common.Settings.SettingCategory.NETWORK,
|
|
452
452
|
title: i18nLazyString(UIStrings.forceAdBlocking),
|
|
453
|
-
settingName: 'network.ad-blocking-enabled',
|
|
454
|
-
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
455
|
-
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
456
|
-
defaultValue: false,
|
|
457
453
|
options: [
|
|
458
454
|
{
|
|
459
455
|
value: true,
|
|
@@ -595,16 +595,15 @@ export class MainImpl {
|
|
|
595
595
|
if (event.data.payload === 'true' || event.data.payload === 'false') {
|
|
596
596
|
VisualLogging.setVeDebuggingEnabled(event.data.payload === 'true', (query: string) => {
|
|
597
597
|
VisualLogging.setVeDebuggingEnabled(false);
|
|
598
|
-
void runtimeModel?.defaultExecutionContext()?.
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
/* awaitPromise */ false);
|
|
598
|
+
void runtimeModel?.defaultExecutionContext()?.evaluateWithSelectedFrameFallback({
|
|
599
|
+
expression: `window.inspect(${JSON.stringify(query)})`,
|
|
600
|
+
includeCommandLineAPI: false,
|
|
601
|
+
silent: true,
|
|
602
|
+
returnByValue: false,
|
|
603
|
+
generatePreview: false,
|
|
604
|
+
},
|
|
605
|
+
/* userGesture */ false,
|
|
606
|
+
/* awaitPromise */ false);
|
|
608
607
|
});
|
|
609
608
|
} else {
|
|
610
609
|
VisualLogging.setHighlightedVe(event.data.payload === 'null' ? null : event.data.payload);
|
|
@@ -16,11 +16,9 @@ import '../../panels/changes/changes-meta.js';
|
|
|
16
16
|
import '../../panels/linear_memory_inspector/linear_memory_inspector-meta.js';
|
|
17
17
|
import '../../panels/settings/settings-meta.js';
|
|
18
18
|
import '../../panels/protocol_monitor/protocol_monitor-meta.js';
|
|
19
|
-
import '../../models/logs/logs-meta.js';
|
|
20
19
|
import '../main/main-meta.js';
|
|
21
20
|
import '../../ui/legacy/components/perf_ui/perf_ui-meta.js';
|
|
22
21
|
import '../../ui/legacy/components/quick_open/quick_open-meta.js';
|
|
23
|
-
import '../../models/workspace/workspace-meta.js';
|
|
24
22
|
import '../../ui/legacy/components/source_frame/source_frame-meta.js';
|
|
25
23
|
import '../../panels/console_counters/console_counters-meta.js';
|
|
26
24
|
import '../../panels/explain/explain-meta.js';
|
|
@@ -4,13 +4,11 @@
|
|
|
4
4
|
// found in the LICENSE file.
|
|
5
5
|
import '../main/main-meta.js';
|
|
6
6
|
import '../inspector_main/inspector_main-meta.js';
|
|
7
|
-
import '../../models/workspace/workspace-meta.js';
|
|
8
7
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
9
8
|
// @ts-ignore: tsc 6.0 does not support side-effect imports without a type definition.
|
|
10
9
|
// We cannot use `@ts-expect-error` here because the import is correctly resolved
|
|
11
10
|
// when bundling the application (which doesn't error) and only errors in unbundled builds.
|
|
12
11
|
import '../../Images/Images.js';
|
|
13
|
-
import '../../models/logs/logs-meta.js';
|
|
14
12
|
import '../../panels/browser_debugger/browser_debugger-meta.js';
|
|
15
13
|
import '../../panels/developer_resources/developer_resources-meta.js';
|
|
16
14
|
// panels/timeline depends on mobile_throttling for settings UI
|
|
@@ -226,6 +226,8 @@ inspectorBackend.registerCommand("Browser.setContentsSize", [{"name": "windowId"
|
|
|
226
226
|
inspectorBackend.registerCommand("Browser.setDockTile", [{"name": "badgeLabel", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "image", "type": "string", "optional": true, "description": "Png encoded image.", "typeRef": null}], [], "Set dock tile details, platform-specific.");
|
|
227
227
|
inspectorBackend.registerCommand("Browser.executeBrowserCommand", [{"name": "commandId", "type": "string", "optional": false, "description": "", "typeRef": "Browser.BrowserCommandId"}], [], "Invoke custom browser commands used by telemetry.");
|
|
228
228
|
inspectorBackend.registerCommand("Browser.addPrivacySandboxEnrollmentOverride", [{"name": "url", "type": "string", "optional": false, "description": "", "typeRef": null}], [], "Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.");
|
|
229
|
+
inspectorBackend.registerCommand("Browser.getGlobalPrivacyControl", [], ["gpc"], "Gets the current globally-applied privacy control status See https://www.w3.org/TR/gpc/#get-global-privacy-control");
|
|
230
|
+
inspectorBackend.registerCommand("Browser.setGlobalPrivacyControl", [{"name": "gpc", "type": "boolean", "optional": false, "description": "", "typeRef": null}], ["gpc"], "Sets and then gets the current globally-applied privacy control status See https://www.w3.org/TR/gpc/#set-global-privacy-control");
|
|
229
231
|
inspectorBackend.registerType("Browser.Bounds", [{"name": "left", "type": "number", "optional": true, "description": "The offset from the left edge of the screen to the window in pixels.", "typeRef": null}, {"name": "top", "type": "number", "optional": true, "description": "The offset from the top edge of the screen to the window in pixels.", "typeRef": null}, {"name": "width", "type": "number", "optional": true, "description": "The window width in pixels.", "typeRef": null}, {"name": "height", "type": "number", "optional": true, "description": "The window height in pixels.", "typeRef": null}, {"name": "windowState", "type": "string", "optional": true, "description": "The window state. Default to normal.", "typeRef": "Browser.WindowState"}]);
|
|
230
232
|
inspectorBackend.registerType("Browser.PermissionDescriptor", [{"name": "name", "type": "string", "optional": false, "description": "Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.", "typeRef": null}, {"name": "sysex", "type": "boolean", "optional": true, "description": "For \\\"midi\\\" permission, may also specify sysex control.", "typeRef": null}, {"name": "userVisibleOnly", "type": "boolean", "optional": true, "description": "For \\\"push\\\" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.", "typeRef": null}, {"name": "allowWithoutSanitization", "type": "boolean", "optional": true, "description": "For \\\"clipboard\\\" permission, may specify allowWithoutSanitization.", "typeRef": null}, {"name": "allowWithoutGesture", "type": "boolean", "optional": true, "description": "For \\\"fullscreen\\\" permission, must specify allowWithoutGesture:true.", "typeRef": null}, {"name": "panTiltZoom", "type": "boolean", "optional": true, "description": "For \\\"camera\\\" permission, may specify panTiltZoom.", "typeRef": null}]);
|
|
231
233
|
inspectorBackend.registerType("Browser.Bucket", [{"name": "low", "type": "number", "optional": false, "description": "Minimum value (inclusive).", "typeRef": null}, {"name": "high", "type": "number", "optional": false, "description": "Maximum value (exclusive).", "typeRef": null}, {"name": "count", "type": "number", "optional": false, "description": "Number of samples.", "typeRef": null}]);
|
|
@@ -1487,6 +1487,22 @@ export namespace ProtocolMapping {
|
|
|
1487
1487
|
paramsType: [Protocol.Browser.AddPrivacySandboxEnrollmentOverrideRequest];
|
|
1488
1488
|
returnType: void;
|
|
1489
1489
|
};
|
|
1490
|
+
/**
|
|
1491
|
+
* Gets the current globally-applied privacy control status
|
|
1492
|
+
* See https://www.w3.org/TR/gpc/#get-global-privacy-control
|
|
1493
|
+
*/
|
|
1494
|
+
'Browser.getGlobalPrivacyControl': {
|
|
1495
|
+
paramsType: [];
|
|
1496
|
+
returnType: Protocol.Browser.GetGlobalPrivacyControlResponse;
|
|
1497
|
+
};
|
|
1498
|
+
/**
|
|
1499
|
+
* Sets and then gets the current globally-applied privacy control status
|
|
1500
|
+
* See https://www.w3.org/TR/gpc/#set-global-privacy-control
|
|
1501
|
+
*/
|
|
1502
|
+
'Browser.setGlobalPrivacyControl': {
|
|
1503
|
+
paramsType: [Protocol.Browser.SetGlobalPrivacyControlRequest];
|
|
1504
|
+
returnType: Protocol.Browser.SetGlobalPrivacyControlResponse;
|
|
1505
|
+
};
|
|
1490
1506
|
/**
|
|
1491
1507
|
* Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
|
|
1492
1508
|
* position specified by `location`.
|
|
@@ -713,6 +713,18 @@ declare namespace ProtocolProxyApi {
|
|
|
713
713
|
*/
|
|
714
714
|
invoke_addPrivacySandboxEnrollmentOverride(params: Protocol.Browser.AddPrivacySandboxEnrollmentOverrideRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
715
715
|
|
|
716
|
+
/**
|
|
717
|
+
* Gets the current globally-applied privacy control status
|
|
718
|
+
* See https://www.w3.org/TR/gpc/#get-global-privacy-control
|
|
719
|
+
*/
|
|
720
|
+
invoke_getGlobalPrivacyControl(): Promise<Protocol.Browser.GetGlobalPrivacyControlResponse>;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Sets and then gets the current globally-applied privacy control status
|
|
724
|
+
* See https://www.w3.org/TR/gpc/#set-global-privacy-control
|
|
725
|
+
*/
|
|
726
|
+
invoke_setGlobalPrivacyControl(params: Protocol.Browser.SetGlobalPrivacyControlRequest): Promise<Protocol.Browser.SetGlobalPrivacyControlResponse>;
|
|
727
|
+
|
|
716
728
|
}
|
|
717
729
|
export interface BrowserDispatcher {
|
|
718
730
|
/**
|
|
@@ -2744,6 +2744,18 @@ export namespace Browser {
|
|
|
2744
2744
|
url: string;
|
|
2745
2745
|
}
|
|
2746
2746
|
|
|
2747
|
+
export interface GetGlobalPrivacyControlResponse extends ProtocolResponseWithError {
|
|
2748
|
+
gpc: boolean;
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
export interface SetGlobalPrivacyControlRequest {
|
|
2752
|
+
gpc: boolean;
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
export interface SetGlobalPrivacyControlResponse extends ProtocolResponseWithError {
|
|
2756
|
+
gpc: boolean;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2747
2759
|
/**
|
|
2748
2760
|
* Fired when page is about to start a download.
|
|
2749
2761
|
*/
|
|
@@ -100,18 +100,17 @@ export class ExtensionScope {
|
|
|
100
100
|
): Promise<{
|
|
101
101
|
object: SDK.RemoteObject.RemoteObject,
|
|
102
102
|
}> {
|
|
103
|
-
const response = await context.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
/* userGesture */ false, /* awaitPromise */ true);
|
|
103
|
+
const response = await context.evaluateWithSelectedFrameFallback({
|
|
104
|
+
expression,
|
|
105
|
+
replMode: true,
|
|
106
|
+
includeCommandLineAPI: false,
|
|
107
|
+
returnByValue,
|
|
108
|
+
silent: false,
|
|
109
|
+
generatePreview: false,
|
|
110
|
+
allowUnsafeEvalBlockedByCSP: true,
|
|
111
|
+
throwOnSideEffect: false,
|
|
112
|
+
},
|
|
113
|
+
/* userGesture */ false, /* awaitPromise */ true);
|
|
115
114
|
|
|
116
115
|
if (!response) {
|
|
117
116
|
throw new Error('Response is not found');
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Host from '../../../core/host/host.js';
|
|
6
|
-
import type {UrlString} from '../../../core/platform/DevToolsPath.js';
|
|
7
6
|
import type * as Platform from '../../../core/platform/platform.js';
|
|
8
7
|
import * as Root from '../../../core/root/root.js';
|
|
9
8
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
@@ -16,6 +15,7 @@ import {areOriginsEquivalent, extractContextOrigin, isOpaqueOrigin} from '../AiO
|
|
|
16
15
|
import {debugLog, isStructuredLogEnabled} from '../debug.js';
|
|
17
16
|
import type {ContextHandlerResult, DataHandlerResult} from '../tools/Tool.js';
|
|
18
17
|
|
|
18
|
+
type UrlString = Platform.DevToolsPath.UrlString;
|
|
19
19
|
const MAX_SUGGESTION_LENGTH = 200;
|
|
20
20
|
|
|
21
21
|
export const enum ResponseType {
|
|
@@ -6,7 +6,6 @@ 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 * as Root from '../../../core/root/root.js';
|
|
9
|
-
import type {NetworkRequest} from '../../../core/sdk/NetworkRequest.js';
|
|
10
9
|
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
11
10
|
import type * as LHModel from '../../lighthouse/lighthouse.js';
|
|
12
11
|
import * as Logs from '../../logs/logs.js';
|
|
@@ -32,6 +31,8 @@ import {
|
|
|
32
31
|
type RequestOptions,
|
|
33
32
|
} from './AiAgent.js';
|
|
34
33
|
|
|
34
|
+
type NetworkRequest = SDK.NetworkRequest.NetworkRequest;
|
|
35
|
+
|
|
35
36
|
const lockedString = i18n.i18n.lockedString;
|
|
36
37
|
/**
|
|
37
38
|
* WARNING: preamble defined in code is only used when userTier is
|
|
@@ -38,7 +38,7 @@ Content:
|
|
|
38
38
|
"details": [
|
|
39
39
|
{
|
|
40
40
|
"title": "Trace details",
|
|
41
|
-
"text": "Trace summary:\nURL: https://chromedevtools.github.io/performance-stories/lcp-large-image/index.html\nTrace bounds: {min: 658799706428µs, max: 658804825864µs}\nCPU throttling: 1x\nNetwork throttling: No throttling\n\n# Available insight sets\n\nThe following is a list of insight sets. An insight set covers a specific part of the trace, split by navigations. The insights within each insight set are specific to that part of the trace. Be sure to consider the insight set id and bounds when calling functions. If no specific insight set or navigation is mentioned, assume the user is referring to the first one.\n\n## insight set id: NAVIGATION_0\n\nURL: https://chromedevtools.github.io/performance-stories/lcp-large-image/index.html\nBounds: {min: 658799738257µs, max: 658804825864µs}\nMetrics (lab / observed):\n - LCP: 110 ms, event: (eventKey: r-2399, ts: 658799847880), nodeId: 10\n - LCP breakdown:\n - TTFB: 7 ms, bounds: {min: 658799738257µs, max: 658799745193µs}\n - Load delay: 34 ms, bounds: {min: 658799745193µs, max: 658799778937µs}\n - Load duration: 12 ms, bounds: {min: 658799778937µs, max: 658799791032µs}\n - Render delay: 57 ms, bounds: {min: 658799791032µs, max: 658799847880µs}\n - CLS: 0.00\nMetrics (field / real users): n/a – no data for this page in CrUX\nAvailable insights:\n - insight name: LCPBreakdown\n description: Each [subpart has specific improvement strategies](https://developer.chrome.com/docs/performance/insights/lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.\n relevant trace bounds: {min: 658799738257µs, max: 658799847880µs}\n example question: Help me optimize my LCP score\n example question: Which LCP subpart was most problematic?\n example question: What can I do to reduce the LCP time for this page load?\n - insight name: LCPDiscovery\n description: [Optimize LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery) by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading
|
|
41
|
+
"text": "Trace summary:\nURL: https://chromedevtools.github.io/performance-stories/lcp-large-image/index.html\nTrace bounds: {min: 658799706428µs, max: 658804825864µs}\nCPU throttling: 1x\nNetwork throttling: No throttling\n\n# Available insight sets\n\nThe following is a list of insight sets. An insight set covers a specific part of the trace, split by navigations. The insights within each insight set are specific to that part of the trace. Be sure to consider the insight set id and bounds when calling functions. If no specific insight set or navigation is mentioned, assume the user is referring to the first one.\n\n## insight set id: NAVIGATION_0\n\nURL: https://chromedevtools.github.io/performance-stories/lcp-large-image/index.html\nBounds: {min: 658799738257µs, max: 658804825864µs}\nMetrics (lab / observed):\n - LCP: 110 ms, event: (eventKey: r-2399, ts: 658799847880), nodeId: 10\n - LCP breakdown:\n - TTFB: 7 ms, bounds: {min: 658799738257µs, max: 658799745193µs}\n - Load delay: 34 ms, bounds: {min: 658799745193µs, max: 658799778937µs}\n - Load duration: 12 ms, bounds: {min: 658799778937µs, max: 658799791032µs}\n - Render delay: 57 ms, bounds: {min: 658799791032µs, max: 658799847880µs}\n - CLS: 0.00\nMetrics (field / real users): n/a – no data for this page in CrUX\nAvailable insights:\n - insight name: LCPBreakdown\n description: Each [subpart has specific improvement strategies](https://developer.chrome.com/docs/performance/insights/lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.\n relevant trace bounds: {min: 658799738257µs, max: 658799847880µs}\n example question: Help me optimize my LCP score\n example question: Which LCP subpart was most problematic?\n example question: What can I do to reduce the LCP time for this page load?\n - insight name: LCPDiscovery\n description: [Optimize LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery) by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading.\n relevant trace bounds: {min: 658799745193µs, max: 658799793683µs}\n example question: Suggest fixes to reduce my LCP\n example question: What can I do to reduce my LCP discovery time?\n example question: Why is LCP discovery time important?\n - insight name: RenderBlocking\n 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.\n relevant trace bounds: {min: 658799775876µs, max: 658799791419µs}\n example question: Show me the most impactful render-blocking requests that I should focus on\n example question: How can I reduce the number of render-blocking requests?\n - insight name: Cache\n description: A long cache lifetime can speed up repeat visits to your page. [Learn more about caching](https://developer.chrome.com/docs/performance/insights/cache).\n relevant trace bounds: {min: 658799777502µs, max: 658799791419µs}\n example question: What caching strategies can I apply to improve my page performance?\n# Critical network requests\n\nnone\n\n# Main thread bottom-up summary\n\nThis is the bottom-up summary for the entire trace. Only the top 10 activities (sorted by self time) are shown. An activity is all the aggregated time spent on the same type of work. For example, it can be all the time spent in a specific JavaScript function, or all the time spent in a specific browser rendering stage (like layout, v8 compile, parsing html). \"Self time\" represents the aggregated time spent directly in an activity, across all occurrences. \"Total time\" represents the aggregated time spent in an activity or any of its children.\n\n- self: 57 ms, total: 79 ms, source: Task\n- self: 5 ms, total: 5 ms, source: Layout\n- self: 4 ms, total: 4 ms, source: Major GC\n- self: 3 ms, total: 3 ms, source: Parse HTML\n- self: 2 ms, total: 2 ms, source: Recalculate style\n- self: 2 ms, total: 2 ms, source: Commit\n- self: 1 ms, total: 1 ms, source: C++ GC\n- self: 1 ms, total: 1 ms, source: Paint\n\n# 3rd party summary\n\n- name: GitHub, main thread time: 3 ms, network transfer size: 0 B\n\n# Longest tasks\n\n- total time: 23 ms, event: (eventKey: r-617, ts: 658799757023)\n- total time: 12 ms, event: (eventKey: r-1571, ts: 658799793885)\n- total time: 11 ms, event: (eventKey: r-1891, ts: 658799811130)\n\nUser selected the LCPBreakdown insight.\n\n\n# User query\n\ntest"
|
|
42
42
|
}
|
|
43
43
|
],
|
|
44
44
|
"widgets": [
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
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
|
-
import type {UrlString} from '../../../core/platform/DevToolsPath.js';
|
|
9
8
|
import type * as Platform from '../../../core/platform/platform.js';
|
|
10
9
|
import * as Root from '../../../core/root/root.js';
|
|
11
10
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
@@ -36,6 +35,8 @@ import {
|
|
|
36
35
|
type ToolResult,
|
|
37
36
|
} from './AiAgent.js';
|
|
38
37
|
|
|
38
|
+
type UrlString = Platform.DevToolsPath.UrlString;
|
|
39
|
+
|
|
39
40
|
const UIStringsNotTranslated = {
|
|
40
41
|
/**
|
|
41
42
|
* @description Shown when the agent is investigating network activity
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../../core/common/common.js';
|
|
6
|
-
import type {UrlString} from '../../../core/platform/DevToolsPath.js';
|
|
7
6
|
import type * as Platform from '../../../core/platform/platform.js';
|
|
8
7
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
9
8
|
import * as Tracing from '../../../services/tracing/tracing.js';
|
|
@@ -24,6 +23,8 @@ import {PerformanceTraceFormatter} from '../data_formatters/PerformanceTraceForm
|
|
|
24
23
|
import type {AICallTree} from '../performance/AICallTree.js';
|
|
25
24
|
import {AgentFocus} from '../performance/AIContext.js';
|
|
26
25
|
|
|
26
|
+
type UrlString = Platform.DevToolsPath.UrlString;
|
|
27
|
+
|
|
27
28
|
/**
|
|
28
29
|
* Labels used to identify specific periods or categories in the trace for getting main thread summary.
|
|
29
30
|
* Supports hardcoded phases, dynamic navigation IDs (`NAVIGATION_X`), and insight models.
|
package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt
CHANGED
|
@@ -226,7 +226,7 @@ Response headers
|
|
|
226
226
|
|
|
227
227
|
The result of the checks for this insight are:
|
|
228
228
|
- fetchpriority=high should be applied: FAILED
|
|
229
|
-
- LCP resources
|
|
229
|
+
- LCP resources shouldn’t use loading=lazy: PASSED
|
|
230
230
|
- Request is discoverable in initial document: PASSED
|
|
231
231
|
|
|
232
232
|
## Estimated savings: none
|
|
@@ -1052,7 +1052,7 @@ The network dependency tree checks revealed no problems, but optimization sugges
|
|
|
1052
1052
|
|
|
1053
1053
|
No rendering tasks impacted by network dependencies.
|
|
1054
1054
|
|
|
1055
|
-
|
|
1055
|
+
No origins were preconnected.
|
|
1056
1056
|
|
|
1057
1057
|
## Estimated savings: none
|
|
1058
1058
|
|
|
@@ -1085,7 +1085,7 @@ The following is the critical request chain:
|
|
|
1085
1085
|
- http://localhost:8787/lcp-iframes/app.js (eventKey: s-7225, ts: 566782574106) (5,015 ms) (longest chain)
|
|
1086
1086
|
- http://localhost:8787/lcp-iframes/app.css (eventKey: s-7213, ts: 566782573909) (5,010 ms)
|
|
1087
1087
|
|
|
1088
|
-
|
|
1088
|
+
No origins were preconnected.
|
|
1089
1089
|
|
|
1090
1090
|
## Estimated savings: none
|
|
1091
1091
|
|
|
@@ -1097,13 +1097,13 @@ no origins were preconnected.
|
|
|
1097
1097
|
|
|
1098
1098
|
Title: PerformanceInsightFormatter SlowCssSelector serializes correctly when there are no results
|
|
1099
1099
|
Content:
|
|
1100
|
-
## Insight Title: CSS
|
|
1100
|
+
## Insight Title: CSS selector costs
|
|
1101
1101
|
|
|
1102
1102
|
## Insight Summary:
|
|
1103
1103
|
This insight identifies CSS selectors that are slowing down your page's rendering performance.
|
|
1104
1104
|
|
|
1105
1105
|
## Detailed analysis:
|
|
1106
|
-
No CSS selector data was found. CSS selector stats need to be enabled in the
|
|
1106
|
+
No CSS selector data was found. CSS selector stats need to be enabled in the Performance panel settings.
|
|
1107
1107
|
|
|
1108
1108
|
## Estimated savings: none
|
|
1109
1109
|
|
|
@@ -1114,7 +1114,7 @@ No CSS selector data was found. CSS selector stats need to be enabled in the per
|
|
|
1114
1114
|
|
|
1115
1115
|
Title: PerformanceInsightFormatter SlowCssSelector serializes the correct details when CSS selectors are found
|
|
1116
1116
|
Content:
|
|
1117
|
-
## Insight Title: CSS
|
|
1117
|
+
## Insight Title: CSS selector costs
|
|
1118
1118
|
|
|
1119
1119
|
## Insight Summary:
|
|
1120
1120
|
This insight identifies CSS selectors that are slowing down your page's rendering performance.
|
|
@@ -1130,7 +1130,7 @@ Elapsed time: 0 ms
|
|
|
1130
1130
|
Match attempts: 2444
|
|
1131
1131
|
Match count: 465
|
|
1132
1132
|
|
|
1133
|
-
If
|
|
1133
|
+
If recalculate style costs remain high, selector optimization can reduce them. [Optimize the selectors](https://developer.chrome.com/docs/performance/insights/slow-css-selector) with both high elapsed time and high slow-path %. Simpler selectors, fewer selectors, a smaller DOM, and a shallower DOM will all reduce matching costs.
|
|
1134
1134
|
|
|
1135
1135
|
## Estimated savings: none
|
|
1136
1136
|
|
|
@@ -1258,7 +1258,7 @@ The webpage is not optimized for mobile viewing.
|
|
|
1258
1258
|
|
|
1259
1259
|
The viewport meta tag is missing.
|
|
1260
1260
|
|
|
1261
|
-
Tap interactions may be [delayed by up to 300 ms](https://developer.chrome.com/docs/performance/insights/viewport) if the viewport
|
|
1261
|
+
Tap interactions may be [delayed by up to 300 ms](https://developer.chrome.com/docs/performance/insights/viewport) if the viewport isn’t optimized for mobile.
|
|
1262
1262
|
|
|
1263
1263
|
## Estimated savings: none
|
|
1264
1264
|
|