2017-06-18 00:55:45 +00:00
|
|
|
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
|
|
|
|
|
|
|
package domsnapshot
|
|
|
|
|
|
|
|
import (
|
|
|
|
json "encoding/json"
|
|
|
|
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
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"name\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
out.String(string(in.Name))
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"value\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
out.String(string(in.Value))
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
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(']') {
|
2017-11-02 04:49:15 +00:00
|
|
|
out.InlineTextNodes = make([]*InlineTextBox, 0, 8)
|
2017-06-18 00:55:45 +00:00
|
|
|
} else {
|
2017-11-02 04:49:15 +00:00
|
|
|
out.InlineTextNodes = []*InlineTextBox{}
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
out.InlineTextNodes = (out.InlineTextNodes)[:0]
|
|
|
|
}
|
|
|
|
for !in.IsDelim(']') {
|
2017-11-02 04:49:15 +00:00
|
|
|
var v1 *InlineTextBox
|
2017-06-18 00:55:45 +00:00
|
|
|
if in.IsNull() {
|
|
|
|
in.Skip()
|
|
|
|
v1 = nil
|
|
|
|
} else {
|
|
|
|
if v1 == nil {
|
2017-11-02 04:49:15 +00:00
|
|
|
v1 = new(InlineTextBox)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
(*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
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"domNodeIndex\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
out.Int64(int64(in.DomNodeIndex))
|
2017-07-02 11:44:34 +00:00
|
|
|
}
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"boundingBox\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
if in.BoundingBox == nil {
|
|
|
|
out.RawString("null")
|
|
|
|
} else {
|
|
|
|
(*in.BoundingBox).MarshalEasyJSON(out)
|
|
|
|
}
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
if in.LayoutText != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"layoutText\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.LayoutText))
|
|
|
|
}
|
|
|
|
if len(in.InlineTextNodes) != 0 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"inlineTextNodes\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
2017-06-18 00:55:45 +00:00
|
|
|
} else {
|
2017-11-22 05:01:27 +00:00
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
{
|
2017-06-18 00:55:45 +00:00
|
|
|
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 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"styleIndex\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
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)
|
|
|
|
}
|
2017-11-02 04:49:15 +00:00
|
|
|
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot2(in *jlexer.Lexer, out *InlineTextBox) {
|
|
|
|
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 "boundingBox":
|
|
|
|
if in.IsNull() {
|
|
|
|
in.Skip()
|
|
|
|
out.BoundingBox = nil
|
|
|
|
} else {
|
|
|
|
if out.BoundingBox == nil {
|
|
|
|
out.BoundingBox = new(dom.Rect)
|
|
|
|
}
|
|
|
|
(*out.BoundingBox).UnmarshalEasyJSON(in)
|
|
|
|
}
|
|
|
|
case "startCharacterIndex":
|
|
|
|
out.StartCharacterIndex = int64(in.Int64())
|
|
|
|
case "numCharacters":
|
|
|
|
out.NumCharacters = int64(in.Int64())
|
|
|
|
default:
|
|
|
|
in.SkipRecursive()
|
|
|
|
}
|
|
|
|
in.WantComma()
|
|
|
|
}
|
|
|
|
in.Delim('}')
|
|
|
|
if isTopLevel {
|
|
|
|
in.Consumed()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot2(out *jwriter.Writer, in InlineTextBox) {
|
|
|
|
out.RawByte('{')
|
|
|
|
first := true
|
|
|
|
_ = first
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"boundingBox\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
if in.BoundingBox == nil {
|
|
|
|
out.RawString("null")
|
|
|
|
} else {
|
|
|
|
(*in.BoundingBox).MarshalEasyJSON(out)
|
|
|
|
}
|
2017-11-02 04:49:15 +00:00
|
|
|
}
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"startCharacterIndex\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
out.Int64(int64(in.StartCharacterIndex))
|
2017-11-02 04:49:15 +00:00
|
|
|
}
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"numCharacters\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
out.Int64(int64(in.NumCharacters))
|
2017-11-02 04:49:15 +00:00
|
|
|
}
|
|
|
|
out.RawByte('}')
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
|
|
func (v InlineTextBox) MarshalJSON() ([]byte, error) {
|
|
|
|
w := jwriter.Writer{}
|
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot2(&w, v)
|
|
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
|
|
func (v InlineTextBox) MarshalEasyJSON(w *jwriter.Writer) {
|
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot2(w, v)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
|
|
func (v *InlineTextBox) UnmarshalJSON(data []byte) error {
|
|
|
|
r := jlexer.Lexer{Data: data}
|
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot2(&r, v)
|
|
|
|
return r.Error()
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
|
|
func (v *InlineTextBox) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot2(l, v)
|
|
|
|
}
|
|
|
|
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot3(in *jlexer.Lexer, out *GetSnapshotReturns) {
|
2017-06-18 00:55:45 +00:00
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|
2017-11-02 04:49:15 +00:00
|
|
|
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot3(out *jwriter.Writer, in GetSnapshotReturns) {
|
2017-06-18 00:55:45 +00:00
|
|
|
out.RawByte('{')
|
|
|
|
first := true
|
|
|
|
_ = first
|
|
|
|
if len(in.DomNodes) != 0 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"domNodes\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
2017-06-18 00:55:45 +00:00
|
|
|
} else {
|
2017-11-22 05:01:27 +00:00
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
{
|
2017-06-18 00:55:45 +00:00
|
|
|
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 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"layoutTreeNodes\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
2017-06-18 00:55:45 +00:00
|
|
|
} else {
|
2017-11-22 05:01:27 +00:00
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
{
|
2017-06-18 00:55:45 +00:00
|
|
|
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 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"computedStyles\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
2017-06-18 00:55:45 +00:00
|
|
|
} else {
|
2017-11-22 05:01:27 +00:00
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
{
|
2017-06-18 00:55:45 +00:00
|
|
|
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{}
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot3(&w, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
|
|
func (v GetSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot3(w, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
|
|
func (v *GetSnapshotReturns) UnmarshalJSON(data []byte) error {
|
|
|
|
r := jlexer.Lexer{Data: data}
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot3(&r, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
return r.Error()
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
|
|
func (v *GetSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot3(l, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
2017-11-02 04:49:15 +00:00
|
|
|
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot4(in *jlexer.Lexer, out *GetSnapshotParams) {
|
2017-06-18 00:55:45 +00:00
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|
2017-11-02 04:49:15 +00:00
|
|
|
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot4(out *jwriter.Writer, in GetSnapshotParams) {
|
2017-06-18 00:55:45 +00:00
|
|
|
out.RawByte('{')
|
|
|
|
first := true
|
|
|
|
_ = first
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"computedStyleWhitelist\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
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))
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
2017-11-22 05:01:27 +00:00
|
|
|
out.RawByte(']')
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
out.RawByte('}')
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
|
|
func (v GetSnapshotParams) MarshalJSON() ([]byte, error) {
|
|
|
|
w := jwriter.Writer{}
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot4(&w, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
|
|
func (v GetSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot4(w, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
|
|
func (v *GetSnapshotParams) UnmarshalJSON(data []byte) error {
|
|
|
|
r := jlexer.Lexer{Data: data}
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot4(&r, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
return r.Error()
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
|
|
func (v *GetSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot4(l, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
2017-11-02 04:49:15 +00:00
|
|
|
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot5(in *jlexer.Lexer, out *DOMNode) {
|
2017-06-18 00:55:45 +00:00
|
|
|
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())
|
2017-07-14 03:29:52 +00:00
|
|
|
case "textValue":
|
|
|
|
out.TextValue = string(in.String())
|
|
|
|
case "inputValue":
|
|
|
|
out.InputValue = string(in.String())
|
|
|
|
case "inputChecked":
|
|
|
|
out.InputChecked = bool(in.Bool())
|
|
|
|
case "optionSelected":
|
|
|
|
out.OptionSelected = bool(in.Bool())
|
2017-06-18 00:55:45 +00:00
|
|
|
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())
|
2017-06-30 23:55:30 +00:00
|
|
|
case "contentLanguage":
|
|
|
|
out.ContentLanguage = string(in.String())
|
2017-08-03 05:37:27 +00:00
|
|
|
case "documentEncoding":
|
|
|
|
out.DocumentEncoding = string(in.String())
|
2017-06-18 00:55:45 +00:00
|
|
|
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)
|
2017-06-30 23:55:30 +00:00
|
|
|
case "isClickable":
|
|
|
|
out.IsClickable = bool(in.Bool())
|
2017-06-18 00:55:45 +00:00
|
|
|
default:
|
|
|
|
in.SkipRecursive()
|
|
|
|
}
|
|
|
|
in.WantComma()
|
|
|
|
}
|
|
|
|
in.Delim('}')
|
|
|
|
if isTopLevel {
|
|
|
|
in.Consumed()
|
|
|
|
}
|
|
|
|
}
|
2017-11-02 04:49:15 +00:00
|
|
|
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot5(out *jwriter.Writer, in DOMNode) {
|
2017-06-18 00:55:45 +00:00
|
|
|
out.RawByte('{')
|
|
|
|
first := true
|
|
|
|
_ = first
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"nodeType\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
(in.NodeType).MarshalEasyJSON(out)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"nodeName\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
out.String(string(in.NodeName))
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"nodeValue\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
out.String(string(in.NodeValue))
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
2017-07-14 03:29:52 +00:00
|
|
|
if in.TextValue != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"textValue\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-07-14 03:29:52 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.TextValue))
|
|
|
|
}
|
|
|
|
if in.InputValue != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"inputValue\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-07-14 03:29:52 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.InputValue))
|
|
|
|
}
|
|
|
|
if in.InputChecked {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"inputChecked\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-07-14 03:29:52 +00:00
|
|
|
}
|
|
|
|
out.Bool(bool(in.InputChecked))
|
|
|
|
}
|
|
|
|
if in.OptionSelected {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"optionSelected\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-07-14 03:29:52 +00:00
|
|
|
}
|
|
|
|
out.Bool(bool(in.OptionSelected))
|
|
|
|
}
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"backendNodeId\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
out.Int64(int64(in.BackendNodeID))
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
if len(in.ChildNodeIndexes) != 0 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"childNodeIndexes\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
2017-06-18 00:55:45 +00:00
|
|
|
} else {
|
2017-11-22 05:01:27 +00:00
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
{
|
2017-06-18 00:55:45 +00:00
|
|
|
out.RawByte('[')
|
|
|
|
for v19, v20 := range in.ChildNodeIndexes {
|
|
|
|
if v19 > 0 {
|
|
|
|
out.RawByte(',')
|
|
|
|
}
|
|
|
|
out.Int64(int64(v20))
|
|
|
|
}
|
|
|
|
out.RawByte(']')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if len(in.Attributes) != 0 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"attributes\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
2017-06-18 00:55:45 +00:00
|
|
|
} else {
|
2017-11-22 05:01:27 +00:00
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
{
|
2017-06-18 00:55:45 +00:00
|
|
|
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 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"pseudoElementIndexes\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
2017-06-18 00:55:45 +00:00
|
|
|
} else {
|
2017-11-22 05:01:27 +00:00
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
{
|
2017-06-18 00:55:45 +00:00
|
|
|
out.RawByte('[')
|
|
|
|
for v23, v24 := range in.PseudoElementIndexes {
|
|
|
|
if v23 > 0 {
|
|
|
|
out.RawByte(',')
|
|
|
|
}
|
|
|
|
out.Int64(int64(v24))
|
|
|
|
}
|
|
|
|
out.RawByte(']')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if in.LayoutNodeIndex != 0 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"layoutNodeIndex\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.Int64(int64(in.LayoutNodeIndex))
|
|
|
|
}
|
|
|
|
if in.DocumentURL != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"documentURL\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.DocumentURL))
|
|
|
|
}
|
|
|
|
if in.BaseURL != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"baseURL\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.BaseURL))
|
|
|
|
}
|
2017-06-30 23:55:30 +00:00
|
|
|
if in.ContentLanguage != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"contentLanguage\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-30 23:55:30 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.ContentLanguage))
|
|
|
|
}
|
2017-08-03 05:37:27 +00:00
|
|
|
if in.DocumentEncoding != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"documentEncoding\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-08-03 05:37:27 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.DocumentEncoding))
|
|
|
|
}
|
2017-06-18 00:55:45 +00:00
|
|
|
if in.PublicID != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"publicId\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.PublicID))
|
|
|
|
}
|
|
|
|
if in.SystemID != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"systemId\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.SystemID))
|
|
|
|
}
|
|
|
|
if in.FrameID != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"frameId\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.String(string(in.FrameID))
|
|
|
|
}
|
|
|
|
if in.ContentDocumentIndex != 0 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"contentDocumentIndex\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.Int64(int64(in.ContentDocumentIndex))
|
|
|
|
}
|
|
|
|
if in.ImportedDocumentIndex != 0 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"importedDocumentIndex\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.Int64(int64(in.ImportedDocumentIndex))
|
|
|
|
}
|
|
|
|
if in.TemplateContentIndex != 0 {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"templateContentIndex\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
out.Int64(int64(in.TemplateContentIndex))
|
|
|
|
}
|
|
|
|
if in.PseudoType != "" {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"pseudoType\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
(in.PseudoType).MarshalEasyJSON(out)
|
|
|
|
}
|
2017-06-30 23:55:30 +00:00
|
|
|
if in.IsClickable {
|
2017-11-22 05:01:27 +00:00
|
|
|
const prefix string = ",\"isClickable\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
2017-06-30 23:55:30 +00:00
|
|
|
}
|
|
|
|
out.Bool(bool(in.IsClickable))
|
|
|
|
}
|
2017-06-18 00:55:45 +00:00
|
|
|
out.RawByte('}')
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
|
|
func (v DOMNode) MarshalJSON() ([]byte, error) {
|
|
|
|
w := jwriter.Writer{}
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot5(&w, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
|
|
func (v DOMNode) MarshalEasyJSON(w *jwriter.Writer) {
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot5(w, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
|
|
func (v *DOMNode) UnmarshalJSON(data []byte) error {
|
|
|
|
r := jlexer.Lexer{Data: data}
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot5(&r, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
return r.Error()
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
|
|
func (v *DOMNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot5(l, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
2017-11-02 04:49:15 +00:00
|
|
|
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot6(in *jlexer.Lexer, out *ComputedStyle) {
|
2017-06-18 00:55:45 +00:00
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|
2017-11-02 04:49:15 +00:00
|
|
|
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot6(out *jwriter.Writer, in ComputedStyle) {
|
2017-06-18 00:55:45 +00:00
|
|
|
out.RawByte('{')
|
|
|
|
first := true
|
|
|
|
_ = first
|
2017-11-22 05:01:27 +00:00
|
|
|
{
|
|
|
|
const prefix string = ",\"properties\":"
|
|
|
|
if first {
|
|
|
|
first = false
|
|
|
|
out.RawString(prefix[1:])
|
|
|
|
} else {
|
|
|
|
out.RawString(prefix)
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
}
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
2017-11-22 05:01:27 +00:00
|
|
|
out.RawByte(']')
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
out.RawByte('}')
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
|
|
func (v ComputedStyle) MarshalJSON() ([]byte, error) {
|
|
|
|
w := jwriter.Writer{}
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot6(&w, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
|
|
func (v ComputedStyle) MarshalEasyJSON(w *jwriter.Writer) {
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot6(w, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
|
|
func (v *ComputedStyle) UnmarshalJSON(data []byte) error {
|
|
|
|
r := jlexer.Lexer{Data: data}
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot6(&r, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
return r.Error()
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
|
|
func (v *ComputedStyle) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
2017-11-02 04:49:15 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomsnapshot6(l, v)
|
2017-06-18 00:55:45 +00:00
|
|
|
}
|