diff --git a/vendor/github.com/chromedp/cdproto/.gitignore b/vendor/github.com/chromedp/cdproto/.gitignore deleted file mode 100644 index c456f532..00000000 --- a/vendor/github.com/chromedp/cdproto/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.json -*.pdl diff --git a/vendor/github.com/chromedp/cdproto/LICENSE b/vendor/github.com/chromedp/cdproto/LICENSE deleted file mode 100644 index 323e87a9..00000000 --- a/vendor/github.com/chromedp/cdproto/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2021 Kenneth Shaw - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/chromedp/cdproto/README.md b/vendor/github.com/chromedp/cdproto/README.md deleted file mode 100644 index a21f77ca..00000000 --- a/vendor/github.com/chromedp/cdproto/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# About cdproto - -Package `cdproto` contains the generated commands, types, and events for the -[Chrome DevTools Protocol domains][devtools-protocol]. - -[![Unit Tests][cdproto-ci-status]][cdproto-ci] -[![Go Reference][goref-cdproto-status]][goref-cdproto] - -This package is generated by the [`cdproto-gen`][cdproto-gen] command. Please -refer to that project and to the main [`chromedp`][chromedp] project for -information on using the commands, types, and events available here. - -## API - -Please see the [Go Reference][goref-cdproto]. - -## Contributing - -If you would like to submit a change to the code in this package, please submit -your Pull Request to the [`cdproto-gen`][cdproto-gen] project. Any Issues and -Pull Requests submitted to this project will be closed without being reviewed. - -[cdproto-ci]: https://github.com/chromedp/cdproto/actions/workflows/build.yml (Build CI) -[cdproto-ci-status]: https://github.com/chromedp/cdproto/actions/workflows/build.yml/badge.svg (Build CI) -[cdproto-gen]: https://github.com/chromedp/cdproto-gen -[chromedp]: https://github.com/chromedp/chromedp -[devtools-protocol]: https://chromedevtools.github.io/devtools-protocol/ -[goref-cdproto]: https://pkg.go.dev/github.com/chromedp/cdproto -[goref-cdproto-status]: https://pkg.go.dev/badge/github.com/chromedp/chromedp.svg diff --git a/vendor/github.com/chromedp/cdproto/accessibility/accessibility.go b/vendor/github.com/chromedp/cdproto/accessibility/accessibility.go deleted file mode 100644 index 7ac2eea0..00000000 --- a/vendor/github.com/chromedp/cdproto/accessibility/accessibility.go +++ /dev/null @@ -1,287 +0,0 @@ -// Package accessibility provides the Chrome DevTools Protocol -// commands, types, and events for the Accessibility domain. -// -// Generated by the cdproto-gen command. -package accessibility - -// Code generated by cdproto-gen. DO NOT EDIT. - -import ( - "context" - - "github.com/chromedp/cdproto/cdp" - "github.com/chromedp/cdproto/runtime" -) - -// DisableParams disables the accessibility domain. -type DisableParams struct{} - -// Disable disables the accessibility domain. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-disable -func Disable() *DisableParams { - return &DisableParams{} -} - -// Do executes Accessibility.disable against the provided context. -func (p *DisableParams) Do(ctx context.Context) (err error) { - return cdp.Execute(ctx, CommandDisable, nil, nil) -} - -// EnableParams enables the accessibility domain which causes AXNodeIds to -// remain consistent between method calls. This turns on accessibility for the -// page, which can impact performance until accessibility is disabled. -type EnableParams struct{} - -// Enable enables the accessibility domain which causes AXNodeIds to remain -// consistent between method calls. This turns on accessibility for the page, -// which can impact performance until accessibility is disabled. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-enable -func Enable() *EnableParams { - return &EnableParams{} -} - -// Do executes Accessibility.enable against the provided context. -func (p *EnableParams) Do(ctx context.Context) (err error) { - return cdp.Execute(ctx, CommandEnable, nil, nil) -} - -// GetPartialAXTreeParams fetches the accessibility node and partial -// accessibility tree for this DOM node, if it exists. -type GetPartialAXTreeParams struct { - NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node to get the partial accessibility tree for. - BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to get the partial accessibility tree for. - ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper to get the partial accessibility tree for. - FetchRelatives bool `json:"fetchRelatives,omitempty"` // Whether to fetch this nodes ancestors, siblings and children. Defaults to true. -} - -// GetPartialAXTree fetches the accessibility node and partial accessibility -// tree for this DOM node, if it exists. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getPartialAXTree -// -// parameters: -func GetPartialAXTree() *GetPartialAXTreeParams { - return &GetPartialAXTreeParams{} -} - -// WithNodeID identifier of the node to get the partial accessibility tree -// for. -func (p GetPartialAXTreeParams) WithNodeID(nodeID cdp.NodeID) *GetPartialAXTreeParams { - p.NodeID = nodeID - return &p -} - -// WithBackendNodeID identifier of the backend node to get the partial -// accessibility tree for. -func (p GetPartialAXTreeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetPartialAXTreeParams { - p.BackendNodeID = backendNodeID - return &p -} - -// WithObjectID JavaScript object id of the node wrapper to get the partial -// accessibility tree for. -func (p GetPartialAXTreeParams) WithObjectID(objectID runtime.RemoteObjectID) *GetPartialAXTreeParams { - p.ObjectID = objectID - return &p -} - -// WithFetchRelatives whether to fetch this nodes ancestors, siblings and -// children. Defaults to true. -func (p GetPartialAXTreeParams) WithFetchRelatives(fetchRelatives bool) *GetPartialAXTreeParams { - p.FetchRelatives = fetchRelatives - return &p -} - -// GetPartialAXTreeReturns return values. -type GetPartialAXTreeReturns struct { - Nodes []*Node `json:"nodes,omitempty"` // The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested. -} - -// Do executes Accessibility.getPartialAXTree against the provided context. -// -// returns: -// nodes - The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested. -func (p *GetPartialAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) { - // execute - var res GetPartialAXTreeReturns - err = cdp.Execute(ctx, CommandGetPartialAXTree, p, &res) - if err != nil { - return nil, err - } - - return res.Nodes, nil -} - -// GetFullAXTreeParams fetches the entire accessibility tree for the root -// Document. -type GetFullAXTreeParams struct { - MaxDepth int64 `json:"max_depth,omitempty"` // The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned. -} - -// GetFullAXTree fetches the entire accessibility tree for the root Document. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getFullAXTree -// -// parameters: -func GetFullAXTree() *GetFullAXTreeParams { - return &GetFullAXTreeParams{} -} - -// WithMaxDepth the maximum depth at which descendants of the root node -// should be retrieved. If omitted, the full tree is returned. -func (p GetFullAXTreeParams) WithMaxDepth(maxDepth int64) *GetFullAXTreeParams { - p.MaxDepth = maxDepth - return &p -} - -// GetFullAXTreeReturns return values. -type GetFullAXTreeReturns struct { - Nodes []*Node `json:"nodes,omitempty"` -} - -// Do executes Accessibility.getFullAXTree against the provided context. -// -// returns: -// nodes -func (p *GetFullAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) { - // execute - var res GetFullAXTreeReturns - err = cdp.Execute(ctx, CommandGetFullAXTree, p, &res) - if err != nil { - return nil, err - } - - return res.Nodes, nil -} - -// GetChildAXNodesParams fetches a particular accessibility node by AXNodeId. -// Requires enable() to have been called previously. -type GetChildAXNodesParams struct { - ID NodeID `json:"id"` -} - -// GetChildAXNodes fetches a particular accessibility node by AXNodeId. -// Requires enable() to have been called previously. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getChildAXNodes -// -// parameters: -// id -func GetChildAXNodes(id NodeID) *GetChildAXNodesParams { - return &GetChildAXNodesParams{ - ID: id, - } -} - -// GetChildAXNodesReturns return values. -type GetChildAXNodesReturns struct { - Nodes []*Node `json:"nodes,omitempty"` -} - -// Do executes Accessibility.getChildAXNodes against the provided context. -// -// returns: -// nodes -func (p *GetChildAXNodesParams) Do(ctx context.Context) (nodes []*Node, err error) { - // execute - var res GetChildAXNodesReturns - err = cdp.Execute(ctx, CommandGetChildAXNodes, p, &res) - if err != nil { - return nil, err - } - - return res.Nodes, nil -} - -// QueryAXTreeParams query a DOM node's accessibility subtree for accessible -// name and role. This command computes the name and role for all nodes in the -// subtree, including those that are ignored for accessibility, and returns -// those that mactch the specified name and role. If no DOM node is specified, -// or the DOM node does not exist, the command returns an error. If neither -// accessibleName or role is specified, it returns all the accessibility nodes -// in the subtree. -type QueryAXTreeParams struct { - NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node for the root to query. - BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node for the root to query. - ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper for the root to query. - AccessibleName string `json:"accessibleName,omitempty"` // Find nodes with this computed name. - Role string `json:"role,omitempty"` // Find nodes with this computed role. -} - -// QueryAXTree query a DOM node's accessibility subtree for accessible name -// and role. This command computes the name and role for all nodes in the -// subtree, including those that are ignored for accessibility, and returns -// those that mactch the specified name and role. If no DOM node is specified, -// or the DOM node does not exist, the command returns an error. If neither -// accessibleName or role is specified, it returns all the accessibility nodes -// in the subtree. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-queryAXTree -// -// parameters: -func QueryAXTree() *QueryAXTreeParams { - return &QueryAXTreeParams{} -} - -// WithNodeID identifier of the node for the root to query. -func (p QueryAXTreeParams) WithNodeID(nodeID cdp.NodeID) *QueryAXTreeParams { - p.NodeID = nodeID - return &p -} - -// WithBackendNodeID identifier of the backend node for the root to query. -func (p QueryAXTreeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *QueryAXTreeParams { - p.BackendNodeID = backendNodeID - return &p -} - -// WithObjectID JavaScript object id of the node wrapper for the root to -// query. -func (p QueryAXTreeParams) WithObjectID(objectID runtime.RemoteObjectID) *QueryAXTreeParams { - p.ObjectID = objectID - return &p -} - -// WithAccessibleName find nodes with this computed name. -func (p QueryAXTreeParams) WithAccessibleName(accessibleName string) *QueryAXTreeParams { - p.AccessibleName = accessibleName - return &p -} - -// WithRole find nodes with this computed role. -func (p QueryAXTreeParams) WithRole(role string) *QueryAXTreeParams { - p.Role = role - return &p -} - -// QueryAXTreeReturns return values. -type QueryAXTreeReturns struct { - Nodes []*Node `json:"nodes,omitempty"` // A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility. -} - -// Do executes Accessibility.queryAXTree against the provided context. -// -// returns: -// nodes - A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility. -func (p *QueryAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) { - // execute - var res QueryAXTreeReturns - err = cdp.Execute(ctx, CommandQueryAXTree, p, &res) - if err != nil { - return nil, err - } - - return res.Nodes, nil -} - -// Command names. -const ( - CommandDisable = "Accessibility.disable" - CommandEnable = "Accessibility.enable" - CommandGetPartialAXTree = "Accessibility.getPartialAXTree" - CommandGetFullAXTree = "Accessibility.getFullAXTree" - CommandGetChildAXNodes = "Accessibility.getChildAXNodes" - CommandQueryAXTree = "Accessibility.queryAXTree" -) diff --git a/vendor/github.com/chromedp/cdproto/accessibility/easyjson.go b/vendor/github.com/chromedp/cdproto/accessibility/easyjson.go deleted file mode 100644 index cf868d28..00000000 --- a/vendor/github.com/chromedp/cdproto/accessibility/easyjson.go +++ /dev/null @@ -1,1682 +0,0 @@ -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package accessibility - -import ( - json "encoding/json" - runtime "github.com/chromedp/cdproto/runtime" - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility(in *jlexer.Lexer, out *ValueSource) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "value": - if in.IsNull() { - in.Skip() - out.Value = nil - } else { - if out.Value == nil { - out.Value = new(Value) - } - (*out.Value).UnmarshalEasyJSON(in) - } - case "attribute": - out.Attribute = string(in.String()) - case "attributeValue": - if in.IsNull() { - in.Skip() - out.AttributeValue = nil - } else { - if out.AttributeValue == nil { - out.AttributeValue = new(Value) - } - (*out.AttributeValue).UnmarshalEasyJSON(in) - } - case "superseded": - out.Superseded = bool(in.Bool()) - case "nativeSource": - (out.NativeSource).UnmarshalEasyJSON(in) - case "nativeSourceValue": - if in.IsNull() { - in.Skip() - out.NativeSourceValue = nil - } else { - if out.NativeSourceValue == nil { - out.NativeSourceValue = new(Value) - } - (*out.NativeSourceValue).UnmarshalEasyJSON(in) - } - case "invalid": - out.Invalid = bool(in.Bool()) - case "invalidReason": - out.InvalidReason = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility(out *jwriter.Writer, in ValueSource) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"type\":" - out.RawString(prefix[1:]) - (in.Type).MarshalEasyJSON(out) - } - if in.Value != nil { - const prefix string = ",\"value\":" - out.RawString(prefix) - (*in.Value).MarshalEasyJSON(out) - } - if in.Attribute != "" { - const prefix string = ",\"attribute\":" - out.RawString(prefix) - out.String(string(in.Attribute)) - } - if in.AttributeValue != nil { - const prefix string = ",\"attributeValue\":" - out.RawString(prefix) - (*in.AttributeValue).MarshalEasyJSON(out) - } - if in.Superseded { - const prefix string = ",\"superseded\":" - out.RawString(prefix) - out.Bool(bool(in.Superseded)) - } - if in.NativeSource != "" { - const prefix string = ",\"nativeSource\":" - out.RawString(prefix) - (in.NativeSource).MarshalEasyJSON(out) - } - if in.NativeSourceValue != nil { - const prefix string = ",\"nativeSourceValue\":" - out.RawString(prefix) - (*in.NativeSourceValue).MarshalEasyJSON(out) - } - if in.Invalid { - const prefix string = ",\"invalid\":" - out.RawString(prefix) - out.Bool(bool(in.Invalid)) - } - if in.InvalidReason != "" { - const prefix string = ",\"invalidReason\":" - out.RawString(prefix) - out.String(string(in.InvalidReason)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ValueSource) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ValueSource) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ValueSource) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ValueSource) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1(in *jlexer.Lexer, out *Value) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "value": - (out.Value).UnmarshalEasyJSON(in) - case "relatedNodes": - if in.IsNull() { - in.Skip() - out.RelatedNodes = nil - } else { - in.Delim('[') - if out.RelatedNodes == nil { - if !in.IsDelim(']') { - out.RelatedNodes = make([]*RelatedNode, 0, 8) - } else { - out.RelatedNodes = []*RelatedNode{} - } - } else { - out.RelatedNodes = (out.RelatedNodes)[:0] - } - for !in.IsDelim(']') { - var v1 *RelatedNode - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(RelatedNode) - } - (*v1).UnmarshalEasyJSON(in) - } - out.RelatedNodes = append(out.RelatedNodes, v1) - in.WantComma() - } - in.Delim(']') - } - case "sources": - if in.IsNull() { - in.Skip() - out.Sources = nil - } else { - in.Delim('[') - if out.Sources == nil { - if !in.IsDelim(']') { - out.Sources = make([]*ValueSource, 0, 8) - } else { - out.Sources = []*ValueSource{} - } - } else { - out.Sources = (out.Sources)[:0] - } - for !in.IsDelim(']') { - var v2 *ValueSource - if in.IsNull() { - in.Skip() - v2 = nil - } else { - if v2 == nil { - v2 = new(ValueSource) - } - (*v2).UnmarshalEasyJSON(in) - } - out.Sources = append(out.Sources, v2) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility1(out *jwriter.Writer, in Value) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"type\":" - out.RawString(prefix[1:]) - (in.Type).MarshalEasyJSON(out) - } - if (in.Value).IsDefined() { - const prefix string = ",\"value\":" - out.RawString(prefix) - (in.Value).MarshalEasyJSON(out) - } - if len(in.RelatedNodes) != 0 { - const prefix string = ",\"relatedNodes\":" - out.RawString(prefix) - { - out.RawByte('[') - for v3, v4 := range in.RelatedNodes { - if v3 > 0 { - out.RawByte(',') - } - if v4 == nil { - out.RawString("null") - } else { - (*v4).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.Sources) != 0 { - const prefix string = ",\"sources\":" - out.RawString(prefix) - { - out.RawByte('[') - for v5, v6 := range in.Sources { - if v5 > 0 { - out.RawByte(',') - } - if v6 == nil { - out.RawString("null") - } else { - (*v6).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Value) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Value) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Value) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Value) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility2(in *jlexer.Lexer, out *RelatedNode) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "backendDOMNodeId": - (out.BackendDOMNodeID).UnmarshalEasyJSON(in) - case "idref": - out.Idref = string(in.String()) - case "text": - out.Text = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility2(out *jwriter.Writer, in RelatedNode) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"backendDOMNodeId\":" - out.RawString(prefix[1:]) - out.Int64(int64(in.BackendDOMNodeID)) - } - if in.Idref != "" { - const prefix string = ",\"idref\":" - out.RawString(prefix) - out.String(string(in.Idref)) - } - if in.Text != "" { - const prefix string = ",\"text\":" - out.RawString(prefix) - out.String(string(in.Text)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RelatedNode) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RelatedNode) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RelatedNode) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RelatedNode) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility2(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility3(in *jlexer.Lexer, out *QueryAXTreeReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodes": - if in.IsNull() { - in.Skip() - out.Nodes = nil - } else { - in.Delim('[') - if out.Nodes == nil { - if !in.IsDelim(']') { - out.Nodes = make([]*Node, 0, 8) - } else { - out.Nodes = []*Node{} - } - } else { - out.Nodes = (out.Nodes)[:0] - } - for !in.IsDelim(']') { - var v7 *Node - if in.IsNull() { - in.Skip() - v7 = nil - } else { - if v7 == nil { - v7 = new(Node) - } - (*v7).UnmarshalEasyJSON(in) - } - out.Nodes = append(out.Nodes, v7) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility3(out *jwriter.Writer, in QueryAXTreeReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Nodes) != 0 { - const prefix string = ",\"nodes\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v8, v9 := range in.Nodes { - if v8 > 0 { - out.RawByte(',') - } - if v9 == nil { - out.RawString("null") - } else { - (*v9).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QueryAXTreeReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QueryAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QueryAXTreeReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QueryAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility3(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility4(in *jlexer.Lexer, out *QueryAXTreeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "backendNodeId": - (out.BackendNodeID).UnmarshalEasyJSON(in) - case "objectId": - out.ObjectID = runtime.RemoteObjectID(in.String()) - case "accessibleName": - out.AccessibleName = string(in.String()) - case "role": - out.Role = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility4(out *jwriter.Writer, in QueryAXTreeParams) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - const prefix string = ",\"nodeId\":" - first = false - out.RawString(prefix[1:]) - out.Int64(int64(in.NodeID)) - } - if in.BackendNodeID != 0 { - const prefix string = ",\"backendNodeId\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Int64(int64(in.BackendNodeID)) - } - if in.ObjectID != "" { - const prefix string = ",\"objectId\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(in.ObjectID)) - } - if in.AccessibleName != "" { - const prefix string = ",\"accessibleName\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(in.AccessibleName)) - } - if in.Role != "" { - const prefix string = ",\"role\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(in.Role)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QueryAXTreeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QueryAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QueryAXTreeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QueryAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility4(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility5(in *jlexer.Lexer, out *Property) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - (out.Name).UnmarshalEasyJSON(in) - case "value": - if in.IsNull() { - in.Skip() - out.Value = nil - } else { - if out.Value == nil { - out.Value = new(Value) - } - (*out.Value).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility5(out *jwriter.Writer, in Property) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"name\":" - out.RawString(prefix[1:]) - (in.Name).MarshalEasyJSON(out) - } - { - const prefix string = ",\"value\":" - out.RawString(prefix) - if in.Value == nil { - out.RawString("null") - } else { - (*in.Value).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Property) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Property) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Property) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Property) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility5(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(in *jlexer.Lexer, out *Node) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - out.NodeID = NodeID(in.String()) - case "ignored": - out.Ignored = bool(in.Bool()) - case "ignoredReasons": - if in.IsNull() { - in.Skip() - out.IgnoredReasons = nil - } else { - in.Delim('[') - if out.IgnoredReasons == nil { - if !in.IsDelim(']') { - out.IgnoredReasons = make([]*Property, 0, 8) - } else { - out.IgnoredReasons = []*Property{} - } - } else { - out.IgnoredReasons = (out.IgnoredReasons)[:0] - } - for !in.IsDelim(']') { - var v10 *Property - if in.IsNull() { - in.Skip() - v10 = nil - } else { - if v10 == nil { - v10 = new(Property) - } - (*v10).UnmarshalEasyJSON(in) - } - out.IgnoredReasons = append(out.IgnoredReasons, v10) - in.WantComma() - } - in.Delim(']') - } - case "role": - if in.IsNull() { - in.Skip() - out.Role = nil - } else { - if out.Role == nil { - out.Role = new(Value) - } - (*out.Role).UnmarshalEasyJSON(in) - } - case "name": - if in.IsNull() { - in.Skip() - out.Name = nil - } else { - if out.Name == nil { - out.Name = new(Value) - } - (*out.Name).UnmarshalEasyJSON(in) - } - case "description": - if in.IsNull() { - in.Skip() - out.Description = nil - } else { - if out.Description == nil { - out.Description = new(Value) - } - (*out.Description).UnmarshalEasyJSON(in) - } - case "value": - if in.IsNull() { - in.Skip() - out.Value = nil - } else { - if out.Value == nil { - out.Value = new(Value) - } - (*out.Value).UnmarshalEasyJSON(in) - } - case "properties": - if in.IsNull() { - in.Skip() - out.Properties = nil - } else { - in.Delim('[') - if out.Properties == nil { - if !in.IsDelim(']') { - out.Properties = make([]*Property, 0, 8) - } else { - out.Properties = []*Property{} - } - } else { - out.Properties = (out.Properties)[:0] - } - for !in.IsDelim(']') { - var v11 *Property - if in.IsNull() { - in.Skip() - v11 = nil - } else { - if v11 == nil { - v11 = new(Property) - } - (*v11).UnmarshalEasyJSON(in) - } - out.Properties = append(out.Properties, v11) - in.WantComma() - } - in.Delim(']') - } - case "childIds": - if in.IsNull() { - in.Skip() - out.ChildIds = nil - } else { - in.Delim('[') - if out.ChildIds == nil { - if !in.IsDelim(']') { - out.ChildIds = make([]NodeID, 0, 4) - } else { - out.ChildIds = []NodeID{} - } - } else { - out.ChildIds = (out.ChildIds)[:0] - } - for !in.IsDelim(']') { - var v12 NodeID - v12 = NodeID(in.String()) - out.ChildIds = append(out.ChildIds, v12) - in.WantComma() - } - in.Delim(']') - } - case "backendDOMNodeId": - (out.BackendDOMNodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(out *jwriter.Writer, in Node) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"nodeId\":" - out.RawString(prefix[1:]) - out.String(string(in.NodeID)) - } - { - const prefix string = ",\"ignored\":" - out.RawString(prefix) - out.Bool(bool(in.Ignored)) - } - if len(in.IgnoredReasons) != 0 { - const prefix string = ",\"ignoredReasons\":" - out.RawString(prefix) - { - out.RawByte('[') - for v13, v14 := range in.IgnoredReasons { - if v13 > 0 { - out.RawByte(',') - } - if v14 == nil { - out.RawString("null") - } else { - (*v14).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.Role != nil { - const prefix string = ",\"role\":" - out.RawString(prefix) - (*in.Role).MarshalEasyJSON(out) - } - if in.Name != nil { - const prefix string = ",\"name\":" - out.RawString(prefix) - (*in.Name).MarshalEasyJSON(out) - } - if in.Description != nil { - const prefix string = ",\"description\":" - out.RawString(prefix) - (*in.Description).MarshalEasyJSON(out) - } - if in.Value != nil { - const prefix string = ",\"value\":" - out.RawString(prefix) - (*in.Value).MarshalEasyJSON(out) - } - if len(in.Properties) != 0 { - const prefix string = ",\"properties\":" - out.RawString(prefix) - { - out.RawByte('[') - for v15, v16 := range in.Properties { - if v15 > 0 { - out.RawByte(',') - } - if v16 == nil { - out.RawString("null") - } else { - (*v16).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.ChildIds) != 0 { - const prefix string = ",\"childIds\":" - out.RawString(prefix) - { - out.RawByte('[') - for v17, v18 := range in.ChildIds { - if v17 > 0 { - out.RawByte(',') - } - out.String(string(v18)) - } - out.RawByte(']') - } - } - if in.BackendDOMNodeID != 0 { - const prefix string = ",\"backendDOMNodeId\":" - out.RawString(prefix) - out.Int64(int64(in.BackendDOMNodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Node) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Node) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Node) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Node) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(in *jlexer.Lexer, out *GetPartialAXTreeReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodes": - if in.IsNull() { - in.Skip() - out.Nodes = nil - } else { - in.Delim('[') - if out.Nodes == nil { - if !in.IsDelim(']') { - out.Nodes = make([]*Node, 0, 8) - } else { - out.Nodes = []*Node{} - } - } else { - out.Nodes = (out.Nodes)[:0] - } - for !in.IsDelim(']') { - var v19 *Node - if in.IsNull() { - in.Skip() - v19 = nil - } else { - if v19 == nil { - v19 = new(Node) - } - (*v19).UnmarshalEasyJSON(in) - } - out.Nodes = append(out.Nodes, v19) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(out *jwriter.Writer, in GetPartialAXTreeReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Nodes) != 0 { - const prefix string = ",\"nodes\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v20, v21 := range in.Nodes { - if v20 > 0 { - out.RawByte(',') - } - if v21 == nil { - out.RawString("null") - } else { - (*v21).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetPartialAXTreeReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetPartialAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetPartialAXTreeReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetPartialAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(in *jlexer.Lexer, out *GetPartialAXTreeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "backendNodeId": - (out.BackendNodeID).UnmarshalEasyJSON(in) - case "objectId": - out.ObjectID = runtime.RemoteObjectID(in.String()) - case "fetchRelatives": - out.FetchRelatives = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(out *jwriter.Writer, in GetPartialAXTreeParams) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - const prefix string = ",\"nodeId\":" - first = false - out.RawString(prefix[1:]) - out.Int64(int64(in.NodeID)) - } - if in.BackendNodeID != 0 { - const prefix string = ",\"backendNodeId\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Int64(int64(in.BackendNodeID)) - } - if in.ObjectID != "" { - const prefix string = ",\"objectId\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(in.ObjectID)) - } - if in.FetchRelatives { - const prefix string = ",\"fetchRelatives\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(in.FetchRelatives)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetPartialAXTreeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetPartialAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetPartialAXTreeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetPartialAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility9(in *jlexer.Lexer, out *GetFullAXTreeReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodes": - if in.IsNull() { - in.Skip() - out.Nodes = nil - } else { - in.Delim('[') - if out.Nodes == nil { - if !in.IsDelim(']') { - out.Nodes = make([]*Node, 0, 8) - } else { - out.Nodes = []*Node{} - } - } else { - out.Nodes = (out.Nodes)[:0] - } - for !in.IsDelim(']') { - var v22 *Node - if in.IsNull() { - in.Skip() - v22 = nil - } else { - if v22 == nil { - v22 = new(Node) - } - (*v22).UnmarshalEasyJSON(in) - } - out.Nodes = append(out.Nodes, v22) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility9(out *jwriter.Writer, in GetFullAXTreeReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Nodes) != 0 { - const prefix string = ",\"nodes\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v23, v24 := range in.Nodes { - if v23 > 0 { - out.RawByte(',') - } - if v24 == nil { - out.RawString("null") - } else { - (*v24).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetFullAXTreeReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetFullAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetFullAXTreeReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetFullAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility9(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility10(in *jlexer.Lexer, out *GetFullAXTreeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "max_depth": - out.MaxDepth = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility10(out *jwriter.Writer, in GetFullAXTreeParams) { - out.RawByte('{') - first := true - _ = first - if in.MaxDepth != 0 { - const prefix string = ",\"max_depth\":" - first = false - out.RawString(prefix[1:]) - out.Int64(int64(in.MaxDepth)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetFullAXTreeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility10(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetFullAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility10(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetFullAXTreeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility10(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetFullAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility10(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility11(in *jlexer.Lexer, out *GetChildAXNodesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodes": - if in.IsNull() { - in.Skip() - out.Nodes = nil - } else { - in.Delim('[') - if out.Nodes == nil { - if !in.IsDelim(']') { - out.Nodes = make([]*Node, 0, 8) - } else { - out.Nodes = []*Node{} - } - } else { - out.Nodes = (out.Nodes)[:0] - } - for !in.IsDelim(']') { - var v25 *Node - if in.IsNull() { - in.Skip() - v25 = nil - } else { - if v25 == nil { - v25 = new(Node) - } - (*v25).UnmarshalEasyJSON(in) - } - out.Nodes = append(out.Nodes, v25) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility11(out *jwriter.Writer, in GetChildAXNodesReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Nodes) != 0 { - const prefix string = ",\"nodes\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v26, v27 := range in.Nodes { - if v26 > 0 { - out.RawByte(',') - } - if v27 == nil { - out.RawString("null") - } else { - (*v27).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetChildAXNodesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetChildAXNodesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetChildAXNodesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetChildAXNodesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility11(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility12(in *jlexer.Lexer, out *GetChildAXNodesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "id": - out.ID = NodeID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility12(out *jwriter.Writer, in GetChildAXNodesParams) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"id\":" - out.RawString(prefix[1:]) - out.String(string(in.ID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetChildAXNodesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetChildAXNodesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetChildAXNodesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetChildAXNodesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility12(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility13(in *jlexer.Lexer, out *EnableParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility13(out *jwriter.Writer, in EnableParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EnableParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility13(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility13(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility13(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility13(l, v) -} -func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility14(in *jlexer.Lexer, out *DisableParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeFieldName(false) - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility14(out *jwriter.Writer, in DisableParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DisableParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility14(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility14(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility14(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility14(l, v) -} diff --git a/vendor/github.com/chromedp/cdproto/accessibility/types.go b/vendor/github.com/chromedp/cdproto/accessibility/types.go deleted file mode 100644 index 655fc11c..00000000 --- a/vendor/github.com/chromedp/cdproto/accessibility/types.go +++ /dev/null @@ -1,451 +0,0 @@ -package accessibility - -// Code generated by cdproto-gen. DO NOT EDIT. - -import ( - "errors" - - "github.com/chromedp/cdproto/cdp" - "github.com/mailru/easyjson" - "github.com/mailru/easyjson/jlexer" - "github.com/mailru/easyjson/jwriter" -) - -// NodeID unique accessibility node identifier. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXNodeId -type NodeID string - -// String returns the NodeID as string value. -func (t NodeID) String() string { - return string(t) -} - -// ValueType enum of possible property types. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueType -type ValueType string - -// String returns the ValueType as string value. -func (t ValueType) String() string { - return string(t) -} - -// ValueType values. -const ( - ValueTypeBoolean ValueType = "boolean" - ValueTypeTristate ValueType = "tristate" - ValueTypeBooleanOrUndefined ValueType = "booleanOrUndefined" - ValueTypeIdref ValueType = "idref" - ValueTypeIdrefList ValueType = "idrefList" - ValueTypeInteger ValueType = "integer" - ValueTypeNode ValueType = "node" - ValueTypeNodeList ValueType = "nodeList" - ValueTypeNumber ValueType = "number" - ValueTypeString ValueType = "string" - ValueTypeComputedString ValueType = "computedString" - ValueTypeToken ValueType = "token" - ValueTypeTokenList ValueType = "tokenList" - ValueTypeDomRelation ValueType = "domRelation" - ValueTypeRole ValueType = "role" - ValueTypeInternalRole ValueType = "internalRole" - ValueTypeValueUndefined ValueType = "valueUndefined" -) - -// MarshalEasyJSON satisfies easyjson.Marshaler. -func (t ValueType) MarshalEasyJSON(out *jwriter.Writer) { - out.String(string(t)) -} - -// MarshalJSON satisfies json.Marshaler. -func (t ValueType) MarshalJSON() ([]byte, error) { - return easyjson.Marshal(t) -} - -// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. -func (t *ValueType) UnmarshalEasyJSON(in *jlexer.Lexer) { - switch ValueType(in.String()) { - case ValueTypeBoolean: - *t = ValueTypeBoolean - case ValueTypeTristate: - *t = ValueTypeTristate - case ValueTypeBooleanOrUndefined: - *t = ValueTypeBooleanOrUndefined - case ValueTypeIdref: - *t = ValueTypeIdref - case ValueTypeIdrefList: - *t = ValueTypeIdrefList - case ValueTypeInteger: - *t = ValueTypeInteger - case ValueTypeNode: - *t = ValueTypeNode - case ValueTypeNodeList: - *t = ValueTypeNodeList - case ValueTypeNumber: - *t = ValueTypeNumber - case ValueTypeString: - *t = ValueTypeString - case ValueTypeComputedString: - *t = ValueTypeComputedString - case ValueTypeToken: - *t = ValueTypeToken - case ValueTypeTokenList: - *t = ValueTypeTokenList - case ValueTypeDomRelation: - *t = ValueTypeDomRelation - case ValueTypeRole: - *t = ValueTypeRole - case ValueTypeInternalRole: - *t = ValueTypeInternalRole - case ValueTypeValueUndefined: - *t = ValueTypeValueUndefined - - default: - in.AddError(errors.New("unknown ValueType value")) - } -} - -// UnmarshalJSON satisfies json.Unmarshaler. -func (t *ValueType) UnmarshalJSON(buf []byte) error { - return easyjson.Unmarshal(buf, t) -} - -// ValueSourceType enum of possible property sources. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueSourceType -type ValueSourceType string - -// String returns the ValueSourceType as string value. -func (t ValueSourceType) String() string { - return string(t) -} - -// ValueSourceType values. -const ( - ValueSourceTypeAttribute ValueSourceType = "attribute" - ValueSourceTypeImplicit ValueSourceType = "implicit" - ValueSourceTypeStyle ValueSourceType = "style" - ValueSourceTypeContents ValueSourceType = "contents" - ValueSourceTypePlaceholder ValueSourceType = "placeholder" - ValueSourceTypeRelatedElement ValueSourceType = "relatedElement" -) - -// MarshalEasyJSON satisfies easyjson.Marshaler. -func (t ValueSourceType) MarshalEasyJSON(out *jwriter.Writer) { - out.String(string(t)) -} - -// MarshalJSON satisfies json.Marshaler. -func (t ValueSourceType) MarshalJSON() ([]byte, error) { - return easyjson.Marshal(t) -} - -// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. -func (t *ValueSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) { - switch ValueSourceType(in.String()) { - case ValueSourceTypeAttribute: - *t = ValueSourceTypeAttribute - case ValueSourceTypeImplicit: - *t = ValueSourceTypeImplicit - case ValueSourceTypeStyle: - *t = ValueSourceTypeStyle - case ValueSourceTypeContents: - *t = ValueSourceTypeContents - case ValueSourceTypePlaceholder: - *t = ValueSourceTypePlaceholder - case ValueSourceTypeRelatedElement: - *t = ValueSourceTypeRelatedElement - - default: - in.AddError(errors.New("unknown ValueSourceType value")) - } -} - -// UnmarshalJSON satisfies json.Unmarshaler. -func (t *ValueSourceType) UnmarshalJSON(buf []byte) error { - return easyjson.Unmarshal(buf, t) -} - -// ValueNativeSourceType enum of possible native property sources (as a -// subtype of a particular AXValueSourceType). -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueNativeSourceType -type ValueNativeSourceType string - -// String returns the ValueNativeSourceType as string value. -func (t ValueNativeSourceType) String() string { - return string(t) -} - -// ValueNativeSourceType values. -const ( - ValueNativeSourceTypeFigcaption ValueNativeSourceType = "figcaption" - ValueNativeSourceTypeLabel ValueNativeSourceType = "label" - ValueNativeSourceTypeLabelfor ValueNativeSourceType = "labelfor" - ValueNativeSourceTypeLabelwrapped ValueNativeSourceType = "labelwrapped" - ValueNativeSourceTypeLegend ValueNativeSourceType = "legend" - ValueNativeSourceTypeRubyannotation ValueNativeSourceType = "rubyannotation" - ValueNativeSourceTypeTablecaption ValueNativeSourceType = "tablecaption" - ValueNativeSourceTypeTitle ValueNativeSourceType = "title" - ValueNativeSourceTypeOther ValueNativeSourceType = "other" -) - -// MarshalEasyJSON satisfies easyjson.Marshaler. -func (t ValueNativeSourceType) MarshalEasyJSON(out *jwriter.Writer) { - out.String(string(t)) -} - -// MarshalJSON satisfies json.Marshaler. -func (t ValueNativeSourceType) MarshalJSON() ([]byte, error) { - return easyjson.Marshal(t) -} - -// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. -func (t *ValueNativeSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) { - switch ValueNativeSourceType(in.String()) { - case ValueNativeSourceTypeFigcaption: - *t = ValueNativeSourceTypeFigcaption - case ValueNativeSourceTypeLabel: - *t = ValueNativeSourceTypeLabel - case ValueNativeSourceTypeLabelfor: - *t = ValueNativeSourceTypeLabelfor - case ValueNativeSourceTypeLabelwrapped: - *t = ValueNativeSourceTypeLabelwrapped - case ValueNativeSourceTypeLegend: - *t = ValueNativeSourceTypeLegend - case ValueNativeSourceTypeRubyannotation: - *t = ValueNativeSourceTypeRubyannotation - case ValueNativeSourceTypeTablecaption: - *t = ValueNativeSourceTypeTablecaption - case ValueNativeSourceTypeTitle: - *t = ValueNativeSourceTypeTitle - case ValueNativeSourceTypeOther: - *t = ValueNativeSourceTypeOther - - default: - in.AddError(errors.New("unknown ValueNativeSourceType value")) - } -} - -// UnmarshalJSON satisfies json.Unmarshaler. -func (t *ValueNativeSourceType) UnmarshalJSON(buf []byte) error { - return easyjson.Unmarshal(buf, t) -} - -// ValueSource a single source for a computed AX property. -// -// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueSource -type ValueSource struct { - Type ValueSourceType `json:"type"` // What type of source this is. - Value *Value `json:"value,omitempty"` // The value of this property source. - Attribute string `json:"attribute,omitempty"` // The name of the relevant attribute, if any. - AttributeValue *Value `json:"attributeValue,omitempty"` // The value of the relevant attribute, if any. - Superseded bool `json:"superseded,omitempty"` // Whether this source is superseded by a higher priority source. - NativeSource ValueNativeSourceType `json:"nativeSource,omitempty"` // The native markup source for this value, e.g. a