chrome-devtools-frontend 1.0.1592129 → 1.0.1593518
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/Images/src/tab-move.svg +1 -0
- package/front_end/application_tokens.css +4 -4
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/root/ExperimentNames.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +3 -1
- package/front_end/generated/SupportedCSSProperties.js +2 -2
- package/front_end/generated/protocol-mapping.d.ts +13 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +75 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +24 -1
- package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgent.ts +320 -26
- package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgentOverlay.ts +87 -0
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +8 -8
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +79 -48
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +16 -2
- package/front_end/models/computed_style/ComputedStyleModel.ts +40 -6
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -6
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +5 -3
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +39 -7
- package/front_end/panels/ai_assistance/README.md +61 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +141 -27
- package/front_end/panels/ai_assistance/components/ChatView.ts +5 -1
- package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +55 -1
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +19 -7
- package/front_end/panels/ai_assistance/components/chatMessage.css +30 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +12 -7
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +194 -134
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +1 -1
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -0
- package/front_end/panels/application/StorageItemsToolbar.ts +25 -2
- package/front_end/panels/application/components/BackForwardCacheView.ts +4 -2
- package/front_end/panels/application/cookieItemsView.css +28 -26
- package/front_end/panels/autofill/AutofillView.ts +1 -1
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +161 -154
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +1 -0
- package/front_end/panels/browser_debugger/domBreakpointsSidebarPane.css +58 -36
- package/front_end/panels/console/ConsoleViewMessage.ts +2 -1
- package/front_end/panels/console/consoleView.css +7 -2
- package/front_end/panels/elements/ComputedStyleWidget.ts +16 -26
- package/front_end/panels/elements/ElementsPanel.ts +26 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
- package/front_end/panels/elements/LayoutPane.ts +8 -7
- package/front_end/panels/elements/StandaloneStylesContainer.ts +254 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +33 -0
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +148 -1
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +4 -0
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -1
- package/front_end/panels/elements/components/computedStyleProperty.css +1 -1
- package/front_end/panels/elements/elements-meta.ts +3 -5
- package/front_end/panels/elements/elements.ts +2 -0
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +6 -0
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +2 -1
- package/front_end/panels/network/components/RequestHeaderSection.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
- package/front_end/panels/recorder/components/StepEditor.ts +3 -3
- package/front_end/panels/settings/KeybindsSettingsTab.ts +2 -1
- package/front_end/panels/sources/components/HeadersView.ts +2 -2
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +1 -1
- package/front_end/panels/timeline/components/metricCard.css +0 -4
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +1 -1
- 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/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +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.js +6 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +1 -1
- 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/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +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/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +7 -12
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +13 -2
- package/front_end/ui/components/tree_outline/TreeOutline.ts +6 -2
- package/front_end/ui/components/tree_outline/treeOutline.css +5 -0
- package/front_end/ui/legacy/ListControl.ts +5 -3
- package/front_end/ui/legacy/ListWidget.ts +1 -1
- package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
- package/front_end/ui/legacy/Treeoutline.ts +1 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +44 -24
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +4 -2
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +31 -0
- package/front_end/ui/visual_logging/Debugging.ts +4 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#000000"><path d="M216-144q-29.7 0-50.85-21.5Q144-187 144-216v-120h72v120h528v-456H216v144h-72v-216q0-29 21.15-50.5T216-816h528q29.7 0 50.85 21.5Q816-773 816-744v528q0 29-21.15 50.5T744-144H216Zm240-120-51-51 81-81H144v-72h342l-81-81 51-51 168 168-168 168Z"/></svg>
|
|
@@ -180,8 +180,8 @@
|
|
|
180
180
|
/**
|
|
181
181
|
* Colors for Coverage visualization.
|
|
182
182
|
*/
|
|
183
|
-
--app-color-coverage-used: var(--
|
|
184
|
-
|
|
183
|
+
--app-color-coverage-used: var(--sys-color-green-bright);
|
|
184
|
+
--app-color-coverage-unused: var(--ref-palette-neutral80);
|
|
185
185
|
--app-color-toolbar-background: var(--sys-color-surface4);
|
|
186
186
|
|
|
187
187
|
/**
|
|
@@ -372,8 +372,8 @@
|
|
|
372
372
|
/**
|
|
373
373
|
* Colors for Coverage visualization.
|
|
374
374
|
*/
|
|
375
|
-
--app-color-coverage-used: var(--
|
|
376
|
-
|
|
375
|
+
--app-color-coverage-used: var(--sys-color-green-bright);
|
|
376
|
+
--app-color-coverage-unused: var(--ref-palette-neutral40);
|
|
377
377
|
--app-color-toolbar-background: var(--sys-color-base);
|
|
378
378
|
|
|
379
379
|
/**
|
|
@@ -826,10 +826,11 @@ export enum DevtoolsExperiments {
|
|
|
826
826
|
'timeline-show-postmessage-events' = 86,
|
|
827
827
|
'timeline-debug-mode' = 93,
|
|
828
828
|
'durable-messages' = 110,
|
|
829
|
+
'jpeg-xl' = 111,
|
|
829
830
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
830
831
|
|
|
831
832
|
// Increment this when new experiments are added.
|
|
832
|
-
MAX_VALUE =
|
|
833
|
+
MAX_VALUE = 112,
|
|
833
834
|
}
|
|
834
835
|
|
|
835
836
|
/** Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added. **/
|
|
@@ -24,6 +24,7 @@ export enum ExperimentName {
|
|
|
24
24
|
TIMELINE_SHOW_POST_MESSAGE_EVENTS = 'timeline-show-postmessage-events',
|
|
25
25
|
TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
|
|
26
26
|
DURABLE_MESSAGES = 'durable-messages',
|
|
27
|
+
JPEG_XL = 'jpeg-xl',
|
|
27
28
|
// Adding or removing an entry from this enum?
|
|
28
29
|
// You will need to update:
|
|
29
30
|
// 1. DevToolsExperiments enum in host/UserMetrics.ts
|
|
@@ -431,6 +431,14 @@ export class MainImpl {
|
|
|
431
431
|
requiresChromeRestart: false,
|
|
432
432
|
});
|
|
433
433
|
|
|
434
|
+
Root.Runtime.experiments.registerHostExperiment({
|
|
435
|
+
name: Root.ExperimentNames.ExperimentName.JPEG_XL,
|
|
436
|
+
title: 'JPEG XL support',
|
|
437
|
+
aboutFlag: 'enable-jxl-image-format',
|
|
438
|
+
isEnabled: Root.Runtime.hostConfig.devToolsJpegXlImageFormat?.enabled ?? false,
|
|
439
|
+
requiresChromeRestart: true,
|
|
440
|
+
});
|
|
441
|
+
|
|
434
442
|
Root.Runtime.experiments.enableExperimentsByDefault([
|
|
435
443
|
Root.ExperimentNames.ExperimentName.FULL_ACCESSIBILITY_TREE,
|
|
436
444
|
Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES,
|
|
@@ -508,6 +508,7 @@ inspectorBackend.registerEnum("Emulation.PressureSource", {Cpu: "cpu"});
|
|
|
508
508
|
inspectorBackend.registerEnum("Emulation.PressureState", {Nominal: "nominal", Fair: "fair", Serious: "serious", Critical: "critical"});
|
|
509
509
|
inspectorBackend.registerEnum("Emulation.DisabledImageType", {Avif: "avif", Jxl: "jxl", Webp: "webp"});
|
|
510
510
|
inspectorBackend.registerEvent("Emulation.virtualTimeBudgetExpired", []);
|
|
511
|
+
inspectorBackend.registerEvent("Emulation.screenOrientationLockChanged", ["locked", "orientation"]);
|
|
511
512
|
inspectorBackend.registerCommand("Emulation.canEmulate", [], ["result"], "Tells whether emulation is supported.");
|
|
512
513
|
inspectorBackend.registerCommand("Emulation.clearDeviceMetricsOverride", [], [], "Clears the overridden device metrics.");
|
|
513
514
|
inspectorBackend.registerCommand("Emulation.clearGeolocationOverride", [], [], "Clears the overridden Geolocation Position and Error.");
|
|
@@ -518,7 +519,7 @@ inspectorBackend.registerCommand("Emulation.setCPUThrottlingRate", [{"name": "ra
|
|
|
518
519
|
inspectorBackend.registerCommand("Emulation.setDefaultBackgroundColorOverride", [{"name": "color", "type": "object", "optional": true, "description": "RGBA of the default background color. If not specified, any existing override will be cleared.", "typeRef": "DOM.RGBA"}], [], "Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.");
|
|
519
520
|
inspectorBackend.registerCommand("Emulation.setSafeAreaInsetsOverride", [{"name": "insets", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.SafeAreaInsets"}], [], "Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the respective variables to be undefined, even if previously overridden.");
|
|
520
521
|
inspectorBackend.registerEnum("Emulation.SetDeviceMetricsOverrideRequestScrollbarType", {Overlay: "overlay", Default: "default"});
|
|
521
|
-
inspectorBackend.registerCommand("Emulation.setDeviceMetricsOverride", [{"name": "width", "type": "number", "optional": false, "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "height", "type": "number", "optional": false, "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "deviceScaleFactor", "type": "number", "optional": false, "description": "Overriding device scale factor value. 0 disables the override.", "typeRef": null}, {"name": "mobile", "type": "boolean", "optional": false, "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.", "typeRef": null}, {"name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image.", "typeRef": null}, {"name": "screenWidth", "type": "number", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "screenHeight", "type": "number", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionX", "type": "number", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionY", "type": "number", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "dontSetVisibleSize", "type": "boolean", "optional": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", "typeRef": null}, {"name": "screenOrientation", "type": "object", "optional": true, "description": "Screen orientation override.", "typeRef": "Emulation.ScreenOrientation"}, {"name": "viewport", "type": "object", "optional": true, "description": "If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.", "typeRef": "Page.Viewport"}, {"name": "displayFeature", "type": "object", "optional": true, "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.", "typeRef": "Emulation.DisplayFeature"}, {"name": "devicePosture", "type": "object", "optional": true, "description": "If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.", "typeRef": "Emulation.DevicePosture"}, {"name": "scrollbarType", "type": "string", "optional": true, "description": "Scrollbar type. Default: `default`.", "typeRef": "Emulation.SetDeviceMetricsOverrideRequestScrollbarType"}], [], "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).");
|
|
522
|
+
inspectorBackend.registerCommand("Emulation.setDeviceMetricsOverride", [{"name": "width", "type": "number", "optional": false, "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "height", "type": "number", "optional": false, "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "deviceScaleFactor", "type": "number", "optional": false, "description": "Overriding device scale factor value. 0 disables the override.", "typeRef": null}, {"name": "mobile", "type": "boolean", "optional": false, "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.", "typeRef": null}, {"name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image.", "typeRef": null}, {"name": "screenWidth", "type": "number", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "screenHeight", "type": "number", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionX", "type": "number", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionY", "type": "number", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "dontSetVisibleSize", "type": "boolean", "optional": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", "typeRef": null}, {"name": "screenOrientation", "type": "object", "optional": true, "description": "Screen orientation override.", "typeRef": "Emulation.ScreenOrientation"}, {"name": "viewport", "type": "object", "optional": true, "description": "If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.", "typeRef": "Page.Viewport"}, {"name": "displayFeature", "type": "object", "optional": true, "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.", "typeRef": "Emulation.DisplayFeature"}, {"name": "devicePosture", "type": "object", "optional": true, "description": "If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.", "typeRef": "Emulation.DevicePosture"}, {"name": "scrollbarType", "type": "string", "optional": true, "description": "Scrollbar type. Default: `default`.", "typeRef": "Emulation.SetDeviceMetricsOverrideRequestScrollbarType"}, {"name": "screenOrientationLockEmulation", "type": "boolean", "optional": true, "description": "If set to true, enables screen orientation lock emulation, which intercepts screen.orientation.lock() calls from the page and reports orientation changes via screenOrientationLockChanged events. This is useful for emulating mobile device orientation lock behavior in responsive design mode.", "typeRef": null}], [], "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).");
|
|
522
523
|
inspectorBackend.registerCommand("Emulation.setDevicePostureOverride", [{"name": "posture", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.DevicePosture"}], [], "Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride().");
|
|
523
524
|
inspectorBackend.registerCommand("Emulation.clearDevicePostureOverride", [], [], "Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set.");
|
|
524
525
|
inspectorBackend.registerCommand("Emulation.setDisplayFeaturesOverride", [{"name": "features", "type": "array", "optional": false, "description": "", "typeRef": "Emulation.DisplayFeature"}], [], "Start using the given display features to pupulate the Viewport Segments API. This override can also be set in setDeviceMetricsOverride().");
|
|
@@ -556,6 +557,7 @@ inspectorBackend.registerCommand("Emulation.setAutomationOverride", [{"name": "e
|
|
|
556
557
|
inspectorBackend.registerCommand("Emulation.setSmallViewportHeightDifferenceOverride", [{"name": "difference", "type": "number", "optional": false, "description": "This will cause an element of size 100svh to be `difference` pixels smaller than an element of size 100lvh.", "typeRef": null}], [], "Allows overriding the difference between the small and large viewport sizes, which determine the value of the `svh` and `lvh` unit, respectively. Only supported for top-level frames.");
|
|
557
558
|
inspectorBackend.registerCommand("Emulation.getScreenInfos", [], ["screenInfos"], "Returns device's screen configuration. In headful mode, the physical screens configuration is returned, whereas in headless mode, a virtual headless screen configuration is provided instead.");
|
|
558
559
|
inspectorBackend.registerCommand("Emulation.addScreen", [{"name": "left", "type": "number", "optional": false, "description": "Offset of the left edge of the screen in pixels.", "typeRef": null}, {"name": "top", "type": "number", "optional": false, "description": "Offset of the top edge of the screen in pixels.", "typeRef": null}, {"name": "width", "type": "number", "optional": false, "description": "The width of the screen in pixels.", "typeRef": null}, {"name": "height", "type": "number", "optional": false, "description": "The height of the screen in pixels.", "typeRef": null}, {"name": "workAreaInsets", "type": "object", "optional": true, "description": "Specifies the screen's work area. Default is entire screen.", "typeRef": "Emulation.WorkAreaInsets"}, {"name": "devicePixelRatio", "type": "number", "optional": true, "description": "Specifies the screen's device pixel ratio. Default is 1.", "typeRef": null}, {"name": "rotation", "type": "number", "optional": true, "description": "Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270. Default is 0.", "typeRef": null}, {"name": "colorDepth", "type": "number", "optional": true, "description": "Specifies the screen's color depth in bits. Default is 24.", "typeRef": null}, {"name": "label", "type": "string", "optional": true, "description": "Specifies the descriptive label for the screen. Default is none.", "typeRef": null}, {"name": "isInternal", "type": "boolean", "optional": true, "description": "Indicates whether the screen is internal to the device or external, attached to the device. Default is false.", "typeRef": null}], ["screenInfo"], "Add a new screen to the device. Only supported in headless mode.");
|
|
560
|
+
inspectorBackend.registerCommand("Emulation.updateScreen", [{"name": "screenId", "type": "string", "optional": false, "description": "Target screen identifier.", "typeRef": "Emulation.ScreenId"}, {"name": "left", "type": "number", "optional": true, "description": "Offset of the left edge of the screen in pixels.", "typeRef": null}, {"name": "top", "type": "number", "optional": true, "description": "Offset of the top edge of the screen in pixels.", "typeRef": null}, {"name": "width", "type": "number", "optional": true, "description": "The width of the screen in pixels.", "typeRef": null}, {"name": "height", "type": "number", "optional": true, "description": "The height of the screen in pixels.", "typeRef": null}, {"name": "workAreaInsets", "type": "object", "optional": true, "description": "Specifies the screen's work area.", "typeRef": "Emulation.WorkAreaInsets"}, {"name": "devicePixelRatio", "type": "number", "optional": true, "description": "Specifies the screen's device pixel ratio.", "typeRef": null}, {"name": "rotation", "type": "number", "optional": true, "description": "Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270.", "typeRef": null}, {"name": "colorDepth", "type": "number", "optional": true, "description": "Specifies the screen's color depth in bits.", "typeRef": null}, {"name": "label", "type": "string", "optional": true, "description": "Specifies the descriptive label for the screen.", "typeRef": null}, {"name": "isInternal", "type": "boolean", "optional": true, "description": "Indicates whether the screen is internal to the device or external, attached to the device. Default is false.", "typeRef": null}], ["screenInfo"], "Updates specified screen parameters. Only supported in headless mode.");
|
|
559
561
|
inspectorBackend.registerCommand("Emulation.removeScreen", [{"name": "screenId", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.ScreenId"}], [], "Remove screen from the device. Only supported in headless mode.");
|
|
560
562
|
inspectorBackend.registerCommand("Emulation.setPrimaryScreen", [{"name": "screenId", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.ScreenId"}], [], "Set primary screen. Only supported in headless mode. Note that this changes the coordinate system origin to the top-left of the new primary screen, updating the bounds and work areas of all existing screens accordingly.");
|
|
561
563
|
inspectorBackend.registerType("Emulation.SafeAreaInsets", [{"name": "top", "type": "number", "optional": true, "description": "Overrides safe-area-inset-top.", "typeRef": null}, {"name": "topMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-top.", "typeRef": null}, {"name": "left", "type": "number", "optional": true, "description": "Overrides safe-area-inset-left.", "typeRef": null}, {"name": "leftMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-left.", "typeRef": null}, {"name": "bottom", "type": "number", "optional": true, "description": "Overrides safe-area-inset-bottom.", "typeRef": null}, {"name": "bottomMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-bottom.", "typeRef": null}, {"name": "right", "type": "number", "optional": true, "description": "Overrides safe-area-inset-right.", "typeRef": null}, {"name": "rightMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-right.", "typeRef": null}]);
|
|
@@ -4891,7 +4891,7 @@ export const generatedProperties = [
|
|
|
4891
4891
|
"inherited": false,
|
|
4892
4892
|
"keywords": [
|
|
4893
4893
|
"none",
|
|
4894
|
-
"
|
|
4894
|
+
"all"
|
|
4895
4895
|
],
|
|
4896
4896
|
"name": "view-transition-scope"
|
|
4897
4897
|
},
|
|
@@ -7267,7 +7267,7 @@ export const generatedPropertyValues = {
|
|
|
7267
7267
|
"view-transition-scope": {
|
|
7268
7268
|
"values": [
|
|
7269
7269
|
"none",
|
|
7270
|
-
"
|
|
7270
|
+
"all"
|
|
7271
7271
|
]
|
|
7272
7272
|
},
|
|
7273
7273
|
"visibility": {
|
|
@@ -202,6 +202,12 @@ export namespace ProtocolMapping {
|
|
|
202
202
|
* Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
|
|
203
203
|
*/
|
|
204
204
|
'Emulation.virtualTimeBudgetExpired': [];
|
|
205
|
+
/**
|
|
206
|
+
* Fired when a page calls screen.orientation.lock() or screen.orientation.unlock()
|
|
207
|
+
* while device emulation is enabled. This allows the DevTools frontend to update the
|
|
208
|
+
* emulated device orientation accordingly.
|
|
209
|
+
*/
|
|
210
|
+
'Emulation.screenOrientationLockChanged': [Protocol.Emulation.ScreenOrientationLockChangedEvent];
|
|
205
211
|
'FedCm.dialogShown': [Protocol.FedCm.DialogShownEvent];
|
|
206
212
|
/**
|
|
207
213
|
* Triggered when a dialog is closed, either by user action, JS abort,
|
|
@@ -2775,6 +2781,13 @@ export namespace ProtocolMapping {
|
|
|
2775
2781
|
paramsType: [Protocol.Emulation.AddScreenRequest];
|
|
2776
2782
|
returnType: Protocol.Emulation.AddScreenResponse;
|
|
2777
2783
|
};
|
|
2784
|
+
/**
|
|
2785
|
+
* Updates specified screen parameters. Only supported in headless mode.
|
|
2786
|
+
*/
|
|
2787
|
+
'Emulation.updateScreen': {
|
|
2788
|
+
paramsType: [Protocol.Emulation.UpdateScreenRequest];
|
|
2789
|
+
returnType: Protocol.Emulation.UpdateScreenResponse;
|
|
2790
|
+
};
|
|
2778
2791
|
/**
|
|
2779
2792
|
* Remove screen from the device. Only supported in headless mode.
|
|
2780
2793
|
*/
|
|
@@ -1847,6 +1847,11 @@ declare namespace ProtocolProxyApi {
|
|
|
1847
1847
|
*/
|
|
1848
1848
|
invoke_addScreen(params: Protocol.Emulation.AddScreenRequest): Promise<Protocol.Emulation.AddScreenResponse>;
|
|
1849
1849
|
|
|
1850
|
+
/**
|
|
1851
|
+
* Updates specified screen parameters. Only supported in headless mode.
|
|
1852
|
+
*/
|
|
1853
|
+
invoke_updateScreen(params: Protocol.Emulation.UpdateScreenRequest): Promise<Protocol.Emulation.UpdateScreenResponse>;
|
|
1854
|
+
|
|
1850
1855
|
/**
|
|
1851
1856
|
* Remove screen from the device. Only supported in headless mode.
|
|
1852
1857
|
*/
|
|
@@ -1867,6 +1872,13 @@ declare namespace ProtocolProxyApi {
|
|
|
1867
1872
|
*/
|
|
1868
1873
|
virtualTimeBudgetExpired(): void;
|
|
1869
1874
|
|
|
1875
|
+
/**
|
|
1876
|
+
* Fired when a page calls screen.orientation.lock() or screen.orientation.unlock()
|
|
1877
|
+
* while device emulation is enabled. This allows the DevTools frontend to update the
|
|
1878
|
+
* emulated device orientation accordingly.
|
|
1879
|
+
*/
|
|
1880
|
+
screenOrientationLockChanged(params: Protocol.Emulation.ScreenOrientationLockChangedEvent): void;
|
|
1881
|
+
|
|
1870
1882
|
}
|
|
1871
1883
|
|
|
1872
1884
|
export interface EventBreakpointsApi {
|
|
@@ -7205,6 +7205,14 @@ export namespace Emulation {
|
|
|
7205
7205
|
* Scrollbar type. Default: `default`.
|
|
7206
7206
|
*/
|
|
7207
7207
|
scrollbarType?: SetDeviceMetricsOverrideRequestScrollbarType;
|
|
7208
|
+
/**
|
|
7209
|
+
* If set to true, enables screen orientation lock emulation, which
|
|
7210
|
+
* intercepts screen.orientation.lock() calls from the page and reports
|
|
7211
|
+
* orientation changes via screenOrientationLockChanged events. This is
|
|
7212
|
+
* useful for emulating mobile device orientation lock behavior in
|
|
7213
|
+
* responsive design mode.
|
|
7214
|
+
*/
|
|
7215
|
+
screenOrientationLockEmulation?: boolean;
|
|
7208
7216
|
}
|
|
7209
7217
|
|
|
7210
7218
|
export interface SetDevicePostureOverrideRequest {
|
|
@@ -7547,6 +7555,57 @@ export namespace Emulation {
|
|
|
7547
7555
|
screenInfo: ScreenInfo;
|
|
7548
7556
|
}
|
|
7549
7557
|
|
|
7558
|
+
export interface UpdateScreenRequest {
|
|
7559
|
+
/**
|
|
7560
|
+
* Target screen identifier.
|
|
7561
|
+
*/
|
|
7562
|
+
screenId: ScreenId;
|
|
7563
|
+
/**
|
|
7564
|
+
* Offset of the left edge of the screen in pixels.
|
|
7565
|
+
*/
|
|
7566
|
+
left?: integer;
|
|
7567
|
+
/**
|
|
7568
|
+
* Offset of the top edge of the screen in pixels.
|
|
7569
|
+
*/
|
|
7570
|
+
top?: integer;
|
|
7571
|
+
/**
|
|
7572
|
+
* The width of the screen in pixels.
|
|
7573
|
+
*/
|
|
7574
|
+
width?: integer;
|
|
7575
|
+
/**
|
|
7576
|
+
* The height of the screen in pixels.
|
|
7577
|
+
*/
|
|
7578
|
+
height?: integer;
|
|
7579
|
+
/**
|
|
7580
|
+
* Specifies the screen's work area.
|
|
7581
|
+
*/
|
|
7582
|
+
workAreaInsets?: WorkAreaInsets;
|
|
7583
|
+
/**
|
|
7584
|
+
* Specifies the screen's device pixel ratio.
|
|
7585
|
+
*/
|
|
7586
|
+
devicePixelRatio?: number;
|
|
7587
|
+
/**
|
|
7588
|
+
* Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270.
|
|
7589
|
+
*/
|
|
7590
|
+
rotation?: integer;
|
|
7591
|
+
/**
|
|
7592
|
+
* Specifies the screen's color depth in bits.
|
|
7593
|
+
*/
|
|
7594
|
+
colorDepth?: integer;
|
|
7595
|
+
/**
|
|
7596
|
+
* Specifies the descriptive label for the screen.
|
|
7597
|
+
*/
|
|
7598
|
+
label?: string;
|
|
7599
|
+
/**
|
|
7600
|
+
* Indicates whether the screen is internal to the device or external, attached to the device. Default is false.
|
|
7601
|
+
*/
|
|
7602
|
+
isInternal?: boolean;
|
|
7603
|
+
}
|
|
7604
|
+
|
|
7605
|
+
export interface UpdateScreenResponse extends ProtocolResponseWithError {
|
|
7606
|
+
screenInfo: ScreenInfo;
|
|
7607
|
+
}
|
|
7608
|
+
|
|
7550
7609
|
export interface RemoveScreenRequest {
|
|
7551
7610
|
screenId: ScreenId;
|
|
7552
7611
|
}
|
|
@@ -7554,6 +7613,22 @@ export namespace Emulation {
|
|
|
7554
7613
|
export interface SetPrimaryScreenRequest {
|
|
7555
7614
|
screenId: ScreenId;
|
|
7556
7615
|
}
|
|
7616
|
+
|
|
7617
|
+
/**
|
|
7618
|
+
* Fired when a page calls screen.orientation.lock() or screen.orientation.unlock()
|
|
7619
|
+
* while device emulation is enabled. This allows the DevTools frontend to update the
|
|
7620
|
+
* emulated device orientation accordingly.
|
|
7621
|
+
*/
|
|
7622
|
+
export interface ScreenOrientationLockChangedEvent {
|
|
7623
|
+
/**
|
|
7624
|
+
* Whether the screen orientation is currently locked.
|
|
7625
|
+
*/
|
|
7626
|
+
locked: boolean;
|
|
7627
|
+
/**
|
|
7628
|
+
* The orientation lock type requested by the page. Only set when locked is true.
|
|
7629
|
+
*/
|
|
7630
|
+
orientation?: ScreenOrientation;
|
|
7631
|
+
}
|
|
7557
7632
|
}
|
|
7558
7633
|
|
|
7559
7634
|
/**
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Host from '../../../core/host/host.js';
|
|
6
6
|
import * as Root from '../../../core/root/root.js';
|
|
7
7
|
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
8
|
+
import type * as Protocol from '../../../generated/protocol.js';
|
|
8
9
|
import * as Greendev from '../../greendev/greendev.js';
|
|
9
10
|
import {debugLog, isStructuredLogEnabled} from '../debug.js';
|
|
10
11
|
|
|
@@ -84,6 +85,7 @@ export interface ThoughtResponse {
|
|
|
84
85
|
|
|
85
86
|
export interface SideEffectResponse {
|
|
86
87
|
type: ResponseType.SIDE_EFFECT;
|
|
88
|
+
description: string|null;
|
|
87
89
|
code?: string;
|
|
88
90
|
confirm: (confirm: boolean) => void;
|
|
89
91
|
}
|
|
@@ -105,6 +107,7 @@ export interface ActionResponse {
|
|
|
105
107
|
code?: string;
|
|
106
108
|
output?: string;
|
|
107
109
|
canceled: boolean;
|
|
110
|
+
widgets?: AiWidget[];
|
|
108
111
|
}
|
|
109
112
|
|
|
110
113
|
export interface QueryingResponse {
|
|
@@ -215,10 +218,29 @@ export abstract class ConversationContext<T> {
|
|
|
215
218
|
}
|
|
216
219
|
}
|
|
217
220
|
|
|
221
|
+
export interface ComputedStyleAiWidget {
|
|
222
|
+
name: 'COMPUTED_STYLES';
|
|
223
|
+
data: {
|
|
224
|
+
computedStyles: Map<string, string>,
|
|
225
|
+
backendNodeId: Protocol.DOM.BackendNodeId,
|
|
226
|
+
matchedCascade: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
227
|
+
// The subset of CSS properties that the AI looked up.
|
|
228
|
+
properties: string[],
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
// This type will grow as we add more widgets.
|
|
232
|
+
export type AiWidget = ComputedStyleAiWidget;
|
|
233
|
+
|
|
218
234
|
export type FunctionCallHandlerResult<Result> = {
|
|
219
235
|
requiresApproval: true,
|
|
236
|
+
/**
|
|
237
|
+
* Provides extra description of what the required
|
|
238
|
+
* approval is requesting.
|
|
239
|
+
*/
|
|
240
|
+
description: string|null,
|
|
220
241
|
}|{
|
|
221
242
|
result: Result,
|
|
243
|
+
widgets?: AiWidget[],
|
|
222
244
|
}|{
|
|
223
245
|
context: ConversationContext<unknown>,
|
|
224
246
|
description: string,
|
|
@@ -259,7 +281,6 @@ export interface FunctionDeclaration<Args extends Record<string, unknown>, Retur
|
|
|
259
281
|
/**
|
|
260
282
|
* Function implementation that the LLM will try to execute,
|
|
261
283
|
*/
|
|
262
|
-
|
|
263
284
|
handler(args: Args, options?: FunctionHandlerOptions): Promise<FunctionCallHandlerResult<ReturnType>>;
|
|
264
285
|
}
|
|
265
286
|
|
|
@@ -738,6 +759,7 @@ export abstract class AiAgent<T> {
|
|
|
738
759
|
yield {
|
|
739
760
|
type: ResponseType.SIDE_EFFECT,
|
|
740
761
|
confirm: sideEffectConfirmationPromiseWithResolvers.resolve,
|
|
762
|
+
description: result.description,
|
|
741
763
|
};
|
|
742
764
|
|
|
743
765
|
const approvedRun = await sideEffectConfirmationPromiseWithResolvers.promise;
|
|
@@ -764,6 +786,7 @@ export abstract class AiAgent<T> {
|
|
|
764
786
|
type: ResponseType.ACTION,
|
|
765
787
|
code,
|
|
766
788
|
output: typeof result.result === 'string' ? result.result : JSON.stringify(result.result),
|
|
789
|
+
widgets: result.widgets,
|
|
767
790
|
canceled: false,
|
|
768
791
|
};
|
|
769
792
|
}
|