chrome-devtools-frontend 1.0.1626437 → 1.0.1628368
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/front_end/core/common/VersionController.ts +33 -1
- package/front_end/core/host/UserMetrics.ts +11 -8
- package/front_end/core/root/ExperimentNames.ts +1 -3
- package/front_end/core/sdk/CSSContainerQuery.ts +3 -1
- package/front_end/core/sdk/CSSModel.ts +23 -0
- package/front_end/core/sdk/HeapProfilerModel.ts +1 -11
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +2 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +2 -4
- package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +3 -2
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +13 -0
- package/front_end/entrypoints/formatter_worker/Substitute.ts +1 -1
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -1
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -1
- package/front_end/entrypoints/main/MainImpl.ts +4 -36
- package/front_end/generated/InspectorBackendCommands.ts +4 -3
- package/front_end/generated/protocol-mapping.d.ts +5 -0
- package/front_end/generated/protocol-proxy-api.d.ts +4 -0
- package/front_end/generated/protocol.ts +22 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +11 -5
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/models/lighthouse/RunTypes.ts +1 -1
- package/front_end/models/workspace/UISourceCode.ts +0 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +4 -3
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +9 -0
- package/front_end/panels/common/common.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/elements/StylePropertiesSection.ts +6 -2
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +8 -7
- package/front_end/panels/emulation/DeviceModeToolbar.ts +20 -26
- package/front_end/panels/emulation/DeviceModeView.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseController.ts +18 -0
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +9 -4
- package/front_end/panels/profiler/profiler-meta.ts +0 -71
- package/front_end/panels/profiler/profiler.ts +0 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +7 -6
- package/front_end/panels/sources/ProfilePlugin.ts +12 -65
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -2
- package/front_end/panels/timeline/TimelineController.ts +1 -2
- package/front_end/panels/timeline/TimelinePanel.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +2 -10
- package/front_end/panels/timeline/timeline-meta.ts +26 -0
- package/front_end/third_party/acorn/README.chromium +1 -1
- package/front_end/third_party/acorn/acorn.ts +1 -1
- package/front_end/third_party/acorn/package/CHANGELOG.md +128 -0
- package/front_end/third_party/acorn/package/README.md +42 -19
- package/front_end/third_party/acorn/package/dist/acorn.d.mts +883 -26
- package/front_end/third_party/acorn/package/dist/acorn.d.ts +859 -268
- package/front_end/third_party/acorn/package/dist/acorn.js +420 -115
- package/front_end/third_party/acorn/package/dist/acorn.mjs +420 -115
- package/front_end/third_party/acorn/package/dist/bin.js +1 -1
- package/front_end/third_party/acorn/package/package.json +3 -3
- 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 +4213 -4208
- package/front_end/third_party/lighthouse/locales/en-US.json +26 -8
- package/front_end/third_party/lighthouse/locales/en-XL.json +26 -8
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +7 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +2 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +9 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +6 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +23 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +171 -149
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +7 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +2 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +6 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +23 -2
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +6 -7
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +4 -3
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +21 -1
- package/front_end/third_party/puppeteer/package/src/api/JSHandle.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +9 -4
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +2 -1
- package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +9 -5
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/cdp/IsolatedWorld.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +19 -3
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +10 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -3
- package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -1
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +8 -1
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +0 -56
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -35
- package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -405
- package/front_end/panels/profiler/liveHeapProfile.css +0 -22
- package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +0 -113
|
@@ -17,7 +17,7 @@ export class VersionController {
|
|
|
17
17
|
static readonly SYNCED_VERSION_SETTING_NAME = 'syncedInspectorVersion';
|
|
18
18
|
static readonly LOCAL_VERSION_SETTING_NAME = 'localInspectorVersion';
|
|
19
19
|
|
|
20
|
-
static readonly CURRENT_VERSION =
|
|
20
|
+
static readonly CURRENT_VERSION = 46;
|
|
21
21
|
|
|
22
22
|
readonly #settings: Settings;
|
|
23
23
|
readonly #globalVersionSetting: Setting<number>;
|
|
@@ -865,6 +865,38 @@ export class VersionController {
|
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
|
|
868
|
+
updateVersionFrom44To45(): void {
|
|
869
|
+
const timelineDebugModeExperimentEnabled =
|
|
870
|
+
Root.Runtime.experiments.getValueFromStorage('timeline-debug-mode' as Root.ExperimentNames.ExperimentName);
|
|
871
|
+
if (timelineDebugModeExperimentEnabled !== undefined) {
|
|
872
|
+
if (this.#settings.syncedStorage.has('timeline-debug-mode')) {
|
|
873
|
+
return; // Already migrated
|
|
874
|
+
}
|
|
875
|
+
try {
|
|
876
|
+
const timelineDebugModeSetting = this.#settings.moduleSetting('timeline-debug-mode');
|
|
877
|
+
timelineDebugModeSetting.set(timelineDebugModeExperimentEnabled);
|
|
878
|
+
} catch {
|
|
879
|
+
// If the setting is not registered yet (e.g. in tests), skip.
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
updateVersionFrom45To46(): void {
|
|
885
|
+
const timelineInvalidationTrackingExperimentEnabled = Root.Runtime.experiments.getValueFromStorage(
|
|
886
|
+
'timeline-invalidation-tracking' as Root.ExperimentNames.ExperimentName);
|
|
887
|
+
if (timelineInvalidationTrackingExperimentEnabled !== undefined) {
|
|
888
|
+
if (this.#settings.syncedStorage.has('timeline-invalidation-tracking')) {
|
|
889
|
+
return; // Already migrated
|
|
890
|
+
}
|
|
891
|
+
try {
|
|
892
|
+
const timelineInvalidationTrackingSetting = this.#settings.moduleSetting('timeline-invalidation-tracking');
|
|
893
|
+
timelineInvalidationTrackingSetting.set(timelineInvalidationTrackingExperimentEnabled);
|
|
894
|
+
} catch {
|
|
895
|
+
// If the setting is not registered yet (e.g. in tests), skip.
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
|
|
868
900
|
/*
|
|
869
901
|
* Any new migration should be added before this comment.
|
|
870
902
|
*
|
|
@@ -489,7 +489,14 @@ export enum Action {
|
|
|
489
489
|
InsightTeaserModelDownloadCompleted = 198,
|
|
490
490
|
AiCodeGenerationError = 199,
|
|
491
491
|
AiCodeGenerationRequestTriggered = 200,
|
|
492
|
-
|
|
492
|
+
AiCodeCompletionRequestTriggeredFromConsole = 201,
|
|
493
|
+
AiCodeCompletionRequestTriggeredFromSources = 202,
|
|
494
|
+
AiCodeCompletionRequestTriggeredFromStyles = 203,
|
|
495
|
+
AiCodeGenerationRequestTriggeredFromConsole = 204,
|
|
496
|
+
AiCodeGenerationRequestTriggeredFromSources = 205,
|
|
497
|
+
AiCodeCompletionFreCompletedFromConsole = 206,
|
|
498
|
+
AiCodeCompletionFreCompletedFromSources = 207,
|
|
499
|
+
MAX_VALUE = 208,
|
|
493
500
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
494
501
|
}
|
|
495
502
|
|
|
@@ -519,7 +526,7 @@ export enum PanelCodes {
|
|
|
519
526
|
'changes.changes' = 23,
|
|
520
527
|
'performance.monitor' = 24,
|
|
521
528
|
'release-note' = 25,
|
|
522
|
-
|
|
529
|
+
|
|
523
530
|
'sources.quick' = 27,
|
|
524
531
|
'network.blocked-urls' = 28,
|
|
525
532
|
'settings-preferences' = 29,
|
|
@@ -669,8 +676,6 @@ export enum KeyboardShortcutAction {
|
|
|
669
676
|
'inspector-main.focus-debuggee' = 47,
|
|
670
677
|
'inspector-main.hard-reload' = 48,
|
|
671
678
|
'inspector-main.reload' = 49,
|
|
672
|
-
'live-heap-profile.start-with-reload' = 50,
|
|
673
|
-
'live-heap-profile.toggle-recording' = 51,
|
|
674
679
|
'main.debug-reload' = 52,
|
|
675
680
|
'main.next-tab' = 53,
|
|
676
681
|
'main.previous-tab' = 54,
|
|
@@ -758,12 +763,9 @@ export const enum IssueOpener {
|
|
|
758
763
|
export enum DevtoolsExperiments {
|
|
759
764
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
760
765
|
'capture-node-creation-stacks' = 1,
|
|
761
|
-
'live-heap-profile' = 11,
|
|
762
766
|
'protocol-monitor' = 13,
|
|
763
|
-
'timeline-invalidation-tracking' = 26,
|
|
764
767
|
'instrumentation-breakpoints' = 61,
|
|
765
768
|
'use-source-map-scopes' = 76,
|
|
766
|
-
'timeline-debug-mode' = 93,
|
|
767
769
|
'durable-messages' = 110,
|
|
768
770
|
'jpeg-xl' = 111,
|
|
769
771
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
@@ -1142,7 +1144,8 @@ export const enum LighthouseCategoryUsed {
|
|
|
1142
1144
|
SEO = 3,
|
|
1143
1145
|
PWA = 4,
|
|
1144
1146
|
PUB_ADS = 5,
|
|
1145
|
-
|
|
1147
|
+
AGENTIC_BROWSING = 6,
|
|
1148
|
+
MAX_VALUE = 7,
|
|
1146
1149
|
}
|
|
1147
1150
|
|
|
1148
1151
|
export const enum SwatchType {
|
|
@@ -5,12 +5,10 @@
|
|
|
5
5
|
export enum ExperimentName {
|
|
6
6
|
ALL = '*',
|
|
7
7
|
CAPTURE_NODE_CREATION_STACKS = 'capture-node-creation-stacks',
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
PROTOCOL_MONITOR = 'protocol-monitor',
|
|
10
|
-
TIMELINE_INVALIDATION_TRACKING = 'timeline-invalidation-tracking',
|
|
11
10
|
INSTRUMENTATION_BREAKPOINTS = 'instrumentation-breakpoints',
|
|
12
11
|
USE_SOURCE_MAP_SCOPES = 'use-source-map-scopes',
|
|
13
|
-
TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
|
|
14
12
|
DURABLE_MESSAGES = 'durable-messages',
|
|
15
13
|
JPEG_XL = 'jpeg-xl',
|
|
16
14
|
// Adding or removing an entry from this enum?
|
|
@@ -15,6 +15,7 @@ export class CSSContainerQuery extends CSSQuery {
|
|
|
15
15
|
logicalAxes?: Protocol.DOM.LogicalAxes;
|
|
16
16
|
queriesScrollState?: boolean;
|
|
17
17
|
queriesAnchored?: boolean;
|
|
18
|
+
textIsConditionText?: boolean;
|
|
18
19
|
|
|
19
20
|
static parseContainerQueriesPayload(cssModel: CSSModel, payload: Protocol.CSS.CSSContainerQuery[]):
|
|
20
21
|
CSSContainerQuery[] {
|
|
@@ -27,7 +28,8 @@ export class CSSContainerQuery extends CSSQuery {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
reinitialize(payload: Protocol.CSS.CSSContainerQuery): void {
|
|
30
|
-
this.
|
|
31
|
+
this.textIsConditionText = !!payload.conditionText;
|
|
32
|
+
this.text = this.textIsConditionText ? payload.conditionText : payload.text;
|
|
31
33
|
this.range = payload.range ? TextUtils.TextRange.TextRange.fromObject(payload.range) : null;
|
|
32
34
|
this.styleSheetId = payload.styleSheetId;
|
|
33
35
|
this.name = payload.name;
|
|
@@ -552,6 +552,29 @@ export class CSSModel extends SDKModel<EventTypes> {
|
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
+
async setContainerQueryConditionText(
|
|
556
|
+
styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
|
|
557
|
+
newContainerQueryConditionText: string): Promise<boolean> {
|
|
558
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
|
|
559
|
+
|
|
560
|
+
try {
|
|
561
|
+
await this.ensureOriginalStyleSheetText(styleSheetId);
|
|
562
|
+
const {containerQuery} = await this.agent.invoke_setContainerQueryConditionText(
|
|
563
|
+
{styleSheetId, range, text: newContainerQueryConditionText});
|
|
564
|
+
|
|
565
|
+
if (!containerQuery) {
|
|
566
|
+
return false;
|
|
567
|
+
}
|
|
568
|
+
this.#domModel.markUndoableState();
|
|
569
|
+
const edit = new Edit(styleSheetId, range, newContainerQueryConditionText, containerQuery);
|
|
570
|
+
this.fireStyleSheetChanged(styleSheetId, edit);
|
|
571
|
+
return true;
|
|
572
|
+
} catch (e) {
|
|
573
|
+
console.error(e);
|
|
574
|
+
return false;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
555
578
|
async setSupportsText(
|
|
556
579
|
styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
|
|
557
580
|
newSupportsText: string): Promise<boolean> {
|
|
@@ -16,7 +16,6 @@ export class HeapProfilerModel extends SDKModel<EventTypes> {
|
|
|
16
16
|
#enabled = false;
|
|
17
17
|
readonly #heapProfilerAgent: ProtocolProxyApi.HeapProfilerApi;
|
|
18
18
|
readonly #runtimeModel: RuntimeModel;
|
|
19
|
-
#samplingProfilerDepth = 0;
|
|
20
19
|
|
|
21
20
|
constructor(target: Target) {
|
|
22
21
|
super(target);
|
|
@@ -43,9 +42,6 @@ export class HeapProfilerModel extends SDKModel<EventTypes> {
|
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
async startSampling(samplingRateInBytes?: number): Promise<boolean> {
|
|
46
|
-
if (this.#samplingProfilerDepth++) {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
45
|
const defaultSamplingIntervalInBytes = 16384;
|
|
50
46
|
const response = await this.#heapProfilerAgent.invoke_startSampling(
|
|
51
47
|
{samplingInterval: samplingRateInBytes || defaultSamplingIntervalInBytes});
|
|
@@ -53,15 +49,9 @@ export class HeapProfilerModel extends SDKModel<EventTypes> {
|
|
|
53
49
|
}
|
|
54
50
|
|
|
55
51
|
async stopSampling(): Promise<Protocol.HeapProfiler.SamplingHeapProfile|null> {
|
|
56
|
-
if (!this.#samplingProfilerDepth) {
|
|
57
|
-
throw new Error('Sampling profiler is not running.');
|
|
58
|
-
}
|
|
59
|
-
if (--this.#samplingProfilerDepth) {
|
|
60
|
-
return await this.getSamplingProfile();
|
|
61
|
-
}
|
|
62
52
|
const response = await this.#heapProfilerAgent.invoke_stopSampling();
|
|
63
53
|
if (response.getError()) {
|
|
64
|
-
|
|
54
|
+
throw new Error('Sampling profiler is not running.');
|
|
65
55
|
}
|
|
66
56
|
return response.profile;
|
|
67
57
|
}
|
|
@@ -61,6 +61,7 @@ export class AcornTokenizer {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
static identifier(token: TokenOrComment, identifier?: string): boolean {
|
|
64
|
+
// @ts-expect-error https://github.com/acornjs/acorn/issues/1285
|
|
64
65
|
return token.type === Acorn.tokTypes.name && (!identifier || token.value === identifier);
|
|
65
66
|
}
|
|
66
67
|
|
|
@@ -107,4 +108,4 @@ export class AcornTokenizer {
|
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
export const ECMA_VERSION =
|
|
111
|
+
export const ECMA_VERSION = 'latest';
|
|
@@ -18,17 +18,15 @@ export class CSSFormatter {
|
|
|
18
18
|
#toOffset!: number;
|
|
19
19
|
#fromOffset!: number;
|
|
20
20
|
#lineEndings!: number[];
|
|
21
|
-
#lastLine
|
|
21
|
+
#lastLine = -1;
|
|
22
22
|
#state: {
|
|
23
23
|
eatWhitespace?: boolean,
|
|
24
24
|
seenProperty?: boolean,
|
|
25
25
|
inPropertyValue?: boolean,
|
|
26
26
|
afterClosingBrace?: boolean,
|
|
27
|
-
};
|
|
27
|
+
} = {};
|
|
28
28
|
constructor(builder: FormattedContentBuilder) {
|
|
29
29
|
this.#builder = builder;
|
|
30
|
-
this.#lastLine = -1;
|
|
31
|
-
this.#state = {};
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
format(text: string, lineEndings: number[], fromOffset: number, toOffset: number): void {
|
|
@@ -91,7 +91,8 @@ const WALK_ORDER = {
|
|
|
91
91
|
FunctionDeclaration: ['id', 'params', 'body'],
|
|
92
92
|
FunctionExpression: ['id', 'params', 'body'],
|
|
93
93
|
Identifier: [],
|
|
94
|
-
ImportDeclaration: ['specifiers', 'source'],
|
|
94
|
+
ImportDeclaration: ['specifiers', 'source', 'attributes'],
|
|
95
|
+
ImportAttribute: ['key', 'value'],
|
|
95
96
|
ImportDefaultSpecifier: ['local'],
|
|
96
97
|
ImportNamespaceSpecifier: ['local'],
|
|
97
98
|
ImportSpecifier: ['imported', 'local'],
|
|
@@ -136,4 +137,4 @@ const WALK_ORDER = {
|
|
|
136
137
|
WhileStatement: ['test', 'body'],
|
|
137
138
|
WithStatement: ['object', 'body'],
|
|
138
139
|
YieldExpression: ['argument'],
|
|
139
|
-
};
|
|
140
|
+
} as const;
|
|
@@ -150,6 +150,13 @@ export class JavaScriptFormatter {
|
|
|
150
150
|
}
|
|
151
151
|
return 't';
|
|
152
152
|
}
|
|
153
|
+
// @ts-expect-error not on the types
|
|
154
|
+
if (nodeType === 'ImportAttribute') {
|
|
155
|
+
if (AT.punctuator(token, ':')) {
|
|
156
|
+
return 'ts';
|
|
157
|
+
}
|
|
158
|
+
return 't';
|
|
159
|
+
}
|
|
153
160
|
if (nodeType === 'ArrayExpression') {
|
|
154
161
|
if (AT.punctuator(token, ',')) {
|
|
155
162
|
return 'ts';
|
|
@@ -339,11 +346,17 @@ export class JavaScriptFormatter {
|
|
|
339
346
|
return 'ts';
|
|
340
347
|
}
|
|
341
348
|
if (AT.punctuator(token, '}')) {
|
|
349
|
+
if (node.attributes.length > 0) {
|
|
350
|
+
return 't';
|
|
351
|
+
}
|
|
342
352
|
return node.source ? 'ts' : 't';
|
|
343
353
|
}
|
|
344
354
|
if (AT.punctuator(token, '*')) {
|
|
345
355
|
return 'sts';
|
|
346
356
|
}
|
|
357
|
+
if (AT.keyword(token, 'with')) {
|
|
358
|
+
return 'sts';
|
|
359
|
+
}
|
|
347
360
|
return 't';
|
|
348
361
|
} else if (nodeType === 'MemberExpression') {
|
|
349
362
|
if (node.object.type === 'Literal' && typeof (node.object.value) === 'number') {
|
|
@@ -34,7 +34,7 @@ function computeSubstitution(expression: string, nameMap: Map<string, string|nul
|
|
|
34
34
|
allowImportExportEverywhere: true,
|
|
35
35
|
checkPrivateFields: false,
|
|
36
36
|
ranges: false,
|
|
37
|
-
}
|
|
37
|
+
}) as Acorn.ESTree.Node;
|
|
38
38
|
const scopeVariables = new ScopeVariableAnalysis(root, expression);
|
|
39
39
|
scopeVariables.run();
|
|
40
40
|
const freeVariables = scopeVariables.getFreeVariables();
|
|
@@ -534,7 +534,6 @@ async function init(): Promise<void> {
|
|
|
534
534
|
Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS, 'Enable instrumentation breakpoints');
|
|
535
535
|
safeRegisterExperiment(
|
|
536
536
|
Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES, 'Use scope information from source maps');
|
|
537
|
-
safeRegisterExperiment(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE, 'Live heap profile');
|
|
538
537
|
safeRegisterExperiment(Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR, 'Protocol Monitor');
|
|
539
538
|
|
|
540
539
|
const hostUnsyncedStorage: Common.Settings.SettingsBackingStore = {
|
|
@@ -250,7 +250,6 @@ async function init(): Promise<void> {
|
|
|
250
250
|
Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS, 'Enable instrumentation breakpoints');
|
|
251
251
|
Root.Runtime.experiments.register(
|
|
252
252
|
Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES, 'Use scope information from source maps');
|
|
253
|
-
Root.Runtime.experiments.register(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE, 'Live heap profile');
|
|
254
253
|
Root.Runtime.experiments.register(Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR, 'Protocol Monitor');
|
|
255
254
|
|
|
256
255
|
const WINDOW_LOCAL_STORAGE: Common.Settings.SettingsBackingStore = {
|
|
@@ -350,7 +350,6 @@ export class MainImpl {
|
|
|
350
350
|
#initializeExperiments(): void {
|
|
351
351
|
Root.Runtime.experiments.register(
|
|
352
352
|
Root.ExperimentNames.ExperimentName.CAPTURE_NODE_CREATION_STACKS, 'Capture node creation stacks');
|
|
353
|
-
Root.Runtime.experiments.register(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE, 'Live heap profile');
|
|
354
353
|
|
|
355
354
|
const enableProtocolMonitor = (Root.Runtime.hostConfig.devToolsProtocolMonitor?.enabled ?? false) ||
|
|
356
355
|
Boolean(Root.Runtime.Runtime.queryParam('isChromeForTesting'));
|
|
@@ -366,13 +365,6 @@ export class MainImpl {
|
|
|
366
365
|
this.#migrateValueFromLegacyToHostExperiment(
|
|
367
366
|
Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR, protocolMonitorExperiment);
|
|
368
367
|
|
|
369
|
-
// Timeline
|
|
370
|
-
Root.Runtime.experiments.register(
|
|
371
|
-
Root.ExperimentNames.ExperimentName.TIMELINE_INVALIDATION_TRACKING, 'Performance panel: invalidation tracking');
|
|
372
|
-
Root.Runtime.experiments.register(
|
|
373
|
-
Root.ExperimentNames.ExperimentName.TIMELINE_DEBUG_MODE,
|
|
374
|
-
'Performance panel: debug mode (trace event details, etc)');
|
|
375
|
-
|
|
376
368
|
// Debugging
|
|
377
369
|
Root.Runtime.experiments.register(
|
|
378
370
|
Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS, 'Instrumentation breakpoints');
|
|
@@ -404,13 +396,6 @@ export class MainImpl {
|
|
|
404
396
|
Root.Runtime.experiments.setServerEnabledExperiments(enabledExperiments.split(';'));
|
|
405
397
|
}
|
|
406
398
|
|
|
407
|
-
if (Host.InspectorFrontendHost.isUnderTest()) {
|
|
408
|
-
const testParam = Root.Runtime.Runtime.queryParam('test');
|
|
409
|
-
if (testParam?.includes('live-line-level-heap-profile.js')) {
|
|
410
|
-
Root.Runtime.experiments.enableForTest(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
|
|
414
399
|
for (const experiment of Root.Runtime.experiments.allConfigurableExperiments()) {
|
|
415
400
|
if (experiment.isEnabled()) {
|
|
416
401
|
Host.userMetrics.experimentEnabledAtLaunch(experiment.name);
|
|
@@ -667,27 +652,10 @@ export class MainImpl {
|
|
|
667
652
|
async #lateInitialization(): Promise<void> {
|
|
668
653
|
MainImpl.time('Main._lateInitialization');
|
|
669
654
|
PanelCommon.ExtensionServer.ExtensionServer.instance().initializeExtensions();
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
});
|
|
675
|
-
if (Root.Runtime.experiments.isEnabled(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE)) {
|
|
676
|
-
const PerfUI = await import('../../ui/legacy/components/perf_ui/perf_ui.js');
|
|
677
|
-
const setting = 'memory-live-heap-profile';
|
|
678
|
-
if (Common.Settings.Settings.instance().moduleSetting(setting).get()) {
|
|
679
|
-
promises.push(PerfUI.LiveHeapProfile.LiveHeapProfile.instance().run());
|
|
680
|
-
} else {
|
|
681
|
-
const changeListener = async(event: Common.EventTarget.EventTargetEvent<unknown>): Promise<void> => {
|
|
682
|
-
if (!event.data) {
|
|
683
|
-
return;
|
|
684
|
-
}
|
|
685
|
-
Common.Settings.Settings.instance().moduleSetting(setting).removeChangeListener(changeListener);
|
|
686
|
-
void PerfUI.LiveHeapProfile.LiveHeapProfile.instance().run();
|
|
687
|
-
};
|
|
688
|
-
Common.Settings.Settings.instance().moduleSetting(setting).addChangeListener(changeListener);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
655
|
+
void Promise.all(Common.Runnable.lateInitializationRunnables().map(async lateInitializationLoader => {
|
|
656
|
+
const runnable = await lateInitializationLoader();
|
|
657
|
+
return await runnable.run();
|
|
658
|
+
}));
|
|
691
659
|
|
|
692
660
|
MainImpl.timeEnd('Main._lateInitialization');
|
|
693
661
|
}
|
|
@@ -83,7 +83,7 @@ inspectorBackend.registerEnum("Audits.SharedDictionaryError", {UseErrorCrossOrig
|
|
|
83
83
|
inspectorBackend.registerEnum("Audits.SRIMessageSignatureError", {MissingSignatureHeader: "MissingSignatureHeader", MissingSignatureInputHeader: "MissingSignatureInputHeader", InvalidSignatureHeader: "InvalidSignatureHeader", InvalidSignatureInputHeader: "InvalidSignatureInputHeader", SignatureHeaderValueIsNotByteSequence: "SignatureHeaderValueIsNotByteSequence", SignatureHeaderValueIsParameterized: "SignatureHeaderValueIsParameterized", SignatureHeaderValueIsIncorrectLength: "SignatureHeaderValueIsIncorrectLength", SignatureInputHeaderMissingLabel: "SignatureInputHeaderMissingLabel", SignatureInputHeaderValueNotInnerList: "SignatureInputHeaderValueNotInnerList", SignatureInputHeaderValueMissingComponents: "SignatureInputHeaderValueMissingComponents", SignatureInputHeaderInvalidComponentType: "SignatureInputHeaderInvalidComponentType", SignatureInputHeaderInvalidComponentName: "SignatureInputHeaderInvalidComponentName", SignatureInputHeaderInvalidHeaderComponentParameter: "SignatureInputHeaderInvalidHeaderComponentParameter", SignatureInputHeaderInvalidDerivedComponentParameter: "SignatureInputHeaderInvalidDerivedComponentParameter", SignatureInputHeaderKeyIdLength: "SignatureInputHeaderKeyIdLength", SignatureInputHeaderInvalidParameter: "SignatureInputHeaderInvalidParameter", SignatureInputHeaderMissingRequiredParameters: "SignatureInputHeaderMissingRequiredParameters", ValidationFailedSignatureExpired: "ValidationFailedSignatureExpired", ValidationFailedInvalidLength: "ValidationFailedInvalidLength", ValidationFailedSignatureMismatch: "ValidationFailedSignatureMismatch", ValidationFailedIntegrityMismatch: "ValidationFailedIntegrityMismatch"});
|
|
84
84
|
inspectorBackend.registerEnum("Audits.UnencodedDigestError", {MalformedDictionary: "MalformedDictionary", UnknownAlgorithm: "UnknownAlgorithm", IncorrectDigestType: "IncorrectDigestType", IncorrectDigestLength: "IncorrectDigestLength"});
|
|
85
85
|
inspectorBackend.registerEnum("Audits.ConnectionAllowlistError", {InvalidHeader: "InvalidHeader", MoreThanOneList: "MoreThanOneList", ItemNotInnerList: "ItemNotInnerList", InvalidAllowlistItemType: "InvalidAllowlistItemType", ReportingEndpointNotToken: "ReportingEndpointNotToken", InvalidUrlPattern: "InvalidUrlPattern"});
|
|
86
|
-
inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {FormLabelForNameError: "FormLabelForNameError", FormDuplicateIdForInputError: "FormDuplicateIdForInputError", FormInputWithNoLabelError: "FormInputWithNoLabelError", FormAutocompleteAttributeEmptyError: "FormAutocompleteAttributeEmptyError", FormEmptyIdAndNameAttributesForInputError: "FormEmptyIdAndNameAttributesForInputError", FormAriaLabelledByToNonExistingIdError: "FormAriaLabelledByToNonExistingIdError", FormInputAssignedAutocompleteValueToIdOrNameAttributeError: "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", FormLabelHasNeitherForNorNestedInputError: "FormLabelHasNeitherForNorNestedInputError", FormLabelForMatchesNonExistingIdError: "FormLabelForMatchesNonExistingIdError", FormInputHasWrongButWellIntendedAutocompleteValueError: "FormInputHasWrongButWellIntendedAutocompleteValueError", ResponseWasBlockedByORB: "ResponseWasBlockedByORB", NavigationEntryMarkedSkippable: "NavigationEntryMarkedSkippable", AutofillAndManualTextPolicyControlledFeaturesInfo: "AutofillAndManualTextPolicyControlledFeaturesInfo", AutofillPolicyControlledFeatureInfo: "AutofillPolicyControlledFeatureInfo", ManualTextPolicyControlledFeatureInfo: "ManualTextPolicyControlledFeatureInfo", FormModelContextParameterMissingTitleAndDescription: "FormModelContextParameterMissingTitleAndDescription", FormModelContextMissingToolName: "FormModelContextMissingToolName", FormModelContextMissingToolDescription: "FormModelContextMissingToolDescription", FormModelContextRequiredParameterMissingName: "FormModelContextRequiredParameterMissingName", FormModelContextParameterMissingName: "FormModelContextParameterMissingName"});
|
|
86
|
+
inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {FormLabelForNameError: "FormLabelForNameError", FormDuplicateIdForInputError: "FormDuplicateIdForInputError", FormInputWithNoLabelError: "FormInputWithNoLabelError", FormAutocompleteAttributeEmptyError: "FormAutocompleteAttributeEmptyError", FormEmptyIdAndNameAttributesForInputError: "FormEmptyIdAndNameAttributesForInputError", FormAriaLabelledByToNonExistingIdError: "FormAriaLabelledByToNonExistingIdError", FormInputAssignedAutocompleteValueToIdOrNameAttributeError: "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", FormLabelHasNeitherForNorNestedInputError: "FormLabelHasNeitherForNorNestedInputError", FormLabelForMatchesNonExistingIdError: "FormLabelForMatchesNonExistingIdError", FormInputHasWrongButWellIntendedAutocompleteValueError: "FormInputHasWrongButWellIntendedAutocompleteValueError", ResponseWasBlockedByORB: "ResponseWasBlockedByORB", NavigationEntryMarkedSkippable: "NavigationEntryMarkedSkippable", BackUINavigationWouldSkipAd: "BackUINavigationWouldSkipAd", AutofillAndManualTextPolicyControlledFeaturesInfo: "AutofillAndManualTextPolicyControlledFeaturesInfo", AutofillPolicyControlledFeatureInfo: "AutofillPolicyControlledFeatureInfo", ManualTextPolicyControlledFeatureInfo: "ManualTextPolicyControlledFeatureInfo", FormModelContextParameterMissingTitleAndDescription: "FormModelContextParameterMissingTitleAndDescription", FormModelContextMissingToolName: "FormModelContextMissingToolName", FormModelContextMissingToolDescription: "FormModelContextMissingToolDescription", FormModelContextRequiredParameterMissingName: "FormModelContextRequiredParameterMissingName", FormModelContextParameterMissingName: "FormModelContextParameterMissingName"});
|
|
87
87
|
inspectorBackend.registerEnum("Audits.ClientHintIssueReason", {MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML"});
|
|
88
88
|
inspectorBackend.registerEnum("Audits.FederatedAuthRequestIssueReason", {ShouldEmbargo: "ShouldEmbargo", TooManyRequests: "TooManyRequests", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", ConfigNotInWellKnown: "ConfigNotInWellKnown", WellKnownTooBig: "WellKnownTooBig", ConfigHttpNotFound: "ConfigHttpNotFound", ConfigNoResponse: "ConfigNoResponse", ConfigInvalidResponse: "ConfigInvalidResponse", ConfigInvalidContentType: "ConfigInvalidContentType", IdpNotPotentiallyTrustworthy: "IdpNotPotentiallyTrustworthy", DisabledInSettings: "DisabledInSettings", DisabledInFlags: "DisabledInFlags", ErrorFetchingSignin: "ErrorFetchingSignin", InvalidSigninResponse: "InvalidSigninResponse", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsListEmpty: "AccountsListEmpty", AccountsInvalidContentType: "AccountsInvalidContentType", IdTokenHttpNotFound: "IdTokenHttpNotFound", IdTokenNoResponse: "IdTokenNoResponse", IdTokenInvalidResponse: "IdTokenInvalidResponse", IdTokenIdpErrorResponse: "IdTokenIdpErrorResponse", IdTokenCrossSiteIdpErrorResponse: "IdTokenCrossSiteIdpErrorResponse", IdTokenInvalidRequest: "IdTokenInvalidRequest", IdTokenInvalidContentType: "IdTokenInvalidContentType", ErrorIdToken: "ErrorIdToken", Canceled: "Canceled", RpPageNotVisible: "RpPageNotVisible", SilentMediationFailure: "SilentMediationFailure", NotSignedInWithIdp: "NotSignedInWithIdp", MissingTransientUserActivation: "MissingTransientUserActivation", ReplacedByActiveMode: "ReplacedByActiveMode", RelyingPartyOriginIsOpaque: "RelyingPartyOriginIsOpaque", TypeNotMatching: "TypeNotMatching", UiDismissedNoEmbargo: "UiDismissedNoEmbargo", CorsError: "CorsError", SuppressedBySegmentationPlatform: "SuppressedBySegmentationPlatform"});
|
|
89
89
|
inspectorBackend.registerEnum("Audits.FederatedAuthUserInfoRequestIssueReason", {NotSameOrigin: "NotSameOrigin", NotIframe: "NotIframe", NotPotentiallyTrustworthy: "NotPotentiallyTrustworthy", NoAPIPermission: "NoApiPermission", NotSignedInWithIdp: "NotSignedInWithIdp", NoAccountSharingPermission: "NoAccountSharingPermission", InvalidConfigOrWellKnown: "InvalidConfigOrWellKnown", InvalidAccountsResponse: "InvalidAccountsResponse", NoReturningUserFromFetchedAccounts: "NoReturningUserFromFetchedAccounts"});
|
|
@@ -266,7 +266,8 @@ inspectorBackend.registerCommand("CSS.setEffectivePropertyValueForNode", [{"name
|
|
|
266
266
|
inspectorBackend.registerCommand("CSS.setPropertyRulePropertyName", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "propertyName", "type": "string", "optional": false, "description": "", "typeRef": null}], ["propertyName"], "Modifies the property rule property name.");
|
|
267
267
|
inspectorBackend.registerCommand("CSS.setKeyframeKey", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "keyText", "type": "string", "optional": false, "description": "", "typeRef": null}], ["keyText"], "Modifies the keyframe rule key text.");
|
|
268
268
|
inspectorBackend.registerCommand("CSS.setMediaText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["media"], "Modifies the rule selector.");
|
|
269
|
-
inspectorBackend.registerCommand("CSS.setContainerQueryText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["containerQuery"], "Modifies the expression of a container query.");
|
|
269
|
+
inspectorBackend.registerCommand("CSS.setContainerQueryText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["containerQuery"], "Modifies the expression of a container query. Deprecated. Use setContainerQueryConditionText instead.");
|
|
270
|
+
inspectorBackend.registerCommand("CSS.setContainerQueryConditionText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["containerQuery"], "");
|
|
270
271
|
inspectorBackend.registerCommand("CSS.setSupportsText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["supports"], "Modifies the expression of a supports at-rule.");
|
|
271
272
|
inspectorBackend.registerCommand("CSS.setNavigationText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["navigation"], "Modifies the expression of a navigation at-rule.");
|
|
272
273
|
inspectorBackend.registerCommand("CSS.setScopeText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["scope"], "Modifies the expression of a scope at-rule.");
|
|
@@ -298,7 +299,7 @@ inspectorBackend.registerType("CSS.CSSProperty", [{"name": "name", "type": "stri
|
|
|
298
299
|
inspectorBackend.registerType("CSS.CSSMedia", [{"name": "text", "type": "string", "optional": false, "description": "Media query text.", "typeRef": null}, {"name": "source", "type": "string", "optional": false, "description": "Source of the media query: \\\"mediaRule\\\" if specified by a @media rule, \\\"importRule\\\" if specified by an @import rule, \\\"linkedSheet\\\" if specified by a \\\"media\\\" attribute in a linked stylesheet's LINK tag, \\\"inlineSheet\\\" if specified by a \\\"media\\\" attribute in an inline stylesheet's STYLE tag.", "typeRef": null}, {"name": "sourceURL", "type": "string", "optional": true, "description": "URL of the document containing the media query description.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}, {"name": "mediaList", "type": "array", "optional": true, "description": "Array of media queries.", "typeRef": "CSS.MediaQuery"}]);
|
|
299
300
|
inspectorBackend.registerType("CSS.MediaQuery", [{"name": "expressions", "type": "array", "optional": false, "description": "Array of media query expressions.", "typeRef": "CSS.MediaQueryExpression"}, {"name": "active", "type": "boolean", "optional": false, "description": "Whether the media query condition is satisfied.", "typeRef": null}]);
|
|
300
301
|
inspectorBackend.registerType("CSS.MediaQueryExpression", [{"name": "value", "type": "number", "optional": false, "description": "Media query expression value.", "typeRef": null}, {"name": "unit", "type": "string", "optional": false, "description": "Media query expression units.", "typeRef": null}, {"name": "feature", "type": "string", "optional": false, "description": "Media query expression feature.", "typeRef": null}, {"name": "valueRange", "type": "object", "optional": true, "description": "The associated range of the value text in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "computedLength", "type": "number", "optional": true, "description": "Computed length of media query expression (if applicable).", "typeRef": null}]);
|
|
301
|
-
inspectorBackend.registerType("CSS.CSSContainerQuery", [{"name": "text", "type": "string", "optional": false, "description": "Container query text.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}, {"name": "name", "type": "string", "optional": true, "description": "Optional name for the container.", "typeRef": null}, {"name": "physicalAxes", "type": "string", "optional": true, "description": "Optional physical axes queried for the container.", "typeRef": "DOM.PhysicalAxes"}, {"name": "logicalAxes", "type": "string", "optional": true, "description": "Optional logical axes queried for the container.", "typeRef": "DOM.LogicalAxes"}, {"name": "queriesScrollState", "type": "boolean", "optional": true, "description": "true if the query contains scroll-state() queries.", "typeRef": null}, {"name": "queriesAnchored", "type": "boolean", "optional": true, "description": "true if the query contains anchored() queries.", "typeRef": null}]);
|
|
302
|
+
inspectorBackend.registerType("CSS.CSSContainerQuery", [{"name": "text", "type": "string", "optional": false, "description": "Container query text. Contains the query part without the container name for a single query. Deprecated in favor of conditionText which contains the full prelude after @container.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}, {"name": "name", "type": "string", "optional": true, "description": "Optional name for the container.", "typeRef": null}, {"name": "physicalAxes", "type": "string", "optional": true, "description": "Optional physical axes queried for the container.", "typeRef": "DOM.PhysicalAxes"}, {"name": "logicalAxes", "type": "string", "optional": true, "description": "Optional logical axes queried for the container.", "typeRef": "DOM.LogicalAxes"}, {"name": "queriesScrollState", "type": "boolean", "optional": true, "description": "true if the query contains scroll-state() queries.", "typeRef": null}, {"name": "queriesAnchored", "type": "boolean", "optional": true, "description": "true if the query contains anchored() queries.", "typeRef": null}, {"name": "conditionText", "type": "string", "optional": false, "description": "CSSContainerRule.conditionText", "typeRef": null}]);
|
|
302
303
|
inspectorBackend.registerType("CSS.CSSSupports", [{"name": "text", "type": "string", "optional": false, "description": "Supports rule text.", "typeRef": null}, {"name": "active", "type": "boolean", "optional": false, "description": "Whether the supports condition is satisfied.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
|
|
303
304
|
inspectorBackend.registerType("CSS.CSSNavigation", [{"name": "text", "type": "string", "optional": false, "description": "Navigation rule text.", "typeRef": null}, {"name": "active", "type": "boolean", "optional": true, "description": "Whether the navigation condition is satisfied.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
|
|
304
305
|
inspectorBackend.registerType("CSS.CSSScope", [{"name": "text", "type": "string", "optional": false, "description": "Scope rule text.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
|
|
@@ -1729,11 +1729,16 @@ export namespace ProtocolMapping {
|
|
|
1729
1729
|
};
|
|
1730
1730
|
/**
|
|
1731
1731
|
* Modifies the expression of a container query.
|
|
1732
|
+
* Deprecated. Use setContainerQueryConditionText instead.
|
|
1732
1733
|
*/
|
|
1733
1734
|
'CSS.setContainerQueryText': {
|
|
1734
1735
|
paramsType: [Protocol.CSS.SetContainerQueryTextRequest];
|
|
1735
1736
|
returnType: Protocol.CSS.SetContainerQueryTextResponse;
|
|
1736
1737
|
};
|
|
1738
|
+
'CSS.setContainerQueryConditionText': {
|
|
1739
|
+
paramsType: [Protocol.CSS.SetContainerQueryConditionTextRequest];
|
|
1740
|
+
returnType: Protocol.CSS.SetContainerQueryConditionTextResponse;
|
|
1741
|
+
};
|
|
1737
1742
|
/**
|
|
1738
1743
|
* Modifies the expression of a supports at-rule.
|
|
1739
1744
|
*/
|
|
@@ -880,9 +880,13 @@ declare namespace ProtocolProxyApi {
|
|
|
880
880
|
|
|
881
881
|
/**
|
|
882
882
|
* Modifies the expression of a container query.
|
|
883
|
+
* Deprecated. Use setContainerQueryConditionText instead.
|
|
884
|
+
* @deprecated
|
|
883
885
|
*/
|
|
884
886
|
invoke_setContainerQueryText(params: Protocol.CSS.SetContainerQueryTextRequest): Promise<Protocol.CSS.SetContainerQueryTextResponse>;
|
|
885
887
|
|
|
888
|
+
invoke_setContainerQueryConditionText(params: Protocol.CSS.SetContainerQueryConditionTextRequest): Promise<Protocol.CSS.SetContainerQueryConditionTextResponse>;
|
|
889
|
+
|
|
886
890
|
/**
|
|
887
891
|
* Modifies the expression of a supports at-rule.
|
|
888
892
|
*/
|
|
@@ -1208,6 +1208,7 @@ export namespace Audits {
|
|
|
1208
1208
|
FormInputHasWrongButWellIntendedAutocompleteValueError = 'FormInputHasWrongButWellIntendedAutocompleteValueError',
|
|
1209
1209
|
ResponseWasBlockedByORB = 'ResponseWasBlockedByORB',
|
|
1210
1210
|
NavigationEntryMarkedSkippable = 'NavigationEntryMarkedSkippable',
|
|
1211
|
+
BackUINavigationWouldSkipAd = 'BackUINavigationWouldSkipAd',
|
|
1211
1212
|
AutofillAndManualTextPolicyControlledFeaturesInfo = 'AutofillAndManualTextPolicyControlledFeaturesInfo',
|
|
1212
1213
|
AutofillPolicyControlledFeatureInfo = 'AutofillPolicyControlledFeatureInfo',
|
|
1213
1214
|
ManualTextPolicyControlledFeatureInfo = 'ManualTextPolicyControlledFeatureInfo',
|
|
@@ -3240,6 +3241,10 @@ export namespace CSS {
|
|
|
3240
3241
|
export interface CSSContainerQuery {
|
|
3241
3242
|
/**
|
|
3242
3243
|
* Container query text.
|
|
3244
|
+
* Contains the query part without the container name for a single query.
|
|
3245
|
+
* Deprecated in favor of conditionText which contains the full prelude
|
|
3246
|
+
* after @container.
|
|
3247
|
+
* @deprecated
|
|
3243
3248
|
*/
|
|
3244
3249
|
text: string;
|
|
3245
3250
|
/**
|
|
@@ -3271,6 +3276,10 @@ export namespace CSS {
|
|
|
3271
3276
|
* true if the query contains anchored() queries.
|
|
3272
3277
|
*/
|
|
3273
3278
|
queriesAnchored?: boolean;
|
|
3279
|
+
/**
|
|
3280
|
+
* CSSContainerRule.conditionText
|
|
3281
|
+
*/
|
|
3282
|
+
conditionText: string;
|
|
3274
3283
|
}
|
|
3275
3284
|
|
|
3276
3285
|
/**
|
|
@@ -4138,6 +4147,19 @@ export namespace CSS {
|
|
|
4138
4147
|
containerQuery: CSSContainerQuery;
|
|
4139
4148
|
}
|
|
4140
4149
|
|
|
4150
|
+
export interface SetContainerQueryConditionTextRequest {
|
|
4151
|
+
styleSheetId: DOM.StyleSheetId;
|
|
4152
|
+
range: SourceRange;
|
|
4153
|
+
text: string;
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
export interface SetContainerQueryConditionTextResponse extends ProtocolResponseWithError {
|
|
4157
|
+
/**
|
|
4158
|
+
* The resulting CSS container query rule after modification.
|
|
4159
|
+
*/
|
|
4160
|
+
containerQuery: CSSContainerQuery;
|
|
4161
|
+
}
|
|
4162
|
+
|
|
4141
4163
|
export interface SetSupportsTextRequest {
|
|
4142
4164
|
styleSheetId: DOM.StyleSheetId;
|
|
4143
4165
|
range: SourceRange;
|
|
@@ -8,6 +8,7 @@ import type * as SDK from '../../../core/sdk/sdk.js';
|
|
|
8
8
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
9
9
|
import * as Greendev from '../../greendev/greendev.js';
|
|
10
10
|
import type * as LHModel from '../../lighthouse/lighthouse.js';
|
|
11
|
+
import type * as TextUtils from '../../text_utils/text_utils.js';
|
|
11
12
|
import type * as Trace from '../../trace/trace.js';
|
|
12
13
|
import {debugLog, isStructuredLogEnabled} from '../debug.js';
|
|
13
14
|
|
|
@@ -236,7 +237,7 @@ export interface DomTreeAiWidget {
|
|
|
236
237
|
size: number,
|
|
237
238
|
resourceType: Protocol.Network.ResourceType,
|
|
238
239
|
mimeType: string,
|
|
239
|
-
|
|
240
|
+
imageContent?: TextUtils.ContentData.ContentData,
|
|
240
241
|
},
|
|
241
242
|
};
|
|
242
243
|
}
|
|
@@ -985,9 +985,14 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
985
985
|
const nodeMap = await domModel.pushNodesByBackendIdsToFrontend(new Set([nodeId]));
|
|
986
986
|
const node = nodeMap?.get(nodeId);
|
|
987
987
|
if (node) {
|
|
988
|
-
const snapshot = await node.takeSnapshot();
|
|
989
|
-
let networkRequest;
|
|
990
988
|
const lcpSyntheticRequest = insight.lcpRequest;
|
|
989
|
+
const [snapshot, imageContent] = await Promise.all([
|
|
990
|
+
node.takeSnapshot(),
|
|
991
|
+
lcpSyntheticRequest ? this.#getNetworkRequestImageData(lcpSyntheticRequest) :
|
|
992
|
+
Promise.resolve(undefined),
|
|
993
|
+
]);
|
|
994
|
+
|
|
995
|
+
let networkRequest;
|
|
991
996
|
if (lcpSyntheticRequest) {
|
|
992
997
|
networkRequest = {
|
|
993
998
|
url: lcpSyntheticRequest.args.data.url,
|
|
@@ -995,7 +1000,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
995
1000
|
lcpSyntheticRequest.args.data.encodedDataLength ?? 0,
|
|
996
1001
|
resourceType: lcpSyntheticRequest.args.data.resourceType,
|
|
997
1002
|
mimeType: lcpSyntheticRequest.args.data.mimeType ?? '',
|
|
998
|
-
|
|
1003
|
+
imageContent,
|
|
999
1004
|
};
|
|
1000
1005
|
}
|
|
1001
1006
|
widgets.push({
|
|
@@ -1567,7 +1572,8 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
1567
1572
|
return {result: {success: true}};
|
|
1568
1573
|
}
|
|
1569
1574
|
|
|
1570
|
-
async #getNetworkRequestImageData(lcpRequest: Trace.Types.Events.SyntheticNetworkRequest):
|
|
1575
|
+
async #getNetworkRequestImageData(lcpRequest: Trace.Types.Events.SyntheticNetworkRequest):
|
|
1576
|
+
Promise<TextUtils.ContentData.ContentData|undefined> {
|
|
1571
1577
|
const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
|
|
1572
1578
|
const networkManager = target?.model(SDK.NetworkManager.NetworkManager);
|
|
1573
1579
|
if (!target || !networkManager) {
|
|
@@ -1581,7 +1587,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
1581
1587
|
if (sdkRequest?.contentType().isImage()) {
|
|
1582
1588
|
const contentData = await sdkRequest.requestContentData();
|
|
1583
1589
|
if (!TextUtils.ContentData.ContentData.isError(contentData)) {
|
|
1584
|
-
return contentData
|
|
1590
|
+
return contentData;
|
|
1585
1591
|
}
|
|
1586
1592
|
}
|
|
1587
1593
|
return undefined;
|
|
@@ -7664,6 +7664,10 @@ export const NativeFunctions = [
|
|
|
7664
7664
|
name: "registerTool",
|
|
7665
7665
|
signatures: [["tool","?options"]]
|
|
7666
7666
|
},
|
|
7667
|
+
{
|
|
7668
|
+
name: "executeTool",
|
|
7669
|
+
signatures: [["tool","input_arguments","?options"]]
|
|
7670
|
+
},
|
|
7667
7671
|
{
|
|
7668
7672
|
name: "SnapEvent",
|
|
7669
7673
|
signatures: [["type","?eventInitDict"]]
|
|
@@ -5,7 +5,7 @@ import type * as Common from '../../core/common/common.js';
|
|
|
5
5
|
import type * as Host from '../../core/host/host.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
|
|
8
|
-
export type CategoryId = 'performance'|'accessibility'|'best-practices'|'seo';
|
|
8
|
+
export type CategoryId = 'performance'|'accessibility'|'best-practices'|'seo'|'agentic-browsing';
|
|
9
9
|
export type RunMode = 'navigation'|'timespan'|'snapshot';
|
|
10
10
|
|
|
11
11
|
export interface Preset {
|