From a7d69aad1f78d1e8840b4829f1d2eef534a52bd7 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Sun, 18 Jun 2017 07:55:45 +0700 Subject: [PATCH] Fixing issue with nodeType named object parameters in chromedp-gen, and updating to latest protocol.json --- cdp/cachestorage/easyjson.go | 10 + cdp/cachestorage/types.go | 5 +- cdp/cdp.go | 9 +- cdp/cdputil/cdputil.go | 11 +- cdp/css/css.go | 44 -- cdp/css/easyjson.go | 1156 ++++++++----------------------- cdp/css/types.go | 15 - cdp/domsnapshot/domsnapshot.go | 64 ++ cdp/domsnapshot/easyjson.go | 1035 +++++++++++++++++++++++++++ cdp/domsnapshot/types.go | 51 ++ cdp/network/easyjson.go | 246 ++++++- cdp/network/events.go | 12 +- cdp/network/network.go | 36 +- cdp/network/types.go | 127 +++- cdp/runtime/easyjson.go | 10 + cdp/runtime/events.go | 1 + cdp/storage/easyjson.go | 158 ++++- cdp/storage/storage.go | 38 + cmd/chromedp-gen/fixup/fixup.go | 2 +- cmd/chromedp-gen/protocol.json | 460 +++++++++--- 20 files changed, 2444 insertions(+), 1046 deletions(-) create mode 100644 cdp/domsnapshot/domsnapshot.go create mode 100644 cdp/domsnapshot/easyjson.go create mode 100644 cdp/domsnapshot/types.go diff --git a/cdp/cachestorage/easyjson.go b/cdp/cachestorage/easyjson.go index bca6a98..aefb527 100644 --- a/cdp/cachestorage/easyjson.go +++ b/cdp/cachestorage/easyjson.go @@ -568,6 +568,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(in *jlexer.Lexer out.Request = string(in.String()) case "response": out.Response = string(in.String()) + case "responseTime": + out.ResponseTime = float64(in.Float64()) default: in.SkipRecursive() } @@ -598,6 +600,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(out *jwriter.Wri out.RawString("\"response\":") out.String(string(in.Response)) } + if in.ResponseTime != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"responseTime\":") + out.Float64(float64(in.ResponseTime)) + } out.RawByte('}') } diff --git a/cdp/cachestorage/types.go b/cdp/cachestorage/types.go index e3fb316..6257c69 100644 --- a/cdp/cachestorage/types.go +++ b/cdp/cachestorage/types.go @@ -12,8 +12,9 @@ func (t CacheID) String() string { // DataEntry data entry. type DataEntry struct { - Request string `json:"request,omitempty"` // Request url spec. - Response string `json:"response,omitempty"` // Response stataus text. + Request string `json:"request,omitempty"` // Request url spec. + Response string `json:"response,omitempty"` // Response status text. + ResponseTime float64 `json:"responseTime,omitempty"` // Number of seconds since epoch. } // Cache cache identifier. diff --git a/cdp/cdp.go b/cdp/cdp.go index 18dfe8e..f10a2b0 100644 --- a/cdp/cdp.go +++ b/cdp/cdp.go @@ -285,10 +285,10 @@ const ( CommandCSSGetMediaQueries MethodType = "CSS.getMediaQueries" CommandCSSSetEffectivePropertyValueForNode MethodType = "CSS.setEffectivePropertyValueForNode" CommandCSSGetBackgroundColors MethodType = "CSS.getBackgroundColors" - CommandCSSGetLayoutTreeAndStyles MethodType = "CSS.getLayoutTreeAndStyles" CommandCSSStartRuleUsageTracking MethodType = "CSS.startRuleUsageTracking" CommandCSSTakeCoverageDelta MethodType = "CSS.takeCoverageDelta" CommandCSSStopRuleUsageTracking MethodType = "CSS.stopRuleUsageTracking" + CommandDOMSnapshotGetSnapshot MethodType = "DOMSnapshot.getSnapshot" CommandIORead MethodType = "IO.read" CommandIOClose MethodType = "IO.close" CommandDOMDebuggerSetDOMBreakpoint MethodType = "DOMDebugger.setDOMBreakpoint" @@ -377,6 +377,7 @@ const ( CommandAnimationResolveAnimation MethodType = "Animation.resolveAnimation" CommandAccessibilityGetPartialAXTree MethodType = "Accessibility.getPartialAXTree" CommandStorageClearDataForOrigin MethodType = "Storage.clearDataForOrigin" + CommandStorageGetUsageAndQuota MethodType = "Storage.getUsageAndQuota" EventLogEntryAdded MethodType = "Log.entryAdded" CommandLogEnable MethodType = "Log.enable" CommandLogDisable MethodType = "Log.disable" @@ -955,14 +956,14 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = CommandCSSSetEffectivePropertyValueForNode case CommandCSSGetBackgroundColors: *t = CommandCSSGetBackgroundColors - case CommandCSSGetLayoutTreeAndStyles: - *t = CommandCSSGetLayoutTreeAndStyles case CommandCSSStartRuleUsageTracking: *t = CommandCSSStartRuleUsageTracking case CommandCSSTakeCoverageDelta: *t = CommandCSSTakeCoverageDelta case CommandCSSStopRuleUsageTracking: *t = CommandCSSStopRuleUsageTracking + case CommandDOMSnapshotGetSnapshot: + *t = CommandDOMSnapshotGetSnapshot case CommandIORead: *t = CommandIORead case CommandIOClose: @@ -1139,6 +1140,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = CommandAccessibilityGetPartialAXTree case CommandStorageClearDataForOrigin: *t = CommandStorageClearDataForOrigin + case CommandStorageGetUsageAndQuota: + *t = CommandStorageGetUsageAndQuota case EventLogEntryAdded: *t = EventLogEntryAdded case CommandLogEnable: diff --git a/cdp/cdputil/cdputil.go b/cdp/cdputil/cdputil.go index 371176d..33156a5 100644 --- a/cdp/cdputil/cdputil.go +++ b/cdp/cdputil/cdputil.go @@ -16,6 +16,7 @@ import ( "github.com/knq/chromedp/cdp/debugger" "github.com/knq/chromedp/cdp/dom" "github.com/knq/chromedp/cdp/domdebugger" + "github.com/knq/chromedp/cdp/domsnapshot" "github.com/knq/chromedp/cdp/domstorage" "github.com/knq/chromedp/cdp/emulation" "github.com/knq/chromedp/cdp/heapprofiler" @@ -33,6 +34,7 @@ import ( "github.com/knq/chromedp/cdp/schema" "github.com/knq/chromedp/cdp/security" "github.com/knq/chromedp/cdp/serviceworker" + "github.com/knq/chromedp/cdp/storage" "github.com/knq/chromedp/cdp/systeminfo" "github.com/knq/chromedp/cdp/target" "github.com/knq/chromedp/cdp/tethering" @@ -741,9 +743,6 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) { case cdp.CommandCSSGetBackgroundColors: v = new(css.GetBackgroundColorsReturns) - case cdp.CommandCSSGetLayoutTreeAndStyles: - v = new(css.GetLayoutTreeAndStylesReturns) - case cdp.CommandCSSStartRuleUsageTracking: return emptyVal, nil @@ -768,6 +767,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) { case cdp.EventCSSStyleSheetRemoved: v = new(css.EventStyleSheetRemoved) + case cdp.CommandDOMSnapshotGetSnapshot: + v = new(domsnapshot.GetSnapshotReturns) + case cdp.CommandIORead: v = new(iodom.ReadReturns) @@ -1032,6 +1034,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) { case cdp.CommandStorageClearDataForOrigin: return emptyVal, nil + case cdp.CommandStorageGetUsageAndQuota: + v = new(storage.GetUsageAndQuotaReturns) + case cdp.CommandLogEnable: return emptyVal, nil diff --git a/cdp/css/css.go b/cdp/css/css.go index 96aefbb..228a386 100644 --- a/cdp/css/css.go +++ b/cdp/css/css.go @@ -700,50 +700,6 @@ func (p *GetBackgroundColorsParams) Do(ctxt context.Context, h cdp.Handler) (bac return res.BackgroundColors, nil } -// GetLayoutTreeAndStylesParams for the main document and any content -// documents, return the LayoutTreeNodes and a whitelisted subset of the -// computed style. It only returns pushed nodes, on way to pull all nodes is to -// call DOM.getDocument with a depth of -1. -type GetLayoutTreeAndStylesParams struct { - ComputedStyleWhitelist []string `json:"computedStyleWhitelist"` // Whitelist of computed styles to return. -} - -// GetLayoutTreeAndStyles for the main document and any content documents, -// return the LayoutTreeNodes and a whitelisted subset of the computed style. It -// only returns pushed nodes, on way to pull all nodes is to call -// DOM.getDocument with a depth of -1. -// -// parameters: -// computedStyleWhitelist - Whitelist of computed styles to return. -func GetLayoutTreeAndStyles(computedStyleWhitelist []string) *GetLayoutTreeAndStylesParams { - return &GetLayoutTreeAndStylesParams{ - ComputedStyleWhitelist: computedStyleWhitelist, - } -} - -// GetLayoutTreeAndStylesReturns return values. -type GetLayoutTreeAndStylesReturns struct { - LayoutTreeNodes []*LayoutTreeNode `json:"layoutTreeNodes,omitempty"` - ComputedStyles []*ComputedStyle `json:"computedStyles,omitempty"` -} - -// Do executes CSS.getLayoutTreeAndStyles against the provided context and -// target handler. -// -// returns: -// layoutTreeNodes -// computedStyles -func (p *GetLayoutTreeAndStylesParams) Do(ctxt context.Context, h cdp.Handler) (layoutTreeNodes []*LayoutTreeNode, computedStyles []*ComputedStyle, err error) { - // execute - var res GetLayoutTreeAndStylesReturns - err = h.Execute(ctxt, cdp.CommandCSSGetLayoutTreeAndStyles, p, &res) - if err != nil { - return nil, nil, err - } - - return res.LayoutTreeNodes, res.ComputedStyles, nil -} - // StartRuleUsageTrackingParams enables the selector recording. type StartRuleUsageTrackingParams struct{} diff --git a/cdp/css/easyjson.go b/cdp/css/easyjson.go index 461fcd9..a6db9c2 100644 --- a/cdp/css/easyjson.go +++ b/cdp/css/easyjson.go @@ -3482,172 +3482,7 @@ func (v *Media) UnmarshalJSON(data []byte) error { func (v *Media) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss31(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(in *jlexer.Lexer, out *LayoutTreeNode) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "boundingBox": - if in.IsNull() { - in.Skip() - out.BoundingBox = nil - } else { - if out.BoundingBox == nil { - out.BoundingBox = new(dom.Rect) - } - (*out.BoundingBox).UnmarshalEasyJSON(in) - } - case "layoutText": - out.LayoutText = string(in.String()) - case "inlineTextNodes": - if in.IsNull() { - in.Skip() - out.InlineTextNodes = nil - } else { - in.Delim('[') - if out.InlineTextNodes == nil { - if !in.IsDelim(']') { - out.InlineTextNodes = make([]*InlineTextBox, 0, 8) - } else { - out.InlineTextNodes = []*InlineTextBox{} - } - } else { - out.InlineTextNodes = (out.InlineTextNodes)[:0] - } - for !in.IsDelim(']') { - var v37 *InlineTextBox - if in.IsNull() { - in.Skip() - v37 = nil - } else { - if v37 == nil { - v37 = new(InlineTextBox) - } - (*v37).UnmarshalEasyJSON(in) - } - out.InlineTextNodes = append(out.InlineTextNodes, v37) - in.WantComma() - } - in.Delim(']') - } - case "styleIndex": - out.StyleIndex = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(out *jwriter.Writer, in LayoutTreeNode) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - if in.BoundingBox != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"boundingBox\":") - if in.BoundingBox == nil { - out.RawString("null") - } else { - (*in.BoundingBox).MarshalEasyJSON(out) - } - } - if in.LayoutText != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"layoutText\":") - out.String(string(in.LayoutText)) - } - if len(in.InlineTextNodes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"inlineTextNodes\":") - if in.InlineTextNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v38, v39 := range in.InlineTextNodes { - if v38 > 0 { - out.RawByte(',') - } - if v39 == nil { - out.RawString("null") - } else { - (*v39).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.StyleIndex != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleIndex\":") - out.Int64(int64(in.StyleIndex)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v LayoutTreeNode) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v LayoutTreeNode) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *LayoutTreeNode) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *LayoutTreeNode) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(in *jlexer.Lexer, out *KeyframesRule) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(in *jlexer.Lexer, out *KeyframesRule) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3692,17 +3527,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(in *jlexer.Lexer, out *K out.Keyframes = (out.Keyframes)[:0] } for !in.IsDelim(']') { - var v40 *KeyframeRule + var v37 *KeyframeRule if in.IsNull() { in.Skip() - v40 = nil + v37 = nil } else { - if v40 == nil { - v40 = new(KeyframeRule) + if v37 == nil { + v37 = new(KeyframeRule) } - (*v40).UnmarshalEasyJSON(in) + (*v37).UnmarshalEasyJSON(in) } - out.Keyframes = append(out.Keyframes, v40) + out.Keyframes = append(out.Keyframes, v37) in.WantComma() } in.Delim(']') @@ -3717,7 +3552,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(in *jlexer.Lexer, out *K in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(out *jwriter.Writer, in KeyframesRule) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(out *jwriter.Writer, in KeyframesRule) { out.RawByte('{') first := true _ = first @@ -3743,14 +3578,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v41, v42 := range in.Keyframes { - if v41 > 0 { + for v38, v39 := range in.Keyframes { + if v38 > 0 { out.RawByte(',') } - if v42 == nil { + if v39 == nil { out.RawString("null") } else { - (*v42).MarshalEasyJSON(out) + (*v39).MarshalEasyJSON(out) } } out.RawByte(']') @@ -3762,27 +3597,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v KeyframesRule) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v KeyframesRule) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *KeyframesRule) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *KeyframesRule) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(in *jlexer.Lexer, out *KeyframeRule) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(in *jlexer.Lexer, out *KeyframeRule) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3835,7 +3670,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(in *jlexer.Lexer, out *K in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(out *jwriter.Writer, in KeyframeRule) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(out *jwriter.Writer, in KeyframeRule) { out.RawByte('{') first := true _ = first @@ -3885,27 +3720,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v KeyframeRule) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v KeyframeRule) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *KeyframeRule) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *KeyframeRule) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(in *jlexer.Lexer, out *InlineTextBox) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(in *jlexer.Lexer, out *InlineTextBox) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3948,7 +3783,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(in *jlexer.Lexer, out *I in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(out *jwriter.Writer, in InlineTextBox) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(out *jwriter.Writer, in InlineTextBox) { out.RawByte('{') first := true _ = first @@ -3986,27 +3821,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v InlineTextBox) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v InlineTextBox) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *InlineTextBox) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *InlineTextBox) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(in *jlexer.Lexer, out *InheritedStyleEntry) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(in *jlexer.Lexer, out *InheritedStyleEntry) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4051,17 +3886,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(in *jlexer.Lexer, out *I out.MatchedCSSRules = (out.MatchedCSSRules)[:0] } for !in.IsDelim(']') { - var v43 *RuleMatch + var v40 *RuleMatch if in.IsNull() { in.Skip() - v43 = nil + v40 = nil } else { - if v43 == nil { - v43 = new(RuleMatch) + if v40 == nil { + v40 = new(RuleMatch) } - (*v43).UnmarshalEasyJSON(in) + (*v40).UnmarshalEasyJSON(in) } - out.MatchedCSSRules = append(out.MatchedCSSRules, v43) + out.MatchedCSSRules = append(out.MatchedCSSRules, v40) in.WantComma() } in.Delim(']') @@ -4076,7 +3911,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(in *jlexer.Lexer, out *I in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(out *jwriter.Writer, in InheritedStyleEntry) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(out *jwriter.Writer, in InheritedStyleEntry) { out.RawByte('{') first := true _ = first @@ -4102,14 +3937,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v44, v45 := range in.MatchedCSSRules { - if v44 > 0 { + for v41, v42 := range in.MatchedCSSRules { + if v41 > 0 { out.RawByte(',') } - if v45 == nil { + if v42 == nil { out.RawString("null") } else { - (*v45).MarshalEasyJSON(out) + (*v42).MarshalEasyJSON(out) } } out.RawByte(']') @@ -4121,27 +3956,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v InheritedStyleEntry) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v InheritedStyleEntry) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *InheritedStyleEntry) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *InheritedStyleEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(in *jlexer.Lexer, out *GetStyleSheetTextReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(in *jlexer.Lexer, out *GetStyleSheetTextReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4172,7 +4007,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(out *jwriter.Writer, in GetStyleSheetTextReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(out *jwriter.Writer, in GetStyleSheetTextReturns) { out.RawByte('{') first := true _ = first @@ -4190,27 +4025,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetStyleSheetTextReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetStyleSheetTextReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetStyleSheetTextReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetStyleSheetTextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(in *jlexer.Lexer, out *GetStyleSheetTextParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(in *jlexer.Lexer, out *GetStyleSheetTextParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4241,7 +4076,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(out *jwriter.Writer, in GetStyleSheetTextParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(out *jwriter.Writer, in GetStyleSheetTextParams) { out.RawByte('{') first := true _ = first @@ -4257,27 +4092,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetStyleSheetTextParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetStyleSheetTextParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetStyleSheetTextParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetStyleSheetTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(in *jlexer.Lexer, out *GetPlatformFontsForNodeReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(in *jlexer.Lexer, out *GetPlatformFontsForNodeReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4312,17 +4147,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(in *jlexer.Lexer, out *G out.Fonts = (out.Fonts)[:0] } for !in.IsDelim(']') { - var v46 *PlatformFontUsage + var v43 *PlatformFontUsage if in.IsNull() { in.Skip() - v46 = nil + v43 = nil } else { - if v46 == nil { - v46 = new(PlatformFontUsage) + if v43 == nil { + v43 = new(PlatformFontUsage) } - (*v46).UnmarshalEasyJSON(in) + (*v43).UnmarshalEasyJSON(in) } - out.Fonts = append(out.Fonts, v46) + out.Fonts = append(out.Fonts, v43) in.WantComma() } in.Delim(']') @@ -4337,7 +4172,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(out *jwriter.Writer, in GetPlatformFontsForNodeReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(out *jwriter.Writer, in GetPlatformFontsForNodeReturns) { out.RawByte('{') first := true _ = first @@ -4351,14 +4186,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v47, v48 := range in.Fonts { - if v47 > 0 { + for v44, v45 := range in.Fonts { + if v44 > 0 { out.RawByte(',') } - if v48 == nil { + if v45 == nil { out.RawString("null") } else { - (*v48).MarshalEasyJSON(out) + (*v45).MarshalEasyJSON(out) } } out.RawByte(']') @@ -4370,27 +4205,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetPlatformFontsForNodeReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetPlatformFontsForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetPlatformFontsForNodeReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetPlatformFontsForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(in *jlexer.Lexer, out *GetPlatformFontsForNodeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(in *jlexer.Lexer, out *GetPlatformFontsForNodeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4421,7 +4256,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(out *jwriter.Writer, in GetPlatformFontsForNodeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(out *jwriter.Writer, in GetPlatformFontsForNodeParams) { out.RawByte('{') first := true _ = first @@ -4437,27 +4272,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetPlatformFontsForNodeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetPlatformFontsForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetPlatformFontsForNodeParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetPlatformFontsForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(in *jlexer.Lexer, out *GetMediaQueriesReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(in *jlexer.Lexer, out *GetMediaQueriesReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4492,17 +4327,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(in *jlexer.Lexer, out *G out.Medias = (out.Medias)[:0] } for !in.IsDelim(']') { - var v49 *Media + var v46 *Media if in.IsNull() { in.Skip() - v49 = nil + v46 = nil } else { - if v49 == nil { - v49 = new(Media) + if v46 == nil { + v46 = new(Media) } - (*v49).UnmarshalEasyJSON(in) + (*v46).UnmarshalEasyJSON(in) } - out.Medias = append(out.Medias, v49) + out.Medias = append(out.Medias, v46) in.WantComma() } in.Delim(']') @@ -4517,7 +4352,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(out *jwriter.Writer, in GetMediaQueriesReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(out *jwriter.Writer, in GetMediaQueriesReturns) { out.RawByte('{') first := true _ = first @@ -4531,14 +4366,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v50, v51 := range in.Medias { - if v50 > 0 { + for v47, v48 := range in.Medias { + if v47 > 0 { out.RawByte(',') } - if v51 == nil { + if v48 == nil { out.RawString("null") } else { - (*v51).MarshalEasyJSON(out) + (*v48).MarshalEasyJSON(out) } } out.RawByte(']') @@ -4550,27 +4385,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetMediaQueriesReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetMediaQueriesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetMediaQueriesReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetMediaQueriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(in *jlexer.Lexer, out *GetMediaQueriesParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(in *jlexer.Lexer, out *GetMediaQueriesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4599,7 +4434,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(out *jwriter.Writer, in GetMediaQueriesParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(out *jwriter.Writer, in GetMediaQueriesParams) { out.RawByte('{') first := true _ = first @@ -4609,27 +4444,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetMediaQueriesParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetMediaQueriesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetMediaQueriesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetMediaQueriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(in *jlexer.Lexer, out *GetMatchedStylesForNodeReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(in *jlexer.Lexer, out *GetMatchedStylesForNodeReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4684,17 +4519,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(in *jlexer.Lexer, out *G out.MatchedCSSRules = (out.MatchedCSSRules)[:0] } for !in.IsDelim(']') { - var v52 *RuleMatch + var v49 *RuleMatch if in.IsNull() { in.Skip() - v52 = nil + v49 = nil } else { - if v52 == nil { - v52 = new(RuleMatch) + if v49 == nil { + v49 = new(RuleMatch) } - (*v52).UnmarshalEasyJSON(in) + (*v49).UnmarshalEasyJSON(in) } - out.MatchedCSSRules = append(out.MatchedCSSRules, v52) + out.MatchedCSSRules = append(out.MatchedCSSRules, v49) in.WantComma() } in.Delim(']') @@ -4715,17 +4550,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(in *jlexer.Lexer, out *G out.PseudoElements = (out.PseudoElements)[:0] } for !in.IsDelim(']') { - var v53 *PseudoElementMatches + var v50 *PseudoElementMatches if in.IsNull() { in.Skip() - v53 = nil + v50 = nil } else { - if v53 == nil { - v53 = new(PseudoElementMatches) + if v50 == nil { + v50 = new(PseudoElementMatches) } - (*v53).UnmarshalEasyJSON(in) + (*v50).UnmarshalEasyJSON(in) } - out.PseudoElements = append(out.PseudoElements, v53) + out.PseudoElements = append(out.PseudoElements, v50) in.WantComma() } in.Delim(']') @@ -4746,17 +4581,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(in *jlexer.Lexer, out *G out.Inherited = (out.Inherited)[:0] } for !in.IsDelim(']') { - var v54 *InheritedStyleEntry + var v51 *InheritedStyleEntry if in.IsNull() { in.Skip() - v54 = nil + v51 = nil } else { - if v54 == nil { - v54 = new(InheritedStyleEntry) + if v51 == nil { + v51 = new(InheritedStyleEntry) } - (*v54).UnmarshalEasyJSON(in) + (*v51).UnmarshalEasyJSON(in) } - out.Inherited = append(out.Inherited, v54) + out.Inherited = append(out.Inherited, v51) in.WantComma() } in.Delim(']') @@ -4777,17 +4612,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(in *jlexer.Lexer, out *G out.CSSKeyframesRules = (out.CSSKeyframesRules)[:0] } for !in.IsDelim(']') { - var v55 *KeyframesRule + var v52 *KeyframesRule if in.IsNull() { in.Skip() - v55 = nil + v52 = nil } else { - if v55 == nil { - v55 = new(KeyframesRule) + if v52 == nil { + v52 = new(KeyframesRule) } - (*v55).UnmarshalEasyJSON(in) + (*v52).UnmarshalEasyJSON(in) } - out.CSSKeyframesRules = append(out.CSSKeyframesRules, v55) + out.CSSKeyframesRules = append(out.CSSKeyframesRules, v52) in.WantComma() } in.Delim(']') @@ -4802,7 +4637,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(out *jwriter.Writer, in GetMatchedStylesForNodeReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(out *jwriter.Writer, in GetMatchedStylesForNodeReturns) { out.RawByte('{') first := true _ = first @@ -4840,14 +4675,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v56, v57 := range in.MatchedCSSRules { - if v56 > 0 { + for v53, v54 := range in.MatchedCSSRules { + if v53 > 0 { out.RawByte(',') } - if v57 == nil { + if v54 == nil { out.RawString("null") } else { - (*v57).MarshalEasyJSON(out) + (*v54).MarshalEasyJSON(out) } } out.RawByte(']') @@ -4863,14 +4698,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v58, v59 := range in.PseudoElements { - if v58 > 0 { + for v55, v56 := range in.PseudoElements { + if v55 > 0 { out.RawByte(',') } - if v59 == nil { + if v56 == nil { out.RawString("null") } else { - (*v59).MarshalEasyJSON(out) + (*v56).MarshalEasyJSON(out) } } out.RawByte(']') @@ -4886,14 +4721,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v60, v61 := range in.Inherited { - if v60 > 0 { + for v57, v58 := range in.Inherited { + if v57 > 0 { out.RawByte(',') } - if v61 == nil { + if v58 == nil { out.RawString("null") } else { - (*v61).MarshalEasyJSON(out) + (*v58).MarshalEasyJSON(out) } } out.RawByte(']') @@ -4909,14 +4744,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v62, v63 := range in.CSSKeyframesRules { - if v62 > 0 { + for v59, v60 := range in.CSSKeyframesRules { + if v59 > 0 { out.RawByte(',') } - if v63 == nil { + if v60 == nil { out.RawString("null") } else { - (*v63).MarshalEasyJSON(out) + (*v60).MarshalEasyJSON(out) } } out.RawByte(']') @@ -4928,27 +4763,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetMatchedStylesForNodeReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetMatchedStylesForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetMatchedStylesForNodeReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetMatchedStylesForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(in *jlexer.Lexer, out *GetMatchedStylesForNodeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(in *jlexer.Lexer, out *GetMatchedStylesForNodeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4979,7 +4814,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(out *jwriter.Writer, in GetMatchedStylesForNodeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(out *jwriter.Writer, in GetMatchedStylesForNodeParams) { out.RawByte('{') first := true _ = first @@ -4995,293 +4830,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetMatchedStylesForNodeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetMatchedStylesForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetMatchedStylesForNodeParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetMatchedStylesForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(in *jlexer.Lexer, out *GetLayoutTreeAndStylesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "layoutTreeNodes": - if in.IsNull() { - in.Skip() - out.LayoutTreeNodes = nil - } else { - in.Delim('[') - if out.LayoutTreeNodes == nil { - if !in.IsDelim(']') { - out.LayoutTreeNodes = make([]*LayoutTreeNode, 0, 8) - } else { - out.LayoutTreeNodes = []*LayoutTreeNode{} - } - } else { - out.LayoutTreeNodes = (out.LayoutTreeNodes)[:0] - } - for !in.IsDelim(']') { - var v64 *LayoutTreeNode - if in.IsNull() { - in.Skip() - v64 = nil - } else { - if v64 == nil { - v64 = new(LayoutTreeNode) - } - (*v64).UnmarshalEasyJSON(in) - } - out.LayoutTreeNodes = append(out.LayoutTreeNodes, v64) - in.WantComma() - } - in.Delim(']') - } - case "computedStyles": - if in.IsNull() { - in.Skip() - out.ComputedStyles = nil - } else { - in.Delim('[') - if out.ComputedStyles == nil { - if !in.IsDelim(']') { - out.ComputedStyles = make([]*ComputedStyle, 0, 8) - } else { - out.ComputedStyles = []*ComputedStyle{} - } - } else { - out.ComputedStyles = (out.ComputedStyles)[:0] - } - for !in.IsDelim(']') { - var v65 *ComputedStyle - if in.IsNull() { - in.Skip() - v65 = nil - } else { - if v65 == nil { - v65 = new(ComputedStyle) - } - (*v65).UnmarshalEasyJSON(in) - } - out.ComputedStyles = append(out.ComputedStyles, v65) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(out *jwriter.Writer, in GetLayoutTreeAndStylesReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.LayoutTreeNodes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"layoutTreeNodes\":") - if in.LayoutTreeNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v66, v67 := range in.LayoutTreeNodes { - if v66 > 0 { - out.RawByte(',') - } - if v67 == nil { - out.RawString("null") - } else { - (*v67).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.ComputedStyles) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"computedStyles\":") - if in.ComputedStyles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v68, v69 := range in.ComputedStyles { - if v68 > 0 { - out.RawByte(',') - } - if v69 == nil { - out.RawString("null") - } else { - (*v69).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetLayoutTreeAndStylesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetLayoutTreeAndStylesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetLayoutTreeAndStylesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetLayoutTreeAndStylesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(in *jlexer.Lexer, out *GetLayoutTreeAndStylesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "computedStyleWhitelist": - if in.IsNull() { - in.Skip() - out.ComputedStyleWhitelist = nil - } else { - in.Delim('[') - if out.ComputedStyleWhitelist == nil { - if !in.IsDelim(']') { - out.ComputedStyleWhitelist = make([]string, 0, 4) - } else { - out.ComputedStyleWhitelist = []string{} - } - } else { - out.ComputedStyleWhitelist = (out.ComputedStyleWhitelist)[:0] - } - for !in.IsDelim(']') { - var v70 string - v70 = string(in.String()) - out.ComputedStyleWhitelist = append(out.ComputedStyleWhitelist, v70) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(out *jwriter.Writer, in GetLayoutTreeAndStylesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"computedStyleWhitelist\":") - if in.ComputedStyleWhitelist == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v71, v72 := range in.ComputedStyleWhitelist { - if v71 > 0 { - out.RawByte(',') - } - out.String(string(v72)) - } - out.RawByte(']') - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetLayoutTreeAndStylesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetLayoutTreeAndStylesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetLayoutTreeAndStylesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetLayoutTreeAndStylesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(in *jlexer.Lexer, out *GetInlineStylesForNodeReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(in *jlexer.Lexer, out *GetInlineStylesForNodeReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5330,7 +4899,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(out *jwriter.Writer, in GetInlineStylesForNodeReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(out *jwriter.Writer, in GetInlineStylesForNodeReturns) { out.RawByte('{') first := true _ = first @@ -5364,27 +4933,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetInlineStylesForNodeReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetInlineStylesForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetInlineStylesForNodeReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetInlineStylesForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(in *jlexer.Lexer, out *GetInlineStylesForNodeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(in *jlexer.Lexer, out *GetInlineStylesForNodeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5415,7 +4984,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(out *jwriter.Writer, in GetInlineStylesForNodeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(out *jwriter.Writer, in GetInlineStylesForNodeParams) { out.RawByte('{') first := true _ = first @@ -5431,27 +5000,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetInlineStylesForNodeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetInlineStylesForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetInlineStylesForNodeParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetInlineStylesForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(in *jlexer.Lexer, out *GetComputedStyleForNodeReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(in *jlexer.Lexer, out *GetComputedStyleForNodeReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5486,17 +5055,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(in *jlexer.Lexer, out *G out.ComputedStyle = (out.ComputedStyle)[:0] } for !in.IsDelim(']') { - var v73 *ComputedProperty + var v61 *ComputedProperty if in.IsNull() { in.Skip() - v73 = nil + v61 = nil } else { - if v73 == nil { - v73 = new(ComputedProperty) + if v61 == nil { + v61 = new(ComputedProperty) } - (*v73).UnmarshalEasyJSON(in) + (*v61).UnmarshalEasyJSON(in) } - out.ComputedStyle = append(out.ComputedStyle, v73) + out.ComputedStyle = append(out.ComputedStyle, v61) in.WantComma() } in.Delim(']') @@ -5511,7 +5080,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(out *jwriter.Writer, in GetComputedStyleForNodeReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(out *jwriter.Writer, in GetComputedStyleForNodeReturns) { out.RawByte('{') first := true _ = first @@ -5525,14 +5094,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v74, v75 := range in.ComputedStyle { - if v74 > 0 { + for v62, v63 := range in.ComputedStyle { + if v62 > 0 { out.RawByte(',') } - if v75 == nil { + if v63 == nil { out.RawString("null") } else { - (*v75).MarshalEasyJSON(out) + (*v63).MarshalEasyJSON(out) } } out.RawByte(']') @@ -5544,27 +5113,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetComputedStyleForNodeReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetComputedStyleForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetComputedStyleForNodeReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetComputedStyleForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(in *jlexer.Lexer, out *GetComputedStyleForNodeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(in *jlexer.Lexer, out *GetComputedStyleForNodeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5595,7 +5164,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(out *jwriter.Writer, in GetComputedStyleForNodeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(out *jwriter.Writer, in GetComputedStyleForNodeParams) { out.RawByte('{') first := true _ = first @@ -5611,27 +5180,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetComputedStyleForNodeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetComputedStyleForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetComputedStyleForNodeParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetComputedStyleForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(in *jlexer.Lexer, out *GetBackgroundColorsReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(in *jlexer.Lexer, out *GetBackgroundColorsReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5666,9 +5235,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(in *jlexer.Lexer, out *G out.BackgroundColors = (out.BackgroundColors)[:0] } for !in.IsDelim(']') { - var v76 string - v76 = string(in.String()) - out.BackgroundColors = append(out.BackgroundColors, v76) + var v64 string + v64 = string(in.String()) + out.BackgroundColors = append(out.BackgroundColors, v64) in.WantComma() } in.Delim(']') @@ -5683,7 +5252,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(out *jwriter.Writer, in GetBackgroundColorsReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(out *jwriter.Writer, in GetBackgroundColorsReturns) { out.RawByte('{') first := true _ = first @@ -5697,11 +5266,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v77, v78 := range in.BackgroundColors { - if v77 > 0 { + for v65, v66 := range in.BackgroundColors { + if v65 > 0 { out.RawByte(',') } - out.String(string(v78)) + out.String(string(v66)) } out.RawByte(']') } @@ -5712,27 +5281,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetBackgroundColorsReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetBackgroundColorsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetBackgroundColorsReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetBackgroundColorsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(in *jlexer.Lexer, out *GetBackgroundColorsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(in *jlexer.Lexer, out *GetBackgroundColorsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5763,7 +5332,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(out *jwriter.Writer, in GetBackgroundColorsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(out *jwriter.Writer, in GetBackgroundColorsParams) { out.RawByte('{') first := true _ = first @@ -5779,27 +5348,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetBackgroundColorsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetBackgroundColorsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetBackgroundColorsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetBackgroundColorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(in *jlexer.Lexer, out *ForcePseudoStateParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(in *jlexer.Lexer, out *ForcePseudoStateParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5836,9 +5405,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(in *jlexer.Lexer, out *F out.ForcedPseudoClasses = (out.ForcedPseudoClasses)[:0] } for !in.IsDelim(']') { - var v79 PseudoClass - (v79).UnmarshalEasyJSON(in) - out.ForcedPseudoClasses = append(out.ForcedPseudoClasses, v79) + var v67 PseudoClass + (v67).UnmarshalEasyJSON(in) + out.ForcedPseudoClasses = append(out.ForcedPseudoClasses, v67) in.WantComma() } in.Delim(']') @@ -5853,7 +5422,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(in *jlexer.Lexer, out *F in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(out *jwriter.Writer, in ForcePseudoStateParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(out *jwriter.Writer, in ForcePseudoStateParams) { out.RawByte('{') first := true _ = first @@ -5872,11 +5441,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v80, v81 := range in.ForcedPseudoClasses { - if v80 > 0 { + for v68, v69 := range in.ForcedPseudoClasses { + if v68 > 0 { out.RawByte(',') } - (v81).MarshalEasyJSON(out) + (v69).MarshalEasyJSON(out) } out.RawByte(']') } @@ -5886,27 +5455,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v ForcePseudoStateParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ForcePseudoStateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ForcePseudoStateParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ForcePseudoStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(in *jlexer.Lexer, out *EventStyleSheetRemoved) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(in *jlexer.Lexer, out *EventStyleSheetRemoved) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5937,7 +5506,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(in *jlexer.Lexer, out *E in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(out *jwriter.Writer, in EventStyleSheetRemoved) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(out *jwriter.Writer, in EventStyleSheetRemoved) { out.RawByte('{') first := true _ = first @@ -5955,27 +5524,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventStyleSheetRemoved) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventStyleSheetRemoved) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventStyleSheetRemoved) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventStyleSheetRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(in *jlexer.Lexer, out *EventStyleSheetChanged) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(in *jlexer.Lexer, out *EventStyleSheetChanged) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6006,7 +5575,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(in *jlexer.Lexer, out *E in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(out *jwriter.Writer, in EventStyleSheetChanged) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(out *jwriter.Writer, in EventStyleSheetChanged) { out.RawByte('{') first := true _ = first @@ -6024,27 +5593,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventStyleSheetChanged) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventStyleSheetChanged) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventStyleSheetChanged) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventStyleSheetChanged) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(in *jlexer.Lexer, out *EventStyleSheetAdded) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(in *jlexer.Lexer, out *EventStyleSheetAdded) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6083,7 +5652,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(in *jlexer.Lexer, out *E in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(out *jwriter.Writer, in EventStyleSheetAdded) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(out *jwriter.Writer, in EventStyleSheetAdded) { out.RawByte('{') first := true _ = first @@ -6105,27 +5674,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventStyleSheetAdded) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventStyleSheetAdded) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventStyleSheetAdded) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventStyleSheetAdded) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(in *jlexer.Lexer, out *EventMediaQueryResultChanged) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(in *jlexer.Lexer, out *EventMediaQueryResultChanged) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6154,7 +5723,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(in *jlexer.Lexer, out *E in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(out *jwriter.Writer, in EventMediaQueryResultChanged) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(out *jwriter.Writer, in EventMediaQueryResultChanged) { out.RawByte('{') first := true _ = first @@ -6164,27 +5733,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventMediaQueryResultChanged) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventMediaQueryResultChanged) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventMediaQueryResultChanged) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventMediaQueryResultChanged) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(in *jlexer.Lexer, out *EventFontsUpdated) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(in *jlexer.Lexer, out *EventFontsUpdated) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6213,7 +5782,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(in *jlexer.Lexer, out *E in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(out *jwriter.Writer, in EventFontsUpdated) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(out *jwriter.Writer, in EventFontsUpdated) { out.RawByte('{') first := true _ = first @@ -6223,27 +5792,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventFontsUpdated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventFontsUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventFontsUpdated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventFontsUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(in *jlexer.Lexer, out *EnableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(in *jlexer.Lexer, out *EnableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6272,7 +5841,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(in *jlexer.Lexer, out *E in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(out *jwriter.Writer, in EnableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(out *jwriter.Writer, in EnableParams) { out.RawByte('{') first := true _ = first @@ -6282,27 +5851,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EnableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(in *jlexer.Lexer, out *DisableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(in *jlexer.Lexer, out *DisableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6331,7 +5900,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(in *jlexer.Lexer, out *D in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(out *jwriter.Writer, in DisableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(out *jwriter.Writer, in DisableParams) { out.RawByte('{') first := true _ = first @@ -6341,27 +5910,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v DisableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DisableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(in *jlexer.Lexer, out *CreateStyleSheetReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(in *jlexer.Lexer, out *CreateStyleSheetReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6392,7 +5961,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(in *jlexer.Lexer, out *C in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(out *jwriter.Writer, in CreateStyleSheetReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(out *jwriter.Writer, in CreateStyleSheetReturns) { out.RawByte('{') first := true _ = first @@ -6410,27 +5979,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v CreateStyleSheetReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CreateStyleSheetReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CreateStyleSheetReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CreateStyleSheetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(in *jlexer.Lexer, out *CreateStyleSheetParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(in *jlexer.Lexer, out *CreateStyleSheetParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6461,7 +6030,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(in *jlexer.Lexer, out *C in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(out *jwriter.Writer, in CreateStyleSheetParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(out *jwriter.Writer, in CreateStyleSheetParams) { out.RawByte('{') first := true _ = first @@ -6477,140 +6046,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v CreateStyleSheetParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CreateStyleSheetParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CreateStyleSheetParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CreateStyleSheetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(in *jlexer.Lexer, out *ComputedStyle) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "properties": - if in.IsNull() { - in.Skip() - out.Properties = nil - } else { - in.Delim('[') - if out.Properties == nil { - if !in.IsDelim(']') { - out.Properties = make([]*ComputedProperty, 0, 8) - } else { - out.Properties = []*ComputedProperty{} - } - } else { - out.Properties = (out.Properties)[:0] - } - for !in.IsDelim(']') { - var v82 *ComputedProperty - if in.IsNull() { - in.Skip() - v82 = nil - } else { - if v82 == nil { - v82 = new(ComputedProperty) - } - (*v82).UnmarshalEasyJSON(in) - } - out.Properties = append(out.Properties, v82) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(out *jwriter.Writer, in ComputedStyle) { - out.RawByte('{') - first := true - _ = first - if len(in.Properties) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"properties\":") - if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v83, v84 := range in.Properties { - if v83 > 0 { - out.RawByte(',') - } - if v84 == nil { - out.RawString("null") - } else { - (*v84).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ComputedStyle) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ComputedStyle) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ComputedStyle) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ComputedStyle) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(in *jlexer.Lexer, out *ComputedProperty) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(in *jlexer.Lexer, out *ComputedProperty) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6643,7 +6099,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(in *jlexer.Lexer, out *C in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(out *jwriter.Writer, in ComputedProperty) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(out *jwriter.Writer, in ComputedProperty) { out.RawByte('{') first := true _ = first @@ -6669,27 +6125,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v ComputedProperty) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ComputedProperty) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ComputedProperty) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ComputedProperty) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss65(in *jlexer.Lexer, out *CollectClassNamesReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(in *jlexer.Lexer, out *CollectClassNamesReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6724,9 +6180,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss65(in *jlexer.Lexer, out *C out.ClassNames = (out.ClassNames)[:0] } for !in.IsDelim(']') { - var v85 string - v85 = string(in.String()) - out.ClassNames = append(out.ClassNames, v85) + var v70 string + v70 = string(in.String()) + out.ClassNames = append(out.ClassNames, v70) in.WantComma() } in.Delim(']') @@ -6741,7 +6197,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss65(in *jlexer.Lexer, out *C in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss65(out *jwriter.Writer, in CollectClassNamesReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(out *jwriter.Writer, in CollectClassNamesReturns) { out.RawByte('{') first := true _ = first @@ -6755,11 +6211,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss65(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v86, v87 := range in.ClassNames { - if v86 > 0 { + for v71, v72 := range in.ClassNames { + if v71 > 0 { out.RawByte(',') } - out.String(string(v87)) + out.String(string(v72)) } out.RawByte(']') } @@ -6770,27 +6226,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss65(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v CollectClassNamesReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss65(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CollectClassNamesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss65(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CollectClassNamesReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss65(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CollectClassNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss65(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(in *jlexer.Lexer, out *CollectClassNamesParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(in *jlexer.Lexer, out *CollectClassNamesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6821,7 +6277,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(in *jlexer.Lexer, out *C in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss66(out *jwriter.Writer, in CollectClassNamesParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(out *jwriter.Writer, in CollectClassNamesParams) { out.RawByte('{') first := true _ = first @@ -6837,27 +6293,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss66(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v CollectClassNamesParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss66(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CollectClassNamesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss66(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CollectClassNamesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CollectClassNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss67(in *jlexer.Lexer, out *AddRuleReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(in *jlexer.Lexer, out *AddRuleReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6896,7 +6352,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss67(in *jlexer.Lexer, out *A in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss67(out *jwriter.Writer, in AddRuleReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(out *jwriter.Writer, in AddRuleReturns) { out.RawByte('{') first := true _ = first @@ -6918,27 +6374,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss67(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v AddRuleReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss67(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v AddRuleReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss67(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *AddRuleReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss67(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *AddRuleReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss67(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss68(in *jlexer.Lexer, out *AddRuleParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(in *jlexer.Lexer, out *AddRuleParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6981,7 +6437,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss68(in *jlexer.Lexer, out *A in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss68(out *jwriter.Writer, in AddRuleParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(out *jwriter.Writer, in AddRuleParams) { out.RawByte('{') first := true _ = first @@ -7013,23 +6469,23 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss68(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v AddRuleParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss68(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v AddRuleParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss68(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *AddRuleParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss68(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *AddRuleParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss68(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(l, v) } diff --git a/cdp/css/types.go b/cdp/css/types.go index de61b78..c8159c7 100644 --- a/cdp/css/types.go +++ b/cdp/css/types.go @@ -241,21 +241,6 @@ type InlineTextBox struct { NumCharacters int64 `json:"numCharacters,omitempty"` // The number of characters in this post layout textbox substring. } -// LayoutTreeNode details of an element in the DOM tree with a LayoutObject. -type LayoutTreeNode struct { - NodeID cdp.NodeID `json:"nodeId,omitempty"` // The id of the related DOM node matching one from DOM.GetDocument. - BoundingBox *dom.Rect `json:"boundingBox,omitempty"` // The absolute position bounding box. - LayoutText string `json:"layoutText,omitempty"` // Contents of the LayoutText if any - InlineTextNodes []*InlineTextBox `json:"inlineTextNodes,omitempty"` // The post layout inline text nodes, if any. - StyleIndex int64 `json:"styleIndex,omitempty"` // Index into the computedStyles array returned by getLayoutTreeAndStyles. -} - -// ComputedStyle a subset of the full ComputedStyle as defined by the request -// whitelist. -type ComputedStyle struct { - Properties []*ComputedProperty `json:"properties,omitempty"` -} - // MediaSource source of the media query: "mediaRule" if specified by a // @media rule, "importRule" if specified by an @import rule, "linkedSheet" if // specified by a "media" attribute in a linked stylesheet's LINK tag, diff --git a/cdp/domsnapshot/domsnapshot.go b/cdp/domsnapshot/domsnapshot.go new file mode 100644 index 0000000..b2ba388 --- /dev/null +++ b/cdp/domsnapshot/domsnapshot.go @@ -0,0 +1,64 @@ +// Package domsnapshot provides the Chrome Debugging Protocol +// commands, types, and events for the DOMSnapshot domain. +// +// This domain facilitates obtaining document snapshots with DOM, layout, and +// style information. +// +// Generated by the chromedp-gen command. +package domsnapshot + +// AUTOGENERATED. DO NOT EDIT. + +import ( + "context" + + cdp "github.com/knq/chromedp/cdp" +) + +// GetSnapshotParams returns a document snapshot, including the full DOM tree +// of the root node (including iframes, template contents, and imported +// documents) in a flattened array, as well as layout and white-listed computed +// style information for the nodes. Shadow DOM in the returned DOM tree is +// flattened. . +type GetSnapshotParams struct { + ComputedStyleWhitelist []string `json:"computedStyleWhitelist"` // Whitelist of computed styles to return. +} + +// GetSnapshot returns a document snapshot, including the full DOM tree of +// the root node (including iframes, template contents, and imported documents) +// in a flattened array, as well as layout and white-listed computed style +// information for the nodes. Shadow DOM in the returned DOM tree is flattened. +// . +// +// parameters: +// computedStyleWhitelist - Whitelist of computed styles to return. +func GetSnapshot(computedStyleWhitelist []string) *GetSnapshotParams { + return &GetSnapshotParams{ + ComputedStyleWhitelist: computedStyleWhitelist, + } +} + +// GetSnapshotReturns return values. +type GetSnapshotReturns struct { + DomNodes []*DOMNode `json:"domNodes,omitempty"` // The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. + LayoutTreeNodes []*LayoutTreeNode `json:"layoutTreeNodes,omitempty"` // The nodes in the layout tree. + ComputedStyles []*ComputedStyle `json:"computedStyles,omitempty"` // Whitelisted ComputedStyle properties for each node in the layout tree. +} + +// Do executes DOMSnapshot.getSnapshot against the provided context and +// target handler. +// +// returns: +// domNodes - The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. +// layoutTreeNodes - The nodes in the layout tree. +// computedStyles - Whitelisted ComputedStyle properties for each node in the layout tree. +func (p *GetSnapshotParams) Do(ctxt context.Context, h cdp.Handler) (domNodes []*DOMNode, layoutTreeNodes []*LayoutTreeNode, computedStyles []*ComputedStyle, err error) { + // execute + var res GetSnapshotReturns + err = h.Execute(ctxt, cdp.CommandDOMSnapshotGetSnapshot, p, &res) + if err != nil { + return nil, nil, nil, err + } + + return res.DomNodes, res.LayoutTreeNodes, res.ComputedStyles, nil +} diff --git a/cdp/domsnapshot/easyjson.go b/cdp/domsnapshot/easyjson.go new file mode 100644 index 0000000..c97a6db --- /dev/null +++ b/cdp/domsnapshot/easyjson.go @@ -0,0 +1,1035 @@ +// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. + +package domsnapshot + +import ( + json "encoding/json" + css "github.com/knq/chromedp/cdp/css" + dom "github.com/knq/chromedp/cdp/dom" + 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 easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot(in *jlexer.Lexer, out *NameValue) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + out.Name = string(in.String()) + case "value": + out.Value = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot(out *jwriter.Writer, in NameValue) { + out.RawByte('{') + first := true + _ = first + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.Value != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v NameValue) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v NameValue) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *NameValue) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *NameValue) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot1(in *jlexer.Lexer, out *LayoutTreeNode) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "domNodeIndex": + out.DomNodeIndex = int64(in.Int64()) + case "boundingBox": + if in.IsNull() { + in.Skip() + out.BoundingBox = nil + } else { + if out.BoundingBox == nil { + out.BoundingBox = new(dom.Rect) + } + (*out.BoundingBox).UnmarshalEasyJSON(in) + } + case "layoutText": + out.LayoutText = string(in.String()) + case "inlineTextNodes": + if in.IsNull() { + in.Skip() + out.InlineTextNodes = nil + } else { + in.Delim('[') + if out.InlineTextNodes == nil { + if !in.IsDelim(']') { + out.InlineTextNodes = make([]*css.InlineTextBox, 0, 8) + } else { + out.InlineTextNodes = []*css.InlineTextBox{} + } + } else { + out.InlineTextNodes = (out.InlineTextNodes)[:0] + } + for !in.IsDelim(']') { + var v1 *css.InlineTextBox + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(css.InlineTextBox) + } + (*v1).UnmarshalEasyJSON(in) + } + out.InlineTextNodes = append(out.InlineTextNodes, v1) + in.WantComma() + } + in.Delim(']') + } + case "styleIndex": + out.StyleIndex = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot1(out *jwriter.Writer, in LayoutTreeNode) { + out.RawByte('{') + first := true + _ = first + if in.DomNodeIndex != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"domNodeIndex\":") + out.Int64(int64(in.DomNodeIndex)) + } + if in.BoundingBox != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"boundingBox\":") + if in.BoundingBox == nil { + out.RawString("null") + } else { + (*in.BoundingBox).MarshalEasyJSON(out) + } + } + if in.LayoutText != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"layoutText\":") + out.String(string(in.LayoutText)) + } + if len(in.InlineTextNodes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"inlineTextNodes\":") + if in.InlineTextNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.InlineTextNodes { + if v2 > 0 { + out.RawByte(',') + } + if v3 == nil { + out.RawString("null") + } else { + (*v3).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.StyleIndex != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleIndex\":") + out.Int64(int64(in.StyleIndex)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v LayoutTreeNode) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v LayoutTreeNode) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *LayoutTreeNode) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *LayoutTreeNode) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot2(in *jlexer.Lexer, out *GetSnapshotReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "domNodes": + if in.IsNull() { + in.Skip() + out.DomNodes = nil + } else { + in.Delim('[') + if out.DomNodes == nil { + if !in.IsDelim(']') { + out.DomNodes = make([]*DOMNode, 0, 8) + } else { + out.DomNodes = []*DOMNode{} + } + } else { + out.DomNodes = (out.DomNodes)[:0] + } + for !in.IsDelim(']') { + var v4 *DOMNode + if in.IsNull() { + in.Skip() + v4 = nil + } else { + if v4 == nil { + v4 = new(DOMNode) + } + (*v4).UnmarshalEasyJSON(in) + } + out.DomNodes = append(out.DomNodes, v4) + in.WantComma() + } + in.Delim(']') + } + case "layoutTreeNodes": + if in.IsNull() { + in.Skip() + out.LayoutTreeNodes = nil + } else { + in.Delim('[') + if out.LayoutTreeNodes == nil { + if !in.IsDelim(']') { + out.LayoutTreeNodes = make([]*LayoutTreeNode, 0, 8) + } else { + out.LayoutTreeNodes = []*LayoutTreeNode{} + } + } else { + out.LayoutTreeNodes = (out.LayoutTreeNodes)[:0] + } + for !in.IsDelim(']') { + var v5 *LayoutTreeNode + if in.IsNull() { + in.Skip() + v5 = nil + } else { + if v5 == nil { + v5 = new(LayoutTreeNode) + } + (*v5).UnmarshalEasyJSON(in) + } + out.LayoutTreeNodes = append(out.LayoutTreeNodes, v5) + in.WantComma() + } + in.Delim(']') + } + case "computedStyles": + if in.IsNull() { + in.Skip() + out.ComputedStyles = nil + } else { + in.Delim('[') + if out.ComputedStyles == nil { + if !in.IsDelim(']') { + out.ComputedStyles = make([]*ComputedStyle, 0, 8) + } else { + out.ComputedStyles = []*ComputedStyle{} + } + } else { + out.ComputedStyles = (out.ComputedStyles)[:0] + } + for !in.IsDelim(']') { + var v6 *ComputedStyle + if in.IsNull() { + in.Skip() + v6 = nil + } else { + if v6 == nil { + v6 = new(ComputedStyle) + } + (*v6).UnmarshalEasyJSON(in) + } + out.ComputedStyles = append(out.ComputedStyles, v6) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot2(out *jwriter.Writer, in GetSnapshotReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.DomNodes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"domNodes\":") + if in.DomNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v7, v8 := range in.DomNodes { + if v7 > 0 { + out.RawByte(',') + } + if v8 == nil { + out.RawString("null") + } else { + (*v8).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.LayoutTreeNodes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"layoutTreeNodes\":") + if in.LayoutTreeNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v9, v10 := range in.LayoutTreeNodes { + if v9 > 0 { + out.RawByte(',') + } + if v10 == nil { + out.RawString("null") + } else { + (*v10).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.ComputedStyles) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"computedStyles\":") + if in.ComputedStyles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.ComputedStyles { + if v11 > 0 { + out.RawByte(',') + } + if v12 == nil { + out.RawString("null") + } else { + (*v12).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetSnapshotReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetSnapshotReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot3(in *jlexer.Lexer, out *GetSnapshotParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "computedStyleWhitelist": + if in.IsNull() { + in.Skip() + out.ComputedStyleWhitelist = nil + } else { + in.Delim('[') + if out.ComputedStyleWhitelist == nil { + if !in.IsDelim(']') { + out.ComputedStyleWhitelist = make([]string, 0, 4) + } else { + out.ComputedStyleWhitelist = []string{} + } + } else { + out.ComputedStyleWhitelist = (out.ComputedStyleWhitelist)[:0] + } + for !in.IsDelim(']') { + var v13 string + v13 = string(in.String()) + out.ComputedStyleWhitelist = append(out.ComputedStyleWhitelist, v13) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot3(out *jwriter.Writer, in GetSnapshotParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"computedStyleWhitelist\":") + if in.ComputedStyleWhitelist == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v14, v15 := range in.ComputedStyleWhitelist { + if v14 > 0 { + out.RawByte(',') + } + out.String(string(v15)) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetSnapshotParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetSnapshotParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot4(in *jlexer.Lexer, out *DOMNode) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeType": + (out.NodeType).UnmarshalEasyJSON(in) + case "nodeName": + out.NodeName = string(in.String()) + case "nodeValue": + out.NodeValue = string(in.String()) + case "backendNodeId": + (out.BackendNodeID).UnmarshalEasyJSON(in) + case "childNodeIndexes": + if in.IsNull() { + in.Skip() + out.ChildNodeIndexes = nil + } else { + in.Delim('[') + if out.ChildNodeIndexes == nil { + if !in.IsDelim(']') { + out.ChildNodeIndexes = make([]int64, 0, 8) + } else { + out.ChildNodeIndexes = []int64{} + } + } else { + out.ChildNodeIndexes = (out.ChildNodeIndexes)[:0] + } + for !in.IsDelim(']') { + var v16 int64 + v16 = int64(in.Int64()) + out.ChildNodeIndexes = append(out.ChildNodeIndexes, v16) + in.WantComma() + } + in.Delim(']') + } + case "attributes": + if in.IsNull() { + in.Skip() + out.Attributes = nil + } else { + in.Delim('[') + if out.Attributes == nil { + if !in.IsDelim(']') { + out.Attributes = make([]*NameValue, 0, 8) + } else { + out.Attributes = []*NameValue{} + } + } else { + out.Attributes = (out.Attributes)[:0] + } + for !in.IsDelim(']') { + var v17 *NameValue + if in.IsNull() { + in.Skip() + v17 = nil + } else { + if v17 == nil { + v17 = new(NameValue) + } + (*v17).UnmarshalEasyJSON(in) + } + out.Attributes = append(out.Attributes, v17) + in.WantComma() + } + in.Delim(']') + } + case "pseudoElementIndexes": + if in.IsNull() { + in.Skip() + out.PseudoElementIndexes = nil + } else { + in.Delim('[') + if out.PseudoElementIndexes == nil { + if !in.IsDelim(']') { + out.PseudoElementIndexes = make([]int64, 0, 8) + } else { + out.PseudoElementIndexes = []int64{} + } + } else { + out.PseudoElementIndexes = (out.PseudoElementIndexes)[:0] + } + for !in.IsDelim(']') { + var v18 int64 + v18 = int64(in.Int64()) + out.PseudoElementIndexes = append(out.PseudoElementIndexes, v18) + in.WantComma() + } + in.Delim(']') + } + case "layoutNodeIndex": + out.LayoutNodeIndex = int64(in.Int64()) + case "documentURL": + out.DocumentURL = string(in.String()) + case "baseURL": + out.BaseURL = string(in.String()) + case "publicId": + out.PublicID = string(in.String()) + case "systemId": + out.SystemID = string(in.String()) + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + case "contentDocumentIndex": + out.ContentDocumentIndex = int64(in.Int64()) + case "importedDocumentIndex": + out.ImportedDocumentIndex = int64(in.Int64()) + case "templateContentIndex": + out.TemplateContentIndex = int64(in.Int64()) + case "pseudoType": + (out.PseudoType).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot4(out *jwriter.Writer, in DOMNode) { + out.RawByte('{') + first := true + _ = first + if in.NodeType != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeType\":") + (in.NodeType).MarshalEasyJSON(out) + } + if in.NodeName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeName\":") + out.String(string(in.NodeName)) + } + if in.NodeValue != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeValue\":") + out.String(string(in.NodeValue)) + } + if in.BackendNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"backendNodeId\":") + out.Int64(int64(in.BackendNodeID)) + } + if len(in.ChildNodeIndexes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"childNodeIndexes\":") + if in.ChildNodeIndexes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v19, v20 := range in.ChildNodeIndexes { + if v19 > 0 { + out.RawByte(',') + } + out.Int64(int64(v20)) + } + out.RawByte(']') + } + } + if len(in.Attributes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"attributes\":") + if in.Attributes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v21, v22 := range in.Attributes { + if v21 > 0 { + out.RawByte(',') + } + if v22 == nil { + out.RawString("null") + } else { + (*v22).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.PseudoElementIndexes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pseudoElementIndexes\":") + if in.PseudoElementIndexes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v23, v24 := range in.PseudoElementIndexes { + if v23 > 0 { + out.RawByte(',') + } + out.Int64(int64(v24)) + } + out.RawByte(']') + } + } + if in.LayoutNodeIndex != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"layoutNodeIndex\":") + out.Int64(int64(in.LayoutNodeIndex)) + } + if in.DocumentURL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"documentURL\":") + out.String(string(in.DocumentURL)) + } + if in.BaseURL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"baseURL\":") + out.String(string(in.BaseURL)) + } + if in.PublicID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"publicId\":") + out.String(string(in.PublicID)) + } + if in.SystemID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"systemId\":") + out.String(string(in.SystemID)) + } + if in.FrameID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + } + if in.ContentDocumentIndex != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"contentDocumentIndex\":") + out.Int64(int64(in.ContentDocumentIndex)) + } + if in.ImportedDocumentIndex != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"importedDocumentIndex\":") + out.Int64(int64(in.ImportedDocumentIndex)) + } + if in.TemplateContentIndex != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"templateContentIndex\":") + out.Int64(int64(in.TemplateContentIndex)) + } + if in.PseudoType != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pseudoType\":") + (in.PseudoType).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DOMNode) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DOMNode) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DOMNode) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DOMNode) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot5(in *jlexer.Lexer, out *ComputedStyle) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "properties": + if in.IsNull() { + in.Skip() + out.Properties = nil + } else { + in.Delim('[') + if out.Properties == nil { + if !in.IsDelim(']') { + out.Properties = make([]*NameValue, 0, 8) + } else { + out.Properties = []*NameValue{} + } + } else { + out.Properties = (out.Properties)[:0] + } + for !in.IsDelim(']') { + var v25 *NameValue + if in.IsNull() { + in.Skip() + v25 = nil + } else { + if v25 == nil { + v25 = new(NameValue) + } + (*v25).UnmarshalEasyJSON(in) + } + out.Properties = append(out.Properties, v25) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot5(out *jwriter.Writer, in ComputedStyle) { + out.RawByte('{') + first := true + _ = first + if len(in.Properties) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"properties\":") + if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v26, v27 := range in.Properties { + 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 ComputedStyle) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ComputedStyle) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ComputedStyle) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ComputedStyle) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot5(l, v) +} diff --git a/cdp/domsnapshot/types.go b/cdp/domsnapshot/types.go new file mode 100644 index 0000000..585ada2 --- /dev/null +++ b/cdp/domsnapshot/types.go @@ -0,0 +1,51 @@ +package domsnapshot + +// AUTOGENERATED. DO NOT EDIT. + +import ( + cdp "github.com/knq/chromedp/cdp" + "github.com/knq/chromedp/cdp/css" + "github.com/knq/chromedp/cdp/dom" +) + +// DOMNode a Node in the DOM tree. +type DOMNode struct { + NodeType cdp.NodeType `json:"nodeType,omitempty"` // Node's nodeType. + NodeName string `json:"nodeName,omitempty"` // Node's nodeName. + NodeValue string `json:"nodeValue,omitempty"` // Node's nodeValue. + BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Node's id, corresponds to DOM.Node.backendNodeId. + ChildNodeIndexes []int64 `json:"childNodeIndexes,omitempty"` // The indexes of the node's child nodes in the domNodes array returned by getSnapshot, if any. + Attributes []*NameValue `json:"attributes,omitempty"` // Attributes of an Element node. + PseudoElementIndexes []int64 `json:"pseudoElementIndexes,omitempty"` // Indexes of pseudo elements associated with this node in the domNodes array returned by getSnapshot, if any. + LayoutNodeIndex int64 `json:"layoutNodeIndex,omitempty"` // The index of the node's related layout tree node in the layoutTreeNodes array returned by getSnapshot, if any. + DocumentURL string `json:"documentURL,omitempty"` // Document URL that Document or FrameOwner node points to. + BaseURL string `json:"baseURL,omitempty"` // Base URL that Document or FrameOwner node uses for URL completion. + PublicID string `json:"publicId,omitempty"` // DocumentType node's publicId. + SystemID string `json:"systemId,omitempty"` // DocumentType node's systemId. + FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame ID for frame owner elements. + ContentDocumentIndex int64 `json:"contentDocumentIndex,omitempty"` // The index of a frame owner element's content document in the domNodes array returned by getSnapshot, if any. + ImportedDocumentIndex int64 `json:"importedDocumentIndex,omitempty"` // Index of the imported document's node of a link element in the domNodes array returned by getSnapshot, if any. + TemplateContentIndex int64 `json:"templateContentIndex,omitempty"` // Index of the content node of a template element in the domNodes array returned by getSnapshot. + PseudoType cdp.PseudoType `json:"pseudoType,omitempty"` // Type of a pseudo element node. +} + +// LayoutTreeNode details of an element in the DOM tree with a LayoutObject. +type LayoutTreeNode struct { + DomNodeIndex int64 `json:"domNodeIndex,omitempty"` // The index of the related DOM node in the domNodes array returned by getSnapshot. + BoundingBox *dom.Rect `json:"boundingBox,omitempty"` // The absolute position bounding box. + LayoutText string `json:"layoutText,omitempty"` // Contents of the LayoutText, if any. + InlineTextNodes []*css.InlineTextBox `json:"inlineTextNodes,omitempty"` // The post-layout inline text nodes, if any. + StyleIndex int64 `json:"styleIndex,omitempty"` // Index into the computedStyles array returned by getSnapshot. +} + +// ComputedStyle a subset of the full ComputedStyle as defined by the request +// whitelist. +type ComputedStyle struct { + Properties []*NameValue `json:"properties,omitempty"` // Name/value pairs of computed style properties. +} + +// NameValue a name/value pair. +type NameValue struct { + Name string `json:"name,omitempty"` // Attribute/property name. + Value string `json:"value,omitempty"` // Attribute/property value. +} diff --git a/cdp/network/easyjson.go b/cdp/network/easyjson.go index 26b8220..3e54307 100644 --- a/cdp/network/easyjson.go +++ b/cdp/network/easyjson.go @@ -4183,7 +4183,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(in *jlexer.Lexer, ou continue } switch key { - case "InterceptionId": + case "interceptionId": out.InterceptionID = InterceptionID(in.String()) case "request": if in.IsNull() { @@ -4195,6 +4195,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(in *jlexer.Lexer, ou } (*out.Request).UnmarshalEasyJSON(in) } + case "resourceType": + (out.ResourceType).UnmarshalEasyJSON(in) case "redirectHeaders": if in.IsNull() { in.Skip() @@ -4209,6 +4211,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(in *jlexer.Lexer, ou out.RedirectStatusCode = int64(in.Int64()) case "redirectUrl": out.RedirectURL = string(in.String()) + case "authChallenge": + if in.IsNull() { + in.Skip() + out.AuthChallenge = nil + } else { + if out.AuthChallenge == nil { + out.AuthChallenge = new(AuthChallenge) + } + (*out.AuthChallenge).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -4228,7 +4240,7 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(out *jwriter.Writer, out.RawByte(',') } first = false - out.RawString("\"InterceptionId\":") + out.RawString("\"interceptionId\":") out.String(string(in.InterceptionID)) } if in.Request != nil { @@ -4243,6 +4255,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(out *jwriter.Writer, (*in.Request).MarshalEasyJSON(out) } } + if in.ResourceType != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"resourceType\":") + (in.ResourceType).MarshalEasyJSON(out) + } if in.RedirectHeaders != nil { if !first { out.RawByte(',') @@ -4271,6 +4291,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(out *jwriter.Writer, out.RawString("\"redirectUrl\":") out.String(string(in.RedirectURL)) } + if in.AuthChallenge != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"authChallenge\":") + if in.AuthChallenge == nil { + out.RawString("null") + } else { + (*in.AuthChallenge).MarshalEasyJSON(out) + } + } out.RawByte('}') } @@ -5294,6 +5326,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(in *jlexer.Lexer, ou } (*out.Headers).UnmarshalEasyJSON(in) } + case "authChallengeResponse": + if in.IsNull() { + in.Skip() + out.AuthChallengeResponse = nil + } else { + if out.AuthChallengeResponse == nil { + out.AuthChallengeResponse = new(AuthChallengeResponse) + } + (*out.AuthChallengeResponse).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -5366,6 +5408,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(out *jwriter.Writer, (*in.Headers).MarshalEasyJSON(out) } } + if in.AuthChallengeResponse != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"authChallengeResponse\":") + if in.AuthChallengeResponse == nil { + out.RawString("null") + } else { + (*in.AuthChallengeResponse).MarshalEasyJSON(out) + } + } out.RawByte('}') } @@ -6005,3 +6059,191 @@ func (v *CachedResource) UnmarshalJSON(data []byte) error { func (v *CachedResource) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork58(l, v) } +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork59(in *jlexer.Lexer, out *AuthChallengeResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "response": + (out.Response).UnmarshalEasyJSON(in) + case "username": + out.Username = string(in.String()) + case "password": + out.Password = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork59(out *jwriter.Writer, in AuthChallengeResponse) { + out.RawByte('{') + first := true + _ = first + if in.Response != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"response\":") + (in.Response).MarshalEasyJSON(out) + } + if in.Username != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"username\":") + out.String(string(in.Username)) + } + if in.Password != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"password\":") + out.String(string(in.Password)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AuthChallengeResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork59(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AuthChallengeResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork59(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AuthChallengeResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork59(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AuthChallengeResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork59(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork60(in *jlexer.Lexer, out *AuthChallenge) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "source": + (out.Source).UnmarshalEasyJSON(in) + case "origin": + out.Origin = string(in.String()) + case "scheme": + out.Scheme = string(in.String()) + case "realm": + out.Realm = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork60(out *jwriter.Writer, in AuthChallenge) { + out.RawByte('{') + first := true + _ = first + if in.Source != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"source\":") + (in.Source).MarshalEasyJSON(out) + } + if in.Origin != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"origin\":") + out.String(string(in.Origin)) + } + if in.Scheme != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scheme\":") + out.String(string(in.Scheme)) + } + if in.Realm != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"realm\":") + out.String(string(in.Realm)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AuthChallenge) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork60(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AuthChallenge) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork60(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AuthChallenge) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork60(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AuthChallenge) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork60(l, v) +} diff --git a/cdp/network/events.go b/cdp/network/events.go index 01945ea..d085e22 100644 --- a/cdp/network/events.go +++ b/cdp/network/events.go @@ -133,11 +133,13 @@ type EventEventSourceMessageReceived struct { // EventRequestIntercepted details of an intercepted HTTP request, which must // be either allowed, blocked, modified or mocked. type EventRequestIntercepted struct { - InterceptionID InterceptionID `json:"InterceptionId,omitempty"` // Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. - Request *Request `json:"request,omitempty"` - RedirectHeaders *Headers `json:"redirectHeaders,omitempty"` // HTTP response headers, only sent if a redirect was intercepted. - RedirectStatusCode int64 `json:"redirectStatusCode,omitempty"` // HTTP response code, only sent if a redirect was intercepted. - RedirectURL string `json:"redirectUrl,omitempty"` // Redirect location, only sent if a redirect was intercepted. + InterceptionID InterceptionID `json:"interceptionId,omitempty"` // Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used. + Request *Request `json:"request,omitempty"` + ResourceType page.ResourceType `json:"resourceType,omitempty"` // How the requested resource will be used. + RedirectHeaders *Headers `json:"redirectHeaders,omitempty"` // HTTP response headers, only sent if a redirect was intercepted. + RedirectStatusCode int64 `json:"redirectStatusCode,omitempty"` // HTTP response code, only sent if a redirect was intercepted. + RedirectURL string `json:"redirectUrl,omitempty"` // Redirect location, only sent if a redirect was intercepted. + AuthChallenge *AuthChallenge `json:"authChallenge,omitempty"` // Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse. } // EventTypes all event types in the domain. diff --git a/cdp/network/network.go b/cdp/network/network.go index 04b7e65..4404973 100644 --- a/cdp/network/network.go +++ b/cdp/network/network.go @@ -683,13 +683,14 @@ func (p *EnableRequestInterceptionParams) Do(ctxt context.Context, h cdp.Handler // fetch occurs as a result which encounters a redirect an additional // Network.requestIntercepted event will be sent with the same InterceptionId. type ContinueInterceptedRequestParams struct { - InterceptionID InterceptionID `json:"interceptionId"` - ErrorReason ErrorReason `json:"errorReason,omitempty"` // If set this causes the request to fail with the given reason. - RawResponse string `json:"rawResponse,omitempty"` // If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... - URL string `json:"url,omitempty"` // If set the request url will be modified in a way that's not observable by page. - Method string `json:"method,omitempty"` // If set this allows the request method to be overridden. - PostData string `json:"postData,omitempty"` // If set this allows postData to be set. - Headers *Headers `json:"headers,omitempty"` // If set this allows the request headers to be changed. + InterceptionID InterceptionID `json:"interceptionId"` + ErrorReason ErrorReason `json:"errorReason,omitempty"` // If set this causes the request to fail with the given reason. Must not be set in response to an authChallenge. + RawResponse string `json:"rawResponse,omitempty"` // If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge. + URL string `json:"url,omitempty"` // If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge. + Method string `json:"method,omitempty"` // If set this allows the request method to be overridden. Must not be set in response to an authChallenge. + PostData string `json:"postData,omitempty"` // If set this allows postData to be set. Must not be set in response to an authChallenge. + Headers *Headers `json:"headers,omitempty"` // If set this allows the request headers to be changed. Must not be set in response to an authChallenge. + AuthChallengeResponse *AuthChallengeResponse `json:"authChallengeResponse,omitempty"` // Response to a requestIntercepted with an authChallenge. Must not be set otherwise. } // ContinueInterceptedRequest response to Network.requestIntercepted which @@ -707,7 +708,7 @@ func ContinueInterceptedRequest(interceptionID InterceptionID) *ContinueIntercep } // WithErrorReason if set this causes the request to fail with the given -// reason. +// reason. Must not be set in response to an authChallenge. func (p ContinueInterceptedRequestParams) WithErrorReason(errorReason ErrorReason) *ContinueInterceptedRequestParams { p.ErrorReason = errorReason return &p @@ -715,36 +716,47 @@ func (p ContinueInterceptedRequestParams) WithErrorReason(errorReason ErrorReaso // WithRawResponse if set the requests completes using with the provided // base64 encoded raw response, including HTTP status line and headers etc... +// Must not be set in response to an authChallenge. func (p ContinueInterceptedRequestParams) WithRawResponse(rawResponse string) *ContinueInterceptedRequestParams { p.RawResponse = rawResponse return &p } // WithURL if set the request url will be modified in a way that's not -// observable by page. +// observable by page. Must not be set in response to an authChallenge. func (p ContinueInterceptedRequestParams) WithURL(url string) *ContinueInterceptedRequestParams { p.URL = url return &p } -// WithMethod if set this allows the request method to be overridden. +// WithMethod if set this allows the request method to be overridden. Must +// not be set in response to an authChallenge. func (p ContinueInterceptedRequestParams) WithMethod(method string) *ContinueInterceptedRequestParams { p.Method = method return &p } -// WithPostData if set this allows postData to be set. +// WithPostData if set this allows postData to be set. Must not be set in +// response to an authChallenge. func (p ContinueInterceptedRequestParams) WithPostData(postData string) *ContinueInterceptedRequestParams { p.PostData = postData return &p } -// WithHeaders if set this allows the request headers to be changed. +// WithHeaders if set this allows the request headers to be changed. Must not +// be set in response to an authChallenge. func (p ContinueInterceptedRequestParams) WithHeaders(headers *Headers) *ContinueInterceptedRequestParams { p.Headers = headers return &p } +// WithAuthChallengeResponse response to a requestIntercepted with an +// authChallenge. Must not be set otherwise. +func (p ContinueInterceptedRequestParams) WithAuthChallengeResponse(authChallengeResponse *AuthChallengeResponse) *ContinueInterceptedRequestParams { + p.AuthChallengeResponse = authChallengeResponse + return &p +} + // Do executes Network.continueInterceptedRequest against the provided context and // target handler. func (p *ContinueInterceptedRequestParams) Do(ctxt context.Context, h cdp.Handler) (err error) { diff --git a/cdp/network/types.go b/cdp/network/types.go index fe3cc38..c831016 100644 --- a/cdp/network/types.go +++ b/cdp/network/types.go @@ -452,6 +452,21 @@ type Cookie struct { SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. } +// AuthChallenge authorization challenge for HTTP status code 401 or 407. +type AuthChallenge struct { + Source AuthChallengeSource `json:"source,omitempty"` // Source of the authentication challenge. + Origin string `json:"origin,omitempty"` // Origin of the challenger. + Scheme string `json:"scheme,omitempty"` // The authentication scheme used, such as basic or digest + Realm string `json:"realm,omitempty"` // The realm of the challenge. May be empty. +} + +// AuthChallengeResponse response to an AuthChallenge. +type AuthChallengeResponse struct { + Response AuthChallengeResponseResponse `json:"response,omitempty"` // The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box. + Username string `json:"username,omitempty"` // The username to provide, possibly empty. Should only be set if response is ProvideCredentials. + Password string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials. +} + // MixedContentType the mixed content status of the request, as defined in // http://www.w3.org/TR/mixed-content/. type MixedContentType string @@ -509,12 +524,14 @@ func (t ReferrerPolicy) String() string { // ReferrerPolicy values. const ( - ReferrerPolicyUnsafeURL ReferrerPolicy = "unsafe-url" - ReferrerPolicyNoReferrerWhenDowngrade ReferrerPolicy = "no-referrer-when-downgrade" - ReferrerPolicyNoReferrer ReferrerPolicy = "no-referrer" - ReferrerPolicyOrigin ReferrerPolicy = "origin" - ReferrerPolicyOriginWhenCrossOrigin ReferrerPolicy = "origin-when-cross-origin" - ReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin ReferrerPolicy = "no-referrer-when-downgrade-origin-when-cross-origin" + ReferrerPolicyUnsafeURL ReferrerPolicy = "unsafe-url" + ReferrerPolicyNoReferrerWhenDowngrade ReferrerPolicy = "no-referrer-when-downgrade" + ReferrerPolicyNoReferrer ReferrerPolicy = "no-referrer" + ReferrerPolicyOrigin ReferrerPolicy = "origin" + ReferrerPolicyOriginWhenCrossOrigin ReferrerPolicy = "origin-when-cross-origin" + ReferrerPolicySameOrigin ReferrerPolicy = "same-origin" + ReferrerPolicyStrictOrigin ReferrerPolicy = "strict-origin" + ReferrerPolicyStrictOriginWhenCrossOrigin ReferrerPolicy = "strict-origin-when-cross-origin" ) // MarshalEasyJSON satisfies easyjson.Marshaler. @@ -540,8 +557,12 @@ func (t *ReferrerPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = ReferrerPolicyOrigin case ReferrerPolicyOriginWhenCrossOrigin: *t = ReferrerPolicyOriginWhenCrossOrigin - case ReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin: - *t = ReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin + case ReferrerPolicySameOrigin: + *t = ReferrerPolicySameOrigin + case ReferrerPolicyStrictOrigin: + *t = ReferrerPolicyStrictOrigin + case ReferrerPolicyStrictOriginWhenCrossOrigin: + *t = ReferrerPolicyStrictOriginWhenCrossOrigin default: in.AddError(errors.New("unknown ReferrerPolicy value")) @@ -600,3 +621,93 @@ func (t *InitiatorType) UnmarshalEasyJSON(in *jlexer.Lexer) { func (t *InitiatorType) UnmarshalJSON(buf []byte) error { return easyjson.Unmarshal(buf, t) } + +// AuthChallengeSource source of the authentication challenge. +type AuthChallengeSource string + +// String returns the AuthChallengeSource as string value. +func (t AuthChallengeSource) String() string { + return string(t) +} + +// AuthChallengeSource values. +const ( + AuthChallengeSourceServer AuthChallengeSource = "Server" + AuthChallengeSourceProxy AuthChallengeSource = "Proxy" +) + +// MarshalEasyJSON satisfies easyjson.Marshaler. +func (t AuthChallengeSource) MarshalEasyJSON(out *jwriter.Writer) { + out.String(string(t)) +} + +// MarshalJSON satisfies json.Marshaler. +func (t AuthChallengeSource) MarshalJSON() ([]byte, error) { + return easyjson.Marshal(t) +} + +// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. +func (t *AuthChallengeSource) UnmarshalEasyJSON(in *jlexer.Lexer) { + switch AuthChallengeSource(in.String()) { + case AuthChallengeSourceServer: + *t = AuthChallengeSourceServer + case AuthChallengeSourceProxy: + *t = AuthChallengeSourceProxy + + default: + in.AddError(errors.New("unknown AuthChallengeSource value")) + } +} + +// UnmarshalJSON satisfies json.Unmarshaler. +func (t *AuthChallengeSource) UnmarshalJSON(buf []byte) error { + return easyjson.Unmarshal(buf, t) +} + +// AuthChallengeResponseResponse the decision on what to do in response to +// the authorization challenge. Default means deferring to the default behavior +// of the net stack, which will likely either the Cancel authentication or +// display a popup dialog box. +type AuthChallengeResponseResponse string + +// String returns the AuthChallengeResponseResponse as string value. +func (t AuthChallengeResponseResponse) String() string { + return string(t) +} + +// AuthChallengeResponseResponse values. +const ( + AuthChallengeResponseResponseDefault AuthChallengeResponseResponse = "Default" + AuthChallengeResponseResponseCancelAuth AuthChallengeResponseResponse = "CancelAuth" + AuthChallengeResponseResponseProvideCredentials AuthChallengeResponseResponse = "ProvideCredentials" +) + +// MarshalEasyJSON satisfies easyjson.Marshaler. +func (t AuthChallengeResponseResponse) MarshalEasyJSON(out *jwriter.Writer) { + out.String(string(t)) +} + +// MarshalJSON satisfies json.Marshaler. +func (t AuthChallengeResponseResponse) MarshalJSON() ([]byte, error) { + return easyjson.Marshal(t) +} + +// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. +func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { + switch AuthChallengeResponseResponse(in.String()) { + case AuthChallengeResponseResponseDefault: + *t = AuthChallengeResponseResponseDefault + case AuthChallengeResponseResponseCancelAuth: + *t = AuthChallengeResponseResponseCancelAuth + case AuthChallengeResponseResponseProvideCredentials: + *t = AuthChallengeResponseResponseProvideCredentials + + default: + in.AddError(errors.New("unknown AuthChallengeResponseResponse value")) + } +} + +// UnmarshalJSON satisfies json.Unmarshaler. +func (t *AuthChallengeResponseResponse) UnmarshalJSON(buf []byte) error { + return easyjson.Unmarshal(buf, t) +} diff --git a/cdp/runtime/easyjson.go b/cdp/runtime/easyjson.go index f64f21c..af12b8f 100644 --- a/cdp/runtime/easyjson.go +++ b/cdp/runtime/easyjson.go @@ -2577,6 +2577,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime22(in *jlexer.Lexer, ou } (*out.StackTrace).UnmarshalEasyJSON(in) } + case "context": + out.Context = string(in.String()) default: in.SkipRecursive() } @@ -2650,6 +2652,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(out *jwriter.Writer, (*in.StackTrace).MarshalEasyJSON(out) } } + if in.Context != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"context\":") + out.String(string(in.Context)) + } out.RawByte('}') } diff --git a/cdp/runtime/events.go b/cdp/runtime/events.go index bb818bc..3da5d0a 100644 --- a/cdp/runtime/events.go +++ b/cdp/runtime/events.go @@ -40,6 +40,7 @@ type EventConsoleAPICalled struct { ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Identifier of the context where the call was made. Timestamp cdp.Timestamp `json:"timestamp,omitempty"` // Call timestamp. StackTrace *StackTrace `json:"stackTrace,omitempty"` // Stack trace captured when the call was made. + Context string `json:"context,omitempty"` // Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. } // EventInspectRequested issued when object should be inspected (for example, diff --git a/cdp/storage/easyjson.go b/cdp/storage/easyjson.go index 1ffae60..9c0288b 100644 --- a/cdp/storage/easyjson.go +++ b/cdp/storage/easyjson.go @@ -17,7 +17,153 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage(in *jlexer.Lexer, out *ClearDataForOriginParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage(in *jlexer.Lexer, out *GetUsageAndQuotaReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "usage": + out.Usage = float64(in.Float64()) + case "quota": + out.Quota = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage(out *jwriter.Writer, in GetUsageAndQuotaReturns) { + out.RawByte('{') + first := true + _ = first + if in.Usage != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"usage\":") + out.Float64(float64(in.Usage)) + } + if in.Quota != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"quota\":") + out.Float64(float64(in.Quota)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetUsageAndQuotaReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetUsageAndQuotaReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetUsageAndQuotaReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetUsageAndQuotaReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage1(in *jlexer.Lexer, out *GetUsageAndQuotaParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "origin": + out.Origin = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage1(out *jwriter.Writer, in GetUsageAndQuotaParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"origin\":") + out.String(string(in.Origin)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetUsageAndQuotaParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetUsageAndQuotaParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetUsageAndQuotaParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetUsageAndQuotaParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage2(in *jlexer.Lexer, out *ClearDataForOriginParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -50,7 +196,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage(out *jwriter.Writer, in ClearDataForOriginParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage2(out *jwriter.Writer, in ClearDataForOriginParams) { out.RawByte('{') first := true _ = first @@ -72,23 +218,23 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v ClearDataForOriginParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ClearDataForOriginParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ClearDataForOriginParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ClearDataForOriginParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpStorage2(l, v) } diff --git a/cdp/storage/storage.go b/cdp/storage/storage.go index e189c28..7cf4842 100644 --- a/cdp/storage/storage.go +++ b/cdp/storage/storage.go @@ -35,3 +35,41 @@ func ClearDataForOrigin(origin string, storageTypes string) *ClearDataForOriginP func (p *ClearDataForOriginParams) Do(ctxt context.Context, h cdp.Handler) (err error) { return h.Execute(ctxt, cdp.CommandStorageClearDataForOrigin, p, nil) } + +// GetUsageAndQuotaParams returns usage and quota in bytes. +type GetUsageAndQuotaParams struct { + Origin string `json:"origin"` // Security origin. +} + +// GetUsageAndQuota returns usage and quota in bytes. +// +// parameters: +// origin - Security origin. +func GetUsageAndQuota(origin string) *GetUsageAndQuotaParams { + return &GetUsageAndQuotaParams{ + Origin: origin, + } +} + +// GetUsageAndQuotaReturns return values. +type GetUsageAndQuotaReturns struct { + Usage float64 `json:"usage,omitempty"` // Storage usage (bytes). + Quota float64 `json:"quota,omitempty"` // Storage quota (bytes). +} + +// Do executes Storage.getUsageAndQuota against the provided context and +// target handler. +// +// returns: +// usage - Storage usage (bytes). +// quota - Storage quota (bytes). +func (p *GetUsageAndQuotaParams) Do(ctxt context.Context, h cdp.Handler) (usage float64, quota float64, err error) { + // execute + var res GetUsageAndQuotaReturns + err = h.Execute(ctxt, cdp.CommandStorageGetUsageAndQuota, p, &res) + if err != nil { + return 0, 0, err + } + + return res.Usage, res.Quota, nil +} diff --git a/cmd/chromedp-gen/fixup/fixup.go b/cmd/chromedp-gen/fixup/fixup.go index ca10190..021596d 100644 --- a/cmd/chromedp-gen/fixup/fixup.go +++ b/cmd/chromedp-gen/fixup/fixup.go @@ -450,7 +450,7 @@ func convertObjectProperties(params []*internal.Type, d *internal.Domain, name s case p.Name == "nodeType": r = append(r, &internal.Type{ Name: p.Name, - Ref: "NodeType", + Ref: "DOM.NodeType", Description: p.Description, Optional: p.Optional, }) diff --git a/cmd/chromedp-gen/protocol.json b/cmd/chromedp-gen/protocol.json index 9d0e0fc..79c0a9d 100644 --- a/cmd/chromedp-gen/protocol.json +++ b/cmd/chromedp-gen/protocol.json @@ -2556,7 +2556,9 @@ "no-referrer", "origin", "origin-when-cross-origin", - "no-referrer-when-downgrade-origin-when-cross-origin" + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin" ], "description": "The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/" }, @@ -3018,6 +3020,69 @@ } ], "experimental": true + }, + { + "id": "AuthChallenge", + "type": "object", + "description": "Authorization challenge for HTTP status code 401 or 407.", + "properties": [ + { + "name": "source", + "type": "string", + "optional": true, + "enum": [ + "Server", + "Proxy" + ], + "description": "Source of the authentication challenge." + }, + { + "name": "origin", + "type": "string", + "description": "Origin of the challenger." + }, + { + "name": "scheme", + "type": "string", + "description": "The authentication scheme used, such as basic or digest" + }, + { + "name": "realm", + "type": "string", + "description": "The realm of the challenge. May be empty." + } + ], + "experimental": true + }, + { + "id": "AuthChallengeResponse", + "type": "object", + "description": "Response to an AuthChallenge.", + "properties": [ + { + "name": "response", + "type": "string", + "enum": [ + "Default", + "CancelAuth", + "ProvideCredentials" + ], + "description": "The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box." + }, + { + "name": "username", + "type": "string", + "optional": true, + "description": "The username to provide, possibly empty. Should only be set if response is ProvideCredentials." + }, + { + "name": "password", + "type": "string", + "optional": true, + "description": "The password to provide, possibly empty. Should only be set if response is ProvideCredentials." + } + ], + "experimental": true } ], "commands": [ @@ -3398,37 +3463,43 @@ "name": "errorReason", "$ref": "ErrorReason", "optional": true, - "description": "If set this causes the request to fail with the given reason." + "description": "If set this causes the request to fail with the given reason. Must not be set in response to an authChallenge." }, { "name": "rawResponse", "type": "string", "optional": true, - "description": "If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc..." + "description": "If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge." }, { "name": "url", "type": "string", "optional": true, - "description": "If set the request url will be modified in a way that's not observable by page." + "description": "If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge." }, { "name": "method", "type": "string", "optional": true, - "description": "If set this allows the request method to be overridden." + "description": "If set this allows the request method to be overridden. Must not be set in response to an authChallenge." }, { "name": "postData", "type": "string", "optional": true, - "description": "If set this allows postData to be set." + "description": "If set this allows postData to be set. Must not be set in response to an authChallenge." }, { "name": "headers", "$ref": "Headers", "optional": true, - "description": "If set this allows the request headers to be changed." + "description": "If set this allows the request headers to be changed. Must not be set in response to an authChallenge." + }, + { + "name": "authChallengeResponse", + "$ref": "AuthChallengeResponse", + "optional": true, + "description": "Response to a requestIntercepted with an authChallenge. Must not be set otherwise." } ], "experimental": true @@ -3845,14 +3916,19 @@ "description": "Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.", "parameters": [ { - "name": "InterceptionId", + "name": "interceptionId", "$ref": "InterceptionId", - "description": "Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch." + "description": "Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used." }, { "name": "request", "$ref": "Request" }, + { + "name": "resourceType", + "$ref": "Page.ResourceType", + "description": "How the requested resource will be used." + }, { "name": "redirectHeaders", "$ref": "Headers", @@ -3870,6 +3946,12 @@ "optional": true, "type": "string", "description": "Redirect location, only sent if a redirect was intercepted." + }, + { + "name": "authChallenge", + "$ref": "AuthChallenge", + "optional": true, + "description": "Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse." } ], "experimental": true @@ -4399,7 +4481,12 @@ { "name": "response", "type": "string", - "description": "Response stataus text." + "description": "Response status text." + }, + { + "name": "responseTime", + "type": "number", + "description": "Number of seconds since epoch." } ] }, @@ -6822,60 +6909,6 @@ ], "description": "Details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.", "experimental": true - }, - { - "id": "LayoutTreeNode", - "type": "object", - "properties": [ - { - "name": "nodeId", - "$ref": "DOM.NodeId", - "description": "The id of the related DOM node matching one from DOM.GetDocument." - }, - { - "name": "boundingBox", - "$ref": "DOM.Rect", - "description": "The absolute position bounding box." - }, - { - "name": "layoutText", - "type": "string", - "optional": true, - "description": "Contents of the LayoutText if any" - }, - { - "name": "inlineTextNodes", - "type": "array", - "optional": true, - "items": { - "$ref": "InlineTextBox" - }, - "description": "The post layout inline text nodes, if any." - }, - { - "name": "styleIndex", - "type": "integer", - "optional": true, - "description": "Index into the computedStyles array returned by getLayoutTreeAndStyles." - } - ], - "description": "Details of an element in the DOM tree with a LayoutObject.", - "experimental": true - }, - { - "id": "ComputedStyle", - "type": "object", - "properties": [ - { - "name": "properties", - "type": "array", - "items": { - "$ref": "CSSComputedStyleProperty" - } - } - ], - "description": "A subset of the full ComputedStyle as defined by the request whitelist.", - "experimental": true } ], "commands": [ @@ -7297,37 +7330,6 @@ ], "experimental": true }, - { - "name": "getLayoutTreeAndStyles", - "parameters": [ - { - "name": "computedStyleWhitelist", - "type": "array", - "items": { - "type": "string" - }, - "description": "Whitelist of computed styles to return." - } - ], - "returns": [ - { - "name": "layoutTreeNodes", - "type": "array", - "items": { - "$ref": "LayoutTreeNode" - } - }, - { - "name": "computedStyles", - "type": "array", - "items": { - "$ref": "ComputedStyle" - } - } - ], - "description": "For the main document and any content documents, return the LayoutTreeNodes and a whitelisted subset of the computed style. It only returns pushed nodes, on way to pull all nodes is to call DOM.getDocument with a depth of -1.", - "experimental": true - }, { "name": "startRuleUsageTracking", "description": "Enables the selector recording.", @@ -7405,6 +7407,244 @@ } ] }, + { + "domain": "DOMSnapshot", + "experimental": true, + "description": "This domain facilitates obtaining document snapshots with DOM, layout, and style information.", + "dependencies": [ + "CSS", + "DOM", + "Page" + ], + "types": [ + { + "id": "DOMNode", + "type": "object", + "properties": [ + { + "name": "nodeType", + "type": "integer", + "description": "Node's nodeType." + }, + { + "name": "nodeName", + "type": "string", + "description": "Node's nodeName." + }, + { + "name": "nodeValue", + "type": "string", + "description": "Node's nodeValue." + }, + { + "name": "backendNodeId", + "$ref": "DOM.BackendNodeId", + "description": "Node's id, corresponds to DOM.Node.backendNodeId." + }, + { + "name": "childNodeIndexes", + "type": "array", + "items": { + "type": "integer" + }, + "optional": true, + "description": "The indexes of the node's child nodes in the domNodes array returned by getSnapshot, if any." + }, + { + "name": "attributes", + "type": "array", + "items": { + "$ref": "NameValue" + }, + "optional": true, + "description": "Attributes of an Element node." + }, + { + "name": "pseudoElementIndexes", + "type": "array", + "items": { + "type": "integer" + }, + "optional": true, + "description": "Indexes of pseudo elements associated with this node in the domNodes array returned by getSnapshot, if any." + }, + { + "name": "layoutNodeIndex", + "type": "integer", + "optional": true, + "description": "The index of the node's related layout tree node in the layoutTreeNodes array returned by getSnapshot, if any." + }, + { + "name": "documentURL", + "type": "string", + "optional": true, + "description": "Document URL that Document or FrameOwner node points to." + }, + { + "name": "baseURL", + "type": "string", + "optional": true, + "description": "Base URL that Document or FrameOwner node uses for URL completion." + }, + { + "name": "publicId", + "type": "string", + "optional": true, + "description": "DocumentType node's publicId." + }, + { + "name": "systemId", + "type": "string", + "optional": true, + "description": "DocumentType node's systemId." + }, + { + "name": "frameId", + "$ref": "Page.FrameId", + "optional": true, + "description": "Frame ID for frame owner elements." + }, + { + "name": "contentDocumentIndex", + "type": "integer", + "optional": true, + "description": "The index of a frame owner element's content document in the domNodes array returned by getSnapshot, if any." + }, + { + "name": "importedDocumentIndex", + "type": "integer", + "optional": true, + "description": "Index of the imported document's node of a link element in the domNodes array returned by getSnapshot, if any." + }, + { + "name": "templateContentIndex", + "type": "integer", + "optional": true, + "description": "Index of the content node of a template element in the domNodes array returned by getSnapshot." + }, + { + "name": "pseudoType", + "$ref": "DOM.PseudoType", + "optional": true, + "description": "Type of a pseudo element node." + } + ], + "description": "A Node in the DOM tree." + }, + { + "id": "LayoutTreeNode", + "type": "object", + "properties": [ + { + "name": "domNodeIndex", + "type": "integer", + "description": "The index of the related DOM node in the domNodes array returned by getSnapshot." + }, + { + "name": "boundingBox", + "$ref": "DOM.Rect", + "description": "The absolute position bounding box." + }, + { + "name": "layoutText", + "type": "string", + "optional": true, + "description": "Contents of the LayoutText, if any." + }, + { + "name": "inlineTextNodes", + "type": "array", + "optional": true, + "items": { + "$ref": "CSS.InlineTextBox" + }, + "description": "The post-layout inline text nodes, if any." + }, + { + "name": "styleIndex", + "type": "integer", + "optional": true, + "description": "Index into the computedStyles array returned by getSnapshot." + } + ], + "description": "Details of an element in the DOM tree with a LayoutObject." + }, + { + "id": "ComputedStyle", + "type": "object", + "properties": [ + { + "name": "properties", + "type": "array", + "items": { + "$ref": "NameValue" + }, + "description": "Name/value pairs of computed style properties." + } + ], + "description": "A subset of the full ComputedStyle as defined by the request whitelist." + }, + { + "id": "NameValue", + "type": "object", + "properties": [ + { + "name": "name", + "type": "string", + "description": "Attribute/property name." + }, + { + "name": "value", + "type": "string", + "description": "Attribute/property value." + } + ], + "description": "A name/value pair." + } + ], + "commands": [ + { + "name": "getSnapshot", + "parameters": [ + { + "name": "computedStyleWhitelist", + "type": "array", + "items": { + "type": "string" + }, + "description": "Whitelist of computed styles to return." + } + ], + "returns": [ + { + "name": "domNodes", + "type": "array", + "items": { + "$ref": "DOMNode" + }, + "description": "The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document." + }, + { + "name": "layoutTreeNodes", + "type": "array", + "items": { + "$ref": "LayoutTreeNode" + }, + "description": "The nodes in the layout tree." + }, + { + "name": "computedStyles", + "type": "array", + "items": { + "$ref": "ComputedStyle" + }, + "description": "Whitelisted ComputedStyle properties for each node in the layout tree." + } + ], + "description": "Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened. " + } + ] + }, { "domain": "IO", "description": "Input/Output operations for streams produced by DevTools.", @@ -10171,6 +10411,29 @@ } ], "description": "Clears storage for origin." + }, + { + "name": "getUsageAndQuota", + "parameters": [ + { + "name": "origin", + "type": "string", + "description": "Security origin." + } + ], + "returns": [ + { + "name": "usage", + "type": "number", + "description": "Storage usage (bytes)." + }, + { + "name": "quota", + "type": "number", + "description": "Storage quota (bytes)." + } + ], + "description": "Returns usage and quota in bytes." } ] }, @@ -11698,6 +11961,13 @@ "$ref": "StackTrace", "optional": true, "description": "Stack trace captured when the call was made." + }, + { + "name": "context", + "type": "string", + "optional": true, + "experimental": true, + "description": "Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context." } ] },