cdp_driver/methods/overlay.rs
1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! This domain provides various functionality related to drawing atop the
5//! inspected page.
6//!
7//! Method names for the `Overlay` domain, for use with
8//! [`CdpClient::call`](crate::CdpClient::call).
9//!
10//! This domain is experimental and may change without notice.
11
12/// Disables domain notifications.
13pub const DISABLE: &str = "Overlay.disable";
14
15/// Enables domain notifications.
16pub const ENABLE: &str = "Overlay.enable";
17
18/// For testing.
19///
20/// Parameters:
21/// - `nodeId`: DOM.NodeId
22/// - `includeDistance`: boolean (optional)
23/// - `includeStyle`: boolean (optional)
24/// - `colorFormat`: ColorFormat (optional)
25/// - `showAccessibilityInfo`: boolean (optional)
26///
27/// Returns: `highlight`
28pub const GET_HIGHLIGHT_OBJECT_FOR_TEST: &str = "Overlay.getHighlightObjectForTest";
29
30/// For Persistent Grid testing.
31///
32/// Parameters:
33/// - `nodeIds`: array
34///
35/// Returns: `highlights`
36pub const GET_GRID_HIGHLIGHT_OBJECTS_FOR_TEST: &str = "Overlay.getGridHighlightObjectsForTest";
37
38/// For Source Order Viewer testing.
39///
40/// Parameters:
41/// - `nodeId`: DOM.NodeId
42///
43/// Returns: `highlight`
44pub const GET_SOURCE_ORDER_HIGHLIGHT_OBJECT_FOR_TEST: &str =
45 "Overlay.getSourceOrderHighlightObjectForTest";
46
47/// Hides any highlight.
48pub const HIDE_HIGHLIGHT: &str = "Overlay.hideHighlight";
49
50/// Highlights owner element of the frame with given id. Deprecated: Doesn't
51/// work reliably and cannot be fixed due to process separation (the owner
52/// node might be in a different process). Determine the owner node in the
53/// client and use highlightNode.
54///
55/// Deprecated in the protocol.
56///
57/// Parameters:
58/// - `frameId`: Page.FrameId
59/// - `contentColor`: DOM.RGBA (optional)
60/// - `contentOutlineColor`: DOM.RGBA (optional)
61pub const HIGHLIGHT_FRAME: &str = "Overlay.highlightFrame";
62
63/// Highlights DOM node with given id or with the given JavaScript object
64/// wrapper. Either nodeId or objectId must be specified.
65///
66/// Parameters:
67/// - `highlightConfig`: HighlightConfig
68/// - `nodeId`: DOM.NodeId (optional)
69/// - `backendNodeId`: DOM.BackendNodeId (optional)
70/// - `objectId`: Runtime.RemoteObjectId (optional)
71/// - `selector`: string (optional)
72pub const HIGHLIGHT_NODE: &str = "Overlay.highlightNode";
73
74/// Highlights given quad. Coordinates are absolute with respect to the main
75/// frame viewport.
76///
77/// Parameters:
78/// - `quad`: DOM.Quad
79/// - `color`: DOM.RGBA (optional)
80/// - `outlineColor`: DOM.RGBA (optional)
81pub const HIGHLIGHT_QUAD: &str = "Overlay.highlightQuad";
82
83/// Highlights given rectangle. Coordinates are absolute with respect to the
84/// main frame viewport. Issue: the method does not handle device pixel ratio
85/// (DPR) correctly. The coordinates currently have to be adjusted by the
86/// client if DPR is not 1 (see crbug.com/437807128).
87///
88/// Parameters:
89/// - `x`: integer
90/// - `y`: integer
91/// - `width`: integer
92/// - `height`: integer
93/// - `color`: DOM.RGBA (optional)
94/// - `outlineColor`: DOM.RGBA (optional)
95pub const HIGHLIGHT_RECT: &str = "Overlay.highlightRect";
96
97/// Highlights the source order of the children of the DOM node with given id
98/// or with the given JavaScript object wrapper. Either nodeId or objectId
99/// must be specified.
100///
101/// Parameters:
102/// - `sourceOrderConfig`: SourceOrderConfig
103/// - `nodeId`: DOM.NodeId (optional)
104/// - `backendNodeId`: DOM.BackendNodeId (optional)
105/// - `objectId`: Runtime.RemoteObjectId (optional)
106pub const HIGHLIGHT_SOURCE_ORDER: &str = "Overlay.highlightSourceOrder";
107
108/// Enters the 'inspect' mode. In this mode, elements that user is hovering
109/// over are highlighted. Backend then generates 'inspectNodeRequested' event
110/// upon element selection.
111///
112/// Parameters:
113/// - `mode`: InspectMode
114/// - `highlightConfig`: HighlightConfig (optional)
115pub const SET_INSPECT_MODE: &str = "Overlay.setInspectMode";
116
117/// Highlights owner element of all frames detected to be ads.
118///
119/// Parameters:
120/// - `show`: boolean
121pub const SET_SHOW_AD_HIGHLIGHTS: &str = "Overlay.setShowAdHighlights";
122
123/// `Overlay.setPausedInDebuggerMessage`
124///
125/// Parameters:
126/// - `message`: string (optional)
127pub const SET_PAUSED_IN_DEBUGGER_MESSAGE: &str = "Overlay.setPausedInDebuggerMessage";
128
129/// Requests that backend shows debug borders on layers
130///
131/// Parameters:
132/// - `show`: boolean
133pub const SET_SHOW_DEBUG_BORDERS: &str = "Overlay.setShowDebugBorders";
134
135/// Requests that backend shows the FPS counter
136///
137/// Parameters:
138/// - `show`: boolean
139pub const SET_SHOW_FPS_COUNTER: &str = "Overlay.setShowFPSCounter";
140
141/// Highlight multiple elements with the CSS Grid overlay.
142///
143/// Parameters:
144/// - `gridNodeHighlightConfigs`: array
145pub const SET_SHOW_GRID_OVERLAYS: &str = "Overlay.setShowGridOverlays";
146
147/// `Overlay.setShowFlexOverlays`
148///
149/// Parameters:
150/// - `flexNodeHighlightConfigs`: array
151pub const SET_SHOW_FLEX_OVERLAYS: &str = "Overlay.setShowFlexOverlays";
152
153/// `Overlay.setShowScrollSnapOverlays`
154///
155/// Parameters:
156/// - `scrollSnapHighlightConfigs`: array
157pub const SET_SHOW_SCROLL_SNAP_OVERLAYS: &str = "Overlay.setShowScrollSnapOverlays";
158
159/// `Overlay.setShowContainerQueryOverlays`
160///
161/// Parameters:
162/// - `containerQueryHighlightConfigs`: array
163pub const SET_SHOW_CONTAINER_QUERY_OVERLAYS: &str = "Overlay.setShowContainerQueryOverlays";
164
165/// `Overlay.setShowInspectedElementAnchor`
166///
167/// Parameters:
168/// - `inspectedElementAnchorConfig`: InspectedElementAnchorConfig
169pub const SET_SHOW_INSPECTED_ELEMENT_ANCHOR: &str = "Overlay.setShowInspectedElementAnchor";
170
171/// Requests that backend shows paint rectangles
172///
173/// Parameters:
174/// - `result`: boolean
175pub const SET_SHOW_PAINT_RECTS: &str = "Overlay.setShowPaintRects";
176
177/// Requests that backend shows layout shift regions
178///
179/// Parameters:
180/// - `result`: boolean
181pub const SET_SHOW_LAYOUT_SHIFT_REGIONS: &str = "Overlay.setShowLayoutShiftRegions";
182
183/// Requests that backend shows scroll bottleneck rects
184///
185/// Parameters:
186/// - `show`: boolean
187pub const SET_SHOW_SCROLL_BOTTLENECK_RECTS: &str = "Overlay.setShowScrollBottleneckRects";
188
189/// Deprecated, no longer has any effect.
190///
191/// Deprecated in the protocol.
192///
193/// Parameters:
194/// - `show`: boolean
195pub const SET_SHOW_HIT_TEST_BORDERS: &str = "Overlay.setShowHitTestBorders";
196
197/// Deprecated, no longer has any effect.
198///
199/// Deprecated in the protocol.
200///
201/// Parameters:
202/// - `show`: boolean
203pub const SET_SHOW_WEB_VITALS: &str = "Overlay.setShowWebVitals";
204
205/// Paints viewport size upon main frame resize.
206///
207/// Parameters:
208/// - `show`: boolean
209pub const SET_SHOW_VIEWPORT_SIZE_ON_RESIZE: &str = "Overlay.setShowViewportSizeOnResize";
210
211/// Add a dual screen device hinge
212///
213/// Parameters:
214/// - `hingeConfig`: HingeConfig (optional)
215pub const SET_SHOW_HINGE: &str = "Overlay.setShowHinge";
216
217/// Add a display cutout overlay.
218///
219/// Parameters:
220/// - `displayCutoutConfig`: DisplayCutoutConfig (optional)
221pub const SET_SHOW_DISPLAY_CUTOUT: &str = "Overlay.setShowDisplayCutout";
222
223/// Show elements in isolation mode with overlays.
224///
225/// Parameters:
226/// - `isolatedElementHighlightConfigs`: array
227pub const SET_SHOW_ISOLATED_ELEMENTS: &str = "Overlay.setShowIsolatedElements";
228
229/// Show Window Controls Overlay for PWA
230///
231/// Parameters:
232/// - `windowControlsOverlayConfig`: WindowControlsOverlayConfig (optional)
233pub const SET_SHOW_WINDOW_CONTROLS_OVERLAY: &str = "Overlay.setShowWindowControlsOverlay";