1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247 |
- // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
- package domsnapshot
- import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- dom "github.com/chromedp/cdproto/dom"
- domdebugger "github.com/chromedp/cdproto/domdebugger"
- 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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot(in *jlexer.Lexer, out *TextBoxSnapshot) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "layoutIndex":
- if in.IsNull() {
- in.Skip()
- out.LayoutIndex = nil
- } else {
- in.Delim('[')
- if out.LayoutIndex == nil {
- if !in.IsDelim(']') {
- out.LayoutIndex = make([]int64, 0, 8)
- } else {
- out.LayoutIndex = []int64{}
- }
- } else {
- out.LayoutIndex = (out.LayoutIndex)[:0]
- }
- for !in.IsDelim(']') {
- var v1 int64
- v1 = int64(in.Int64())
- out.LayoutIndex = append(out.LayoutIndex, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "bounds":
- if in.IsNull() {
- in.Skip()
- out.Bounds = nil
- } else {
- in.Delim('[')
- if out.Bounds == nil {
- if !in.IsDelim(']') {
- out.Bounds = make([]Rectangle, 0, 2)
- } else {
- out.Bounds = []Rectangle{}
- }
- } else {
- out.Bounds = (out.Bounds)[:0]
- }
- for !in.IsDelim(']') {
- var v2 Rectangle
- if in.IsNull() {
- in.Skip()
- v2 = nil
- } else {
- in.Delim('[')
- if v2 == nil {
- if !in.IsDelim(']') {
- v2 = make(Rectangle, 0, 8)
- } else {
- v2 = Rectangle{}
- }
- } else {
- v2 = (v2)[:0]
- }
- for !in.IsDelim(']') {
- var v3 float64
- v3 = float64(in.Float64())
- v2 = append(v2, v3)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Bounds = append(out.Bounds, v2)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "start":
- if in.IsNull() {
- in.Skip()
- out.Start = nil
- } else {
- in.Delim('[')
- if out.Start == nil {
- if !in.IsDelim(']') {
- out.Start = make([]int64, 0, 8)
- } else {
- out.Start = []int64{}
- }
- } else {
- out.Start = (out.Start)[:0]
- }
- for !in.IsDelim(']') {
- var v4 int64
- v4 = int64(in.Int64())
- out.Start = append(out.Start, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "length":
- if in.IsNull() {
- in.Skip()
- out.Length = nil
- } else {
- in.Delim('[')
- if out.Length == nil {
- if !in.IsDelim(']') {
- out.Length = make([]int64, 0, 8)
- } else {
- out.Length = []int64{}
- }
- } else {
- out.Length = (out.Length)[:0]
- }
- for !in.IsDelim(']') {
- var v5 int64
- v5 = int64(in.Int64())
- out.Length = append(out.Length, v5)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot(out *jwriter.Writer, in TextBoxSnapshot) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"layoutIndex\":"
- out.RawString(prefix[1:])
- if in.LayoutIndex == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v6, v7 := range in.LayoutIndex {
- if v6 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v7))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"bounds\":"
- out.RawString(prefix)
- if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.Bounds {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v10, v11 := range v9 {
- if v10 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v11))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"start\":"
- out.RawString(prefix)
- if in.Start == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v12, v13 := range in.Start {
- if v12 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v13))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"length\":"
- out.RawString(prefix)
- if in.Length == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.Length {
- if v14 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v15))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v TextBoxSnapshot) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v TextBoxSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *TextBoxSnapshot) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *TextBoxSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot1(in *jlexer.Lexer, out *RareStringData) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "index":
- if in.IsNull() {
- in.Skip()
- out.Index = nil
- } else {
- in.Delim('[')
- if out.Index == nil {
- if !in.IsDelim(']') {
- out.Index = make([]int64, 0, 8)
- } else {
- out.Index = []int64{}
- }
- } else {
- out.Index = (out.Index)[:0]
- }
- for !in.IsDelim(']') {
- var v16 int64
- v16 = int64(in.Int64())
- out.Index = append(out.Index, v16)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- in.Delim('[')
- if out.Value == nil {
- if !in.IsDelim(']') {
- out.Value = make([]StringIndex, 0, 8)
- } else {
- out.Value = []StringIndex{}
- }
- } else {
- out.Value = (out.Value)[:0]
- }
- for !in.IsDelim(']') {
- var v17 StringIndex
- v17 = StringIndex(in.Int64())
- out.Value = append(out.Value, v17)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1(out *jwriter.Writer, in RareStringData) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"index\":"
- out.RawString(prefix[1:])
- if in.Index == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v18, v19 := range in.Index {
- if v18 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v19))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v20, v21 := range in.Value {
- if v20 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v21))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RareStringData) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RareStringData) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RareStringData) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot1(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RareStringData) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot1(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot2(in *jlexer.Lexer, out *RareIntegerData) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "index":
- if in.IsNull() {
- in.Skip()
- out.Index = nil
- } else {
- in.Delim('[')
- if out.Index == nil {
- if !in.IsDelim(']') {
- out.Index = make([]int64, 0, 8)
- } else {
- out.Index = []int64{}
- }
- } else {
- out.Index = (out.Index)[:0]
- }
- for !in.IsDelim(']') {
- var v22 int64
- v22 = int64(in.Int64())
- out.Index = append(out.Index, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- in.Delim('[')
- if out.Value == nil {
- if !in.IsDelim(']') {
- out.Value = make([]int64, 0, 8)
- } else {
- out.Value = []int64{}
- }
- } else {
- out.Value = (out.Value)[:0]
- }
- for !in.IsDelim(']') {
- var v23 int64
- v23 = int64(in.Int64())
- out.Value = append(out.Value, v23)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot2(out *jwriter.Writer, in RareIntegerData) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"index\":"
- out.RawString(prefix[1:])
- if in.Index == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v24, v25 := range in.Index {
- if v24 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v25))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v26, v27 := range in.Value {
- if v26 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v27))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RareIntegerData) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RareIntegerData) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot2(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RareIntegerData) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot2(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RareIntegerData) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot2(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot3(in *jlexer.Lexer, out *RareBooleanData) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "index":
- if in.IsNull() {
- in.Skip()
- out.Index = nil
- } else {
- in.Delim('[')
- if out.Index == nil {
- if !in.IsDelim(']') {
- out.Index = make([]int64, 0, 8)
- } else {
- out.Index = []int64{}
- }
- } else {
- out.Index = (out.Index)[:0]
- }
- for !in.IsDelim(']') {
- var v28 int64
- v28 = int64(in.Int64())
- out.Index = append(out.Index, v28)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot3(out *jwriter.Writer, in RareBooleanData) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"index\":"
- out.RawString(prefix[1:])
- if in.Index == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v29, v30 := range in.Index {
- if v29 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v30))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RareBooleanData) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RareBooleanData) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot3(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RareBooleanData) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot3(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RareBooleanData) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot3(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(in *jlexer.Lexer, out *NodeTreeSnapshot) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "parentIndex":
- if in.IsNull() {
- in.Skip()
- out.ParentIndex = nil
- } else {
- in.Delim('[')
- if out.ParentIndex == nil {
- if !in.IsDelim(']') {
- out.ParentIndex = make([]int64, 0, 8)
- } else {
- out.ParentIndex = []int64{}
- }
- } else {
- out.ParentIndex = (out.ParentIndex)[:0]
- }
- for !in.IsDelim(']') {
- var v31 int64
- v31 = int64(in.Int64())
- out.ParentIndex = append(out.ParentIndex, v31)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "nodeType":
- if in.IsNull() {
- in.Skip()
- out.NodeType = nil
- } else {
- in.Delim('[')
- if out.NodeType == nil {
- if !in.IsDelim(']') {
- out.NodeType = make([]int64, 0, 8)
- } else {
- out.NodeType = []int64{}
- }
- } else {
- out.NodeType = (out.NodeType)[:0]
- }
- for !in.IsDelim(']') {
- var v32 int64
- v32 = int64(in.Int64())
- out.NodeType = append(out.NodeType, v32)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "shadowRootType":
- if in.IsNull() {
- in.Skip()
- out.ShadowRootType = nil
- } else {
- if out.ShadowRootType == nil {
- out.ShadowRootType = new(RareStringData)
- }
- (*out.ShadowRootType).UnmarshalEasyJSON(in)
- }
- case "nodeName":
- if in.IsNull() {
- in.Skip()
- out.NodeName = nil
- } else {
- in.Delim('[')
- if out.NodeName == nil {
- if !in.IsDelim(']') {
- out.NodeName = make([]StringIndex, 0, 8)
- } else {
- out.NodeName = []StringIndex{}
- }
- } else {
- out.NodeName = (out.NodeName)[:0]
- }
- for !in.IsDelim(']') {
- var v33 StringIndex
- v33 = StringIndex(in.Int64())
- out.NodeName = append(out.NodeName, v33)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "nodeValue":
- if in.IsNull() {
- in.Skip()
- out.NodeValue = nil
- } else {
- in.Delim('[')
- if out.NodeValue == nil {
- if !in.IsDelim(']') {
- out.NodeValue = make([]StringIndex, 0, 8)
- } else {
- out.NodeValue = []StringIndex{}
- }
- } else {
- out.NodeValue = (out.NodeValue)[:0]
- }
- for !in.IsDelim(']') {
- var v34 StringIndex
- v34 = StringIndex(in.Int64())
- out.NodeValue = append(out.NodeValue, v34)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "backendNodeId":
- if in.IsNull() {
- in.Skip()
- out.BackendNodeID = nil
- } else {
- in.Delim('[')
- if out.BackendNodeID == nil {
- if !in.IsDelim(']') {
- out.BackendNodeID = make([]cdp.BackendNodeID, 0, 8)
- } else {
- out.BackendNodeID = []cdp.BackendNodeID{}
- }
- } else {
- out.BackendNodeID = (out.BackendNodeID)[:0]
- }
- for !in.IsDelim(']') {
- var v35 cdp.BackendNodeID
- (v35).UnmarshalEasyJSON(in)
- out.BackendNodeID = append(out.BackendNodeID, v35)
- 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([]ArrayOfStrings, 0, 2)
- } else {
- out.Attributes = []ArrayOfStrings{}
- }
- } else {
- out.Attributes = (out.Attributes)[:0]
- }
- for !in.IsDelim(']') {
- var v36 ArrayOfStrings
- if in.IsNull() {
- in.Skip()
- v36 = nil
- } else {
- in.Delim('[')
- if v36 == nil {
- if !in.IsDelim(']') {
- v36 = make(ArrayOfStrings, 0, 8)
- } else {
- v36 = ArrayOfStrings{}
- }
- } else {
- v36 = (v36)[:0]
- }
- for !in.IsDelim(']') {
- var v37 int64
- v37 = int64(in.Int64())
- v36 = append(v36, v37)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Attributes = append(out.Attributes, v36)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "textValue":
- if in.IsNull() {
- in.Skip()
- out.TextValue = nil
- } else {
- if out.TextValue == nil {
- out.TextValue = new(RareStringData)
- }
- (*out.TextValue).UnmarshalEasyJSON(in)
- }
- case "inputValue":
- if in.IsNull() {
- in.Skip()
- out.InputValue = nil
- } else {
- if out.InputValue == nil {
- out.InputValue = new(RareStringData)
- }
- (*out.InputValue).UnmarshalEasyJSON(in)
- }
- case "inputChecked":
- if in.IsNull() {
- in.Skip()
- out.InputChecked = nil
- } else {
- if out.InputChecked == nil {
- out.InputChecked = new(RareBooleanData)
- }
- (*out.InputChecked).UnmarshalEasyJSON(in)
- }
- case "optionSelected":
- if in.IsNull() {
- in.Skip()
- out.OptionSelected = nil
- } else {
- if out.OptionSelected == nil {
- out.OptionSelected = new(RareBooleanData)
- }
- (*out.OptionSelected).UnmarshalEasyJSON(in)
- }
- case "contentDocumentIndex":
- if in.IsNull() {
- in.Skip()
- out.ContentDocumentIndex = nil
- } else {
- if out.ContentDocumentIndex == nil {
- out.ContentDocumentIndex = new(RareIntegerData)
- }
- (*out.ContentDocumentIndex).UnmarshalEasyJSON(in)
- }
- case "pseudoType":
- if in.IsNull() {
- in.Skip()
- out.PseudoType = nil
- } else {
- if out.PseudoType == nil {
- out.PseudoType = new(RareStringData)
- }
- (*out.PseudoType).UnmarshalEasyJSON(in)
- }
- case "pseudoIdentifier":
- if in.IsNull() {
- in.Skip()
- out.PseudoIdentifier = nil
- } else {
- if out.PseudoIdentifier == nil {
- out.PseudoIdentifier = new(RareStringData)
- }
- (*out.PseudoIdentifier).UnmarshalEasyJSON(in)
- }
- case "isClickable":
- if in.IsNull() {
- in.Skip()
- out.IsClickable = nil
- } else {
- if out.IsClickable == nil {
- out.IsClickable = new(RareBooleanData)
- }
- (*out.IsClickable).UnmarshalEasyJSON(in)
- }
- case "currentSourceURL":
- if in.IsNull() {
- in.Skip()
- out.CurrentSourceURL = nil
- } else {
- if out.CurrentSourceURL == nil {
- out.CurrentSourceURL = new(RareStringData)
- }
- (*out.CurrentSourceURL).UnmarshalEasyJSON(in)
- }
- case "originURL":
- if in.IsNull() {
- in.Skip()
- out.OriginURL = nil
- } else {
- if out.OriginURL == nil {
- out.OriginURL = new(RareStringData)
- }
- (*out.OriginURL).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(out *jwriter.Writer, in NodeTreeSnapshot) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.ParentIndex) != 0 {
- const prefix string = ",\"parentIndex\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v38, v39 := range in.ParentIndex {
- if v38 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v39))
- }
- out.RawByte(']')
- }
- }
- if len(in.NodeType) != 0 {
- const prefix string = ",\"nodeType\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v40, v41 := range in.NodeType {
- if v40 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v41))
- }
- out.RawByte(']')
- }
- }
- if in.ShadowRootType != nil {
- const prefix string = ",\"shadowRootType\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ShadowRootType).MarshalEasyJSON(out)
- }
- if len(in.NodeName) != 0 {
- const prefix string = ",\"nodeName\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v42, v43 := range in.NodeName {
- if v42 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v43))
- }
- out.RawByte(']')
- }
- }
- if len(in.NodeValue) != 0 {
- const prefix string = ",\"nodeValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v44, v45 := range in.NodeValue {
- if v44 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v45))
- }
- out.RawByte(']')
- }
- }
- if len(in.BackendNodeID) != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v46, v47 := range in.BackendNodeID {
- if v46 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v47))
- }
- out.RawByte(']')
- }
- }
- if len(in.Attributes) != 0 {
- const prefix string = ",\"attributes\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v48, v49 := range in.Attributes {
- if v48 > 0 {
- out.RawByte(',')
- }
- if v49 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v50, v51 := range v49 {
- if v50 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v51))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- if in.TextValue != nil {
- const prefix string = ",\"textValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.TextValue).MarshalEasyJSON(out)
- }
- if in.InputValue != nil {
- const prefix string = ",\"inputValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.InputValue).MarshalEasyJSON(out)
- }
- if in.InputChecked != nil {
- const prefix string = ",\"inputChecked\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.InputChecked).MarshalEasyJSON(out)
- }
- if in.OptionSelected != nil {
- const prefix string = ",\"optionSelected\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.OptionSelected).MarshalEasyJSON(out)
- }
- if in.ContentDocumentIndex != nil {
- const prefix string = ",\"contentDocumentIndex\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ContentDocumentIndex).MarshalEasyJSON(out)
- }
- if in.PseudoType != nil {
- const prefix string = ",\"pseudoType\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.PseudoType).MarshalEasyJSON(out)
- }
- if in.PseudoIdentifier != nil {
- const prefix string = ",\"pseudoIdentifier\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.PseudoIdentifier).MarshalEasyJSON(out)
- }
- if in.IsClickable != nil {
- const prefix string = ",\"isClickable\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.IsClickable).MarshalEasyJSON(out)
- }
- if in.CurrentSourceURL != nil {
- const prefix string = ",\"currentSourceURL\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.CurrentSourceURL).MarshalEasyJSON(out)
- }
- if in.OriginURL != nil {
- const prefix string = ",\"originURL\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.OriginURL).MarshalEasyJSON(out)
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v NodeTreeSnapshot) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v NodeTreeSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *NodeTreeSnapshot) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *NodeTreeSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot5(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.UnsafeFieldName(false)
- 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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot5(out *jwriter.Writer, in NameValue) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v NameValue) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v NameValue) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot5(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *NameValue) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot5(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *NameValue) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot5(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot6(in *jlexer.Lexer, out *LayoutTreeSnapshot) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeIndex":
- if in.IsNull() {
- in.Skip()
- out.NodeIndex = nil
- } else {
- in.Delim('[')
- if out.NodeIndex == nil {
- if !in.IsDelim(']') {
- out.NodeIndex = make([]int64, 0, 8)
- } else {
- out.NodeIndex = []int64{}
- }
- } else {
- out.NodeIndex = (out.NodeIndex)[:0]
- }
- for !in.IsDelim(']') {
- var v52 int64
- v52 = int64(in.Int64())
- out.NodeIndex = append(out.NodeIndex, v52)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "styles":
- if in.IsNull() {
- in.Skip()
- out.Styles = nil
- } else {
- in.Delim('[')
- if out.Styles == nil {
- if !in.IsDelim(']') {
- out.Styles = make([]ArrayOfStrings, 0, 2)
- } else {
- out.Styles = []ArrayOfStrings{}
- }
- } else {
- out.Styles = (out.Styles)[:0]
- }
- for !in.IsDelim(']') {
- var v53 ArrayOfStrings
- if in.IsNull() {
- in.Skip()
- v53 = nil
- } else {
- in.Delim('[')
- if v53 == nil {
- if !in.IsDelim(']') {
- v53 = make(ArrayOfStrings, 0, 8)
- } else {
- v53 = ArrayOfStrings{}
- }
- } else {
- v53 = (v53)[:0]
- }
- for !in.IsDelim(']') {
- var v54 int64
- v54 = int64(in.Int64())
- v53 = append(v53, v54)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Styles = append(out.Styles, v53)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "bounds":
- if in.IsNull() {
- in.Skip()
- out.Bounds = nil
- } else {
- in.Delim('[')
- if out.Bounds == nil {
- if !in.IsDelim(']') {
- out.Bounds = make([]Rectangle, 0, 2)
- } else {
- out.Bounds = []Rectangle{}
- }
- } else {
- out.Bounds = (out.Bounds)[:0]
- }
- for !in.IsDelim(']') {
- var v55 Rectangle
- if in.IsNull() {
- in.Skip()
- v55 = nil
- } else {
- in.Delim('[')
- if v55 == nil {
- if !in.IsDelim(']') {
- v55 = make(Rectangle, 0, 8)
- } else {
- v55 = Rectangle{}
- }
- } else {
- v55 = (v55)[:0]
- }
- for !in.IsDelim(']') {
- var v56 float64
- v56 = float64(in.Float64())
- v55 = append(v55, v56)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Bounds = append(out.Bounds, v55)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "text":
- if in.IsNull() {
- in.Skip()
- out.Text = nil
- } else {
- in.Delim('[')
- if out.Text == nil {
- if !in.IsDelim(']') {
- out.Text = make([]StringIndex, 0, 8)
- } else {
- out.Text = []StringIndex{}
- }
- } else {
- out.Text = (out.Text)[:0]
- }
- for !in.IsDelim(']') {
- var v57 StringIndex
- v57 = StringIndex(in.Int64())
- out.Text = append(out.Text, v57)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "stackingContexts":
- if in.IsNull() {
- in.Skip()
- out.StackingContexts = nil
- } else {
- if out.StackingContexts == nil {
- out.StackingContexts = new(RareBooleanData)
- }
- (*out.StackingContexts).UnmarshalEasyJSON(in)
- }
- case "paintOrders":
- if in.IsNull() {
- in.Skip()
- out.PaintOrders = nil
- } else {
- in.Delim('[')
- if out.PaintOrders == nil {
- if !in.IsDelim(']') {
- out.PaintOrders = make([]int64, 0, 8)
- } else {
- out.PaintOrders = []int64{}
- }
- } else {
- out.PaintOrders = (out.PaintOrders)[:0]
- }
- for !in.IsDelim(']') {
- var v58 int64
- v58 = int64(in.Int64())
- out.PaintOrders = append(out.PaintOrders, v58)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "offsetRects":
- if in.IsNull() {
- in.Skip()
- out.OffsetRects = nil
- } else {
- in.Delim('[')
- if out.OffsetRects == nil {
- if !in.IsDelim(']') {
- out.OffsetRects = make([]Rectangle, 0, 2)
- } else {
- out.OffsetRects = []Rectangle{}
- }
- } else {
- out.OffsetRects = (out.OffsetRects)[:0]
- }
- for !in.IsDelim(']') {
- var v59 Rectangle
- if in.IsNull() {
- in.Skip()
- v59 = nil
- } else {
- in.Delim('[')
- if v59 == nil {
- if !in.IsDelim(']') {
- v59 = make(Rectangle, 0, 8)
- } else {
- v59 = Rectangle{}
- }
- } else {
- v59 = (v59)[:0]
- }
- for !in.IsDelim(']') {
- var v60 float64
- v60 = float64(in.Float64())
- v59 = append(v59, v60)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.OffsetRects = append(out.OffsetRects, v59)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "scrollRects":
- if in.IsNull() {
- in.Skip()
- out.ScrollRects = nil
- } else {
- in.Delim('[')
- if out.ScrollRects == nil {
- if !in.IsDelim(']') {
- out.ScrollRects = make([]Rectangle, 0, 2)
- } else {
- out.ScrollRects = []Rectangle{}
- }
- } else {
- out.ScrollRects = (out.ScrollRects)[:0]
- }
- for !in.IsDelim(']') {
- var v61 Rectangle
- if in.IsNull() {
- in.Skip()
- v61 = nil
- } else {
- in.Delim('[')
- if v61 == nil {
- if !in.IsDelim(']') {
- v61 = make(Rectangle, 0, 8)
- } else {
- v61 = Rectangle{}
- }
- } else {
- v61 = (v61)[:0]
- }
- for !in.IsDelim(']') {
- var v62 float64
- v62 = float64(in.Float64())
- v61 = append(v61, v62)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.ScrollRects = append(out.ScrollRects, v61)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "clientRects":
- if in.IsNull() {
- in.Skip()
- out.ClientRects = nil
- } else {
- in.Delim('[')
- if out.ClientRects == nil {
- if !in.IsDelim(']') {
- out.ClientRects = make([]Rectangle, 0, 2)
- } else {
- out.ClientRects = []Rectangle{}
- }
- } else {
- out.ClientRects = (out.ClientRects)[:0]
- }
- for !in.IsDelim(']') {
- var v63 Rectangle
- if in.IsNull() {
- in.Skip()
- v63 = nil
- } else {
- in.Delim('[')
- if v63 == nil {
- if !in.IsDelim(']') {
- v63 = make(Rectangle, 0, 8)
- } else {
- v63 = Rectangle{}
- }
- } else {
- v63 = (v63)[:0]
- }
- for !in.IsDelim(']') {
- var v64 float64
- v64 = float64(in.Float64())
- v63 = append(v63, v64)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.ClientRects = append(out.ClientRects, v63)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "blendedBackgroundColors":
- if in.IsNull() {
- in.Skip()
- out.BlendedBackgroundColors = nil
- } else {
- in.Delim('[')
- if out.BlendedBackgroundColors == nil {
- if !in.IsDelim(']') {
- out.BlendedBackgroundColors = make([]StringIndex, 0, 8)
- } else {
- out.BlendedBackgroundColors = []StringIndex{}
- }
- } else {
- out.BlendedBackgroundColors = (out.BlendedBackgroundColors)[:0]
- }
- for !in.IsDelim(']') {
- var v65 StringIndex
- v65 = StringIndex(in.Int64())
- out.BlendedBackgroundColors = append(out.BlendedBackgroundColors, v65)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "textColorOpacities":
- if in.IsNull() {
- in.Skip()
- out.TextColorOpacities = nil
- } else {
- in.Delim('[')
- if out.TextColorOpacities == nil {
- if !in.IsDelim(']') {
- out.TextColorOpacities = make([]float64, 0, 8)
- } else {
- out.TextColorOpacities = []float64{}
- }
- } else {
- out.TextColorOpacities = (out.TextColorOpacities)[:0]
- }
- for !in.IsDelim(']') {
- var v66 float64
- v66 = float64(in.Float64())
- out.TextColorOpacities = append(out.TextColorOpacities, v66)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot6(out *jwriter.Writer, in LayoutTreeSnapshot) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeIndex\":"
- out.RawString(prefix[1:])
- if in.NodeIndex == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v67, v68 := range in.NodeIndex {
- if v67 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v68))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"styles\":"
- out.RawString(prefix)
- if in.Styles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v69, v70 := range in.Styles {
- if v69 > 0 {
- out.RawByte(',')
- }
- if v70 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v71, v72 := range v70 {
- if v71 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v72))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"bounds\":"
- out.RawString(prefix)
- if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v73, v74 := range in.Bounds {
- if v73 > 0 {
- out.RawByte(',')
- }
- if v74 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v75, v76 := range v74 {
- if v75 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v76))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- if in.Text == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v77, v78 := range in.Text {
- if v77 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v78))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"stackingContexts\":"
- out.RawString(prefix)
- if in.StackingContexts == nil {
- out.RawString("null")
- } else {
- (*in.StackingContexts).MarshalEasyJSON(out)
- }
- }
- if len(in.PaintOrders) != 0 {
- const prefix string = ",\"paintOrders\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v79, v80 := range in.PaintOrders {
- if v79 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v80))
- }
- out.RawByte(']')
- }
- }
- if len(in.OffsetRects) != 0 {
- const prefix string = ",\"offsetRects\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v81, v82 := range in.OffsetRects {
- if v81 > 0 {
- out.RawByte(',')
- }
- if v82 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v83, v84 := range v82 {
- if v83 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v84))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.ScrollRects) != 0 {
- const prefix string = ",\"scrollRects\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v85, v86 := range in.ScrollRects {
- if v85 > 0 {
- out.RawByte(',')
- }
- if v86 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v87, v88 := range v86 {
- if v87 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v88))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.ClientRects) != 0 {
- const prefix string = ",\"clientRects\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v89, v90 := range in.ClientRects {
- if v89 > 0 {
- out.RawByte(',')
- }
- if v90 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v91, v92 := range v90 {
- if v91 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v92))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.BlendedBackgroundColors) != 0 {
- const prefix string = ",\"blendedBackgroundColors\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v93, v94 := range in.BlendedBackgroundColors {
- if v93 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v94))
- }
- out.RawByte(']')
- }
- }
- if len(in.TextColorOpacities) != 0 {
- const prefix string = ",\"textColorOpacities\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v95, v96 := range in.TextColorOpacities {
- if v95 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v96))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v LayoutTreeSnapshot) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v LayoutTreeSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot6(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *LayoutTreeSnapshot) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot6(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *LayoutTreeSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot6(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot7(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.UnsafeFieldName(false)
- 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([]*InlineTextBox, 0, 8)
- } else {
- out.InlineTextNodes = []*InlineTextBox{}
- }
- } else {
- out.InlineTextNodes = (out.InlineTextNodes)[:0]
- }
- for !in.IsDelim(']') {
- var v97 *InlineTextBox
- if in.IsNull() {
- in.Skip()
- v97 = nil
- } else {
- if v97 == nil {
- v97 = new(InlineTextBox)
- }
- (*v97).UnmarshalEasyJSON(in)
- }
- out.InlineTextNodes = append(out.InlineTextNodes, v97)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "styleIndex":
- out.StyleIndex = int64(in.Int64())
- case "paintOrder":
- out.PaintOrder = int64(in.Int64())
- case "isStackingContext":
- out.IsStackingContext = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot7(out *jwriter.Writer, in LayoutTreeNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"domNodeIndex\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.DomNodeIndex))
- }
- {
- const prefix string = ",\"boundingBox\":"
- out.RawString(prefix)
- if in.BoundingBox == nil {
- out.RawString("null")
- } else {
- (*in.BoundingBox).MarshalEasyJSON(out)
- }
- }
- if in.LayoutText != "" {
- const prefix string = ",\"layoutText\":"
- out.RawString(prefix)
- out.String(string(in.LayoutText))
- }
- if len(in.InlineTextNodes) != 0 {
- const prefix string = ",\"inlineTextNodes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v98, v99 := range in.InlineTextNodes {
- if v98 > 0 {
- out.RawByte(',')
- }
- if v99 == nil {
- out.RawString("null")
- } else {
- (*v99).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.StyleIndex != 0 {
- const prefix string = ",\"styleIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.StyleIndex))
- }
- if in.PaintOrder != 0 {
- const prefix string = ",\"paintOrder\":"
- out.RawString(prefix)
- out.Int64(int64(in.PaintOrder))
- }
- if in.IsStackingContext {
- const prefix string = ",\"isStackingContext\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsStackingContext))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v LayoutTreeNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v LayoutTreeNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot7(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *LayoutTreeNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot7(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *LayoutTreeNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot7(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot8(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.UnsafeFieldName(false)
- 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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot8(out *jwriter.Writer, in InlineTextBox) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"boundingBox\":"
- out.RawString(prefix[1:])
- if in.BoundingBox == nil {
- out.RawString("null")
- } else {
- (*in.BoundingBox).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"startCharacterIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.StartCharacterIndex))
- }
- {
- const prefix string = ",\"numCharacters\":"
- out.RawString(prefix)
- out.Int64(int64(in.NumCharacters))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v InlineTextBox) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v InlineTextBox) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot8(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *InlineTextBox) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot8(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *InlineTextBox) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot8(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot9(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot9(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot9(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot9(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot9(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot10(in *jlexer.Lexer, out *DocumentSnapshot) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "documentURL":
- out.DocumentURL = StringIndex(in.Int64())
- case "title":
- out.Title = StringIndex(in.Int64())
- case "baseURL":
- out.BaseURL = StringIndex(in.Int64())
- case "contentLanguage":
- out.ContentLanguage = StringIndex(in.Int64())
- case "encodingName":
- out.EncodingName = StringIndex(in.Int64())
- case "publicId":
- out.PublicID = StringIndex(in.Int64())
- case "systemId":
- out.SystemID = StringIndex(in.Int64())
- case "frameId":
- out.FrameID = StringIndex(in.Int64())
- case "nodes":
- if in.IsNull() {
- in.Skip()
- out.Nodes = nil
- } else {
- if out.Nodes == nil {
- out.Nodes = new(NodeTreeSnapshot)
- }
- (*out.Nodes).UnmarshalEasyJSON(in)
- }
- case "layout":
- if in.IsNull() {
- in.Skip()
- out.Layout = nil
- } else {
- if out.Layout == nil {
- out.Layout = new(LayoutTreeSnapshot)
- }
- (*out.Layout).UnmarshalEasyJSON(in)
- }
- case "textBoxes":
- if in.IsNull() {
- in.Skip()
- out.TextBoxes = nil
- } else {
- if out.TextBoxes == nil {
- out.TextBoxes = new(TextBoxSnapshot)
- }
- (*out.TextBoxes).UnmarshalEasyJSON(in)
- }
- case "scrollOffsetX":
- out.ScrollOffsetX = float64(in.Float64())
- case "scrollOffsetY":
- out.ScrollOffsetY = float64(in.Float64())
- case "contentWidth":
- out.ContentWidth = float64(in.Float64())
- case "contentHeight":
- out.ContentHeight = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot10(out *jwriter.Writer, in DocumentSnapshot) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"documentURL\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.DocumentURL))
- }
- {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.Int64(int64(in.Title))
- }
- {
- const prefix string = ",\"baseURL\":"
- out.RawString(prefix)
- out.Int64(int64(in.BaseURL))
- }
- {
- const prefix string = ",\"contentLanguage\":"
- out.RawString(prefix)
- out.Int64(int64(in.ContentLanguage))
- }
- {
- const prefix string = ",\"encodingName\":"
- out.RawString(prefix)
- out.Int64(int64(in.EncodingName))
- }
- {
- const prefix string = ",\"publicId\":"
- out.RawString(prefix)
- out.Int64(int64(in.PublicID))
- }
- {
- const prefix string = ",\"systemId\":"
- out.RawString(prefix)
- out.Int64(int64(in.SystemID))
- }
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.Int64(int64(in.FrameID))
- }
- {
- const prefix string = ",\"nodes\":"
- out.RawString(prefix)
- if in.Nodes == nil {
- out.RawString("null")
- } else {
- (*in.Nodes).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"layout\":"
- out.RawString(prefix)
- if in.Layout == nil {
- out.RawString("null")
- } else {
- (*in.Layout).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"textBoxes\":"
- out.RawString(prefix)
- if in.TextBoxes == nil {
- out.RawString("null")
- } else {
- (*in.TextBoxes).MarshalEasyJSON(out)
- }
- }
- if in.ScrollOffsetX != 0 {
- const prefix string = ",\"scrollOffsetX\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetX))
- }
- if in.ScrollOffsetY != 0 {
- const prefix string = ",\"scrollOffsetY\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetY))
- }
- if in.ContentWidth != 0 {
- const prefix string = ",\"contentWidth\":"
- out.RawString(prefix)
- out.Float64(float64(in.ContentWidth))
- }
- if in.ContentHeight != 0 {
- const prefix string = ",\"contentHeight\":"
- out.RawString(prefix)
- out.Float64(float64(in.ContentHeight))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v DocumentSnapshot) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v DocumentSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot10(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *DocumentSnapshot) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot10(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *DocumentSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot10(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot11(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot11(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot11(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot11(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot11(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot12(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.UnsafeFieldName(false)
- 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 "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())
- 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 v100 int64
- v100 = int64(in.Int64())
- out.ChildNodeIndexes = append(out.ChildNodeIndexes, v100)
- 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 v101 *NameValue
- if in.IsNull() {
- in.Skip()
- v101 = nil
- } else {
- if v101 == nil {
- v101 = new(NameValue)
- }
- (*v101).UnmarshalEasyJSON(in)
- }
- out.Attributes = append(out.Attributes, v101)
- 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 v102 int64
- v102 = int64(in.Int64())
- out.PseudoElementIndexes = append(out.PseudoElementIndexes, v102)
- 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 "contentLanguage":
- out.ContentLanguage = string(in.String())
- case "documentEncoding":
- out.DocumentEncoding = 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 "pseudoType":
- (out.PseudoType).UnmarshalEasyJSON(in)
- case "shadowRootType":
- (out.ShadowRootType).UnmarshalEasyJSON(in)
- case "isClickable":
- out.IsClickable = bool(in.Bool())
- case "eventListeners":
- if in.IsNull() {
- in.Skip()
- out.EventListeners = nil
- } else {
- in.Delim('[')
- if out.EventListeners == nil {
- if !in.IsDelim(']') {
- out.EventListeners = make([]*domdebugger.EventListener, 0, 8)
- } else {
- out.EventListeners = []*domdebugger.EventListener{}
- }
- } else {
- out.EventListeners = (out.EventListeners)[:0]
- }
- for !in.IsDelim(']') {
- var v103 *domdebugger.EventListener
- if in.IsNull() {
- in.Skip()
- v103 = nil
- } else {
- if v103 == nil {
- v103 = new(domdebugger.EventListener)
- }
- (*v103).UnmarshalEasyJSON(in)
- }
- out.EventListeners = append(out.EventListeners, v103)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "currentSourceURL":
- out.CurrentSourceURL = string(in.String())
- case "originURL":
- out.OriginURL = string(in.String())
- case "scrollOffsetX":
- out.ScrollOffsetX = float64(in.Float64())
- case "scrollOffsetY":
- out.ScrollOffsetY = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12(out *jwriter.Writer, in DOMNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeType\":"
- out.RawString(prefix[1:])
- (in.NodeType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"nodeName\":"
- out.RawString(prefix)
- out.String(string(in.NodeName))
- }
- {
- const prefix string = ",\"nodeValue\":"
- out.RawString(prefix)
- out.String(string(in.NodeValue))
- }
- if in.TextValue != "" {
- const prefix string = ",\"textValue\":"
- out.RawString(prefix)
- out.String(string(in.TextValue))
- }
- if in.InputValue != "" {
- const prefix string = ",\"inputValue\":"
- out.RawString(prefix)
- out.String(string(in.InputValue))
- }
- if in.InputChecked {
- const prefix string = ",\"inputChecked\":"
- out.RawString(prefix)
- out.Bool(bool(in.InputChecked))
- }
- if in.OptionSelected {
- const prefix string = ",\"optionSelected\":"
- out.RawString(prefix)
- out.Bool(bool(in.OptionSelected))
- }
- {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- if len(in.ChildNodeIndexes) != 0 {
- const prefix string = ",\"childNodeIndexes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v104, v105 := range in.ChildNodeIndexes {
- if v104 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v105))
- }
- out.RawByte(']')
- }
- }
- if len(in.Attributes) != 0 {
- const prefix string = ",\"attributes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v106, v107 := range in.Attributes {
- if v106 > 0 {
- out.RawByte(',')
- }
- if v107 == nil {
- out.RawString("null")
- } else {
- (*v107).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.PseudoElementIndexes) != 0 {
- const prefix string = ",\"pseudoElementIndexes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v108, v109 := range in.PseudoElementIndexes {
- if v108 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v109))
- }
- out.RawByte(']')
- }
- }
- if in.LayoutNodeIndex != 0 {
- const prefix string = ",\"layoutNodeIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.LayoutNodeIndex))
- }
- if in.DocumentURL != "" {
- const prefix string = ",\"documentURL\":"
- out.RawString(prefix)
- out.String(string(in.DocumentURL))
- }
- if in.BaseURL != "" {
- const prefix string = ",\"baseURL\":"
- out.RawString(prefix)
- out.String(string(in.BaseURL))
- }
- if in.ContentLanguage != "" {
- const prefix string = ",\"contentLanguage\":"
- out.RawString(prefix)
- out.String(string(in.ContentLanguage))
- }
- if in.DocumentEncoding != "" {
- const prefix string = ",\"documentEncoding\":"
- out.RawString(prefix)
- out.String(string(in.DocumentEncoding))
- }
- if in.PublicID != "" {
- const prefix string = ",\"publicId\":"
- out.RawString(prefix)
- out.String(string(in.PublicID))
- }
- if in.SystemID != "" {
- const prefix string = ",\"systemId\":"
- out.RawString(prefix)
- out.String(string(in.SystemID))
- }
- if in.FrameID != "" {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- if in.ContentDocumentIndex != 0 {
- const prefix string = ",\"contentDocumentIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.ContentDocumentIndex))
- }
- if in.PseudoType != "" {
- const prefix string = ",\"pseudoType\":"
- out.RawString(prefix)
- (in.PseudoType).MarshalEasyJSON(out)
- }
- if in.ShadowRootType != "" {
- const prefix string = ",\"shadowRootType\":"
- out.RawString(prefix)
- (in.ShadowRootType).MarshalEasyJSON(out)
- }
- if in.IsClickable {
- const prefix string = ",\"isClickable\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsClickable))
- }
- if len(in.EventListeners) != 0 {
- const prefix string = ",\"eventListeners\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v110, v111 := range in.EventListeners {
- if v110 > 0 {
- out.RawByte(',')
- }
- if v111 == nil {
- out.RawString("null")
- } else {
- (*v111).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.CurrentSourceURL != "" {
- const prefix string = ",\"currentSourceURL\":"
- out.RawString(prefix)
- out.String(string(in.CurrentSourceURL))
- }
- if in.OriginURL != "" {
- const prefix string = ",\"originURL\":"
- out.RawString(prefix)
- out.String(string(in.OriginURL))
- }
- if in.ScrollOffsetX != 0 {
- const prefix string = ",\"scrollOffsetX\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetX))
- }
- if in.ScrollOffsetY != 0 {
- const prefix string = ",\"scrollOffsetY\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetY))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v DOMNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v DOMNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *DOMNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot12(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *DOMNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot12(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot13(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.UnsafeFieldName(false)
- 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 v112 *NameValue
- if in.IsNull() {
- in.Skip()
- v112 = nil
- } else {
- if v112 == nil {
- v112 = new(NameValue)
- }
- (*v112).UnmarshalEasyJSON(in)
- }
- out.Properties = append(out.Properties, v112)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot13(out *jwriter.Writer, in ComputedStyle) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"properties\":"
- out.RawString(prefix[1:])
- if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v113, v114 := range in.Properties {
- if v113 > 0 {
- out.RawByte(',')
- }
- if v114 == nil {
- out.RawString("null")
- } else {
- (*v114).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v ComputedStyle) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v ComputedStyle) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot13(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *ComputedStyle) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot13(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *ComputedStyle) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot13(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot14(in *jlexer.Lexer, out *CaptureSnapshotReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "documents":
- if in.IsNull() {
- in.Skip()
- out.Documents = nil
- } else {
- in.Delim('[')
- if out.Documents == nil {
- if !in.IsDelim(']') {
- out.Documents = make([]*DocumentSnapshot, 0, 8)
- } else {
- out.Documents = []*DocumentSnapshot{}
- }
- } else {
- out.Documents = (out.Documents)[:0]
- }
- for !in.IsDelim(']') {
- var v115 *DocumentSnapshot
- if in.IsNull() {
- in.Skip()
- v115 = nil
- } else {
- if v115 == nil {
- v115 = new(DocumentSnapshot)
- }
- (*v115).UnmarshalEasyJSON(in)
- }
- out.Documents = append(out.Documents, v115)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "strings":
- if in.IsNull() {
- in.Skip()
- out.Strings = nil
- } else {
- in.Delim('[')
- if out.Strings == nil {
- if !in.IsDelim(']') {
- out.Strings = make([]string, 0, 4)
- } else {
- out.Strings = []string{}
- }
- } else {
- out.Strings = (out.Strings)[:0]
- }
- for !in.IsDelim(']') {
- var v116 string
- v116 = string(in.String())
- out.Strings = append(out.Strings, v116)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot14(out *jwriter.Writer, in CaptureSnapshotReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Documents) != 0 {
- const prefix string = ",\"documents\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v117, v118 := range in.Documents {
- if v117 > 0 {
- out.RawByte(',')
- }
- if v118 == nil {
- out.RawString("null")
- } else {
- (*v118).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.Strings) != 0 {
- const prefix string = ",\"strings\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v119, v120 := range in.Strings {
- if v119 > 0 {
- out.RawByte(',')
- }
- out.String(string(v120))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v CaptureSnapshotReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v CaptureSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot14(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *CaptureSnapshotReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot14(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *CaptureSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot14(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot15(in *jlexer.Lexer, out *CaptureSnapshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "computedStyles":
- if in.IsNull() {
- in.Skip()
- out.ComputedStyles = nil
- } else {
- in.Delim('[')
- if out.ComputedStyles == nil {
- if !in.IsDelim(']') {
- out.ComputedStyles = make([]string, 0, 4)
- } else {
- out.ComputedStyles = []string{}
- }
- } else {
- out.ComputedStyles = (out.ComputedStyles)[:0]
- }
- for !in.IsDelim(']') {
- var v121 string
- v121 = string(in.String())
- out.ComputedStyles = append(out.ComputedStyles, v121)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "includePaintOrder":
- out.IncludePaintOrder = bool(in.Bool())
- case "includeDOMRects":
- out.IncludeDOMRects = bool(in.Bool())
- case "includeBlendedBackgroundColors":
- out.IncludeBlendedBackgroundColors = bool(in.Bool())
- case "includeTextColorOpacities":
- out.IncludeTextColorOpacities = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot15(out *jwriter.Writer, in CaptureSnapshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"computedStyles\":"
- out.RawString(prefix[1:])
- if in.ComputedStyles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v122, v123 := range in.ComputedStyles {
- if v122 > 0 {
- out.RawByte(',')
- }
- out.String(string(v123))
- }
- out.RawByte(']')
- }
- }
- if in.IncludePaintOrder {
- const prefix string = ",\"includePaintOrder\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludePaintOrder))
- }
- if in.IncludeDOMRects {
- const prefix string = ",\"includeDOMRects\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeDOMRects))
- }
- if in.IncludeBlendedBackgroundColors {
- const prefix string = ",\"includeBlendedBackgroundColors\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeBlendedBackgroundColors))
- }
- if in.IncludeTextColorOpacities {
- const prefix string = ",\"includeTextColorOpacities\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeTextColorOpacities))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v CaptureSnapshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v CaptureSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot15(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *CaptureSnapshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot15(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *CaptureSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot15(l, v)
- }
|