Skip to main content

cdp_protocol/
css.rs

1// Auto-generated from Chrome at version 146.0.7680.165 domain: CSS
2#![allow(dead_code)]
3use super::dom;
4use super::page;
5#[allow(unused_imports)]
6use super::types::*;
7#[allow(unused_imports)]
8use derive_builder::Builder;
9#[allow(unused_imports)]
10use serde::{Deserialize, Serialize};
11#[allow(unused_imports)]
12use serde_json::Value as Json;
13#[allow(deprecated)]
14#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
15pub enum StyleSheetOrigin {
16    #[serde(rename = "injected")]
17    Injected,
18    #[serde(rename = "user-agent")]
19    UserAgent,
20    #[serde(rename = "inspector")]
21    Inspector,
22    #[serde(rename = "regular")]
23    Regular,
24}
25#[allow(deprecated)]
26#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
27pub enum CssRuleType {
28    #[serde(rename = "MediaRule")]
29    MediaRule,
30    #[serde(rename = "SupportsRule")]
31    SupportsRule,
32    #[serde(rename = "ContainerRule")]
33    ContainerRule,
34    #[serde(rename = "LayerRule")]
35    LayerRule,
36    #[serde(rename = "ScopeRule")]
37    ScopeRule,
38    #[serde(rename = "StyleRule")]
39    StyleRule,
40    #[serde(rename = "StartingStyleRule")]
41    StartingStyleRule,
42}
43#[allow(deprecated)]
44#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
45pub enum CssMediaSource {
46    #[serde(rename = "mediaRule")]
47    MediaRule,
48    #[serde(rename = "importRule")]
49    ImportRule,
50    #[serde(rename = "linkedSheet")]
51    LinkedSheet,
52    #[serde(rename = "inlineSheet")]
53    InlineSheet,
54}
55#[allow(deprecated)]
56#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
57pub enum CssAtRuleType {
58    #[serde(rename = "font-face")]
59    FontFace,
60    #[serde(rename = "font-feature-values")]
61    FontFeatureValues,
62    #[serde(rename = "font-palette-values")]
63    FontPaletteValues,
64}
65#[allow(deprecated)]
66#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
67pub enum CssAtRuleSubsection {
68    #[serde(rename = "swash")]
69    Swash,
70    #[serde(rename = "annotation")]
71    Annotation,
72    #[serde(rename = "ornaments")]
73    Ornaments,
74    #[serde(rename = "stylistic")]
75    Stylistic,
76    #[serde(rename = "styleset")]
77    Styleset,
78    #[serde(rename = "character-variant")]
79    CharacterVariant,
80}
81#[allow(deprecated)]
82#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
83#[builder(setter(into, strip_option))]
84#[serde(rename_all = "camelCase")]
85#[doc = "CSS rule collection for a single pseudo style."]
86pub struct PseudoElementMatches {
87    #[doc = "Pseudo element type."]
88    pub pseudo_type: dom::PseudoType,
89    #[builder(default)]
90    #[serde(skip_serializing_if = "Option::is_none")]
91    #[serde(default)]
92    #[doc = "Pseudo element custom ident."]
93    pub pseudo_identifier: Option<String>,
94    #[doc = "Matches of CSS rules applicable to the pseudo style."]
95    pub matches: Vec<RuleMatch>,
96}
97#[allow(deprecated)]
98#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
99#[builder(setter(into, strip_option))]
100#[serde(rename_all = "camelCase")]
101#[doc = "CSS style coming from animations with the name of the animation."]
102pub struct CssAnimationStyle {
103    #[builder(default)]
104    #[serde(skip_serializing_if = "Option::is_none")]
105    #[serde(default)]
106    #[doc = "The name of the animation."]
107    pub name: Option<String>,
108    #[doc = "The style coming from the animation."]
109    pub style: CssStyle,
110}
111#[allow(deprecated)]
112#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
113#[builder(setter(into, strip_option))]
114#[serde(rename_all = "camelCase")]
115#[doc = "Inherited CSS rule collection from ancestor node."]
116pub struct InheritedStyleEntry {
117    #[builder(default)]
118    #[serde(skip_serializing_if = "Option::is_none")]
119    #[doc = "The ancestor node's inline style, if any, in the style inheritance chain."]
120    pub inline_style: Option<CssStyle>,
121    #[doc = "Matches of CSS rules matching the ancestor node in the style inheritance chain."]
122    #[serde(rename = "matchedCSSRules")]
123    pub matched_css_rules: Vec<RuleMatch>,
124}
125#[allow(deprecated)]
126#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
127#[builder(setter(into, strip_option))]
128#[serde(rename_all = "camelCase")]
129#[doc = "Inherited CSS style collection for animated styles from ancestor node."]
130pub struct InheritedAnimatedStyleEntry {
131    #[builder(default)]
132    #[serde(skip_serializing_if = "Option::is_none")]
133    #[doc = "Styles coming from the animations of the ancestor, if any, in the style inheritance chain."]
134    pub animation_styles: Option<Vec<CssAnimationStyle>>,
135    #[builder(default)]
136    #[serde(skip_serializing_if = "Option::is_none")]
137    #[doc = "The style coming from the transitions of the ancestor, if any, in the style inheritance chain."]
138    pub transitions_style: Option<CssStyle>,
139}
140#[allow(deprecated)]
141#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
142#[builder(setter(into, strip_option))]
143#[serde(rename_all = "camelCase")]
144#[doc = "Inherited pseudo element matches from pseudos of an ancestor node."]
145pub struct InheritedPseudoElementMatches {
146    #[doc = "Matches of pseudo styles from the pseudos of an ancestor node."]
147    pub pseudo_elements: Vec<PseudoElementMatches>,
148}
149#[allow(deprecated)]
150#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
151#[builder(setter(into, strip_option))]
152#[serde(rename_all = "camelCase")]
153#[doc = "Match data for a CSS rule."]
154pub struct RuleMatch {
155    #[doc = "CSS rule in the match."]
156    pub rule: CssRule,
157    #[serde(default)]
158    #[doc = "Matching selector indices in the rule's selectorList selectors (0-based)."]
159    pub matching_selectors: Vec<JsUInt>,
160}
161#[allow(deprecated)]
162#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
163#[builder(setter(into, strip_option))]
164#[serde(rename_all = "camelCase")]
165#[doc = "Data for a simple selector (these are delimited by commas in a selector list)."]
166pub struct Value {
167    #[serde(default)]
168    #[doc = "Value text."]
169    pub text: String,
170    #[builder(default)]
171    #[serde(skip_serializing_if = "Option::is_none")]
172    #[doc = "Value range in the underlying resource (if available)."]
173    pub range: Option<SourceRange>,
174    #[builder(default)]
175    #[serde(skip_serializing_if = "Option::is_none")]
176    #[doc = "Specificity of the selector."]
177    pub specificity: Option<Specificity>,
178}
179#[allow(deprecated)]
180#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
181#[builder(setter(into, strip_option))]
182#[serde(rename_all = "camelCase")]
183#[doc = "Specificity:\n <https://drafts.csswg.org/selectors/#specificity-rules>"]
184pub struct Specificity {
185    #[serde(default)]
186    #[doc = "The a component, which represents the number of ID selectors."]
187    pub a: JsUInt,
188    #[serde(default)]
189    #[doc = "The b component, which represents the number of class selectors, attributes selectors, and\n pseudo-classes."]
190    pub b: JsUInt,
191    #[serde(default)]
192    #[doc = "The c component, which represents the number of type selectors and pseudo-elements."]
193    pub c: JsUInt,
194}
195#[allow(deprecated)]
196#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
197#[builder(setter(into, strip_option))]
198#[serde(rename_all = "camelCase")]
199#[doc = "Selector list data."]
200pub struct SelectorList {
201    #[doc = "Selectors in the list."]
202    pub selectors: Vec<Value>,
203    #[serde(default)]
204    #[doc = "Rule selector text."]
205    pub text: String,
206}
207#[allow(deprecated)]
208#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
209#[builder(setter(into, strip_option))]
210#[serde(rename_all = "camelCase")]
211#[doc = "CSS stylesheet metainformation."]
212pub struct CssStyleSheetHeader {
213    #[doc = "The stylesheet identifier."]
214    pub style_sheet_id: dom::StyleSheetId,
215    #[doc = "Owner frame identifier."]
216    pub frame_id: page::FrameId,
217    #[serde(default)]
218    #[doc = "Stylesheet resource URL. Empty if this is a constructed stylesheet created using\n new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported\n as a CSS module script)."]
219    #[serde(rename = "sourceURL")]
220    pub source_url: String,
221    #[builder(default)]
222    #[serde(skip_serializing_if = "Option::is_none")]
223    #[serde(default)]
224    #[doc = "URL of source map associated with the stylesheet (if any)."]
225    #[serde(rename = "sourceMapURL")]
226    pub source_map_url: Option<String>,
227    #[doc = "Stylesheet origin."]
228    pub origin: StyleSheetOrigin,
229    #[serde(default)]
230    #[doc = "Stylesheet title."]
231    pub title: String,
232    #[builder(default)]
233    #[serde(skip_serializing_if = "Option::is_none")]
234    #[doc = "The backend id for the owner node of the stylesheet."]
235    pub owner_node: Option<dom::BackendNodeId>,
236    #[serde(default)]
237    #[doc = "Denotes whether the stylesheet is disabled."]
238    pub disabled: bool,
239    #[builder(default)]
240    #[serde(skip_serializing_if = "Option::is_none")]
241    #[serde(default)]
242    #[doc = "Whether the sourceURL field value comes from the sourceURL comment."]
243    #[serde(rename = "hasSourceURL")]
244    pub has_source_url: Option<bool>,
245    #[serde(default)]
246    #[doc = "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for\n document.written STYLE tags."]
247    pub is_inline: bool,
248    #[serde(default)]
249    #[doc = "Whether this stylesheet is mutable. Inline stylesheets become mutable\n after they have been modified via CSSOM API.\n `\\<link\\>` element's stylesheets become mutable only if DevTools modifies them.\n Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation."]
250    pub is_mutable: bool,
251    #[serde(default)]
252    #[doc = "True if this stylesheet is created through new CSSStyleSheet() or imported as a\n CSS module script."]
253    pub is_constructed: bool,
254    #[serde(default)]
255    #[doc = "Line offset of the stylesheet within the resource (zero based)."]
256    pub start_line: JsFloat,
257    #[serde(default)]
258    #[doc = "Column offset of the stylesheet within the resource (zero based)."]
259    pub start_column: JsFloat,
260    #[serde(default)]
261    #[doc = "Size of the content (in characters)."]
262    pub length: JsFloat,
263    #[serde(default)]
264    #[doc = "Line offset of the end of the stylesheet within the resource (zero based)."]
265    pub end_line: JsFloat,
266    #[serde(default)]
267    #[doc = "Column offset of the end of the stylesheet within the resource (zero based)."]
268    pub end_column: JsFloat,
269    #[builder(default)]
270    #[serde(skip_serializing_if = "Option::is_none")]
271    #[serde(default)]
272    #[doc = "If the style sheet was loaded from a network resource, this indicates when the resource failed to load"]
273    pub loading_failed: Option<bool>,
274}
275#[allow(deprecated)]
276#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
277#[builder(setter(into, strip_option))]
278#[serde(rename_all = "camelCase")]
279#[doc = "CSS rule representation."]
280pub struct CssRule {
281    #[builder(default)]
282    #[serde(skip_serializing_if = "Option::is_none")]
283    #[doc = "The css style sheet identifier (absent for user agent stylesheet and user-specified\n stylesheet rules) this rule came from."]
284    pub style_sheet_id: Option<dom::StyleSheetId>,
285    #[doc = "Rule selector data."]
286    pub selector_list: SelectorList,
287    #[builder(default)]
288    #[serde(skip_serializing_if = "Option::is_none")]
289    #[serde(default)]
290    #[doc = "Array of selectors from ancestor style rules, sorted by distance from the current rule."]
291    pub nesting_selectors: Option<Vec<String>>,
292    #[doc = "Parent stylesheet's origin."]
293    pub origin: StyleSheetOrigin,
294    #[doc = "Associated style declaration."]
295    pub style: CssStyle,
296    #[builder(default)]
297    #[serde(skip_serializing_if = "Option::is_none")]
298    #[doc = "The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule."]
299    pub origin_tree_scope_node_id: Option<dom::BackendNodeId>,
300    #[builder(default)]
301    #[serde(skip_serializing_if = "Option::is_none")]
302    #[doc = "Media list array (for rules involving media queries). The array enumerates media queries\n starting with the innermost one, going outwards."]
303    pub media: Option<Vec<CssMedia>>,
304    #[builder(default)]
305    #[serde(skip_serializing_if = "Option::is_none")]
306    #[doc = "Container query list array (for rules involving container queries).\n The array enumerates container queries starting with the innermost one, going outwards."]
307    pub container_queries: Option<Vec<CssContainerQuery>>,
308    #[builder(default)]
309    #[serde(skip_serializing_if = "Option::is_none")]
310    #[doc = "@supports CSS at-rule array.\n The array enumerates @supports at-rules starting with the innermost one, going outwards."]
311    pub supports: Option<Vec<CssSupports>>,
312    #[builder(default)]
313    #[serde(skip_serializing_if = "Option::is_none")]
314    #[doc = "Cascade layer array. Contains the layer hierarchy that this rule belongs to starting\n with the innermost layer and going outwards."]
315    pub layers: Option<Vec<CssLayer>>,
316    #[builder(default)]
317    #[serde(skip_serializing_if = "Option::is_none")]
318    #[doc = "@scope CSS at-rule array.\n The array enumerates @scope at-rules starting with the innermost one, going outwards."]
319    pub scopes: Option<Vec<CssScope>>,
320    #[builder(default)]
321    #[serde(skip_serializing_if = "Option::is_none")]
322    #[doc = "The array keeps the types of ancestor CSSRules from the innermost going outwards."]
323    pub rule_types: Option<Vec<CssRuleType>>,
324    #[builder(default)]
325    #[serde(skip_serializing_if = "Option::is_none")]
326    #[doc = "@starting-style CSS at-rule array.\n The array enumerates @starting-style at-rules starting with the innermost one, going outwards."]
327    pub starting_styles: Option<Vec<CssStartingStyle>>,
328}
329#[allow(deprecated)]
330#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
331#[builder(setter(into, strip_option))]
332#[serde(rename_all = "camelCase")]
333#[doc = "CSS coverage information."]
334pub struct RuleUsage {
335    #[doc = "The css style sheet identifier (absent for user agent stylesheet and user-specified\n stylesheet rules) this rule came from."]
336    pub style_sheet_id: dom::StyleSheetId,
337    #[serde(default)]
338    #[doc = "Offset of the start of the rule (including selector) from the beginning of the stylesheet."]
339    pub start_offset: JsFloat,
340    #[serde(default)]
341    #[doc = "Offset of the end of the rule body from the beginning of the stylesheet."]
342    pub end_offset: JsFloat,
343    #[serde(default)]
344    #[doc = "Indicates whether the rule was actually used by some element in the page."]
345    pub used: bool,
346}
347#[allow(deprecated)]
348#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
349#[builder(setter(into, strip_option))]
350#[serde(rename_all = "camelCase")]
351#[doc = "Text range within a resource. All numbers are zero-based."]
352pub struct SourceRange {
353    #[serde(default)]
354    #[doc = "Start line of range."]
355    pub start_line: JsUInt,
356    #[serde(default)]
357    #[doc = "Start column of range (inclusive)."]
358    pub start_column: JsUInt,
359    #[serde(default)]
360    #[doc = "End line of range"]
361    pub end_line: JsUInt,
362    #[serde(default)]
363    #[doc = "End column of range (exclusive)."]
364    pub end_column: JsUInt,
365}
366#[allow(deprecated)]
367#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
368#[builder(setter(into, strip_option))]
369#[serde(rename_all = "camelCase")]
370pub struct ShorthandEntry {
371    #[serde(default)]
372    #[doc = "Shorthand name."]
373    pub name: String,
374    #[serde(default)]
375    #[doc = "Shorthand value."]
376    pub value: String,
377    #[builder(default)]
378    #[serde(skip_serializing_if = "Option::is_none")]
379    #[serde(default)]
380    #[doc = "Whether the property has \"!important\" annotation (implies `false` if absent)."]
381    pub important: Option<bool>,
382}
383#[allow(deprecated)]
384#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
385#[builder(setter(into, strip_option))]
386#[serde(rename_all = "camelCase")]
387pub struct CssComputedStyleProperty {
388    #[serde(default)]
389    #[doc = "Computed style property name."]
390    pub name: String,
391    #[serde(default)]
392    #[doc = "Computed style property value."]
393    pub value: String,
394}
395#[allow(deprecated)]
396#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
397#[builder(setter(into, strip_option))]
398#[serde(rename_all = "camelCase")]
399pub struct ComputedStyleExtraFields {
400    #[serde(default)]
401    #[doc = "Returns whether or not this node is being rendered with base appearance,\n which happens when it has its appearance property set to base/base-select\n or it is in the subtree of an element being rendered with base appearance."]
402    pub is_appearance_base: bool,
403}
404#[allow(deprecated)]
405#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
406#[builder(setter(into, strip_option))]
407#[serde(rename_all = "camelCase")]
408#[doc = "CSS style representation."]
409pub struct CssStyle {
410    #[builder(default)]
411    #[serde(skip_serializing_if = "Option::is_none")]
412    #[doc = "The css style sheet identifier (absent for user agent stylesheet and user-specified\n stylesheet rules) this rule came from."]
413    pub style_sheet_id: Option<dom::StyleSheetId>,
414    #[doc = "CSS properties in the style."]
415    pub css_properties: Vec<CssProperty>,
416    #[doc = "Computed values for all shorthands found in the style."]
417    pub shorthand_entries: Vec<ShorthandEntry>,
418    #[builder(default)]
419    #[serde(skip_serializing_if = "Option::is_none")]
420    #[serde(default)]
421    #[doc = "Style declaration text (if available)."]
422    pub css_text: Option<String>,
423    #[builder(default)]
424    #[serde(skip_serializing_if = "Option::is_none")]
425    #[doc = "Style declaration range in the enclosing stylesheet (if available)."]
426    pub range: Option<SourceRange>,
427}
428#[allow(deprecated)]
429#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
430#[builder(setter(into, strip_option))]
431#[serde(rename_all = "camelCase")]
432#[doc = "CSS property declaration data."]
433pub struct CssProperty {
434    #[serde(default)]
435    #[doc = "The property name."]
436    pub name: String,
437    #[serde(default)]
438    #[doc = "The property value."]
439    pub value: String,
440    #[builder(default)]
441    #[serde(skip_serializing_if = "Option::is_none")]
442    #[serde(default)]
443    #[doc = "Whether the property has \"!important\" annotation (implies `false` if absent)."]
444    pub important: Option<bool>,
445    #[builder(default)]
446    #[serde(skip_serializing_if = "Option::is_none")]
447    #[serde(default)]
448    #[doc = "Whether the property is implicit (implies `false` if absent)."]
449    pub implicit: Option<bool>,
450    #[builder(default)]
451    #[serde(skip_serializing_if = "Option::is_none")]
452    #[serde(default)]
453    #[doc = "The full property text as specified in the style."]
454    pub text: Option<String>,
455    #[builder(default)]
456    #[serde(skip_serializing_if = "Option::is_none")]
457    #[serde(default)]
458    #[doc = "Whether the property is understood by the browser (implies `true` if absent)."]
459    pub parsed_ok: Option<bool>,
460    #[builder(default)]
461    #[serde(skip_serializing_if = "Option::is_none")]
462    #[serde(default)]
463    #[doc = "Whether the property is disabled by the user (present for source-based properties only)."]
464    pub disabled: Option<bool>,
465    #[builder(default)]
466    #[serde(skip_serializing_if = "Option::is_none")]
467    #[doc = "The entire property range in the enclosing style declaration (if available)."]
468    pub range: Option<SourceRange>,
469    #[builder(default)]
470    #[serde(skip_serializing_if = "Option::is_none")]
471    #[doc = "Parsed longhand components of this property if it is a shorthand.\n This field will be empty if the given property is not a shorthand."]
472    pub longhand_properties: Option<Vec<CssProperty>>,
473}
474#[allow(deprecated)]
475#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
476#[builder(setter(into, strip_option))]
477#[serde(rename_all = "camelCase")]
478#[doc = "CSS media rule descriptor."]
479pub struct CssMedia {
480    #[serde(default)]
481    #[doc = "Media query text."]
482    pub text: String,
483    #[doc = "Source of the media query: \"mediaRule\" if specified by a @media rule, \"importRule\" if\n specified by an @import rule, \"linkedSheet\" if specified by a \"media\" attribute in a linked\n stylesheet's LINK tag, \"inlineSheet\" if specified by a \"media\" attribute in an inline\n stylesheet's STYLE tag."]
484    pub source: CssMediaSource,
485    #[builder(default)]
486    #[serde(skip_serializing_if = "Option::is_none")]
487    #[serde(default)]
488    #[doc = "URL of the document containing the media query description."]
489    #[serde(rename = "sourceURL")]
490    pub source_url: Option<String>,
491    #[builder(default)]
492    #[serde(skip_serializing_if = "Option::is_none")]
493    #[doc = "The associated rule (@media or @import) header range in the enclosing stylesheet (if\n available)."]
494    pub range: Option<SourceRange>,
495    #[builder(default)]
496    #[serde(skip_serializing_if = "Option::is_none")]
497    #[doc = "Identifier of the stylesheet containing this object (if exists)."]
498    pub style_sheet_id: Option<dom::StyleSheetId>,
499    #[builder(default)]
500    #[serde(skip_serializing_if = "Option::is_none")]
501    #[doc = "Array of media queries."]
502    pub media_list: Option<Vec<MediaQuery>>,
503}
504#[allow(deprecated)]
505#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
506#[builder(setter(into, strip_option))]
507#[serde(rename_all = "camelCase")]
508#[doc = "Media query descriptor."]
509pub struct MediaQuery {
510    #[doc = "Array of media query expressions."]
511    pub expressions: Vec<MediaQueryExpression>,
512    #[serde(default)]
513    #[doc = "Whether the media query condition is satisfied."]
514    pub active: bool,
515}
516#[allow(deprecated)]
517#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
518#[builder(setter(into, strip_option))]
519#[serde(rename_all = "camelCase")]
520#[doc = "Media query expression descriptor."]
521pub struct MediaQueryExpression {
522    #[serde(default)]
523    #[doc = "Media query expression value."]
524    pub value: JsFloat,
525    #[serde(default)]
526    #[doc = "Media query expression units."]
527    pub unit: String,
528    #[serde(default)]
529    #[doc = "Media query expression feature."]
530    pub feature: String,
531    #[builder(default)]
532    #[serde(skip_serializing_if = "Option::is_none")]
533    #[doc = "The associated range of the value text in the enclosing stylesheet (if available)."]
534    pub value_range: Option<SourceRange>,
535    #[builder(default)]
536    #[serde(skip_serializing_if = "Option::is_none")]
537    #[serde(default)]
538    #[doc = "Computed length of media query expression (if applicable)."]
539    pub computed_length: Option<JsFloat>,
540}
541#[allow(deprecated)]
542#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
543#[builder(setter(into, strip_option))]
544#[serde(rename_all = "camelCase")]
545#[doc = "CSS container query rule descriptor."]
546pub struct CssContainerQuery {
547    #[serde(default)]
548    #[doc = "Container query text."]
549    pub text: String,
550    #[builder(default)]
551    #[serde(skip_serializing_if = "Option::is_none")]
552    #[doc = "The associated rule header range in the enclosing stylesheet (if\n available)."]
553    pub range: Option<SourceRange>,
554    #[builder(default)]
555    #[serde(skip_serializing_if = "Option::is_none")]
556    #[doc = "Identifier of the stylesheet containing this object (if exists)."]
557    pub style_sheet_id: Option<dom::StyleSheetId>,
558    #[builder(default)]
559    #[serde(skip_serializing_if = "Option::is_none")]
560    #[serde(default)]
561    #[doc = "Optional name for the container."]
562    pub name: Option<String>,
563    #[builder(default)]
564    #[serde(skip_serializing_if = "Option::is_none")]
565    #[doc = "Optional physical axes queried for the container."]
566    pub physical_axes: Option<dom::PhysicalAxes>,
567    #[builder(default)]
568    #[serde(skip_serializing_if = "Option::is_none")]
569    #[doc = "Optional logical axes queried for the container."]
570    pub logical_axes: Option<dom::LogicalAxes>,
571    #[builder(default)]
572    #[serde(skip_serializing_if = "Option::is_none")]
573    #[serde(default)]
574    #[doc = "true if the query contains scroll-state() queries."]
575    pub queries_scroll_state: Option<bool>,
576    #[builder(default)]
577    #[serde(skip_serializing_if = "Option::is_none")]
578    #[serde(default)]
579    #[doc = "true if the query contains anchored() queries."]
580    pub queries_anchored: Option<bool>,
581}
582#[allow(deprecated)]
583#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
584#[builder(setter(into, strip_option))]
585#[serde(rename_all = "camelCase")]
586#[doc = "CSS Supports at-rule descriptor."]
587pub struct CssSupports {
588    #[serde(default)]
589    #[doc = "Supports rule text."]
590    pub text: String,
591    #[serde(default)]
592    #[doc = "Whether the supports condition is satisfied."]
593    pub active: bool,
594    #[builder(default)]
595    #[serde(skip_serializing_if = "Option::is_none")]
596    #[doc = "The associated rule header range in the enclosing stylesheet (if\n available)."]
597    pub range: Option<SourceRange>,
598    #[builder(default)]
599    #[serde(skip_serializing_if = "Option::is_none")]
600    #[doc = "Identifier of the stylesheet containing this object (if exists)."]
601    pub style_sheet_id: Option<dom::StyleSheetId>,
602}
603#[allow(deprecated)]
604#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
605#[builder(setter(into, strip_option))]
606#[serde(rename_all = "camelCase")]
607#[doc = "CSS Scope at-rule descriptor."]
608pub struct CssScope {
609    #[serde(default)]
610    #[doc = "Scope rule text."]
611    pub text: String,
612    #[builder(default)]
613    #[serde(skip_serializing_if = "Option::is_none")]
614    #[doc = "The associated rule header range in the enclosing stylesheet (if\n available)."]
615    pub range: Option<SourceRange>,
616    #[builder(default)]
617    #[serde(skip_serializing_if = "Option::is_none")]
618    #[doc = "Identifier of the stylesheet containing this object (if exists)."]
619    pub style_sheet_id: Option<dom::StyleSheetId>,
620}
621#[allow(deprecated)]
622#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
623#[builder(setter(into, strip_option))]
624#[serde(rename_all = "camelCase")]
625#[doc = "CSS Layer at-rule descriptor."]
626pub struct CssLayer {
627    #[serde(default)]
628    #[doc = "Layer name."]
629    pub text: String,
630    #[builder(default)]
631    #[serde(skip_serializing_if = "Option::is_none")]
632    #[doc = "The associated rule header range in the enclosing stylesheet (if\n available)."]
633    pub range: Option<SourceRange>,
634    #[builder(default)]
635    #[serde(skip_serializing_if = "Option::is_none")]
636    #[doc = "Identifier of the stylesheet containing this object (if exists)."]
637    pub style_sheet_id: Option<dom::StyleSheetId>,
638}
639#[allow(deprecated)]
640#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
641#[builder(setter(into, strip_option))]
642#[serde(rename_all = "camelCase")]
643#[doc = "CSS Starting Style at-rule descriptor."]
644pub struct CssStartingStyle {
645    #[builder(default)]
646    #[serde(skip_serializing_if = "Option::is_none")]
647    #[doc = "The associated rule header range in the enclosing stylesheet (if\n available)."]
648    pub range: Option<SourceRange>,
649    #[builder(default)]
650    #[serde(skip_serializing_if = "Option::is_none")]
651    #[doc = "Identifier of the stylesheet containing this object (if exists)."]
652    pub style_sheet_id: Option<dom::StyleSheetId>,
653}
654#[allow(deprecated)]
655#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
656#[builder(setter(into, strip_option))]
657#[serde(rename_all = "camelCase")]
658#[doc = "CSS Layer data."]
659pub struct CssLayerData {
660    #[serde(default)]
661    #[doc = "Layer name."]
662    pub name: String,
663    #[builder(default)]
664    #[serde(skip_serializing_if = "Option::is_none")]
665    #[doc = "Direct sub-layers"]
666    pub sub_layers: Option<Vec<CssLayerData>>,
667    #[serde(default)]
668    #[doc = "Layer order. The order determines the order of the layer in the cascade order.\n A higher number has higher priority in the cascade order."]
669    pub order: JsFloat,
670}
671#[allow(deprecated)]
672#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
673#[builder(setter(into, strip_option))]
674#[serde(rename_all = "camelCase")]
675#[doc = "Information about amount of glyphs that were rendered with given font."]
676pub struct PlatformFontUsage {
677    #[serde(default)]
678    #[doc = "Font's family name reported by platform."]
679    pub family_name: String,
680    #[serde(default)]
681    #[doc = "Font's PostScript name reported by platform."]
682    pub post_script_name: String,
683    #[serde(default)]
684    #[doc = "Indicates if the font was downloaded or resolved locally."]
685    pub is_custom_font: bool,
686    #[serde(default)]
687    #[doc = "Amount of glyphs that were rendered with this font."]
688    pub glyph_count: JsFloat,
689}
690#[allow(deprecated)]
691#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
692#[builder(setter(into, strip_option))]
693#[serde(rename_all = "camelCase")]
694#[doc = "Information about font variation axes for variable fonts"]
695pub struct FontVariationAxis {
696    #[serde(default)]
697    #[doc = "The font-variation-setting tag (a.k.a. \"axis tag\")."]
698    pub tag: String,
699    #[serde(default)]
700    #[doc = "Human-readable variation name in the default language (normally, \"en\")."]
701    pub name: String,
702    #[serde(default)]
703    #[doc = "The minimum value (inclusive) the font supports for this tag."]
704    pub min_value: JsFloat,
705    #[serde(default)]
706    #[doc = "The maximum value (inclusive) the font supports for this tag."]
707    pub max_value: JsFloat,
708    #[serde(default)]
709    #[doc = "The default value."]
710    pub default_value: JsFloat,
711}
712#[allow(deprecated)]
713#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
714#[builder(setter(into, strip_option))]
715#[serde(rename_all = "camelCase")]
716#[doc = "Properties of a web font: <https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions>\n and additional information such as platformFontFamily and fontVariationAxes."]
717pub struct FontFace {
718    #[serde(default)]
719    #[doc = "The font-family."]
720    pub font_family: String,
721    #[serde(default)]
722    #[doc = "The font-style."]
723    pub font_style: String,
724    #[serde(default)]
725    #[doc = "The font-variant."]
726    pub font_variant: String,
727    #[serde(default)]
728    #[doc = "The font-weight."]
729    pub font_weight: String,
730    #[serde(default)]
731    #[doc = "The font-stretch."]
732    pub font_stretch: String,
733    #[serde(default)]
734    #[doc = "The font-display."]
735    pub font_display: String,
736    #[serde(default)]
737    #[doc = "The unicode-range."]
738    pub unicode_range: String,
739    #[serde(default)]
740    #[doc = "The src."]
741    pub src: String,
742    #[serde(default)]
743    #[doc = "The resolved platform font family"]
744    pub platform_font_family: String,
745    #[builder(default)]
746    #[serde(skip_serializing_if = "Option::is_none")]
747    #[doc = "Available variation settings (a.k.a. \"axes\")."]
748    pub font_variation_axes: Option<Vec<FontVariationAxis>>,
749}
750#[allow(deprecated)]
751#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
752#[builder(setter(into, strip_option))]
753#[serde(rename_all = "camelCase")]
754#[doc = "CSS try rule representation."]
755pub struct CssTryRule {
756    #[builder(default)]
757    #[serde(skip_serializing_if = "Option::is_none")]
758    #[doc = "The css style sheet identifier (absent for user agent stylesheet and user-specified\n stylesheet rules) this rule came from."]
759    pub style_sheet_id: Option<dom::StyleSheetId>,
760    #[doc = "Parent stylesheet's origin."]
761    pub origin: StyleSheetOrigin,
762    #[doc = "Associated style declaration."]
763    pub style: CssStyle,
764}
765#[allow(deprecated)]
766#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
767#[builder(setter(into, strip_option))]
768#[serde(rename_all = "camelCase")]
769#[doc = "CSS @position-try rule representation."]
770pub struct CssPositionTryRule {
771    #[doc = "The prelude dashed-ident name"]
772    pub name: Value,
773    #[builder(default)]
774    #[serde(skip_serializing_if = "Option::is_none")]
775    #[doc = "The css style sheet identifier (absent for user agent stylesheet and user-specified\n stylesheet rules) this rule came from."]
776    pub style_sheet_id: Option<dom::StyleSheetId>,
777    #[doc = "Parent stylesheet's origin."]
778    pub origin: StyleSheetOrigin,
779    #[doc = "Associated style declaration."]
780    pub style: CssStyle,
781    #[serde(default)]
782    pub active: bool,
783}
784#[allow(deprecated)]
785#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
786#[builder(setter(into, strip_option))]
787#[serde(rename_all = "camelCase")]
788#[doc = "CSS keyframes rule representation."]
789pub struct CssKeyframesRule {
790    #[doc = "Animation name."]
791    pub animation_name: Value,
792    #[doc = "List of keyframes."]
793    pub keyframes: Vec<CssKeyframeRule>,
794}
795#[allow(deprecated)]
796#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
797#[builder(setter(into, strip_option))]
798#[serde(rename_all = "camelCase")]
799#[doc = "Representation of a custom property registration through CSS.registerProperty"]
800pub struct CssPropertyRegistration {
801    #[serde(default)]
802    pub property_name: String,
803    #[builder(default)]
804    #[serde(skip_serializing_if = "Option::is_none")]
805    pub initial_value: Option<Value>,
806    #[serde(default)]
807    pub inherits: bool,
808    #[serde(default)]
809    pub syntax: String,
810}
811#[allow(deprecated)]
812#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
813#[builder(setter(into, strip_option))]
814#[serde(rename_all = "camelCase")]
815#[doc = "CSS generic @rule representation."]
816pub struct CssAtRule {
817    #[doc = "Type of at-rule."]
818    pub r#type: CssAtRuleType,
819    #[builder(default)]
820    #[serde(skip_serializing_if = "Option::is_none")]
821    #[doc = "Subsection of font-feature-values, if this is a subsection."]
822    pub subsection: Option<CssAtRuleSubsection>,
823    #[builder(default)]
824    #[serde(skip_serializing_if = "Option::is_none")]
825    #[doc = "LINT.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType)\n Associated name, if applicable."]
826    pub name: Option<Value>,
827    #[builder(default)]
828    #[serde(skip_serializing_if = "Option::is_none")]
829    #[doc = "The css style sheet identifier (absent for user agent stylesheet and user-specified\n stylesheet rules) this rule came from."]
830    pub style_sheet_id: Option<dom::StyleSheetId>,
831    #[doc = "Parent stylesheet's origin."]
832    pub origin: StyleSheetOrigin,
833    #[doc = "Associated style declaration."]
834    pub style: CssStyle,
835}
836#[allow(deprecated)]
837#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
838#[builder(setter(into, strip_option))]
839#[serde(rename_all = "camelCase")]
840#[doc = "CSS property at-rule representation."]
841pub struct CssPropertyRule {
842    #[builder(default)]
843    #[serde(skip_serializing_if = "Option::is_none")]
844    #[doc = "The css style sheet identifier (absent for user agent stylesheet and user-specified\n stylesheet rules) this rule came from."]
845    pub style_sheet_id: Option<dom::StyleSheetId>,
846    #[doc = "Parent stylesheet's origin."]
847    pub origin: StyleSheetOrigin,
848    #[doc = "Associated property name."]
849    pub property_name: Value,
850    #[doc = "Associated style declaration."]
851    pub style: CssStyle,
852}
853#[allow(deprecated)]
854#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
855#[builder(setter(into, strip_option))]
856#[serde(rename_all = "camelCase")]
857#[doc = "CSS function argument representation."]
858pub struct CssFunctionParameter {
859    #[serde(default)]
860    #[doc = "The parameter name."]
861    pub name: String,
862    #[serde(default)]
863    #[doc = "The parameter type."]
864    pub r#type: String,
865}
866#[allow(deprecated)]
867#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
868#[builder(setter(into, strip_option))]
869#[serde(rename_all = "camelCase")]
870#[doc = "CSS function conditional block representation."]
871pub struct CssFunctionConditionNode {
872    #[builder(default)]
873    #[serde(skip_serializing_if = "Option::is_none")]
874    #[doc = "Media query for this conditional block. Only one type of condition should be set."]
875    pub media: Option<CssMedia>,
876    #[builder(default)]
877    #[serde(skip_serializing_if = "Option::is_none")]
878    #[doc = "Container query for this conditional block. Only one type of condition should be set."]
879    pub container_queries: Option<CssContainerQuery>,
880    #[builder(default)]
881    #[serde(skip_serializing_if = "Option::is_none")]
882    #[doc = "@supports CSS at-rule condition. Only one type of condition should be set."]
883    pub supports: Option<CssSupports>,
884    #[doc = "Block body."]
885    pub children: Vec<CssFunctionNode>,
886    #[serde(default)]
887    #[doc = "The condition text."]
888    pub condition_text: String,
889}
890#[allow(deprecated)]
891#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
892#[builder(setter(into, strip_option))]
893#[serde(rename_all = "camelCase")]
894#[doc = "Section of the body of a CSS function rule."]
895pub struct CssFunctionNode {
896    #[builder(default)]
897    #[serde(skip_serializing_if = "Option::is_none")]
898    #[doc = "A conditional block. If set, style should not be set."]
899    pub condition: Option<CssFunctionConditionNode>,
900    #[builder(default)]
901    #[serde(skip_serializing_if = "Option::is_none")]
902    #[doc = "Values set by this node. If set, condition should not be set."]
903    pub style: Option<CssStyle>,
904}
905#[allow(deprecated)]
906#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
907#[builder(setter(into, strip_option))]
908#[serde(rename_all = "camelCase")]
909#[doc = "CSS function at-rule representation."]
910pub struct CssFunctionRule {
911    #[doc = "Name of the function."]
912    pub name: Value,
913    #[builder(default)]
914    #[serde(skip_serializing_if = "Option::is_none")]
915    #[doc = "The css style sheet identifier (absent for user agent stylesheet and user-specified\n stylesheet rules) this rule came from."]
916    pub style_sheet_id: Option<dom::StyleSheetId>,
917    #[doc = "Parent stylesheet's origin."]
918    pub origin: StyleSheetOrigin,
919    #[doc = "List of parameters."]
920    pub parameters: Vec<CssFunctionParameter>,
921    #[doc = "Function body."]
922    pub children: Vec<CssFunctionNode>,
923}
924#[allow(deprecated)]
925#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
926#[builder(setter(into, strip_option))]
927#[serde(rename_all = "camelCase")]
928#[doc = "CSS keyframe rule representation."]
929pub struct CssKeyframeRule {
930    #[builder(default)]
931    #[serde(skip_serializing_if = "Option::is_none")]
932    #[doc = "The css style sheet identifier (absent for user agent stylesheet and user-specified\n stylesheet rules) this rule came from."]
933    pub style_sheet_id: Option<dom::StyleSheetId>,
934    #[doc = "Parent stylesheet's origin."]
935    pub origin: StyleSheetOrigin,
936    #[doc = "Associated key text."]
937    pub key_text: Value,
938    #[doc = "Associated style declaration."]
939    pub style: CssStyle,
940}
941#[allow(deprecated)]
942#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
943#[builder(setter(into, strip_option))]
944#[serde(rename_all = "camelCase")]
945#[doc = "A descriptor of operation to mutate style declaration text."]
946pub struct StyleDeclarationEdit {
947    #[doc = "The css style sheet identifier."]
948    pub style_sheet_id: dom::StyleSheetId,
949    #[doc = "The range of the style text in the enclosing stylesheet."]
950    pub range: SourceRange,
951    #[serde(default)]
952    #[doc = "New style text."]
953    pub text: String,
954}
955#[allow(deprecated)]
956#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
957#[builder(setter(into, strip_option))]
958#[serde(rename_all = "camelCase")]
959#[doc = "Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the\n position specified by `location`."]
960pub struct AddRule {
961    #[doc = "The css style sheet identifier where a new rule should be inserted."]
962    pub style_sheet_id: dom::StyleSheetId,
963    #[serde(default)]
964    #[doc = "The text of a new rule."]
965    pub rule_text: String,
966    #[doc = "Text position of a new rule in the target style sheet."]
967    pub location: SourceRange,
968    #[builder(default)]
969    #[serde(skip_serializing_if = "Option::is_none")]
970    #[doc = "NodeId for the DOM node in whose context custom property declarations for registered properties should be\n validated. If omitted, declarations in the new rule text can only be validated statically, which may produce\n incorrect results if the declaration contains a var() for example."]
971    pub node_for_property_syntax_validation: Option<dom::NodeId>,
972}
973#[allow(deprecated)]
974#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
975#[builder(setter(into, strip_option))]
976#[serde(rename_all = "camelCase")]
977#[doc = "Returns all class names from specified stylesheet."]
978pub struct CollectClassNames {
979    pub style_sheet_id: dom::StyleSheetId,
980}
981#[allow(deprecated)]
982#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
983#[builder(setter(into, strip_option))]
984#[serde(rename_all = "camelCase")]
985#[doc = "Creates a new special \"via-inspector\" stylesheet in the frame with given `frameId`."]
986pub struct CreateStyleSheet {
987    #[doc = "Identifier of the frame where \"via-inspector\" stylesheet should be created."]
988    pub frame_id: page::FrameId,
989    #[builder(default)]
990    #[serde(skip_serializing_if = "Option::is_none")]
991    #[serde(default)]
992    #[doc = "If true, creates a new stylesheet for every call. If false,\n returns a stylesheet previously created by a call with force=false\n for the frame's document if it exists or creates a new stylesheet\n (default: false)."]
993    pub force: Option<bool>,
994}
995#[allow(deprecated)]
996#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
997pub struct Disable(pub Option<Json>);
998#[allow(deprecated)]
999#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1000pub struct Enable(pub Option<Json>);
1001#[allow(deprecated)]
1002#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1003#[builder(setter(into, strip_option))]
1004#[serde(rename_all = "camelCase")]
1005#[doc = "Ensures that the given node will have specified pseudo-classes whenever its style is computed by\n the browser."]
1006pub struct ForcePseudoState {
1007    #[doc = "The element id for which to force the pseudo state."]
1008    pub node_id: dom::NodeId,
1009    #[serde(default)]
1010    #[doc = "Element pseudo classes to force when computing the element's style."]
1011    pub forced_pseudo_classes: Vec<String>,
1012}
1013#[allow(deprecated)]
1014#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1015#[builder(setter(into, strip_option))]
1016#[serde(rename_all = "camelCase")]
1017#[doc = "Ensures that the given node is in its starting-style state."]
1018pub struct ForceStartingStyle {
1019    #[doc = "The element id for which to force the starting-style state."]
1020    pub node_id: dom::NodeId,
1021    #[serde(default)]
1022    #[doc = "Boolean indicating if this is on or off."]
1023    pub forced: bool,
1024}
1025#[allow(deprecated)]
1026#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1027#[builder(setter(into, strip_option))]
1028#[serde(rename_all = "camelCase")]
1029pub struct GetBackgroundColors {
1030    #[doc = "Id of the node to get background colors for."]
1031    pub node_id: dom::NodeId,
1032}
1033#[allow(deprecated)]
1034#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1035#[builder(setter(into, strip_option))]
1036#[serde(rename_all = "camelCase")]
1037#[doc = "Returns the computed style for a DOM node identified by `nodeId`."]
1038pub struct GetComputedStyleForNode {
1039    pub node_id: dom::NodeId,
1040}
1041#[allow(deprecated)]
1042#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1043#[builder(setter(into, strip_option))]
1044#[serde(rename_all = "camelCase")]
1045#[doc = "Resolve the specified values in the context of the provided element.\n For example, a value of '1em' is evaluated according to the computed\n 'font-size' of the element and a value 'calc(1px + 2px)' will be\n resolved to '3px'.\n If the `propertyName` was specified the `values` are resolved as if\n they were property's declaration. If a value cannot be parsed according\n to the provided property syntax, the value is parsed using combined\n syntax as if null `propertyName` was provided. If the value cannot be\n resolved even then, return the provided value without any changes.\n Note: this function currently does not resolve CSS random() function,\n it returns unmodified random() function parts.`"]
1046pub struct ResolveValues {
1047    #[serde(default)]
1048    #[doc = "Cascade-dependent keywords (revert/revert-layer) do not work."]
1049    pub values: Vec<String>,
1050    #[doc = "Id of the node in whose context the expression is evaluated"]
1051    pub node_id: dom::NodeId,
1052    #[builder(default)]
1053    #[serde(skip_serializing_if = "Option::is_none")]
1054    #[serde(default)]
1055    #[doc = "Only longhands and custom property names are accepted."]
1056    pub property_name: Option<String>,
1057    #[builder(default)]
1058    #[serde(skip_serializing_if = "Option::is_none")]
1059    #[doc = "Pseudo element type, only works for pseudo elements that generate\n elements in the tree, such as ::before and ::after."]
1060    pub pseudo_type: Option<dom::PseudoType>,
1061    #[builder(default)]
1062    #[serde(skip_serializing_if = "Option::is_none")]
1063    #[serde(default)]
1064    #[doc = "Pseudo element custom ident."]
1065    pub pseudo_identifier: Option<String>,
1066}
1067#[allow(deprecated)]
1068#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1069#[builder(setter(into, strip_option))]
1070#[serde(rename_all = "camelCase")]
1071pub struct GetLonghandProperties {
1072    #[serde(default)]
1073    pub shorthand_name: String,
1074    #[serde(default)]
1075    pub value: String,
1076}
1077#[allow(deprecated)]
1078#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1079#[builder(setter(into, strip_option))]
1080#[serde(rename_all = "camelCase")]
1081#[doc = "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM\n attributes) for a DOM node identified by `nodeId`."]
1082pub struct GetInlineStylesForNode {
1083    pub node_id: dom::NodeId,
1084}
1085#[allow(deprecated)]
1086#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1087#[builder(setter(into, strip_option))]
1088#[serde(rename_all = "camelCase")]
1089#[doc = "Returns the styles coming from animations & transitions\n including the animation & transition styles coming from inheritance chain."]
1090pub struct GetAnimatedStylesForNode {
1091    pub node_id: dom::NodeId,
1092}
1093#[allow(deprecated)]
1094#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1095#[builder(setter(into, strip_option))]
1096#[serde(rename_all = "camelCase")]
1097#[doc = "Returns requested styles for a DOM node identified by `nodeId`."]
1098pub struct GetMatchedStylesForNode {
1099    pub node_id: dom::NodeId,
1100}
1101#[allow(deprecated)]
1102#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1103pub struct GetEnvironmentVariables(pub Option<Json>);
1104#[allow(deprecated)]
1105#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1106pub struct GetMediaQueries(pub Option<Json>);
1107#[allow(deprecated)]
1108#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1109#[builder(setter(into, strip_option))]
1110#[serde(rename_all = "camelCase")]
1111#[doc = "Requests information about platform fonts which we used to render child TextNodes in the given\n node."]
1112pub struct GetPlatformFontsForNode {
1113    pub node_id: dom::NodeId,
1114}
1115#[allow(deprecated)]
1116#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1117#[builder(setter(into, strip_option))]
1118#[serde(rename_all = "camelCase")]
1119#[doc = "Returns the current textual content for a stylesheet."]
1120pub struct GetStyleSheetText {
1121    pub style_sheet_id: dom::StyleSheetId,
1122}
1123#[allow(deprecated)]
1124#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1125#[builder(setter(into, strip_option))]
1126#[serde(rename_all = "camelCase")]
1127#[doc = "Returns all layers parsed by the rendering engine for the tree scope of a node.\n Given a DOM element identified by nodeId, getLayersForNode returns the root\n layer for the nearest ancestor document or shadow root. The layer root contains\n the full layer tree for the tree scope and their ordering."]
1128pub struct GetLayersForNode {
1129    pub node_id: dom::NodeId,
1130}
1131#[allow(deprecated)]
1132#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1133#[builder(setter(into, strip_option))]
1134#[serde(rename_all = "camelCase")]
1135#[doc = "Given a CSS selector text and a style sheet ID, getLocationForSelector\n returns an array of locations of the CSS selector in the style sheet."]
1136pub struct GetLocationForSelector {
1137    pub style_sheet_id: dom::StyleSheetId,
1138    #[serde(default)]
1139    pub selector_text: String,
1140}
1141#[allow(deprecated)]
1142#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1143#[builder(setter(into, strip_option))]
1144#[serde(rename_all = "camelCase")]
1145#[doc = "Starts tracking the given node for the computed style updates\n and whenever the computed style is updated for node, it queues\n a `computedStyleUpdated` event with throttling.\n There can only be 1 node tracked for computed style updates\n so passing a new node id removes tracking from the previous node.\n Pass `undefined` to disable tracking."]
1146pub struct TrackComputedStyleUpdatesForNode {
1147    #[builder(default)]
1148    #[serde(skip_serializing_if = "Option::is_none")]
1149    pub node_id: Option<dom::NodeId>,
1150}
1151#[allow(deprecated)]
1152#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1153#[builder(setter(into, strip_option))]
1154#[serde(rename_all = "camelCase")]
1155#[doc = "Starts tracking the given computed styles for updates. The specified array of properties\n replaces the one previously specified. Pass empty array to disable tracking.\n Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.\n The changes to computed style properties are only tracked for nodes pushed to the front-end\n by the DOM agent. If no changes to the tracked properties occur after the node has been pushed\n to the front-end, no updates will be issued for the node."]
1156pub struct TrackComputedStyleUpdates {
1157    pub properties_to_track: Vec<CssComputedStyleProperty>,
1158}
1159#[allow(deprecated)]
1160#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1161pub struct TakeComputedStyleUpdates(pub Option<Json>);
1162#[allow(deprecated)]
1163#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1164#[builder(setter(into, strip_option))]
1165#[serde(rename_all = "camelCase")]
1166#[doc = "Find a rule with the given active property for the given node and set the new value for this\n property"]
1167pub struct SetEffectivePropertyValueForNode {
1168    #[doc = "The element id for which to set property."]
1169    pub node_id: dom::NodeId,
1170    #[serde(default)]
1171    pub property_name: String,
1172    #[serde(default)]
1173    pub value: String,
1174}
1175#[allow(deprecated)]
1176#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1177#[builder(setter(into, strip_option))]
1178#[serde(rename_all = "camelCase")]
1179#[doc = "Modifies the property rule property name."]
1180pub struct SetPropertyRulePropertyName {
1181    pub style_sheet_id: dom::StyleSheetId,
1182    pub range: SourceRange,
1183    #[serde(default)]
1184    pub property_name: String,
1185}
1186#[allow(deprecated)]
1187#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1188#[builder(setter(into, strip_option))]
1189#[serde(rename_all = "camelCase")]
1190#[doc = "Modifies the keyframe rule key text."]
1191pub struct SetKeyframeKey {
1192    pub style_sheet_id: dom::StyleSheetId,
1193    pub range: SourceRange,
1194    #[serde(default)]
1195    pub key_text: String,
1196}
1197#[allow(deprecated)]
1198#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1199#[builder(setter(into, strip_option))]
1200#[serde(rename_all = "camelCase")]
1201#[doc = "Modifies the rule selector."]
1202pub struct SetMediaText {
1203    pub style_sheet_id: dom::StyleSheetId,
1204    pub range: SourceRange,
1205    #[serde(default)]
1206    pub text: String,
1207}
1208#[allow(deprecated)]
1209#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1210#[builder(setter(into, strip_option))]
1211#[serde(rename_all = "camelCase")]
1212#[doc = "Modifies the expression of a container query."]
1213pub struct SetContainerQueryText {
1214    pub style_sheet_id: dom::StyleSheetId,
1215    pub range: SourceRange,
1216    #[serde(default)]
1217    pub text: String,
1218}
1219#[allow(deprecated)]
1220#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1221#[builder(setter(into, strip_option))]
1222#[serde(rename_all = "camelCase")]
1223#[doc = "Modifies the expression of a supports at-rule."]
1224pub struct SetSupportsText {
1225    pub style_sheet_id: dom::StyleSheetId,
1226    pub range: SourceRange,
1227    #[serde(default)]
1228    pub text: String,
1229}
1230#[allow(deprecated)]
1231#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1232#[builder(setter(into, strip_option))]
1233#[serde(rename_all = "camelCase")]
1234#[doc = "Modifies the expression of a scope at-rule."]
1235pub struct SetScopeText {
1236    pub style_sheet_id: dom::StyleSheetId,
1237    pub range: SourceRange,
1238    #[serde(default)]
1239    pub text: String,
1240}
1241#[allow(deprecated)]
1242#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1243#[builder(setter(into, strip_option))]
1244#[serde(rename_all = "camelCase")]
1245#[doc = "Modifies the rule selector."]
1246pub struct SetRuleSelector {
1247    pub style_sheet_id: dom::StyleSheetId,
1248    pub range: SourceRange,
1249    #[serde(default)]
1250    pub selector: String,
1251}
1252#[allow(deprecated)]
1253#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1254#[builder(setter(into, strip_option))]
1255#[serde(rename_all = "camelCase")]
1256#[doc = "Sets the new stylesheet text."]
1257pub struct SetStyleSheetText {
1258    pub style_sheet_id: dom::StyleSheetId,
1259    #[serde(default)]
1260    pub text: String,
1261}
1262#[allow(deprecated)]
1263#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1264#[builder(setter(into, strip_option))]
1265#[serde(rename_all = "camelCase")]
1266#[doc = "Applies specified style edits one after another in the given order."]
1267pub struct SetStyleTexts {
1268    pub edits: Vec<StyleDeclarationEdit>,
1269    #[builder(default)]
1270    #[serde(skip_serializing_if = "Option::is_none")]
1271    #[doc = "NodeId for the DOM node in whose context custom property declarations for registered properties should be\n validated. If omitted, declarations in the new rule text can only be validated statically, which may produce\n incorrect results if the declaration contains a var() for example."]
1272    pub node_for_property_syntax_validation: Option<dom::NodeId>,
1273}
1274#[allow(deprecated)]
1275#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1276pub struct StartRuleUsageTracking(pub Option<Json>);
1277#[allow(deprecated)]
1278#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1279pub struct StopRuleUsageTracking(pub Option<Json>);
1280#[allow(deprecated)]
1281#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1282pub struct TakeCoverageDelta(pub Option<Json>);
1283#[allow(deprecated)]
1284#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1285#[builder(setter(into, strip_option))]
1286#[serde(rename_all = "camelCase")]
1287#[doc = "Enables/disables rendering of local CSS fonts (enabled by default)."]
1288pub struct SetLocalFontsEnabled {
1289    #[serde(default)]
1290    #[doc = "Whether rendering of local fonts is enabled."]
1291    pub enabled: bool,
1292}
1293#[allow(deprecated)]
1294#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1295#[serde(rename_all = "camelCase")]
1296#[doc = "Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the\n position specified by `location`."]
1297pub struct AddRuleReturnObject {
1298    #[doc = "The newly created rule."]
1299    pub rule: CssRule,
1300}
1301#[allow(deprecated)]
1302#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1303#[serde(rename_all = "camelCase")]
1304#[doc = "Returns all class names from specified stylesheet."]
1305pub struct CollectClassNamesReturnObject {
1306    #[doc = "Class name list."]
1307    pub class_names: Vec<String>,
1308}
1309#[allow(deprecated)]
1310#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1311#[serde(rename_all = "camelCase")]
1312#[doc = "Creates a new special \"via-inspector\" stylesheet in the frame with given `frameId`."]
1313pub struct CreateStyleSheetReturnObject {
1314    #[doc = "Identifier of the created \"via-inspector\" stylesheet."]
1315    pub style_sheet_id: dom::StyleSheetId,
1316}
1317#[allow(deprecated)]
1318#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1319#[doc = "Disables the CSS agent for the given page."]
1320pub struct DisableReturnObject(pub Option<Json>);
1321#[allow(deprecated)]
1322#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1323#[doc = "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been\n enabled until the result of this command is received."]
1324pub struct EnableReturnObject(pub Option<Json>);
1325#[allow(deprecated)]
1326#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1327#[doc = "Ensures that the given node will have specified pseudo-classes whenever its style is computed by\n the browser."]
1328pub struct ForcePseudoStateReturnObject(pub Option<Json>);
1329#[allow(deprecated)]
1330#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1331#[doc = "Ensures that the given node is in its starting-style state."]
1332pub struct ForceStartingStyleReturnObject(pub Option<Json>);
1333#[allow(deprecated)]
1334#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1335#[serde(rename_all = "camelCase")]
1336pub struct GetBackgroundColorsReturnObject {
1337    #[builder(default)]
1338    #[serde(skip_serializing_if = "Option::is_none")]
1339    #[doc = "The range of background colors behind this element, if it contains any visible text. If no\n visible text is present, this will be undefined. In the case of a flat background color,\n this will consist of simply that color. In the case of a gradient, this will consist of each\n of the color stops. For anything more complicated, this will be an empty array. Images will\n be ignored (as if the image had failed to load)."]
1340    pub background_colors: Option<Vec<String>>,
1341    #[builder(default)]
1342    #[serde(skip_serializing_if = "Option::is_none")]
1343    #[serde(default)]
1344    #[doc = "The computed font size for this node, as a CSS computed value string (e.g. '12px')."]
1345    pub computed_font_size: Option<String>,
1346    #[builder(default)]
1347    #[serde(skip_serializing_if = "Option::is_none")]
1348    #[serde(default)]
1349    #[doc = "The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or\n '100')."]
1350    pub computed_font_weight: Option<String>,
1351}
1352#[allow(deprecated)]
1353#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1354#[serde(rename_all = "camelCase")]
1355#[doc = "Returns the computed style for a DOM node identified by `nodeId`."]
1356pub struct GetComputedStyleForNodeReturnObject {
1357    #[doc = "Computed style for the specified DOM node."]
1358    pub computed_style: Vec<CssComputedStyleProperty>,
1359    #[doc = "A list of non-standard \"extra fields\" which blink stores alongside each\n computed style."]
1360    pub extra_fields: ComputedStyleExtraFields,
1361}
1362#[allow(deprecated)]
1363#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1364#[serde(rename_all = "camelCase")]
1365#[doc = "Resolve the specified values in the context of the provided element.\n For example, a value of '1em' is evaluated according to the computed\n 'font-size' of the element and a value 'calc(1px + 2px)' will be\n resolved to '3px'.\n If the `propertyName` was specified the `values` are resolved as if\n they were property's declaration. If a value cannot be parsed according\n to the provided property syntax, the value is parsed using combined\n syntax as if null `propertyName` was provided. If the value cannot be\n resolved even then, return the provided value without any changes.\n Note: this function currently does not resolve CSS random() function,\n it returns unmodified random() function parts.`"]
1366pub struct ResolveValuesReturnObject {
1367    pub results: Vec<String>,
1368}
1369#[allow(deprecated)]
1370#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1371#[serde(rename_all = "camelCase")]
1372pub struct GetLonghandPropertiesReturnObject {
1373    pub longhand_properties: Vec<CssProperty>,
1374}
1375#[allow(deprecated)]
1376#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1377#[serde(rename_all = "camelCase")]
1378#[doc = "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM\n attributes) for a DOM node identified by `nodeId`."]
1379pub struct GetInlineStylesForNodeReturnObject {
1380    #[builder(default)]
1381    #[serde(skip_serializing_if = "Option::is_none")]
1382    #[doc = "Inline style for the specified DOM node."]
1383    pub inline_style: Option<CssStyle>,
1384    #[builder(default)]
1385    #[serde(skip_serializing_if = "Option::is_none")]
1386    #[doc = "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."]
1387    pub attributes_style: Option<CssStyle>,
1388}
1389#[allow(deprecated)]
1390#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1391#[serde(rename_all = "camelCase")]
1392#[doc = "Returns the styles coming from animations & transitions\n including the animation & transition styles coming from inheritance chain."]
1393pub struct GetAnimatedStylesForNodeReturnObject {
1394    #[builder(default)]
1395    #[serde(skip_serializing_if = "Option::is_none")]
1396    #[doc = "Styles coming from animations."]
1397    pub animation_styles: Option<Vec<CssAnimationStyle>>,
1398    #[builder(default)]
1399    #[serde(skip_serializing_if = "Option::is_none")]
1400    #[doc = "Style coming from transitions."]
1401    pub transitions_style: Option<CssStyle>,
1402    #[builder(default)]
1403    #[serde(skip_serializing_if = "Option::is_none")]
1404    #[doc = "Inherited style entries for animationsStyle and transitionsStyle from\n the inheritance chain of the element."]
1405    pub inherited: Option<Vec<InheritedAnimatedStyleEntry>>,
1406}
1407#[allow(deprecated)]
1408#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1409#[serde(rename_all = "camelCase")]
1410#[doc = "Returns requested styles for a DOM node identified by `nodeId`."]
1411pub struct GetMatchedStylesForNodeReturnObject {
1412    #[builder(default)]
1413    #[serde(skip_serializing_if = "Option::is_none")]
1414    #[doc = "Inline style for the specified DOM node."]
1415    pub inline_style: Option<CssStyle>,
1416    #[builder(default)]
1417    #[serde(skip_serializing_if = "Option::is_none")]
1418    #[doc = "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."]
1419    pub attributes_style: Option<CssStyle>,
1420    #[builder(default)]
1421    #[serde(skip_serializing_if = "Option::is_none")]
1422    #[doc = "CSS rules matching this node, from all applicable stylesheets."]
1423    #[serde(rename = "matchedCSSRules")]
1424    pub matched_css_rules: Option<Vec<RuleMatch>>,
1425    #[builder(default)]
1426    #[serde(skip_serializing_if = "Option::is_none")]
1427    #[doc = "Pseudo style matches for this node."]
1428    pub pseudo_elements: Option<Vec<PseudoElementMatches>>,
1429    #[builder(default)]
1430    #[serde(skip_serializing_if = "Option::is_none")]
1431    #[doc = "A chain of inherited styles (from the immediate node parent up to the DOM tree root)."]
1432    pub inherited: Option<Vec<InheritedStyleEntry>>,
1433    #[builder(default)]
1434    #[serde(skip_serializing_if = "Option::is_none")]
1435    #[doc = "A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root)."]
1436    pub inherited_pseudo_elements: Option<Vec<InheritedPseudoElementMatches>>,
1437    #[builder(default)]
1438    #[serde(skip_serializing_if = "Option::is_none")]
1439    #[doc = "A list of CSS keyframed animations matching this node."]
1440    pub css_keyframes_rules: Option<Vec<CssKeyframesRule>>,
1441    #[builder(default)]
1442    #[serde(skip_serializing_if = "Option::is_none")]
1443    #[doc = "A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property."]
1444    pub css_position_try_rules: Option<Vec<CssPositionTryRule>>,
1445    #[builder(default)]
1446    #[serde(skip_serializing_if = "Option::is_none")]
1447    #[serde(default)]
1448    #[doc = "Index of the active fallback in the applied position-try-fallback property,\n will not be set if there is no active position-try fallback."]
1449    pub active_position_fallback_index: Option<JsUInt>,
1450    #[builder(default)]
1451    #[serde(skip_serializing_if = "Option::is_none")]
1452    #[doc = "A list of CSS at-property rules matching this node."]
1453    pub css_property_rules: Option<Vec<CssPropertyRule>>,
1454    #[builder(default)]
1455    #[serde(skip_serializing_if = "Option::is_none")]
1456    #[doc = "A list of CSS property registrations matching this node."]
1457    pub css_property_registrations: Option<Vec<CssPropertyRegistration>>,
1458    #[builder(default)]
1459    #[serde(skip_serializing_if = "Option::is_none")]
1460    #[doc = "A list of simple @rules matching this node or its pseudo-elements."]
1461    pub css_at_rules: Option<Vec<CssAtRule>>,
1462    #[builder(default)]
1463    #[serde(skip_serializing_if = "Option::is_none")]
1464    #[doc = "Id of the first parent element that does not have display: contents."]
1465    pub parent_layout_node_id: Option<dom::NodeId>,
1466    #[builder(default)]
1467    #[serde(skip_serializing_if = "Option::is_none")]
1468    #[doc = "A list of CSS at-function rules referenced by styles of this node."]
1469    pub css_function_rules: Option<Vec<CssFunctionRule>>,
1470}
1471#[allow(deprecated)]
1472#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1473#[serde(rename_all = "camelCase")]
1474#[doc = "Returns the values of the default UA-defined environment variables used in env()"]
1475pub struct GetEnvironmentVariablesReturnObject {
1476    #[serde(default)]
1477    pub environment_variables: Json,
1478}
1479#[allow(deprecated)]
1480#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1481#[serde(rename_all = "camelCase")]
1482#[doc = "Returns all media queries parsed by the rendering engine."]
1483pub struct GetMediaQueriesReturnObject {
1484    pub medias: Vec<CssMedia>,
1485}
1486#[allow(deprecated)]
1487#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1488#[serde(rename_all = "camelCase")]
1489#[doc = "Requests information about platform fonts which we used to render child TextNodes in the given\n node."]
1490pub struct GetPlatformFontsForNodeReturnObject {
1491    #[doc = "Usage statistics for every employed platform font."]
1492    pub fonts: Vec<PlatformFontUsage>,
1493}
1494#[allow(deprecated)]
1495#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1496#[serde(rename_all = "camelCase")]
1497#[doc = "Returns the current textual content for a stylesheet."]
1498pub struct GetStyleSheetTextReturnObject {
1499    #[serde(default)]
1500    #[doc = "The stylesheet text."]
1501    pub text: String,
1502}
1503#[allow(deprecated)]
1504#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1505#[serde(rename_all = "camelCase")]
1506#[doc = "Returns all layers parsed by the rendering engine for the tree scope of a node.\n Given a DOM element identified by nodeId, getLayersForNode returns the root\n layer for the nearest ancestor document or shadow root. The layer root contains\n the full layer tree for the tree scope and their ordering."]
1507pub struct GetLayersForNodeReturnObject {
1508    pub root_layer: CssLayerData,
1509}
1510#[allow(deprecated)]
1511#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1512#[serde(rename_all = "camelCase")]
1513#[doc = "Given a CSS selector text and a style sheet ID, getLocationForSelector\n returns an array of locations of the CSS selector in the style sheet."]
1514pub struct GetLocationForSelectorReturnObject {
1515    pub ranges: Vec<SourceRange>,
1516}
1517#[allow(deprecated)]
1518#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1519#[doc = "Starts tracking the given node for the computed style updates\n and whenever the computed style is updated for node, it queues\n a `computedStyleUpdated` event with throttling.\n There can only be 1 node tracked for computed style updates\n so passing a new node id removes tracking from the previous node.\n Pass `undefined` to disable tracking."]
1520pub struct TrackComputedStyleUpdatesForNodeReturnObject(pub Option<Json>);
1521#[allow(deprecated)]
1522#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1523#[doc = "Starts tracking the given computed styles for updates. The specified array of properties\n replaces the one previously specified. Pass empty array to disable tracking.\n Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.\n The changes to computed style properties are only tracked for nodes pushed to the front-end\n by the DOM agent. If no changes to the tracked properties occur after the node has been pushed\n to the front-end, no updates will be issued for the node."]
1524pub struct TrackComputedStyleUpdatesReturnObject(pub Option<Json>);
1525#[allow(deprecated)]
1526#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1527#[serde(rename_all = "camelCase")]
1528#[doc = "Polls the next batch of computed style updates."]
1529pub struct TakeComputedStyleUpdatesReturnObject {
1530    #[doc = "The list of node Ids that have their tracked computed styles updated."]
1531    pub node_ids: dom::NodeId,
1532}
1533#[allow(deprecated)]
1534#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1535#[doc = "Find a rule with the given active property for the given node and set the new value for this\n property"]
1536pub struct SetEffectivePropertyValueForNodeReturnObject(pub Option<Json>);
1537#[allow(deprecated)]
1538#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1539#[serde(rename_all = "camelCase")]
1540#[doc = "Modifies the property rule property name."]
1541pub struct SetPropertyRulePropertyNameReturnObject {
1542    #[doc = "The resulting key text after modification."]
1543    pub property_name: Value,
1544}
1545#[allow(deprecated)]
1546#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1547#[serde(rename_all = "camelCase")]
1548#[doc = "Modifies the keyframe rule key text."]
1549pub struct SetKeyframeKeyReturnObject {
1550    #[doc = "The resulting key text after modification."]
1551    pub key_text: Value,
1552}
1553#[allow(deprecated)]
1554#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1555#[serde(rename_all = "camelCase")]
1556#[doc = "Modifies the rule selector."]
1557pub struct SetMediaTextReturnObject {
1558    #[doc = "The resulting CSS media rule after modification."]
1559    pub media: CssMedia,
1560}
1561#[allow(deprecated)]
1562#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1563#[serde(rename_all = "camelCase")]
1564#[doc = "Modifies the expression of a container query."]
1565pub struct SetContainerQueryTextReturnObject {
1566    #[doc = "The resulting CSS container query rule after modification."]
1567    pub container_query: CssContainerQuery,
1568}
1569#[allow(deprecated)]
1570#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1571#[serde(rename_all = "camelCase")]
1572#[doc = "Modifies the expression of a supports at-rule."]
1573pub struct SetSupportsTextReturnObject {
1574    #[doc = "The resulting CSS Supports rule after modification."]
1575    pub supports: CssSupports,
1576}
1577#[allow(deprecated)]
1578#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1579#[serde(rename_all = "camelCase")]
1580#[doc = "Modifies the expression of a scope at-rule."]
1581pub struct SetScopeTextReturnObject {
1582    #[doc = "The resulting CSS Scope rule after modification."]
1583    pub scope: CssScope,
1584}
1585#[allow(deprecated)]
1586#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1587#[serde(rename_all = "camelCase")]
1588#[doc = "Modifies the rule selector."]
1589pub struct SetRuleSelectorReturnObject {
1590    #[doc = "The resulting selector list after modification."]
1591    pub selector_list: SelectorList,
1592}
1593#[allow(deprecated)]
1594#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1595#[serde(rename_all = "camelCase")]
1596#[doc = "Sets the new stylesheet text."]
1597pub struct SetStyleSheetTextReturnObject {
1598    #[builder(default)]
1599    #[serde(skip_serializing_if = "Option::is_none")]
1600    #[serde(default)]
1601    #[doc = "URL of source map associated with script (if any)."]
1602    #[serde(rename = "sourceMapURL")]
1603    pub source_map_url: Option<String>,
1604}
1605#[allow(deprecated)]
1606#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1607#[serde(rename_all = "camelCase")]
1608#[doc = "Applies specified style edits one after another in the given order."]
1609pub struct SetStyleTextsReturnObject {
1610    #[doc = "The resulting styles after modification."]
1611    pub styles: Vec<CssStyle>,
1612}
1613#[allow(deprecated)]
1614#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1615#[doc = "Enables the selector recording."]
1616pub struct StartRuleUsageTrackingReturnObject(pub Option<Json>);
1617#[allow(deprecated)]
1618#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1619#[serde(rename_all = "camelCase")]
1620#[doc = "Stop tracking rule usage and return the list of rules that were used since last call to\n `takeCoverageDelta` (or since start of coverage instrumentation)."]
1621pub struct StopRuleUsageTrackingReturnObject {
1622    pub rule_usage: Vec<RuleUsage>,
1623}
1624#[allow(deprecated)]
1625#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1626#[serde(rename_all = "camelCase")]
1627#[doc = "Obtain list of rules that became used since last call to this method (or since start of coverage\n instrumentation)."]
1628pub struct TakeCoverageDeltaReturnObject {
1629    pub coverage: Vec<RuleUsage>,
1630    #[serde(default)]
1631    #[doc = "Monotonically increasing time, in seconds."]
1632    pub timestamp: JsFloat,
1633}
1634#[allow(deprecated)]
1635#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1636#[doc = "Enables/disables rendering of local CSS fonts (enabled by default)."]
1637pub struct SetLocalFontsEnabledReturnObject(pub Option<Json>);
1638#[allow(deprecated)]
1639impl Method for AddRule {
1640    const NAME: &'static str = "CSS.addRule";
1641    type ReturnObject = AddRuleReturnObject;
1642}
1643#[allow(deprecated)]
1644impl Method for CollectClassNames {
1645    const NAME: &'static str = "CSS.collectClassNames";
1646    type ReturnObject = CollectClassNamesReturnObject;
1647}
1648#[allow(deprecated)]
1649impl Method for CreateStyleSheet {
1650    const NAME: &'static str = "CSS.createStyleSheet";
1651    type ReturnObject = CreateStyleSheetReturnObject;
1652}
1653#[allow(deprecated)]
1654impl Method for Disable {
1655    const NAME: &'static str = "CSS.disable";
1656    type ReturnObject = DisableReturnObject;
1657}
1658#[allow(deprecated)]
1659impl Method for Enable {
1660    const NAME: &'static str = "CSS.enable";
1661    type ReturnObject = EnableReturnObject;
1662}
1663#[allow(deprecated)]
1664impl Method for ForcePseudoState {
1665    const NAME: &'static str = "CSS.forcePseudoState";
1666    type ReturnObject = ForcePseudoStateReturnObject;
1667}
1668#[allow(deprecated)]
1669impl Method for ForceStartingStyle {
1670    const NAME: &'static str = "CSS.forceStartingStyle";
1671    type ReturnObject = ForceStartingStyleReturnObject;
1672}
1673#[allow(deprecated)]
1674impl Method for GetBackgroundColors {
1675    const NAME: &'static str = "CSS.getBackgroundColors";
1676    type ReturnObject = GetBackgroundColorsReturnObject;
1677}
1678#[allow(deprecated)]
1679impl Method for GetComputedStyleForNode {
1680    const NAME: &'static str = "CSS.getComputedStyleForNode";
1681    type ReturnObject = GetComputedStyleForNodeReturnObject;
1682}
1683#[allow(deprecated)]
1684impl Method for ResolveValues {
1685    const NAME: &'static str = "CSS.resolveValues";
1686    type ReturnObject = ResolveValuesReturnObject;
1687}
1688#[allow(deprecated)]
1689impl Method for GetLonghandProperties {
1690    const NAME: &'static str = "CSS.getLonghandProperties";
1691    type ReturnObject = GetLonghandPropertiesReturnObject;
1692}
1693#[allow(deprecated)]
1694impl Method for GetInlineStylesForNode {
1695    const NAME: &'static str = "CSS.getInlineStylesForNode";
1696    type ReturnObject = GetInlineStylesForNodeReturnObject;
1697}
1698#[allow(deprecated)]
1699impl Method for GetAnimatedStylesForNode {
1700    const NAME: &'static str = "CSS.getAnimatedStylesForNode";
1701    type ReturnObject = GetAnimatedStylesForNodeReturnObject;
1702}
1703#[allow(deprecated)]
1704impl Method for GetMatchedStylesForNode {
1705    const NAME: &'static str = "CSS.getMatchedStylesForNode";
1706    type ReturnObject = GetMatchedStylesForNodeReturnObject;
1707}
1708#[allow(deprecated)]
1709impl Method for GetEnvironmentVariables {
1710    const NAME: &'static str = "CSS.getEnvironmentVariables";
1711    type ReturnObject = GetEnvironmentVariablesReturnObject;
1712}
1713#[allow(deprecated)]
1714impl Method for GetMediaQueries {
1715    const NAME: &'static str = "CSS.getMediaQueries";
1716    type ReturnObject = GetMediaQueriesReturnObject;
1717}
1718#[allow(deprecated)]
1719impl Method for GetPlatformFontsForNode {
1720    const NAME: &'static str = "CSS.getPlatformFontsForNode";
1721    type ReturnObject = GetPlatformFontsForNodeReturnObject;
1722}
1723#[allow(deprecated)]
1724impl Method for GetStyleSheetText {
1725    const NAME: &'static str = "CSS.getStyleSheetText";
1726    type ReturnObject = GetStyleSheetTextReturnObject;
1727}
1728#[allow(deprecated)]
1729impl Method for GetLayersForNode {
1730    const NAME: &'static str = "CSS.getLayersForNode";
1731    type ReturnObject = GetLayersForNodeReturnObject;
1732}
1733#[allow(deprecated)]
1734impl Method for GetLocationForSelector {
1735    const NAME: &'static str = "CSS.getLocationForSelector";
1736    type ReturnObject = GetLocationForSelectorReturnObject;
1737}
1738#[allow(deprecated)]
1739impl Method for TrackComputedStyleUpdatesForNode {
1740    const NAME: &'static str = "CSS.trackComputedStyleUpdatesForNode";
1741    type ReturnObject = TrackComputedStyleUpdatesForNodeReturnObject;
1742}
1743#[allow(deprecated)]
1744impl Method for TrackComputedStyleUpdates {
1745    const NAME: &'static str = "CSS.trackComputedStyleUpdates";
1746    type ReturnObject = TrackComputedStyleUpdatesReturnObject;
1747}
1748#[allow(deprecated)]
1749impl Method for TakeComputedStyleUpdates {
1750    const NAME: &'static str = "CSS.takeComputedStyleUpdates";
1751    type ReturnObject = TakeComputedStyleUpdatesReturnObject;
1752}
1753#[allow(deprecated)]
1754impl Method for SetEffectivePropertyValueForNode {
1755    const NAME: &'static str = "CSS.setEffectivePropertyValueForNode";
1756    type ReturnObject = SetEffectivePropertyValueForNodeReturnObject;
1757}
1758#[allow(deprecated)]
1759impl Method for SetPropertyRulePropertyName {
1760    const NAME: &'static str = "CSS.setPropertyRulePropertyName";
1761    type ReturnObject = SetPropertyRulePropertyNameReturnObject;
1762}
1763#[allow(deprecated)]
1764impl Method for SetKeyframeKey {
1765    const NAME: &'static str = "CSS.setKeyframeKey";
1766    type ReturnObject = SetKeyframeKeyReturnObject;
1767}
1768#[allow(deprecated)]
1769impl Method for SetMediaText {
1770    const NAME: &'static str = "CSS.setMediaText";
1771    type ReturnObject = SetMediaTextReturnObject;
1772}
1773#[allow(deprecated)]
1774impl Method for SetContainerQueryText {
1775    const NAME: &'static str = "CSS.setContainerQueryText";
1776    type ReturnObject = SetContainerQueryTextReturnObject;
1777}
1778#[allow(deprecated)]
1779impl Method for SetSupportsText {
1780    const NAME: &'static str = "CSS.setSupportsText";
1781    type ReturnObject = SetSupportsTextReturnObject;
1782}
1783#[allow(deprecated)]
1784impl Method for SetScopeText {
1785    const NAME: &'static str = "CSS.setScopeText";
1786    type ReturnObject = SetScopeTextReturnObject;
1787}
1788#[allow(deprecated)]
1789impl Method for SetRuleSelector {
1790    const NAME: &'static str = "CSS.setRuleSelector";
1791    type ReturnObject = SetRuleSelectorReturnObject;
1792}
1793#[allow(deprecated)]
1794impl Method for SetStyleSheetText {
1795    const NAME: &'static str = "CSS.setStyleSheetText";
1796    type ReturnObject = SetStyleSheetTextReturnObject;
1797}
1798#[allow(deprecated)]
1799impl Method for SetStyleTexts {
1800    const NAME: &'static str = "CSS.setStyleTexts";
1801    type ReturnObject = SetStyleTextsReturnObject;
1802}
1803#[allow(deprecated)]
1804impl Method for StartRuleUsageTracking {
1805    const NAME: &'static str = "CSS.startRuleUsageTracking";
1806    type ReturnObject = StartRuleUsageTrackingReturnObject;
1807}
1808#[allow(deprecated)]
1809impl Method for StopRuleUsageTracking {
1810    const NAME: &'static str = "CSS.stopRuleUsageTracking";
1811    type ReturnObject = StopRuleUsageTrackingReturnObject;
1812}
1813#[allow(deprecated)]
1814impl Method for TakeCoverageDelta {
1815    const NAME: &'static str = "CSS.takeCoverageDelta";
1816    type ReturnObject = TakeCoverageDeltaReturnObject;
1817}
1818#[allow(deprecated)]
1819impl Method for SetLocalFontsEnabled {
1820    const NAME: &'static str = "CSS.setLocalFontsEnabled";
1821    type ReturnObject = SetLocalFontsEnabledReturnObject;
1822}
1823#[allow(dead_code)]
1824pub mod events {
1825    #[allow(unused_imports)]
1826    use super::super::types::*;
1827    #[allow(unused_imports)]
1828    use derive_builder::Builder;
1829    #[allow(unused_imports)]
1830    use serde::{Deserialize, Serialize};
1831    #[allow(unused_imports)]
1832    use serde_json::Value as Json;
1833    #[allow(deprecated)]
1834    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1835    pub struct FontsUpdatedEvent {
1836        pub params: FontsUpdatedEventParams,
1837    }
1838    #[allow(deprecated)]
1839    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1840    #[serde(rename_all = "camelCase")]
1841    pub struct FontsUpdatedEventParams {
1842        #[builder(default)]
1843        #[serde(skip_serializing_if = "Option::is_none")]
1844        #[doc = "The web font that has loaded."]
1845        pub font: Option<super::FontFace>,
1846    }
1847    #[allow(deprecated)]
1848    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1849    pub struct MediaQueryResultChangedEvent(pub Option<Json>);
1850    #[allow(deprecated)]
1851    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1852    pub struct StyleSheetAddedEvent {
1853        pub params: StyleSheetAddedEventParams,
1854    }
1855    #[allow(deprecated)]
1856    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1857    #[serde(rename_all = "camelCase")]
1858    pub struct StyleSheetAddedEventParams {
1859        #[doc = "Added stylesheet metainfo."]
1860        pub header: super::CssStyleSheetHeader,
1861    }
1862    #[allow(deprecated)]
1863    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1864    pub struct StyleSheetChangedEvent {
1865        pub params: StyleSheetChangedEventParams,
1866    }
1867    #[allow(deprecated)]
1868    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1869    #[serde(rename_all = "camelCase")]
1870    pub struct StyleSheetChangedEventParams {
1871        pub style_sheet_id: super::super::dom::StyleSheetId,
1872    }
1873    #[allow(deprecated)]
1874    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1875    pub struct StyleSheetRemovedEvent {
1876        pub params: StyleSheetRemovedEventParams,
1877    }
1878    #[allow(deprecated)]
1879    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1880    #[serde(rename_all = "camelCase")]
1881    pub struct StyleSheetRemovedEventParams {
1882        #[doc = "Identifier of the removed stylesheet."]
1883        pub style_sheet_id: super::super::dom::StyleSheetId,
1884    }
1885    #[allow(deprecated)]
1886    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
1887    pub struct ComputedStyleUpdatedEvent {
1888        pub params: ComputedStyleUpdatedEventParams,
1889    }
1890    #[allow(deprecated)]
1891    #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
1892    #[serde(rename_all = "camelCase")]
1893    pub struct ComputedStyleUpdatedEventParams {
1894        #[doc = "The node id that has updated computed styles."]
1895        pub node_id: super::super::dom::NodeId,
1896    }
1897}