easyjson.go 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package domsnapshot
  3. import (
  4. json "encoding/json"
  5. cdp "github.com/chromedp/cdproto/cdp"
  6. dom "github.com/chromedp/cdproto/dom"
  7. domdebugger "github.com/chromedp/cdproto/domdebugger"
  8. easyjson "github.com/mailru/easyjson"
  9. jlexer "github.com/mailru/easyjson/jlexer"
  10. jwriter "github.com/mailru/easyjson/jwriter"
  11. )
  12. // suppress unused package warning
  13. var (
  14. _ *json.RawMessage
  15. _ *jlexer.Lexer
  16. _ *jwriter.Writer
  17. _ easyjson.Marshaler
  18. )
  19. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot(in *jlexer.Lexer, out *TextBoxSnapshot) {
  20. isTopLevel := in.IsStart()
  21. if in.IsNull() {
  22. if isTopLevel {
  23. in.Consumed()
  24. }
  25. in.Skip()
  26. return
  27. }
  28. in.Delim('{')
  29. for !in.IsDelim('}') {
  30. key := in.UnsafeFieldName(false)
  31. in.WantColon()
  32. if in.IsNull() {
  33. in.Skip()
  34. in.WantComma()
  35. continue
  36. }
  37. switch key {
  38. case "layoutIndex":
  39. if in.IsNull() {
  40. in.Skip()
  41. out.LayoutIndex = nil
  42. } else {
  43. in.Delim('[')
  44. if out.LayoutIndex == nil {
  45. if !in.IsDelim(']') {
  46. out.LayoutIndex = make([]int64, 0, 8)
  47. } else {
  48. out.LayoutIndex = []int64{}
  49. }
  50. } else {
  51. out.LayoutIndex = (out.LayoutIndex)[:0]
  52. }
  53. for !in.IsDelim(']') {
  54. var v1 int64
  55. v1 = int64(in.Int64())
  56. out.LayoutIndex = append(out.LayoutIndex, v1)
  57. in.WantComma()
  58. }
  59. in.Delim(']')
  60. }
  61. case "bounds":
  62. if in.IsNull() {
  63. in.Skip()
  64. out.Bounds = nil
  65. } else {
  66. in.Delim('[')
  67. if out.Bounds == nil {
  68. if !in.IsDelim(']') {
  69. out.Bounds = make([]Rectangle, 0, 2)
  70. } else {
  71. out.Bounds = []Rectangle{}
  72. }
  73. } else {
  74. out.Bounds = (out.Bounds)[:0]
  75. }
  76. for !in.IsDelim(']') {
  77. var v2 Rectangle
  78. if in.IsNull() {
  79. in.Skip()
  80. v2 = nil
  81. } else {
  82. in.Delim('[')
  83. if v2 == nil {
  84. if !in.IsDelim(']') {
  85. v2 = make(Rectangle, 0, 8)
  86. } else {
  87. v2 = Rectangle{}
  88. }
  89. } else {
  90. v2 = (v2)[:0]
  91. }
  92. for !in.IsDelim(']') {
  93. var v3 float64
  94. v3 = float64(in.Float64())
  95. v2 = append(v2, v3)
  96. in.WantComma()
  97. }
  98. in.Delim(']')
  99. }
  100. out.Bounds = append(out.Bounds, v2)
  101. in.WantComma()
  102. }
  103. in.Delim(']')
  104. }
  105. case "start":
  106. if in.IsNull() {
  107. in.Skip()
  108. out.Start = nil
  109. } else {
  110. in.Delim('[')
  111. if out.Start == nil {
  112. if !in.IsDelim(']') {
  113. out.Start = make([]int64, 0, 8)
  114. } else {
  115. out.Start = []int64{}
  116. }
  117. } else {
  118. out.Start = (out.Start)[:0]
  119. }
  120. for !in.IsDelim(']') {
  121. var v4 int64
  122. v4 = int64(in.Int64())
  123. out.Start = append(out.Start, v4)
  124. in.WantComma()
  125. }
  126. in.Delim(']')
  127. }
  128. case "length":
  129. if in.IsNull() {
  130. in.Skip()
  131. out.Length = nil
  132. } else {
  133. in.Delim('[')
  134. if out.Length == nil {
  135. if !in.IsDelim(']') {
  136. out.Length = make([]int64, 0, 8)
  137. } else {
  138. out.Length = []int64{}
  139. }
  140. } else {
  141. out.Length = (out.Length)[:0]
  142. }
  143. for !in.IsDelim(']') {
  144. var v5 int64
  145. v5 = int64(in.Int64())
  146. out.Length = append(out.Length, v5)
  147. in.WantComma()
  148. }
  149. in.Delim(']')
  150. }
  151. default:
  152. in.SkipRecursive()
  153. }
  154. in.WantComma()
  155. }
  156. in.Delim('}')
  157. if isTopLevel {
  158. in.Consumed()
  159. }
  160. }
  161. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot(out *jwriter.Writer, in TextBoxSnapshot) {
  162. out.RawByte('{')
  163. first := true
  164. _ = first
  165. {
  166. const prefix string = ",\"layoutIndex\":"
  167. out.RawString(prefix[1:])
  168. if in.LayoutIndex == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  169. out.RawString("null")
  170. } else {
  171. out.RawByte('[')
  172. for v6, v7 := range in.LayoutIndex {
  173. if v6 > 0 {
  174. out.RawByte(',')
  175. }
  176. out.Int64(int64(v7))
  177. }
  178. out.RawByte(']')
  179. }
  180. }
  181. {
  182. const prefix string = ",\"bounds\":"
  183. out.RawString(prefix)
  184. if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  185. out.RawString("null")
  186. } else {
  187. out.RawByte('[')
  188. for v8, v9 := range in.Bounds {
  189. if v8 > 0 {
  190. out.RawByte(',')
  191. }
  192. if v9 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  193. out.RawString("null")
  194. } else {
  195. out.RawByte('[')
  196. for v10, v11 := range v9 {
  197. if v10 > 0 {
  198. out.RawByte(',')
  199. }
  200. out.Float64(float64(v11))
  201. }
  202. out.RawByte(']')
  203. }
  204. }
  205. out.RawByte(']')
  206. }
  207. }
  208. {
  209. const prefix string = ",\"start\":"
  210. out.RawString(prefix)
  211. if in.Start == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  212. out.RawString("null")
  213. } else {
  214. out.RawByte('[')
  215. for v12, v13 := range in.Start {
  216. if v12 > 0 {
  217. out.RawByte(',')
  218. }
  219. out.Int64(int64(v13))
  220. }
  221. out.RawByte(']')
  222. }
  223. }
  224. {
  225. const prefix string = ",\"length\":"
  226. out.RawString(prefix)
  227. if in.Length == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  228. out.RawString("null")
  229. } else {
  230. out.RawByte('[')
  231. for v14, v15 := range in.Length {
  232. if v14 > 0 {
  233. out.RawByte(',')
  234. }
  235. out.Int64(int64(v15))
  236. }
  237. out.RawByte(']')
  238. }
  239. }
  240. out.RawByte('}')
  241. }
  242. // MarshalJSON supports json.Marshaler interface
  243. func (v TextBoxSnapshot) MarshalJSON() ([]byte, error) {
  244. w := jwriter.Writer{}
  245. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot(&w, v)
  246. return w.Buffer.BuildBytes(), w.Error
  247. }
  248. // MarshalEasyJSON supports easyjson.Marshaler interface
  249. func (v TextBoxSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
  250. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot(w, v)
  251. }
  252. // UnmarshalJSON supports json.Unmarshaler interface
  253. func (v *TextBoxSnapshot) UnmarshalJSON(data []byte) error {
  254. r := jlexer.Lexer{Data: data}
  255. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot(&r, v)
  256. return r.Error()
  257. }
  258. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  259. func (v *TextBoxSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
  260. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot(l, v)
  261. }
  262. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot1(in *jlexer.Lexer, out *RareStringData) {
  263. isTopLevel := in.IsStart()
  264. if in.IsNull() {
  265. if isTopLevel {
  266. in.Consumed()
  267. }
  268. in.Skip()
  269. return
  270. }
  271. in.Delim('{')
  272. for !in.IsDelim('}') {
  273. key := in.UnsafeFieldName(false)
  274. in.WantColon()
  275. if in.IsNull() {
  276. in.Skip()
  277. in.WantComma()
  278. continue
  279. }
  280. switch key {
  281. case "index":
  282. if in.IsNull() {
  283. in.Skip()
  284. out.Index = nil
  285. } else {
  286. in.Delim('[')
  287. if out.Index == nil {
  288. if !in.IsDelim(']') {
  289. out.Index = make([]int64, 0, 8)
  290. } else {
  291. out.Index = []int64{}
  292. }
  293. } else {
  294. out.Index = (out.Index)[:0]
  295. }
  296. for !in.IsDelim(']') {
  297. var v16 int64
  298. v16 = int64(in.Int64())
  299. out.Index = append(out.Index, v16)
  300. in.WantComma()
  301. }
  302. in.Delim(']')
  303. }
  304. case "value":
  305. if in.IsNull() {
  306. in.Skip()
  307. out.Value = nil
  308. } else {
  309. in.Delim('[')
  310. if out.Value == nil {
  311. if !in.IsDelim(']') {
  312. out.Value = make([]StringIndex, 0, 8)
  313. } else {
  314. out.Value = []StringIndex{}
  315. }
  316. } else {
  317. out.Value = (out.Value)[:0]
  318. }
  319. for !in.IsDelim(']') {
  320. var v17 StringIndex
  321. v17 = StringIndex(in.Int64())
  322. out.Value = append(out.Value, v17)
  323. in.WantComma()
  324. }
  325. in.Delim(']')
  326. }
  327. default:
  328. in.SkipRecursive()
  329. }
  330. in.WantComma()
  331. }
  332. in.Delim('}')
  333. if isTopLevel {
  334. in.Consumed()
  335. }
  336. }
  337. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1(out *jwriter.Writer, in RareStringData) {
  338. out.RawByte('{')
  339. first := true
  340. _ = first
  341. {
  342. const prefix string = ",\"index\":"
  343. out.RawString(prefix[1:])
  344. if in.Index == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  345. out.RawString("null")
  346. } else {
  347. out.RawByte('[')
  348. for v18, v19 := range in.Index {
  349. if v18 > 0 {
  350. out.RawByte(',')
  351. }
  352. out.Int64(int64(v19))
  353. }
  354. out.RawByte(']')
  355. }
  356. }
  357. {
  358. const prefix string = ",\"value\":"
  359. out.RawString(prefix)
  360. if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  361. out.RawString("null")
  362. } else {
  363. out.RawByte('[')
  364. for v20, v21 := range in.Value {
  365. if v20 > 0 {
  366. out.RawByte(',')
  367. }
  368. out.Int64(int64(v21))
  369. }
  370. out.RawByte(']')
  371. }
  372. }
  373. out.RawByte('}')
  374. }
  375. // MarshalJSON supports json.Marshaler interface
  376. func (v RareStringData) MarshalJSON() ([]byte, error) {
  377. w := jwriter.Writer{}
  378. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1(&w, v)
  379. return w.Buffer.BuildBytes(), w.Error
  380. }
  381. // MarshalEasyJSON supports easyjson.Marshaler interface
  382. func (v RareStringData) MarshalEasyJSON(w *jwriter.Writer) {
  383. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1(w, v)
  384. }
  385. // UnmarshalJSON supports json.Unmarshaler interface
  386. func (v *RareStringData) UnmarshalJSON(data []byte) error {
  387. r := jlexer.Lexer{Data: data}
  388. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot1(&r, v)
  389. return r.Error()
  390. }
  391. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  392. func (v *RareStringData) UnmarshalEasyJSON(l *jlexer.Lexer) {
  393. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot1(l, v)
  394. }
  395. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot2(in *jlexer.Lexer, out *RareIntegerData) {
  396. isTopLevel := in.IsStart()
  397. if in.IsNull() {
  398. if isTopLevel {
  399. in.Consumed()
  400. }
  401. in.Skip()
  402. return
  403. }
  404. in.Delim('{')
  405. for !in.IsDelim('}') {
  406. key := in.UnsafeFieldName(false)
  407. in.WantColon()
  408. if in.IsNull() {
  409. in.Skip()
  410. in.WantComma()
  411. continue
  412. }
  413. switch key {
  414. case "index":
  415. if in.IsNull() {
  416. in.Skip()
  417. out.Index = nil
  418. } else {
  419. in.Delim('[')
  420. if out.Index == nil {
  421. if !in.IsDelim(']') {
  422. out.Index = make([]int64, 0, 8)
  423. } else {
  424. out.Index = []int64{}
  425. }
  426. } else {
  427. out.Index = (out.Index)[:0]
  428. }
  429. for !in.IsDelim(']') {
  430. var v22 int64
  431. v22 = int64(in.Int64())
  432. out.Index = append(out.Index, v22)
  433. in.WantComma()
  434. }
  435. in.Delim(']')
  436. }
  437. case "value":
  438. if in.IsNull() {
  439. in.Skip()
  440. out.Value = nil
  441. } else {
  442. in.Delim('[')
  443. if out.Value == nil {
  444. if !in.IsDelim(']') {
  445. out.Value = make([]int64, 0, 8)
  446. } else {
  447. out.Value = []int64{}
  448. }
  449. } else {
  450. out.Value = (out.Value)[:0]
  451. }
  452. for !in.IsDelim(']') {
  453. var v23 int64
  454. v23 = int64(in.Int64())
  455. out.Value = append(out.Value, v23)
  456. in.WantComma()
  457. }
  458. in.Delim(']')
  459. }
  460. default:
  461. in.SkipRecursive()
  462. }
  463. in.WantComma()
  464. }
  465. in.Delim('}')
  466. if isTopLevel {
  467. in.Consumed()
  468. }
  469. }
  470. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot2(out *jwriter.Writer, in RareIntegerData) {
  471. out.RawByte('{')
  472. first := true
  473. _ = first
  474. {
  475. const prefix string = ",\"index\":"
  476. out.RawString(prefix[1:])
  477. if in.Index == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  478. out.RawString("null")
  479. } else {
  480. out.RawByte('[')
  481. for v24, v25 := range in.Index {
  482. if v24 > 0 {
  483. out.RawByte(',')
  484. }
  485. out.Int64(int64(v25))
  486. }
  487. out.RawByte(']')
  488. }
  489. }
  490. {
  491. const prefix string = ",\"value\":"
  492. out.RawString(prefix)
  493. if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  494. out.RawString("null")
  495. } else {
  496. out.RawByte('[')
  497. for v26, v27 := range in.Value {
  498. if v26 > 0 {
  499. out.RawByte(',')
  500. }
  501. out.Int64(int64(v27))
  502. }
  503. out.RawByte(']')
  504. }
  505. }
  506. out.RawByte('}')
  507. }
  508. // MarshalJSON supports json.Marshaler interface
  509. func (v RareIntegerData) MarshalJSON() ([]byte, error) {
  510. w := jwriter.Writer{}
  511. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot2(&w, v)
  512. return w.Buffer.BuildBytes(), w.Error
  513. }
  514. // MarshalEasyJSON supports easyjson.Marshaler interface
  515. func (v RareIntegerData) MarshalEasyJSON(w *jwriter.Writer) {
  516. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot2(w, v)
  517. }
  518. // UnmarshalJSON supports json.Unmarshaler interface
  519. func (v *RareIntegerData) UnmarshalJSON(data []byte) error {
  520. r := jlexer.Lexer{Data: data}
  521. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot2(&r, v)
  522. return r.Error()
  523. }
  524. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  525. func (v *RareIntegerData) UnmarshalEasyJSON(l *jlexer.Lexer) {
  526. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot2(l, v)
  527. }
  528. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot3(in *jlexer.Lexer, out *RareBooleanData) {
  529. isTopLevel := in.IsStart()
  530. if in.IsNull() {
  531. if isTopLevel {
  532. in.Consumed()
  533. }
  534. in.Skip()
  535. return
  536. }
  537. in.Delim('{')
  538. for !in.IsDelim('}') {
  539. key := in.UnsafeFieldName(false)
  540. in.WantColon()
  541. if in.IsNull() {
  542. in.Skip()
  543. in.WantComma()
  544. continue
  545. }
  546. switch key {
  547. case "index":
  548. if in.IsNull() {
  549. in.Skip()
  550. out.Index = nil
  551. } else {
  552. in.Delim('[')
  553. if out.Index == nil {
  554. if !in.IsDelim(']') {
  555. out.Index = make([]int64, 0, 8)
  556. } else {
  557. out.Index = []int64{}
  558. }
  559. } else {
  560. out.Index = (out.Index)[:0]
  561. }
  562. for !in.IsDelim(']') {
  563. var v28 int64
  564. v28 = int64(in.Int64())
  565. out.Index = append(out.Index, v28)
  566. in.WantComma()
  567. }
  568. in.Delim(']')
  569. }
  570. default:
  571. in.SkipRecursive()
  572. }
  573. in.WantComma()
  574. }
  575. in.Delim('}')
  576. if isTopLevel {
  577. in.Consumed()
  578. }
  579. }
  580. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot3(out *jwriter.Writer, in RareBooleanData) {
  581. out.RawByte('{')
  582. first := true
  583. _ = first
  584. {
  585. const prefix string = ",\"index\":"
  586. out.RawString(prefix[1:])
  587. if in.Index == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  588. out.RawString("null")
  589. } else {
  590. out.RawByte('[')
  591. for v29, v30 := range in.Index {
  592. if v29 > 0 {
  593. out.RawByte(',')
  594. }
  595. out.Int64(int64(v30))
  596. }
  597. out.RawByte(']')
  598. }
  599. }
  600. out.RawByte('}')
  601. }
  602. // MarshalJSON supports json.Marshaler interface
  603. func (v RareBooleanData) MarshalJSON() ([]byte, error) {
  604. w := jwriter.Writer{}
  605. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot3(&w, v)
  606. return w.Buffer.BuildBytes(), w.Error
  607. }
  608. // MarshalEasyJSON supports easyjson.Marshaler interface
  609. func (v RareBooleanData) MarshalEasyJSON(w *jwriter.Writer) {
  610. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot3(w, v)
  611. }
  612. // UnmarshalJSON supports json.Unmarshaler interface
  613. func (v *RareBooleanData) UnmarshalJSON(data []byte) error {
  614. r := jlexer.Lexer{Data: data}
  615. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot3(&r, v)
  616. return r.Error()
  617. }
  618. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  619. func (v *RareBooleanData) UnmarshalEasyJSON(l *jlexer.Lexer) {
  620. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot3(l, v)
  621. }
  622. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(in *jlexer.Lexer, out *NodeTreeSnapshot) {
  623. isTopLevel := in.IsStart()
  624. if in.IsNull() {
  625. if isTopLevel {
  626. in.Consumed()
  627. }
  628. in.Skip()
  629. return
  630. }
  631. in.Delim('{')
  632. for !in.IsDelim('}') {
  633. key := in.UnsafeFieldName(false)
  634. in.WantColon()
  635. if in.IsNull() {
  636. in.Skip()
  637. in.WantComma()
  638. continue
  639. }
  640. switch key {
  641. case "parentIndex":
  642. if in.IsNull() {
  643. in.Skip()
  644. out.ParentIndex = nil
  645. } else {
  646. in.Delim('[')
  647. if out.ParentIndex == nil {
  648. if !in.IsDelim(']') {
  649. out.ParentIndex = make([]int64, 0, 8)
  650. } else {
  651. out.ParentIndex = []int64{}
  652. }
  653. } else {
  654. out.ParentIndex = (out.ParentIndex)[:0]
  655. }
  656. for !in.IsDelim(']') {
  657. var v31 int64
  658. v31 = int64(in.Int64())
  659. out.ParentIndex = append(out.ParentIndex, v31)
  660. in.WantComma()
  661. }
  662. in.Delim(']')
  663. }
  664. case "nodeType":
  665. if in.IsNull() {
  666. in.Skip()
  667. out.NodeType = nil
  668. } else {
  669. in.Delim('[')
  670. if out.NodeType == nil {
  671. if !in.IsDelim(']') {
  672. out.NodeType = make([]int64, 0, 8)
  673. } else {
  674. out.NodeType = []int64{}
  675. }
  676. } else {
  677. out.NodeType = (out.NodeType)[:0]
  678. }
  679. for !in.IsDelim(']') {
  680. var v32 int64
  681. v32 = int64(in.Int64())
  682. out.NodeType = append(out.NodeType, v32)
  683. in.WantComma()
  684. }
  685. in.Delim(']')
  686. }
  687. case "shadowRootType":
  688. if in.IsNull() {
  689. in.Skip()
  690. out.ShadowRootType = nil
  691. } else {
  692. if out.ShadowRootType == nil {
  693. out.ShadowRootType = new(RareStringData)
  694. }
  695. (*out.ShadowRootType).UnmarshalEasyJSON(in)
  696. }
  697. case "nodeName":
  698. if in.IsNull() {
  699. in.Skip()
  700. out.NodeName = nil
  701. } else {
  702. in.Delim('[')
  703. if out.NodeName == nil {
  704. if !in.IsDelim(']') {
  705. out.NodeName = make([]StringIndex, 0, 8)
  706. } else {
  707. out.NodeName = []StringIndex{}
  708. }
  709. } else {
  710. out.NodeName = (out.NodeName)[:0]
  711. }
  712. for !in.IsDelim(']') {
  713. var v33 StringIndex
  714. v33 = StringIndex(in.Int64())
  715. out.NodeName = append(out.NodeName, v33)
  716. in.WantComma()
  717. }
  718. in.Delim(']')
  719. }
  720. case "nodeValue":
  721. if in.IsNull() {
  722. in.Skip()
  723. out.NodeValue = nil
  724. } else {
  725. in.Delim('[')
  726. if out.NodeValue == nil {
  727. if !in.IsDelim(']') {
  728. out.NodeValue = make([]StringIndex, 0, 8)
  729. } else {
  730. out.NodeValue = []StringIndex{}
  731. }
  732. } else {
  733. out.NodeValue = (out.NodeValue)[:0]
  734. }
  735. for !in.IsDelim(']') {
  736. var v34 StringIndex
  737. v34 = StringIndex(in.Int64())
  738. out.NodeValue = append(out.NodeValue, v34)
  739. in.WantComma()
  740. }
  741. in.Delim(']')
  742. }
  743. case "backendNodeId":
  744. if in.IsNull() {
  745. in.Skip()
  746. out.BackendNodeID = nil
  747. } else {
  748. in.Delim('[')
  749. if out.BackendNodeID == nil {
  750. if !in.IsDelim(']') {
  751. out.BackendNodeID = make([]cdp.BackendNodeID, 0, 8)
  752. } else {
  753. out.BackendNodeID = []cdp.BackendNodeID{}
  754. }
  755. } else {
  756. out.BackendNodeID = (out.BackendNodeID)[:0]
  757. }
  758. for !in.IsDelim(']') {
  759. var v35 cdp.BackendNodeID
  760. (v35).UnmarshalEasyJSON(in)
  761. out.BackendNodeID = append(out.BackendNodeID, v35)
  762. in.WantComma()
  763. }
  764. in.Delim(']')
  765. }
  766. case "attributes":
  767. if in.IsNull() {
  768. in.Skip()
  769. out.Attributes = nil
  770. } else {
  771. in.Delim('[')
  772. if out.Attributes == nil {
  773. if !in.IsDelim(']') {
  774. out.Attributes = make([]ArrayOfStrings, 0, 2)
  775. } else {
  776. out.Attributes = []ArrayOfStrings{}
  777. }
  778. } else {
  779. out.Attributes = (out.Attributes)[:0]
  780. }
  781. for !in.IsDelim(']') {
  782. var v36 ArrayOfStrings
  783. if in.IsNull() {
  784. in.Skip()
  785. v36 = nil
  786. } else {
  787. in.Delim('[')
  788. if v36 == nil {
  789. if !in.IsDelim(']') {
  790. v36 = make(ArrayOfStrings, 0, 8)
  791. } else {
  792. v36 = ArrayOfStrings{}
  793. }
  794. } else {
  795. v36 = (v36)[:0]
  796. }
  797. for !in.IsDelim(']') {
  798. var v37 int64
  799. v37 = int64(in.Int64())
  800. v36 = append(v36, v37)
  801. in.WantComma()
  802. }
  803. in.Delim(']')
  804. }
  805. out.Attributes = append(out.Attributes, v36)
  806. in.WantComma()
  807. }
  808. in.Delim(']')
  809. }
  810. case "textValue":
  811. if in.IsNull() {
  812. in.Skip()
  813. out.TextValue = nil
  814. } else {
  815. if out.TextValue == nil {
  816. out.TextValue = new(RareStringData)
  817. }
  818. (*out.TextValue).UnmarshalEasyJSON(in)
  819. }
  820. case "inputValue":
  821. if in.IsNull() {
  822. in.Skip()
  823. out.InputValue = nil
  824. } else {
  825. if out.InputValue == nil {
  826. out.InputValue = new(RareStringData)
  827. }
  828. (*out.InputValue).UnmarshalEasyJSON(in)
  829. }
  830. case "inputChecked":
  831. if in.IsNull() {
  832. in.Skip()
  833. out.InputChecked = nil
  834. } else {
  835. if out.InputChecked == nil {
  836. out.InputChecked = new(RareBooleanData)
  837. }
  838. (*out.InputChecked).UnmarshalEasyJSON(in)
  839. }
  840. case "optionSelected":
  841. if in.IsNull() {
  842. in.Skip()
  843. out.OptionSelected = nil
  844. } else {
  845. if out.OptionSelected == nil {
  846. out.OptionSelected = new(RareBooleanData)
  847. }
  848. (*out.OptionSelected).UnmarshalEasyJSON(in)
  849. }
  850. case "contentDocumentIndex":
  851. if in.IsNull() {
  852. in.Skip()
  853. out.ContentDocumentIndex = nil
  854. } else {
  855. if out.ContentDocumentIndex == nil {
  856. out.ContentDocumentIndex = new(RareIntegerData)
  857. }
  858. (*out.ContentDocumentIndex).UnmarshalEasyJSON(in)
  859. }
  860. case "pseudoType":
  861. if in.IsNull() {
  862. in.Skip()
  863. out.PseudoType = nil
  864. } else {
  865. if out.PseudoType == nil {
  866. out.PseudoType = new(RareStringData)
  867. }
  868. (*out.PseudoType).UnmarshalEasyJSON(in)
  869. }
  870. case "pseudoIdentifier":
  871. if in.IsNull() {
  872. in.Skip()
  873. out.PseudoIdentifier = nil
  874. } else {
  875. if out.PseudoIdentifier == nil {
  876. out.PseudoIdentifier = new(RareStringData)
  877. }
  878. (*out.PseudoIdentifier).UnmarshalEasyJSON(in)
  879. }
  880. case "isClickable":
  881. if in.IsNull() {
  882. in.Skip()
  883. out.IsClickable = nil
  884. } else {
  885. if out.IsClickable == nil {
  886. out.IsClickable = new(RareBooleanData)
  887. }
  888. (*out.IsClickable).UnmarshalEasyJSON(in)
  889. }
  890. case "currentSourceURL":
  891. if in.IsNull() {
  892. in.Skip()
  893. out.CurrentSourceURL = nil
  894. } else {
  895. if out.CurrentSourceURL == nil {
  896. out.CurrentSourceURL = new(RareStringData)
  897. }
  898. (*out.CurrentSourceURL).UnmarshalEasyJSON(in)
  899. }
  900. case "originURL":
  901. if in.IsNull() {
  902. in.Skip()
  903. out.OriginURL = nil
  904. } else {
  905. if out.OriginURL == nil {
  906. out.OriginURL = new(RareStringData)
  907. }
  908. (*out.OriginURL).UnmarshalEasyJSON(in)
  909. }
  910. default:
  911. in.SkipRecursive()
  912. }
  913. in.WantComma()
  914. }
  915. in.Delim('}')
  916. if isTopLevel {
  917. in.Consumed()
  918. }
  919. }
  920. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(out *jwriter.Writer, in NodeTreeSnapshot) {
  921. out.RawByte('{')
  922. first := true
  923. _ = first
  924. if len(in.ParentIndex) != 0 {
  925. const prefix string = ",\"parentIndex\":"
  926. first = false
  927. out.RawString(prefix[1:])
  928. {
  929. out.RawByte('[')
  930. for v38, v39 := range in.ParentIndex {
  931. if v38 > 0 {
  932. out.RawByte(',')
  933. }
  934. out.Int64(int64(v39))
  935. }
  936. out.RawByte(']')
  937. }
  938. }
  939. if len(in.NodeType) != 0 {
  940. const prefix string = ",\"nodeType\":"
  941. if first {
  942. first = false
  943. out.RawString(prefix[1:])
  944. } else {
  945. out.RawString(prefix)
  946. }
  947. {
  948. out.RawByte('[')
  949. for v40, v41 := range in.NodeType {
  950. if v40 > 0 {
  951. out.RawByte(',')
  952. }
  953. out.Int64(int64(v41))
  954. }
  955. out.RawByte(']')
  956. }
  957. }
  958. if in.ShadowRootType != nil {
  959. const prefix string = ",\"shadowRootType\":"
  960. if first {
  961. first = false
  962. out.RawString(prefix[1:])
  963. } else {
  964. out.RawString(prefix)
  965. }
  966. (*in.ShadowRootType).MarshalEasyJSON(out)
  967. }
  968. if len(in.NodeName) != 0 {
  969. const prefix string = ",\"nodeName\":"
  970. if first {
  971. first = false
  972. out.RawString(prefix[1:])
  973. } else {
  974. out.RawString(prefix)
  975. }
  976. {
  977. out.RawByte('[')
  978. for v42, v43 := range in.NodeName {
  979. if v42 > 0 {
  980. out.RawByte(',')
  981. }
  982. out.Int64(int64(v43))
  983. }
  984. out.RawByte(']')
  985. }
  986. }
  987. if len(in.NodeValue) != 0 {
  988. const prefix string = ",\"nodeValue\":"
  989. if first {
  990. first = false
  991. out.RawString(prefix[1:])
  992. } else {
  993. out.RawString(prefix)
  994. }
  995. {
  996. out.RawByte('[')
  997. for v44, v45 := range in.NodeValue {
  998. if v44 > 0 {
  999. out.RawByte(',')
  1000. }
  1001. out.Int64(int64(v45))
  1002. }
  1003. out.RawByte(']')
  1004. }
  1005. }
  1006. if len(in.BackendNodeID) != 0 {
  1007. const prefix string = ",\"backendNodeId\":"
  1008. if first {
  1009. first = false
  1010. out.RawString(prefix[1:])
  1011. } else {
  1012. out.RawString(prefix)
  1013. }
  1014. {
  1015. out.RawByte('[')
  1016. for v46, v47 := range in.BackendNodeID {
  1017. if v46 > 0 {
  1018. out.RawByte(',')
  1019. }
  1020. out.Int64(int64(v47))
  1021. }
  1022. out.RawByte(']')
  1023. }
  1024. }
  1025. if len(in.Attributes) != 0 {
  1026. const prefix string = ",\"attributes\":"
  1027. if first {
  1028. first = false
  1029. out.RawString(prefix[1:])
  1030. } else {
  1031. out.RawString(prefix)
  1032. }
  1033. {
  1034. out.RawByte('[')
  1035. for v48, v49 := range in.Attributes {
  1036. if v48 > 0 {
  1037. out.RawByte(',')
  1038. }
  1039. if v49 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1040. out.RawString("null")
  1041. } else {
  1042. out.RawByte('[')
  1043. for v50, v51 := range v49 {
  1044. if v50 > 0 {
  1045. out.RawByte(',')
  1046. }
  1047. out.Int64(int64(v51))
  1048. }
  1049. out.RawByte(']')
  1050. }
  1051. }
  1052. out.RawByte(']')
  1053. }
  1054. }
  1055. if in.TextValue != nil {
  1056. const prefix string = ",\"textValue\":"
  1057. if first {
  1058. first = false
  1059. out.RawString(prefix[1:])
  1060. } else {
  1061. out.RawString(prefix)
  1062. }
  1063. (*in.TextValue).MarshalEasyJSON(out)
  1064. }
  1065. if in.InputValue != nil {
  1066. const prefix string = ",\"inputValue\":"
  1067. if first {
  1068. first = false
  1069. out.RawString(prefix[1:])
  1070. } else {
  1071. out.RawString(prefix)
  1072. }
  1073. (*in.InputValue).MarshalEasyJSON(out)
  1074. }
  1075. if in.InputChecked != nil {
  1076. const prefix string = ",\"inputChecked\":"
  1077. if first {
  1078. first = false
  1079. out.RawString(prefix[1:])
  1080. } else {
  1081. out.RawString(prefix)
  1082. }
  1083. (*in.InputChecked).MarshalEasyJSON(out)
  1084. }
  1085. if in.OptionSelected != nil {
  1086. const prefix string = ",\"optionSelected\":"
  1087. if first {
  1088. first = false
  1089. out.RawString(prefix[1:])
  1090. } else {
  1091. out.RawString(prefix)
  1092. }
  1093. (*in.OptionSelected).MarshalEasyJSON(out)
  1094. }
  1095. if in.ContentDocumentIndex != nil {
  1096. const prefix string = ",\"contentDocumentIndex\":"
  1097. if first {
  1098. first = false
  1099. out.RawString(prefix[1:])
  1100. } else {
  1101. out.RawString(prefix)
  1102. }
  1103. (*in.ContentDocumentIndex).MarshalEasyJSON(out)
  1104. }
  1105. if in.PseudoType != nil {
  1106. const prefix string = ",\"pseudoType\":"
  1107. if first {
  1108. first = false
  1109. out.RawString(prefix[1:])
  1110. } else {
  1111. out.RawString(prefix)
  1112. }
  1113. (*in.PseudoType).MarshalEasyJSON(out)
  1114. }
  1115. if in.PseudoIdentifier != nil {
  1116. const prefix string = ",\"pseudoIdentifier\":"
  1117. if first {
  1118. first = false
  1119. out.RawString(prefix[1:])
  1120. } else {
  1121. out.RawString(prefix)
  1122. }
  1123. (*in.PseudoIdentifier).MarshalEasyJSON(out)
  1124. }
  1125. if in.IsClickable != nil {
  1126. const prefix string = ",\"isClickable\":"
  1127. if first {
  1128. first = false
  1129. out.RawString(prefix[1:])
  1130. } else {
  1131. out.RawString(prefix)
  1132. }
  1133. (*in.IsClickable).MarshalEasyJSON(out)
  1134. }
  1135. if in.CurrentSourceURL != nil {
  1136. const prefix string = ",\"currentSourceURL\":"
  1137. if first {
  1138. first = false
  1139. out.RawString(prefix[1:])
  1140. } else {
  1141. out.RawString(prefix)
  1142. }
  1143. (*in.CurrentSourceURL).MarshalEasyJSON(out)
  1144. }
  1145. if in.OriginURL != nil {
  1146. const prefix string = ",\"originURL\":"
  1147. if first {
  1148. first = false
  1149. out.RawString(prefix[1:])
  1150. } else {
  1151. out.RawString(prefix)
  1152. }
  1153. (*in.OriginURL).MarshalEasyJSON(out)
  1154. }
  1155. out.RawByte('}')
  1156. }
  1157. // MarshalJSON supports json.Marshaler interface
  1158. func (v NodeTreeSnapshot) MarshalJSON() ([]byte, error) {
  1159. w := jwriter.Writer{}
  1160. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(&w, v)
  1161. return w.Buffer.BuildBytes(), w.Error
  1162. }
  1163. // MarshalEasyJSON supports easyjson.Marshaler interface
  1164. func (v NodeTreeSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
  1165. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(w, v)
  1166. }
  1167. // UnmarshalJSON supports json.Unmarshaler interface
  1168. func (v *NodeTreeSnapshot) UnmarshalJSON(data []byte) error {
  1169. r := jlexer.Lexer{Data: data}
  1170. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(&r, v)
  1171. return r.Error()
  1172. }
  1173. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1174. func (v *NodeTreeSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1175. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(l, v)
  1176. }
  1177. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot5(in *jlexer.Lexer, out *NameValue) {
  1178. isTopLevel := in.IsStart()
  1179. if in.IsNull() {
  1180. if isTopLevel {
  1181. in.Consumed()
  1182. }
  1183. in.Skip()
  1184. return
  1185. }
  1186. in.Delim('{')
  1187. for !in.IsDelim('}') {
  1188. key := in.UnsafeFieldName(false)
  1189. in.WantColon()
  1190. if in.IsNull() {
  1191. in.Skip()
  1192. in.WantComma()
  1193. continue
  1194. }
  1195. switch key {
  1196. case "name":
  1197. out.Name = string(in.String())
  1198. case "value":
  1199. out.Value = string(in.String())
  1200. default:
  1201. in.SkipRecursive()
  1202. }
  1203. in.WantComma()
  1204. }
  1205. in.Delim('}')
  1206. if isTopLevel {
  1207. in.Consumed()
  1208. }
  1209. }
  1210. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot5(out *jwriter.Writer, in NameValue) {
  1211. out.RawByte('{')
  1212. first := true
  1213. _ = first
  1214. {
  1215. const prefix string = ",\"name\":"
  1216. out.RawString(prefix[1:])
  1217. out.String(string(in.Name))
  1218. }
  1219. {
  1220. const prefix string = ",\"value\":"
  1221. out.RawString(prefix)
  1222. out.String(string(in.Value))
  1223. }
  1224. out.RawByte('}')
  1225. }
  1226. // MarshalJSON supports json.Marshaler interface
  1227. func (v NameValue) MarshalJSON() ([]byte, error) {
  1228. w := jwriter.Writer{}
  1229. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot5(&w, v)
  1230. return w.Buffer.BuildBytes(), w.Error
  1231. }
  1232. // MarshalEasyJSON supports easyjson.Marshaler interface
  1233. func (v NameValue) MarshalEasyJSON(w *jwriter.Writer) {
  1234. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot5(w, v)
  1235. }
  1236. // UnmarshalJSON supports json.Unmarshaler interface
  1237. func (v *NameValue) UnmarshalJSON(data []byte) error {
  1238. r := jlexer.Lexer{Data: data}
  1239. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot5(&r, v)
  1240. return r.Error()
  1241. }
  1242. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1243. func (v *NameValue) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1244. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot5(l, v)
  1245. }
  1246. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot6(in *jlexer.Lexer, out *LayoutTreeSnapshot) {
  1247. isTopLevel := in.IsStart()
  1248. if in.IsNull() {
  1249. if isTopLevel {
  1250. in.Consumed()
  1251. }
  1252. in.Skip()
  1253. return
  1254. }
  1255. in.Delim('{')
  1256. for !in.IsDelim('}') {
  1257. key := in.UnsafeFieldName(false)
  1258. in.WantColon()
  1259. if in.IsNull() {
  1260. in.Skip()
  1261. in.WantComma()
  1262. continue
  1263. }
  1264. switch key {
  1265. case "nodeIndex":
  1266. if in.IsNull() {
  1267. in.Skip()
  1268. out.NodeIndex = nil
  1269. } else {
  1270. in.Delim('[')
  1271. if out.NodeIndex == nil {
  1272. if !in.IsDelim(']') {
  1273. out.NodeIndex = make([]int64, 0, 8)
  1274. } else {
  1275. out.NodeIndex = []int64{}
  1276. }
  1277. } else {
  1278. out.NodeIndex = (out.NodeIndex)[:0]
  1279. }
  1280. for !in.IsDelim(']') {
  1281. var v52 int64
  1282. v52 = int64(in.Int64())
  1283. out.NodeIndex = append(out.NodeIndex, v52)
  1284. in.WantComma()
  1285. }
  1286. in.Delim(']')
  1287. }
  1288. case "styles":
  1289. if in.IsNull() {
  1290. in.Skip()
  1291. out.Styles = nil
  1292. } else {
  1293. in.Delim('[')
  1294. if out.Styles == nil {
  1295. if !in.IsDelim(']') {
  1296. out.Styles = make([]ArrayOfStrings, 0, 2)
  1297. } else {
  1298. out.Styles = []ArrayOfStrings{}
  1299. }
  1300. } else {
  1301. out.Styles = (out.Styles)[:0]
  1302. }
  1303. for !in.IsDelim(']') {
  1304. var v53 ArrayOfStrings
  1305. if in.IsNull() {
  1306. in.Skip()
  1307. v53 = nil
  1308. } else {
  1309. in.Delim('[')
  1310. if v53 == nil {
  1311. if !in.IsDelim(']') {
  1312. v53 = make(ArrayOfStrings, 0, 8)
  1313. } else {
  1314. v53 = ArrayOfStrings{}
  1315. }
  1316. } else {
  1317. v53 = (v53)[:0]
  1318. }
  1319. for !in.IsDelim(']') {
  1320. var v54 int64
  1321. v54 = int64(in.Int64())
  1322. v53 = append(v53, v54)
  1323. in.WantComma()
  1324. }
  1325. in.Delim(']')
  1326. }
  1327. out.Styles = append(out.Styles, v53)
  1328. in.WantComma()
  1329. }
  1330. in.Delim(']')
  1331. }
  1332. case "bounds":
  1333. if in.IsNull() {
  1334. in.Skip()
  1335. out.Bounds = nil
  1336. } else {
  1337. in.Delim('[')
  1338. if out.Bounds == nil {
  1339. if !in.IsDelim(']') {
  1340. out.Bounds = make([]Rectangle, 0, 2)
  1341. } else {
  1342. out.Bounds = []Rectangle{}
  1343. }
  1344. } else {
  1345. out.Bounds = (out.Bounds)[:0]
  1346. }
  1347. for !in.IsDelim(']') {
  1348. var v55 Rectangle
  1349. if in.IsNull() {
  1350. in.Skip()
  1351. v55 = nil
  1352. } else {
  1353. in.Delim('[')
  1354. if v55 == nil {
  1355. if !in.IsDelim(']') {
  1356. v55 = make(Rectangle, 0, 8)
  1357. } else {
  1358. v55 = Rectangle{}
  1359. }
  1360. } else {
  1361. v55 = (v55)[:0]
  1362. }
  1363. for !in.IsDelim(']') {
  1364. var v56 float64
  1365. v56 = float64(in.Float64())
  1366. v55 = append(v55, v56)
  1367. in.WantComma()
  1368. }
  1369. in.Delim(']')
  1370. }
  1371. out.Bounds = append(out.Bounds, v55)
  1372. in.WantComma()
  1373. }
  1374. in.Delim(']')
  1375. }
  1376. case "text":
  1377. if in.IsNull() {
  1378. in.Skip()
  1379. out.Text = nil
  1380. } else {
  1381. in.Delim('[')
  1382. if out.Text == nil {
  1383. if !in.IsDelim(']') {
  1384. out.Text = make([]StringIndex, 0, 8)
  1385. } else {
  1386. out.Text = []StringIndex{}
  1387. }
  1388. } else {
  1389. out.Text = (out.Text)[:0]
  1390. }
  1391. for !in.IsDelim(']') {
  1392. var v57 StringIndex
  1393. v57 = StringIndex(in.Int64())
  1394. out.Text = append(out.Text, v57)
  1395. in.WantComma()
  1396. }
  1397. in.Delim(']')
  1398. }
  1399. case "stackingContexts":
  1400. if in.IsNull() {
  1401. in.Skip()
  1402. out.StackingContexts = nil
  1403. } else {
  1404. if out.StackingContexts == nil {
  1405. out.StackingContexts = new(RareBooleanData)
  1406. }
  1407. (*out.StackingContexts).UnmarshalEasyJSON(in)
  1408. }
  1409. case "paintOrders":
  1410. if in.IsNull() {
  1411. in.Skip()
  1412. out.PaintOrders = nil
  1413. } else {
  1414. in.Delim('[')
  1415. if out.PaintOrders == nil {
  1416. if !in.IsDelim(']') {
  1417. out.PaintOrders = make([]int64, 0, 8)
  1418. } else {
  1419. out.PaintOrders = []int64{}
  1420. }
  1421. } else {
  1422. out.PaintOrders = (out.PaintOrders)[:0]
  1423. }
  1424. for !in.IsDelim(']') {
  1425. var v58 int64
  1426. v58 = int64(in.Int64())
  1427. out.PaintOrders = append(out.PaintOrders, v58)
  1428. in.WantComma()
  1429. }
  1430. in.Delim(']')
  1431. }
  1432. case "offsetRects":
  1433. if in.IsNull() {
  1434. in.Skip()
  1435. out.OffsetRects = nil
  1436. } else {
  1437. in.Delim('[')
  1438. if out.OffsetRects == nil {
  1439. if !in.IsDelim(']') {
  1440. out.OffsetRects = make([]Rectangle, 0, 2)
  1441. } else {
  1442. out.OffsetRects = []Rectangle{}
  1443. }
  1444. } else {
  1445. out.OffsetRects = (out.OffsetRects)[:0]
  1446. }
  1447. for !in.IsDelim(']') {
  1448. var v59 Rectangle
  1449. if in.IsNull() {
  1450. in.Skip()
  1451. v59 = nil
  1452. } else {
  1453. in.Delim('[')
  1454. if v59 == nil {
  1455. if !in.IsDelim(']') {
  1456. v59 = make(Rectangle, 0, 8)
  1457. } else {
  1458. v59 = Rectangle{}
  1459. }
  1460. } else {
  1461. v59 = (v59)[:0]
  1462. }
  1463. for !in.IsDelim(']') {
  1464. var v60 float64
  1465. v60 = float64(in.Float64())
  1466. v59 = append(v59, v60)
  1467. in.WantComma()
  1468. }
  1469. in.Delim(']')
  1470. }
  1471. out.OffsetRects = append(out.OffsetRects, v59)
  1472. in.WantComma()
  1473. }
  1474. in.Delim(']')
  1475. }
  1476. case "scrollRects":
  1477. if in.IsNull() {
  1478. in.Skip()
  1479. out.ScrollRects = nil
  1480. } else {
  1481. in.Delim('[')
  1482. if out.ScrollRects == nil {
  1483. if !in.IsDelim(']') {
  1484. out.ScrollRects = make([]Rectangle, 0, 2)
  1485. } else {
  1486. out.ScrollRects = []Rectangle{}
  1487. }
  1488. } else {
  1489. out.ScrollRects = (out.ScrollRects)[:0]
  1490. }
  1491. for !in.IsDelim(']') {
  1492. var v61 Rectangle
  1493. if in.IsNull() {
  1494. in.Skip()
  1495. v61 = nil
  1496. } else {
  1497. in.Delim('[')
  1498. if v61 == nil {
  1499. if !in.IsDelim(']') {
  1500. v61 = make(Rectangle, 0, 8)
  1501. } else {
  1502. v61 = Rectangle{}
  1503. }
  1504. } else {
  1505. v61 = (v61)[:0]
  1506. }
  1507. for !in.IsDelim(']') {
  1508. var v62 float64
  1509. v62 = float64(in.Float64())
  1510. v61 = append(v61, v62)
  1511. in.WantComma()
  1512. }
  1513. in.Delim(']')
  1514. }
  1515. out.ScrollRects = append(out.ScrollRects, v61)
  1516. in.WantComma()
  1517. }
  1518. in.Delim(']')
  1519. }
  1520. case "clientRects":
  1521. if in.IsNull() {
  1522. in.Skip()
  1523. out.ClientRects = nil
  1524. } else {
  1525. in.Delim('[')
  1526. if out.ClientRects == nil {
  1527. if !in.IsDelim(']') {
  1528. out.ClientRects = make([]Rectangle, 0, 2)
  1529. } else {
  1530. out.ClientRects = []Rectangle{}
  1531. }
  1532. } else {
  1533. out.ClientRects = (out.ClientRects)[:0]
  1534. }
  1535. for !in.IsDelim(']') {
  1536. var v63 Rectangle
  1537. if in.IsNull() {
  1538. in.Skip()
  1539. v63 = nil
  1540. } else {
  1541. in.Delim('[')
  1542. if v63 == nil {
  1543. if !in.IsDelim(']') {
  1544. v63 = make(Rectangle, 0, 8)
  1545. } else {
  1546. v63 = Rectangle{}
  1547. }
  1548. } else {
  1549. v63 = (v63)[:0]
  1550. }
  1551. for !in.IsDelim(']') {
  1552. var v64 float64
  1553. v64 = float64(in.Float64())
  1554. v63 = append(v63, v64)
  1555. in.WantComma()
  1556. }
  1557. in.Delim(']')
  1558. }
  1559. out.ClientRects = append(out.ClientRects, v63)
  1560. in.WantComma()
  1561. }
  1562. in.Delim(']')
  1563. }
  1564. case "blendedBackgroundColors":
  1565. if in.IsNull() {
  1566. in.Skip()
  1567. out.BlendedBackgroundColors = nil
  1568. } else {
  1569. in.Delim('[')
  1570. if out.BlendedBackgroundColors == nil {
  1571. if !in.IsDelim(']') {
  1572. out.BlendedBackgroundColors = make([]StringIndex, 0, 8)
  1573. } else {
  1574. out.BlendedBackgroundColors = []StringIndex{}
  1575. }
  1576. } else {
  1577. out.BlendedBackgroundColors = (out.BlendedBackgroundColors)[:0]
  1578. }
  1579. for !in.IsDelim(']') {
  1580. var v65 StringIndex
  1581. v65 = StringIndex(in.Int64())
  1582. out.BlendedBackgroundColors = append(out.BlendedBackgroundColors, v65)
  1583. in.WantComma()
  1584. }
  1585. in.Delim(']')
  1586. }
  1587. case "textColorOpacities":
  1588. if in.IsNull() {
  1589. in.Skip()
  1590. out.TextColorOpacities = nil
  1591. } else {
  1592. in.Delim('[')
  1593. if out.TextColorOpacities == nil {
  1594. if !in.IsDelim(']') {
  1595. out.TextColorOpacities = make([]float64, 0, 8)
  1596. } else {
  1597. out.TextColorOpacities = []float64{}
  1598. }
  1599. } else {
  1600. out.TextColorOpacities = (out.TextColorOpacities)[:0]
  1601. }
  1602. for !in.IsDelim(']') {
  1603. var v66 float64
  1604. v66 = float64(in.Float64())
  1605. out.TextColorOpacities = append(out.TextColorOpacities, v66)
  1606. in.WantComma()
  1607. }
  1608. in.Delim(']')
  1609. }
  1610. default:
  1611. in.SkipRecursive()
  1612. }
  1613. in.WantComma()
  1614. }
  1615. in.Delim('}')
  1616. if isTopLevel {
  1617. in.Consumed()
  1618. }
  1619. }
  1620. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot6(out *jwriter.Writer, in LayoutTreeSnapshot) {
  1621. out.RawByte('{')
  1622. first := true
  1623. _ = first
  1624. {
  1625. const prefix string = ",\"nodeIndex\":"
  1626. out.RawString(prefix[1:])
  1627. if in.NodeIndex == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1628. out.RawString("null")
  1629. } else {
  1630. out.RawByte('[')
  1631. for v67, v68 := range in.NodeIndex {
  1632. if v67 > 0 {
  1633. out.RawByte(',')
  1634. }
  1635. out.Int64(int64(v68))
  1636. }
  1637. out.RawByte(']')
  1638. }
  1639. }
  1640. {
  1641. const prefix string = ",\"styles\":"
  1642. out.RawString(prefix)
  1643. if in.Styles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1644. out.RawString("null")
  1645. } else {
  1646. out.RawByte('[')
  1647. for v69, v70 := range in.Styles {
  1648. if v69 > 0 {
  1649. out.RawByte(',')
  1650. }
  1651. if v70 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1652. out.RawString("null")
  1653. } else {
  1654. out.RawByte('[')
  1655. for v71, v72 := range v70 {
  1656. if v71 > 0 {
  1657. out.RawByte(',')
  1658. }
  1659. out.Int64(int64(v72))
  1660. }
  1661. out.RawByte(']')
  1662. }
  1663. }
  1664. out.RawByte(']')
  1665. }
  1666. }
  1667. {
  1668. const prefix string = ",\"bounds\":"
  1669. out.RawString(prefix)
  1670. if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1671. out.RawString("null")
  1672. } else {
  1673. out.RawByte('[')
  1674. for v73, v74 := range in.Bounds {
  1675. if v73 > 0 {
  1676. out.RawByte(',')
  1677. }
  1678. if v74 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1679. out.RawString("null")
  1680. } else {
  1681. out.RawByte('[')
  1682. for v75, v76 := range v74 {
  1683. if v75 > 0 {
  1684. out.RawByte(',')
  1685. }
  1686. out.Float64(float64(v76))
  1687. }
  1688. out.RawByte(']')
  1689. }
  1690. }
  1691. out.RawByte(']')
  1692. }
  1693. }
  1694. {
  1695. const prefix string = ",\"text\":"
  1696. out.RawString(prefix)
  1697. if in.Text == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1698. out.RawString("null")
  1699. } else {
  1700. out.RawByte('[')
  1701. for v77, v78 := range in.Text {
  1702. if v77 > 0 {
  1703. out.RawByte(',')
  1704. }
  1705. out.Int64(int64(v78))
  1706. }
  1707. out.RawByte(']')
  1708. }
  1709. }
  1710. {
  1711. const prefix string = ",\"stackingContexts\":"
  1712. out.RawString(prefix)
  1713. if in.StackingContexts == nil {
  1714. out.RawString("null")
  1715. } else {
  1716. (*in.StackingContexts).MarshalEasyJSON(out)
  1717. }
  1718. }
  1719. if len(in.PaintOrders) != 0 {
  1720. const prefix string = ",\"paintOrders\":"
  1721. out.RawString(prefix)
  1722. {
  1723. out.RawByte('[')
  1724. for v79, v80 := range in.PaintOrders {
  1725. if v79 > 0 {
  1726. out.RawByte(',')
  1727. }
  1728. out.Int64(int64(v80))
  1729. }
  1730. out.RawByte(']')
  1731. }
  1732. }
  1733. if len(in.OffsetRects) != 0 {
  1734. const prefix string = ",\"offsetRects\":"
  1735. out.RawString(prefix)
  1736. {
  1737. out.RawByte('[')
  1738. for v81, v82 := range in.OffsetRects {
  1739. if v81 > 0 {
  1740. out.RawByte(',')
  1741. }
  1742. if v82 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1743. out.RawString("null")
  1744. } else {
  1745. out.RawByte('[')
  1746. for v83, v84 := range v82 {
  1747. if v83 > 0 {
  1748. out.RawByte(',')
  1749. }
  1750. out.Float64(float64(v84))
  1751. }
  1752. out.RawByte(']')
  1753. }
  1754. }
  1755. out.RawByte(']')
  1756. }
  1757. }
  1758. if len(in.ScrollRects) != 0 {
  1759. const prefix string = ",\"scrollRects\":"
  1760. out.RawString(prefix)
  1761. {
  1762. out.RawByte('[')
  1763. for v85, v86 := range in.ScrollRects {
  1764. if v85 > 0 {
  1765. out.RawByte(',')
  1766. }
  1767. if v86 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1768. out.RawString("null")
  1769. } else {
  1770. out.RawByte('[')
  1771. for v87, v88 := range v86 {
  1772. if v87 > 0 {
  1773. out.RawByte(',')
  1774. }
  1775. out.Float64(float64(v88))
  1776. }
  1777. out.RawByte(']')
  1778. }
  1779. }
  1780. out.RawByte(']')
  1781. }
  1782. }
  1783. if len(in.ClientRects) != 0 {
  1784. const prefix string = ",\"clientRects\":"
  1785. out.RawString(prefix)
  1786. {
  1787. out.RawByte('[')
  1788. for v89, v90 := range in.ClientRects {
  1789. if v89 > 0 {
  1790. out.RawByte(',')
  1791. }
  1792. if v90 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1793. out.RawString("null")
  1794. } else {
  1795. out.RawByte('[')
  1796. for v91, v92 := range v90 {
  1797. if v91 > 0 {
  1798. out.RawByte(',')
  1799. }
  1800. out.Float64(float64(v92))
  1801. }
  1802. out.RawByte(']')
  1803. }
  1804. }
  1805. out.RawByte(']')
  1806. }
  1807. }
  1808. if len(in.BlendedBackgroundColors) != 0 {
  1809. const prefix string = ",\"blendedBackgroundColors\":"
  1810. out.RawString(prefix)
  1811. {
  1812. out.RawByte('[')
  1813. for v93, v94 := range in.BlendedBackgroundColors {
  1814. if v93 > 0 {
  1815. out.RawByte(',')
  1816. }
  1817. out.Int64(int64(v94))
  1818. }
  1819. out.RawByte(']')
  1820. }
  1821. }
  1822. if len(in.TextColorOpacities) != 0 {
  1823. const prefix string = ",\"textColorOpacities\":"
  1824. out.RawString(prefix)
  1825. {
  1826. out.RawByte('[')
  1827. for v95, v96 := range in.TextColorOpacities {
  1828. if v95 > 0 {
  1829. out.RawByte(',')
  1830. }
  1831. out.Float64(float64(v96))
  1832. }
  1833. out.RawByte(']')
  1834. }
  1835. }
  1836. out.RawByte('}')
  1837. }
  1838. // MarshalJSON supports json.Marshaler interface
  1839. func (v LayoutTreeSnapshot) MarshalJSON() ([]byte, error) {
  1840. w := jwriter.Writer{}
  1841. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot6(&w, v)
  1842. return w.Buffer.BuildBytes(), w.Error
  1843. }
  1844. // MarshalEasyJSON supports easyjson.Marshaler interface
  1845. func (v LayoutTreeSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
  1846. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot6(w, v)
  1847. }
  1848. // UnmarshalJSON supports json.Unmarshaler interface
  1849. func (v *LayoutTreeSnapshot) UnmarshalJSON(data []byte) error {
  1850. r := jlexer.Lexer{Data: data}
  1851. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot6(&r, v)
  1852. return r.Error()
  1853. }
  1854. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1855. func (v *LayoutTreeSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1856. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot6(l, v)
  1857. }
  1858. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot7(in *jlexer.Lexer, out *LayoutTreeNode) {
  1859. isTopLevel := in.IsStart()
  1860. if in.IsNull() {
  1861. if isTopLevel {
  1862. in.Consumed()
  1863. }
  1864. in.Skip()
  1865. return
  1866. }
  1867. in.Delim('{')
  1868. for !in.IsDelim('}') {
  1869. key := in.UnsafeFieldName(false)
  1870. in.WantColon()
  1871. if in.IsNull() {
  1872. in.Skip()
  1873. in.WantComma()
  1874. continue
  1875. }
  1876. switch key {
  1877. case "domNodeIndex":
  1878. out.DomNodeIndex = int64(in.Int64())
  1879. case "boundingBox":
  1880. if in.IsNull() {
  1881. in.Skip()
  1882. out.BoundingBox = nil
  1883. } else {
  1884. if out.BoundingBox == nil {
  1885. out.BoundingBox = new(dom.Rect)
  1886. }
  1887. (*out.BoundingBox).UnmarshalEasyJSON(in)
  1888. }
  1889. case "layoutText":
  1890. out.LayoutText = string(in.String())
  1891. case "inlineTextNodes":
  1892. if in.IsNull() {
  1893. in.Skip()
  1894. out.InlineTextNodes = nil
  1895. } else {
  1896. in.Delim('[')
  1897. if out.InlineTextNodes == nil {
  1898. if !in.IsDelim(']') {
  1899. out.InlineTextNodes = make([]*InlineTextBox, 0, 8)
  1900. } else {
  1901. out.InlineTextNodes = []*InlineTextBox{}
  1902. }
  1903. } else {
  1904. out.InlineTextNodes = (out.InlineTextNodes)[:0]
  1905. }
  1906. for !in.IsDelim(']') {
  1907. var v97 *InlineTextBox
  1908. if in.IsNull() {
  1909. in.Skip()
  1910. v97 = nil
  1911. } else {
  1912. if v97 == nil {
  1913. v97 = new(InlineTextBox)
  1914. }
  1915. (*v97).UnmarshalEasyJSON(in)
  1916. }
  1917. out.InlineTextNodes = append(out.InlineTextNodes, v97)
  1918. in.WantComma()
  1919. }
  1920. in.Delim(']')
  1921. }
  1922. case "styleIndex":
  1923. out.StyleIndex = int64(in.Int64())
  1924. case "paintOrder":
  1925. out.PaintOrder = int64(in.Int64())
  1926. case "isStackingContext":
  1927. out.IsStackingContext = bool(in.Bool())
  1928. default:
  1929. in.SkipRecursive()
  1930. }
  1931. in.WantComma()
  1932. }
  1933. in.Delim('}')
  1934. if isTopLevel {
  1935. in.Consumed()
  1936. }
  1937. }
  1938. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot7(out *jwriter.Writer, in LayoutTreeNode) {
  1939. out.RawByte('{')
  1940. first := true
  1941. _ = first
  1942. {
  1943. const prefix string = ",\"domNodeIndex\":"
  1944. out.RawString(prefix[1:])
  1945. out.Int64(int64(in.DomNodeIndex))
  1946. }
  1947. {
  1948. const prefix string = ",\"boundingBox\":"
  1949. out.RawString(prefix)
  1950. if in.BoundingBox == nil {
  1951. out.RawString("null")
  1952. } else {
  1953. (*in.BoundingBox).MarshalEasyJSON(out)
  1954. }
  1955. }
  1956. if in.LayoutText != "" {
  1957. const prefix string = ",\"layoutText\":"
  1958. out.RawString(prefix)
  1959. out.String(string(in.LayoutText))
  1960. }
  1961. if len(in.InlineTextNodes) != 0 {
  1962. const prefix string = ",\"inlineTextNodes\":"
  1963. out.RawString(prefix)
  1964. {
  1965. out.RawByte('[')
  1966. for v98, v99 := range in.InlineTextNodes {
  1967. if v98 > 0 {
  1968. out.RawByte(',')
  1969. }
  1970. if v99 == nil {
  1971. out.RawString("null")
  1972. } else {
  1973. (*v99).MarshalEasyJSON(out)
  1974. }
  1975. }
  1976. out.RawByte(']')
  1977. }
  1978. }
  1979. if in.StyleIndex != 0 {
  1980. const prefix string = ",\"styleIndex\":"
  1981. out.RawString(prefix)
  1982. out.Int64(int64(in.StyleIndex))
  1983. }
  1984. if in.PaintOrder != 0 {
  1985. const prefix string = ",\"paintOrder\":"
  1986. out.RawString(prefix)
  1987. out.Int64(int64(in.PaintOrder))
  1988. }
  1989. if in.IsStackingContext {
  1990. const prefix string = ",\"isStackingContext\":"
  1991. out.RawString(prefix)
  1992. out.Bool(bool(in.IsStackingContext))
  1993. }
  1994. out.RawByte('}')
  1995. }
  1996. // MarshalJSON supports json.Marshaler interface
  1997. func (v LayoutTreeNode) MarshalJSON() ([]byte, error) {
  1998. w := jwriter.Writer{}
  1999. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot7(&w, v)
  2000. return w.Buffer.BuildBytes(), w.Error
  2001. }
  2002. // MarshalEasyJSON supports easyjson.Marshaler interface
  2003. func (v LayoutTreeNode) MarshalEasyJSON(w *jwriter.Writer) {
  2004. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot7(w, v)
  2005. }
  2006. // UnmarshalJSON supports json.Unmarshaler interface
  2007. func (v *LayoutTreeNode) UnmarshalJSON(data []byte) error {
  2008. r := jlexer.Lexer{Data: data}
  2009. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot7(&r, v)
  2010. return r.Error()
  2011. }
  2012. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2013. func (v *LayoutTreeNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2014. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot7(l, v)
  2015. }
  2016. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot8(in *jlexer.Lexer, out *InlineTextBox) {
  2017. isTopLevel := in.IsStart()
  2018. if in.IsNull() {
  2019. if isTopLevel {
  2020. in.Consumed()
  2021. }
  2022. in.Skip()
  2023. return
  2024. }
  2025. in.Delim('{')
  2026. for !in.IsDelim('}') {
  2027. key := in.UnsafeFieldName(false)
  2028. in.WantColon()
  2029. if in.IsNull() {
  2030. in.Skip()
  2031. in.WantComma()
  2032. continue
  2033. }
  2034. switch key {
  2035. case "boundingBox":
  2036. if in.IsNull() {
  2037. in.Skip()
  2038. out.BoundingBox = nil
  2039. } else {
  2040. if out.BoundingBox == nil {
  2041. out.BoundingBox = new(dom.Rect)
  2042. }
  2043. (*out.BoundingBox).UnmarshalEasyJSON(in)
  2044. }
  2045. case "startCharacterIndex":
  2046. out.StartCharacterIndex = int64(in.Int64())
  2047. case "numCharacters":
  2048. out.NumCharacters = int64(in.Int64())
  2049. default:
  2050. in.SkipRecursive()
  2051. }
  2052. in.WantComma()
  2053. }
  2054. in.Delim('}')
  2055. if isTopLevel {
  2056. in.Consumed()
  2057. }
  2058. }
  2059. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot8(out *jwriter.Writer, in InlineTextBox) {
  2060. out.RawByte('{')
  2061. first := true
  2062. _ = first
  2063. {
  2064. const prefix string = ",\"boundingBox\":"
  2065. out.RawString(prefix[1:])
  2066. if in.BoundingBox == nil {
  2067. out.RawString("null")
  2068. } else {
  2069. (*in.BoundingBox).MarshalEasyJSON(out)
  2070. }
  2071. }
  2072. {
  2073. const prefix string = ",\"startCharacterIndex\":"
  2074. out.RawString(prefix)
  2075. out.Int64(int64(in.StartCharacterIndex))
  2076. }
  2077. {
  2078. const prefix string = ",\"numCharacters\":"
  2079. out.RawString(prefix)
  2080. out.Int64(int64(in.NumCharacters))
  2081. }
  2082. out.RawByte('}')
  2083. }
  2084. // MarshalJSON supports json.Marshaler interface
  2085. func (v InlineTextBox) MarshalJSON() ([]byte, error) {
  2086. w := jwriter.Writer{}
  2087. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot8(&w, v)
  2088. return w.Buffer.BuildBytes(), w.Error
  2089. }
  2090. // MarshalEasyJSON supports easyjson.Marshaler interface
  2091. func (v InlineTextBox) MarshalEasyJSON(w *jwriter.Writer) {
  2092. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot8(w, v)
  2093. }
  2094. // UnmarshalJSON supports json.Unmarshaler interface
  2095. func (v *InlineTextBox) UnmarshalJSON(data []byte) error {
  2096. r := jlexer.Lexer{Data: data}
  2097. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot8(&r, v)
  2098. return r.Error()
  2099. }
  2100. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2101. func (v *InlineTextBox) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2102. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot8(l, v)
  2103. }
  2104. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot9(in *jlexer.Lexer, out *EnableParams) {
  2105. isTopLevel := in.IsStart()
  2106. if in.IsNull() {
  2107. if isTopLevel {
  2108. in.Consumed()
  2109. }
  2110. in.Skip()
  2111. return
  2112. }
  2113. in.Delim('{')
  2114. for !in.IsDelim('}') {
  2115. key := in.UnsafeFieldName(false)
  2116. in.WantColon()
  2117. if in.IsNull() {
  2118. in.Skip()
  2119. in.WantComma()
  2120. continue
  2121. }
  2122. switch key {
  2123. default:
  2124. in.SkipRecursive()
  2125. }
  2126. in.WantComma()
  2127. }
  2128. in.Delim('}')
  2129. if isTopLevel {
  2130. in.Consumed()
  2131. }
  2132. }
  2133. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot9(out *jwriter.Writer, in EnableParams) {
  2134. out.RawByte('{')
  2135. first := true
  2136. _ = first
  2137. out.RawByte('}')
  2138. }
  2139. // MarshalJSON supports json.Marshaler interface
  2140. func (v EnableParams) MarshalJSON() ([]byte, error) {
  2141. w := jwriter.Writer{}
  2142. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot9(&w, v)
  2143. return w.Buffer.BuildBytes(), w.Error
  2144. }
  2145. // MarshalEasyJSON supports easyjson.Marshaler interface
  2146. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  2147. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot9(w, v)
  2148. }
  2149. // UnmarshalJSON supports json.Unmarshaler interface
  2150. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  2151. r := jlexer.Lexer{Data: data}
  2152. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot9(&r, v)
  2153. return r.Error()
  2154. }
  2155. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2156. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2157. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot9(l, v)
  2158. }
  2159. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot10(in *jlexer.Lexer, out *DocumentSnapshot) {
  2160. isTopLevel := in.IsStart()
  2161. if in.IsNull() {
  2162. if isTopLevel {
  2163. in.Consumed()
  2164. }
  2165. in.Skip()
  2166. return
  2167. }
  2168. in.Delim('{')
  2169. for !in.IsDelim('}') {
  2170. key := in.UnsafeFieldName(false)
  2171. in.WantColon()
  2172. if in.IsNull() {
  2173. in.Skip()
  2174. in.WantComma()
  2175. continue
  2176. }
  2177. switch key {
  2178. case "documentURL":
  2179. out.DocumentURL = StringIndex(in.Int64())
  2180. case "title":
  2181. out.Title = StringIndex(in.Int64())
  2182. case "baseURL":
  2183. out.BaseURL = StringIndex(in.Int64())
  2184. case "contentLanguage":
  2185. out.ContentLanguage = StringIndex(in.Int64())
  2186. case "encodingName":
  2187. out.EncodingName = StringIndex(in.Int64())
  2188. case "publicId":
  2189. out.PublicID = StringIndex(in.Int64())
  2190. case "systemId":
  2191. out.SystemID = StringIndex(in.Int64())
  2192. case "frameId":
  2193. out.FrameID = StringIndex(in.Int64())
  2194. case "nodes":
  2195. if in.IsNull() {
  2196. in.Skip()
  2197. out.Nodes = nil
  2198. } else {
  2199. if out.Nodes == nil {
  2200. out.Nodes = new(NodeTreeSnapshot)
  2201. }
  2202. (*out.Nodes).UnmarshalEasyJSON(in)
  2203. }
  2204. case "layout":
  2205. if in.IsNull() {
  2206. in.Skip()
  2207. out.Layout = nil
  2208. } else {
  2209. if out.Layout == nil {
  2210. out.Layout = new(LayoutTreeSnapshot)
  2211. }
  2212. (*out.Layout).UnmarshalEasyJSON(in)
  2213. }
  2214. case "textBoxes":
  2215. if in.IsNull() {
  2216. in.Skip()
  2217. out.TextBoxes = nil
  2218. } else {
  2219. if out.TextBoxes == nil {
  2220. out.TextBoxes = new(TextBoxSnapshot)
  2221. }
  2222. (*out.TextBoxes).UnmarshalEasyJSON(in)
  2223. }
  2224. case "scrollOffsetX":
  2225. out.ScrollOffsetX = float64(in.Float64())
  2226. case "scrollOffsetY":
  2227. out.ScrollOffsetY = float64(in.Float64())
  2228. case "contentWidth":
  2229. out.ContentWidth = float64(in.Float64())
  2230. case "contentHeight":
  2231. out.ContentHeight = float64(in.Float64())
  2232. default:
  2233. in.SkipRecursive()
  2234. }
  2235. in.WantComma()
  2236. }
  2237. in.Delim('}')
  2238. if isTopLevel {
  2239. in.Consumed()
  2240. }
  2241. }
  2242. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot10(out *jwriter.Writer, in DocumentSnapshot) {
  2243. out.RawByte('{')
  2244. first := true
  2245. _ = first
  2246. {
  2247. const prefix string = ",\"documentURL\":"
  2248. out.RawString(prefix[1:])
  2249. out.Int64(int64(in.DocumentURL))
  2250. }
  2251. {
  2252. const prefix string = ",\"title\":"
  2253. out.RawString(prefix)
  2254. out.Int64(int64(in.Title))
  2255. }
  2256. {
  2257. const prefix string = ",\"baseURL\":"
  2258. out.RawString(prefix)
  2259. out.Int64(int64(in.BaseURL))
  2260. }
  2261. {
  2262. const prefix string = ",\"contentLanguage\":"
  2263. out.RawString(prefix)
  2264. out.Int64(int64(in.ContentLanguage))
  2265. }
  2266. {
  2267. const prefix string = ",\"encodingName\":"
  2268. out.RawString(prefix)
  2269. out.Int64(int64(in.EncodingName))
  2270. }
  2271. {
  2272. const prefix string = ",\"publicId\":"
  2273. out.RawString(prefix)
  2274. out.Int64(int64(in.PublicID))
  2275. }
  2276. {
  2277. const prefix string = ",\"systemId\":"
  2278. out.RawString(prefix)
  2279. out.Int64(int64(in.SystemID))
  2280. }
  2281. {
  2282. const prefix string = ",\"frameId\":"
  2283. out.RawString(prefix)
  2284. out.Int64(int64(in.FrameID))
  2285. }
  2286. {
  2287. const prefix string = ",\"nodes\":"
  2288. out.RawString(prefix)
  2289. if in.Nodes == nil {
  2290. out.RawString("null")
  2291. } else {
  2292. (*in.Nodes).MarshalEasyJSON(out)
  2293. }
  2294. }
  2295. {
  2296. const prefix string = ",\"layout\":"
  2297. out.RawString(prefix)
  2298. if in.Layout == nil {
  2299. out.RawString("null")
  2300. } else {
  2301. (*in.Layout).MarshalEasyJSON(out)
  2302. }
  2303. }
  2304. {
  2305. const prefix string = ",\"textBoxes\":"
  2306. out.RawString(prefix)
  2307. if in.TextBoxes == nil {
  2308. out.RawString("null")
  2309. } else {
  2310. (*in.TextBoxes).MarshalEasyJSON(out)
  2311. }
  2312. }
  2313. if in.ScrollOffsetX != 0 {
  2314. const prefix string = ",\"scrollOffsetX\":"
  2315. out.RawString(prefix)
  2316. out.Float64(float64(in.ScrollOffsetX))
  2317. }
  2318. if in.ScrollOffsetY != 0 {
  2319. const prefix string = ",\"scrollOffsetY\":"
  2320. out.RawString(prefix)
  2321. out.Float64(float64(in.ScrollOffsetY))
  2322. }
  2323. if in.ContentWidth != 0 {
  2324. const prefix string = ",\"contentWidth\":"
  2325. out.RawString(prefix)
  2326. out.Float64(float64(in.ContentWidth))
  2327. }
  2328. if in.ContentHeight != 0 {
  2329. const prefix string = ",\"contentHeight\":"
  2330. out.RawString(prefix)
  2331. out.Float64(float64(in.ContentHeight))
  2332. }
  2333. out.RawByte('}')
  2334. }
  2335. // MarshalJSON supports json.Marshaler interface
  2336. func (v DocumentSnapshot) MarshalJSON() ([]byte, error) {
  2337. w := jwriter.Writer{}
  2338. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot10(&w, v)
  2339. return w.Buffer.BuildBytes(), w.Error
  2340. }
  2341. // MarshalEasyJSON supports easyjson.Marshaler interface
  2342. func (v DocumentSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
  2343. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot10(w, v)
  2344. }
  2345. // UnmarshalJSON supports json.Unmarshaler interface
  2346. func (v *DocumentSnapshot) UnmarshalJSON(data []byte) error {
  2347. r := jlexer.Lexer{Data: data}
  2348. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot10(&r, v)
  2349. return r.Error()
  2350. }
  2351. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2352. func (v *DocumentSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2353. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot10(l, v)
  2354. }
  2355. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot11(in *jlexer.Lexer, out *DisableParams) {
  2356. isTopLevel := in.IsStart()
  2357. if in.IsNull() {
  2358. if isTopLevel {
  2359. in.Consumed()
  2360. }
  2361. in.Skip()
  2362. return
  2363. }
  2364. in.Delim('{')
  2365. for !in.IsDelim('}') {
  2366. key := in.UnsafeFieldName(false)
  2367. in.WantColon()
  2368. if in.IsNull() {
  2369. in.Skip()
  2370. in.WantComma()
  2371. continue
  2372. }
  2373. switch key {
  2374. default:
  2375. in.SkipRecursive()
  2376. }
  2377. in.WantComma()
  2378. }
  2379. in.Delim('}')
  2380. if isTopLevel {
  2381. in.Consumed()
  2382. }
  2383. }
  2384. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot11(out *jwriter.Writer, in DisableParams) {
  2385. out.RawByte('{')
  2386. first := true
  2387. _ = first
  2388. out.RawByte('}')
  2389. }
  2390. // MarshalJSON supports json.Marshaler interface
  2391. func (v DisableParams) MarshalJSON() ([]byte, error) {
  2392. w := jwriter.Writer{}
  2393. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot11(&w, v)
  2394. return w.Buffer.BuildBytes(), w.Error
  2395. }
  2396. // MarshalEasyJSON supports easyjson.Marshaler interface
  2397. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  2398. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot11(w, v)
  2399. }
  2400. // UnmarshalJSON supports json.Unmarshaler interface
  2401. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  2402. r := jlexer.Lexer{Data: data}
  2403. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot11(&r, v)
  2404. return r.Error()
  2405. }
  2406. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2407. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2408. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot11(l, v)
  2409. }
  2410. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot12(in *jlexer.Lexer, out *DOMNode) {
  2411. isTopLevel := in.IsStart()
  2412. if in.IsNull() {
  2413. if isTopLevel {
  2414. in.Consumed()
  2415. }
  2416. in.Skip()
  2417. return
  2418. }
  2419. in.Delim('{')
  2420. for !in.IsDelim('}') {
  2421. key := in.UnsafeFieldName(false)
  2422. in.WantColon()
  2423. if in.IsNull() {
  2424. in.Skip()
  2425. in.WantComma()
  2426. continue
  2427. }
  2428. switch key {
  2429. case "nodeType":
  2430. (out.NodeType).UnmarshalEasyJSON(in)
  2431. case "nodeName":
  2432. out.NodeName = string(in.String())
  2433. case "nodeValue":
  2434. out.NodeValue = string(in.String())
  2435. case "textValue":
  2436. out.TextValue = string(in.String())
  2437. case "inputValue":
  2438. out.InputValue = string(in.String())
  2439. case "inputChecked":
  2440. out.InputChecked = bool(in.Bool())
  2441. case "optionSelected":
  2442. out.OptionSelected = bool(in.Bool())
  2443. case "backendNodeId":
  2444. (out.BackendNodeID).UnmarshalEasyJSON(in)
  2445. case "childNodeIndexes":
  2446. if in.IsNull() {
  2447. in.Skip()
  2448. out.ChildNodeIndexes = nil
  2449. } else {
  2450. in.Delim('[')
  2451. if out.ChildNodeIndexes == nil {
  2452. if !in.IsDelim(']') {
  2453. out.ChildNodeIndexes = make([]int64, 0, 8)
  2454. } else {
  2455. out.ChildNodeIndexes = []int64{}
  2456. }
  2457. } else {
  2458. out.ChildNodeIndexes = (out.ChildNodeIndexes)[:0]
  2459. }
  2460. for !in.IsDelim(']') {
  2461. var v100 int64
  2462. v100 = int64(in.Int64())
  2463. out.ChildNodeIndexes = append(out.ChildNodeIndexes, v100)
  2464. in.WantComma()
  2465. }
  2466. in.Delim(']')
  2467. }
  2468. case "attributes":
  2469. if in.IsNull() {
  2470. in.Skip()
  2471. out.Attributes = nil
  2472. } else {
  2473. in.Delim('[')
  2474. if out.Attributes == nil {
  2475. if !in.IsDelim(']') {
  2476. out.Attributes = make([]*NameValue, 0, 8)
  2477. } else {
  2478. out.Attributes = []*NameValue{}
  2479. }
  2480. } else {
  2481. out.Attributes = (out.Attributes)[:0]
  2482. }
  2483. for !in.IsDelim(']') {
  2484. var v101 *NameValue
  2485. if in.IsNull() {
  2486. in.Skip()
  2487. v101 = nil
  2488. } else {
  2489. if v101 == nil {
  2490. v101 = new(NameValue)
  2491. }
  2492. (*v101).UnmarshalEasyJSON(in)
  2493. }
  2494. out.Attributes = append(out.Attributes, v101)
  2495. in.WantComma()
  2496. }
  2497. in.Delim(']')
  2498. }
  2499. case "pseudoElementIndexes":
  2500. if in.IsNull() {
  2501. in.Skip()
  2502. out.PseudoElementIndexes = nil
  2503. } else {
  2504. in.Delim('[')
  2505. if out.PseudoElementIndexes == nil {
  2506. if !in.IsDelim(']') {
  2507. out.PseudoElementIndexes = make([]int64, 0, 8)
  2508. } else {
  2509. out.PseudoElementIndexes = []int64{}
  2510. }
  2511. } else {
  2512. out.PseudoElementIndexes = (out.PseudoElementIndexes)[:0]
  2513. }
  2514. for !in.IsDelim(']') {
  2515. var v102 int64
  2516. v102 = int64(in.Int64())
  2517. out.PseudoElementIndexes = append(out.PseudoElementIndexes, v102)
  2518. in.WantComma()
  2519. }
  2520. in.Delim(']')
  2521. }
  2522. case "layoutNodeIndex":
  2523. out.LayoutNodeIndex = int64(in.Int64())
  2524. case "documentURL":
  2525. out.DocumentURL = string(in.String())
  2526. case "baseURL":
  2527. out.BaseURL = string(in.String())
  2528. case "contentLanguage":
  2529. out.ContentLanguage = string(in.String())
  2530. case "documentEncoding":
  2531. out.DocumentEncoding = string(in.String())
  2532. case "publicId":
  2533. out.PublicID = string(in.String())
  2534. case "systemId":
  2535. out.SystemID = string(in.String())
  2536. case "frameId":
  2537. (out.FrameID).UnmarshalEasyJSON(in)
  2538. case "contentDocumentIndex":
  2539. out.ContentDocumentIndex = int64(in.Int64())
  2540. case "pseudoType":
  2541. (out.PseudoType).UnmarshalEasyJSON(in)
  2542. case "shadowRootType":
  2543. (out.ShadowRootType).UnmarshalEasyJSON(in)
  2544. case "isClickable":
  2545. out.IsClickable = bool(in.Bool())
  2546. case "eventListeners":
  2547. if in.IsNull() {
  2548. in.Skip()
  2549. out.EventListeners = nil
  2550. } else {
  2551. in.Delim('[')
  2552. if out.EventListeners == nil {
  2553. if !in.IsDelim(']') {
  2554. out.EventListeners = make([]*domdebugger.EventListener, 0, 8)
  2555. } else {
  2556. out.EventListeners = []*domdebugger.EventListener{}
  2557. }
  2558. } else {
  2559. out.EventListeners = (out.EventListeners)[:0]
  2560. }
  2561. for !in.IsDelim(']') {
  2562. var v103 *domdebugger.EventListener
  2563. if in.IsNull() {
  2564. in.Skip()
  2565. v103 = nil
  2566. } else {
  2567. if v103 == nil {
  2568. v103 = new(domdebugger.EventListener)
  2569. }
  2570. (*v103).UnmarshalEasyJSON(in)
  2571. }
  2572. out.EventListeners = append(out.EventListeners, v103)
  2573. in.WantComma()
  2574. }
  2575. in.Delim(']')
  2576. }
  2577. case "currentSourceURL":
  2578. out.CurrentSourceURL = string(in.String())
  2579. case "originURL":
  2580. out.OriginURL = string(in.String())
  2581. case "scrollOffsetX":
  2582. out.ScrollOffsetX = float64(in.Float64())
  2583. case "scrollOffsetY":
  2584. out.ScrollOffsetY = float64(in.Float64())
  2585. default:
  2586. in.SkipRecursive()
  2587. }
  2588. in.WantComma()
  2589. }
  2590. in.Delim('}')
  2591. if isTopLevel {
  2592. in.Consumed()
  2593. }
  2594. }
  2595. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12(out *jwriter.Writer, in DOMNode) {
  2596. out.RawByte('{')
  2597. first := true
  2598. _ = first
  2599. {
  2600. const prefix string = ",\"nodeType\":"
  2601. out.RawString(prefix[1:])
  2602. (in.NodeType).MarshalEasyJSON(out)
  2603. }
  2604. {
  2605. const prefix string = ",\"nodeName\":"
  2606. out.RawString(prefix)
  2607. out.String(string(in.NodeName))
  2608. }
  2609. {
  2610. const prefix string = ",\"nodeValue\":"
  2611. out.RawString(prefix)
  2612. out.String(string(in.NodeValue))
  2613. }
  2614. if in.TextValue != "" {
  2615. const prefix string = ",\"textValue\":"
  2616. out.RawString(prefix)
  2617. out.String(string(in.TextValue))
  2618. }
  2619. if in.InputValue != "" {
  2620. const prefix string = ",\"inputValue\":"
  2621. out.RawString(prefix)
  2622. out.String(string(in.InputValue))
  2623. }
  2624. if in.InputChecked {
  2625. const prefix string = ",\"inputChecked\":"
  2626. out.RawString(prefix)
  2627. out.Bool(bool(in.InputChecked))
  2628. }
  2629. if in.OptionSelected {
  2630. const prefix string = ",\"optionSelected\":"
  2631. out.RawString(prefix)
  2632. out.Bool(bool(in.OptionSelected))
  2633. }
  2634. {
  2635. const prefix string = ",\"backendNodeId\":"
  2636. out.RawString(prefix)
  2637. out.Int64(int64(in.BackendNodeID))
  2638. }
  2639. if len(in.ChildNodeIndexes) != 0 {
  2640. const prefix string = ",\"childNodeIndexes\":"
  2641. out.RawString(prefix)
  2642. {
  2643. out.RawByte('[')
  2644. for v104, v105 := range in.ChildNodeIndexes {
  2645. if v104 > 0 {
  2646. out.RawByte(',')
  2647. }
  2648. out.Int64(int64(v105))
  2649. }
  2650. out.RawByte(']')
  2651. }
  2652. }
  2653. if len(in.Attributes) != 0 {
  2654. const prefix string = ",\"attributes\":"
  2655. out.RawString(prefix)
  2656. {
  2657. out.RawByte('[')
  2658. for v106, v107 := range in.Attributes {
  2659. if v106 > 0 {
  2660. out.RawByte(',')
  2661. }
  2662. if v107 == nil {
  2663. out.RawString("null")
  2664. } else {
  2665. (*v107).MarshalEasyJSON(out)
  2666. }
  2667. }
  2668. out.RawByte(']')
  2669. }
  2670. }
  2671. if len(in.PseudoElementIndexes) != 0 {
  2672. const prefix string = ",\"pseudoElementIndexes\":"
  2673. out.RawString(prefix)
  2674. {
  2675. out.RawByte('[')
  2676. for v108, v109 := range in.PseudoElementIndexes {
  2677. if v108 > 0 {
  2678. out.RawByte(',')
  2679. }
  2680. out.Int64(int64(v109))
  2681. }
  2682. out.RawByte(']')
  2683. }
  2684. }
  2685. if in.LayoutNodeIndex != 0 {
  2686. const prefix string = ",\"layoutNodeIndex\":"
  2687. out.RawString(prefix)
  2688. out.Int64(int64(in.LayoutNodeIndex))
  2689. }
  2690. if in.DocumentURL != "" {
  2691. const prefix string = ",\"documentURL\":"
  2692. out.RawString(prefix)
  2693. out.String(string(in.DocumentURL))
  2694. }
  2695. if in.BaseURL != "" {
  2696. const prefix string = ",\"baseURL\":"
  2697. out.RawString(prefix)
  2698. out.String(string(in.BaseURL))
  2699. }
  2700. if in.ContentLanguage != "" {
  2701. const prefix string = ",\"contentLanguage\":"
  2702. out.RawString(prefix)
  2703. out.String(string(in.ContentLanguage))
  2704. }
  2705. if in.DocumentEncoding != "" {
  2706. const prefix string = ",\"documentEncoding\":"
  2707. out.RawString(prefix)
  2708. out.String(string(in.DocumentEncoding))
  2709. }
  2710. if in.PublicID != "" {
  2711. const prefix string = ",\"publicId\":"
  2712. out.RawString(prefix)
  2713. out.String(string(in.PublicID))
  2714. }
  2715. if in.SystemID != "" {
  2716. const prefix string = ",\"systemId\":"
  2717. out.RawString(prefix)
  2718. out.String(string(in.SystemID))
  2719. }
  2720. if in.FrameID != "" {
  2721. const prefix string = ",\"frameId\":"
  2722. out.RawString(prefix)
  2723. out.String(string(in.FrameID))
  2724. }
  2725. if in.ContentDocumentIndex != 0 {
  2726. const prefix string = ",\"contentDocumentIndex\":"
  2727. out.RawString(prefix)
  2728. out.Int64(int64(in.ContentDocumentIndex))
  2729. }
  2730. if in.PseudoType != "" {
  2731. const prefix string = ",\"pseudoType\":"
  2732. out.RawString(prefix)
  2733. (in.PseudoType).MarshalEasyJSON(out)
  2734. }
  2735. if in.ShadowRootType != "" {
  2736. const prefix string = ",\"shadowRootType\":"
  2737. out.RawString(prefix)
  2738. (in.ShadowRootType).MarshalEasyJSON(out)
  2739. }
  2740. if in.IsClickable {
  2741. const prefix string = ",\"isClickable\":"
  2742. out.RawString(prefix)
  2743. out.Bool(bool(in.IsClickable))
  2744. }
  2745. if len(in.EventListeners) != 0 {
  2746. const prefix string = ",\"eventListeners\":"
  2747. out.RawString(prefix)
  2748. {
  2749. out.RawByte('[')
  2750. for v110, v111 := range in.EventListeners {
  2751. if v110 > 0 {
  2752. out.RawByte(',')
  2753. }
  2754. if v111 == nil {
  2755. out.RawString("null")
  2756. } else {
  2757. (*v111).MarshalEasyJSON(out)
  2758. }
  2759. }
  2760. out.RawByte(']')
  2761. }
  2762. }
  2763. if in.CurrentSourceURL != "" {
  2764. const prefix string = ",\"currentSourceURL\":"
  2765. out.RawString(prefix)
  2766. out.String(string(in.CurrentSourceURL))
  2767. }
  2768. if in.OriginURL != "" {
  2769. const prefix string = ",\"originURL\":"
  2770. out.RawString(prefix)
  2771. out.String(string(in.OriginURL))
  2772. }
  2773. if in.ScrollOffsetX != 0 {
  2774. const prefix string = ",\"scrollOffsetX\":"
  2775. out.RawString(prefix)
  2776. out.Float64(float64(in.ScrollOffsetX))
  2777. }
  2778. if in.ScrollOffsetY != 0 {
  2779. const prefix string = ",\"scrollOffsetY\":"
  2780. out.RawString(prefix)
  2781. out.Float64(float64(in.ScrollOffsetY))
  2782. }
  2783. out.RawByte('}')
  2784. }
  2785. // MarshalJSON supports json.Marshaler interface
  2786. func (v DOMNode) MarshalJSON() ([]byte, error) {
  2787. w := jwriter.Writer{}
  2788. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12(&w, v)
  2789. return w.Buffer.BuildBytes(), w.Error
  2790. }
  2791. // MarshalEasyJSON supports easyjson.Marshaler interface
  2792. func (v DOMNode) MarshalEasyJSON(w *jwriter.Writer) {
  2793. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12(w, v)
  2794. }
  2795. // UnmarshalJSON supports json.Unmarshaler interface
  2796. func (v *DOMNode) UnmarshalJSON(data []byte) error {
  2797. r := jlexer.Lexer{Data: data}
  2798. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot12(&r, v)
  2799. return r.Error()
  2800. }
  2801. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2802. func (v *DOMNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2803. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot12(l, v)
  2804. }
  2805. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot13(in *jlexer.Lexer, out *ComputedStyle) {
  2806. isTopLevel := in.IsStart()
  2807. if in.IsNull() {
  2808. if isTopLevel {
  2809. in.Consumed()
  2810. }
  2811. in.Skip()
  2812. return
  2813. }
  2814. in.Delim('{')
  2815. for !in.IsDelim('}') {
  2816. key := in.UnsafeFieldName(false)
  2817. in.WantColon()
  2818. if in.IsNull() {
  2819. in.Skip()
  2820. in.WantComma()
  2821. continue
  2822. }
  2823. switch key {
  2824. case "properties":
  2825. if in.IsNull() {
  2826. in.Skip()
  2827. out.Properties = nil
  2828. } else {
  2829. in.Delim('[')
  2830. if out.Properties == nil {
  2831. if !in.IsDelim(']') {
  2832. out.Properties = make([]*NameValue, 0, 8)
  2833. } else {
  2834. out.Properties = []*NameValue{}
  2835. }
  2836. } else {
  2837. out.Properties = (out.Properties)[:0]
  2838. }
  2839. for !in.IsDelim(']') {
  2840. var v112 *NameValue
  2841. if in.IsNull() {
  2842. in.Skip()
  2843. v112 = nil
  2844. } else {
  2845. if v112 == nil {
  2846. v112 = new(NameValue)
  2847. }
  2848. (*v112).UnmarshalEasyJSON(in)
  2849. }
  2850. out.Properties = append(out.Properties, v112)
  2851. in.WantComma()
  2852. }
  2853. in.Delim(']')
  2854. }
  2855. default:
  2856. in.SkipRecursive()
  2857. }
  2858. in.WantComma()
  2859. }
  2860. in.Delim('}')
  2861. if isTopLevel {
  2862. in.Consumed()
  2863. }
  2864. }
  2865. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot13(out *jwriter.Writer, in ComputedStyle) {
  2866. out.RawByte('{')
  2867. first := true
  2868. _ = first
  2869. {
  2870. const prefix string = ",\"properties\":"
  2871. out.RawString(prefix[1:])
  2872. if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  2873. out.RawString("null")
  2874. } else {
  2875. out.RawByte('[')
  2876. for v113, v114 := range in.Properties {
  2877. if v113 > 0 {
  2878. out.RawByte(',')
  2879. }
  2880. if v114 == nil {
  2881. out.RawString("null")
  2882. } else {
  2883. (*v114).MarshalEasyJSON(out)
  2884. }
  2885. }
  2886. out.RawByte(']')
  2887. }
  2888. }
  2889. out.RawByte('}')
  2890. }
  2891. // MarshalJSON supports json.Marshaler interface
  2892. func (v ComputedStyle) MarshalJSON() ([]byte, error) {
  2893. w := jwriter.Writer{}
  2894. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot13(&w, v)
  2895. return w.Buffer.BuildBytes(), w.Error
  2896. }
  2897. // MarshalEasyJSON supports easyjson.Marshaler interface
  2898. func (v ComputedStyle) MarshalEasyJSON(w *jwriter.Writer) {
  2899. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot13(w, v)
  2900. }
  2901. // UnmarshalJSON supports json.Unmarshaler interface
  2902. func (v *ComputedStyle) UnmarshalJSON(data []byte) error {
  2903. r := jlexer.Lexer{Data: data}
  2904. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot13(&r, v)
  2905. return r.Error()
  2906. }
  2907. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2908. func (v *ComputedStyle) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2909. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot13(l, v)
  2910. }
  2911. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot14(in *jlexer.Lexer, out *CaptureSnapshotReturns) {
  2912. isTopLevel := in.IsStart()
  2913. if in.IsNull() {
  2914. if isTopLevel {
  2915. in.Consumed()
  2916. }
  2917. in.Skip()
  2918. return
  2919. }
  2920. in.Delim('{')
  2921. for !in.IsDelim('}') {
  2922. key := in.UnsafeFieldName(false)
  2923. in.WantColon()
  2924. if in.IsNull() {
  2925. in.Skip()
  2926. in.WantComma()
  2927. continue
  2928. }
  2929. switch key {
  2930. case "documents":
  2931. if in.IsNull() {
  2932. in.Skip()
  2933. out.Documents = nil
  2934. } else {
  2935. in.Delim('[')
  2936. if out.Documents == nil {
  2937. if !in.IsDelim(']') {
  2938. out.Documents = make([]*DocumentSnapshot, 0, 8)
  2939. } else {
  2940. out.Documents = []*DocumentSnapshot{}
  2941. }
  2942. } else {
  2943. out.Documents = (out.Documents)[:0]
  2944. }
  2945. for !in.IsDelim(']') {
  2946. var v115 *DocumentSnapshot
  2947. if in.IsNull() {
  2948. in.Skip()
  2949. v115 = nil
  2950. } else {
  2951. if v115 == nil {
  2952. v115 = new(DocumentSnapshot)
  2953. }
  2954. (*v115).UnmarshalEasyJSON(in)
  2955. }
  2956. out.Documents = append(out.Documents, v115)
  2957. in.WantComma()
  2958. }
  2959. in.Delim(']')
  2960. }
  2961. case "strings":
  2962. if in.IsNull() {
  2963. in.Skip()
  2964. out.Strings = nil
  2965. } else {
  2966. in.Delim('[')
  2967. if out.Strings == nil {
  2968. if !in.IsDelim(']') {
  2969. out.Strings = make([]string, 0, 4)
  2970. } else {
  2971. out.Strings = []string{}
  2972. }
  2973. } else {
  2974. out.Strings = (out.Strings)[:0]
  2975. }
  2976. for !in.IsDelim(']') {
  2977. var v116 string
  2978. v116 = string(in.String())
  2979. out.Strings = append(out.Strings, v116)
  2980. in.WantComma()
  2981. }
  2982. in.Delim(']')
  2983. }
  2984. default:
  2985. in.SkipRecursive()
  2986. }
  2987. in.WantComma()
  2988. }
  2989. in.Delim('}')
  2990. if isTopLevel {
  2991. in.Consumed()
  2992. }
  2993. }
  2994. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot14(out *jwriter.Writer, in CaptureSnapshotReturns) {
  2995. out.RawByte('{')
  2996. first := true
  2997. _ = first
  2998. if len(in.Documents) != 0 {
  2999. const prefix string = ",\"documents\":"
  3000. first = false
  3001. out.RawString(prefix[1:])
  3002. {
  3003. out.RawByte('[')
  3004. for v117, v118 := range in.Documents {
  3005. if v117 > 0 {
  3006. out.RawByte(',')
  3007. }
  3008. if v118 == nil {
  3009. out.RawString("null")
  3010. } else {
  3011. (*v118).MarshalEasyJSON(out)
  3012. }
  3013. }
  3014. out.RawByte(']')
  3015. }
  3016. }
  3017. if len(in.Strings) != 0 {
  3018. const prefix string = ",\"strings\":"
  3019. if first {
  3020. first = false
  3021. out.RawString(prefix[1:])
  3022. } else {
  3023. out.RawString(prefix)
  3024. }
  3025. {
  3026. out.RawByte('[')
  3027. for v119, v120 := range in.Strings {
  3028. if v119 > 0 {
  3029. out.RawByte(',')
  3030. }
  3031. out.String(string(v120))
  3032. }
  3033. out.RawByte(']')
  3034. }
  3035. }
  3036. out.RawByte('}')
  3037. }
  3038. // MarshalJSON supports json.Marshaler interface
  3039. func (v CaptureSnapshotReturns) MarshalJSON() ([]byte, error) {
  3040. w := jwriter.Writer{}
  3041. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot14(&w, v)
  3042. return w.Buffer.BuildBytes(), w.Error
  3043. }
  3044. // MarshalEasyJSON supports easyjson.Marshaler interface
  3045. func (v CaptureSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
  3046. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot14(w, v)
  3047. }
  3048. // UnmarshalJSON supports json.Unmarshaler interface
  3049. func (v *CaptureSnapshotReturns) UnmarshalJSON(data []byte) error {
  3050. r := jlexer.Lexer{Data: data}
  3051. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot14(&r, v)
  3052. return r.Error()
  3053. }
  3054. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  3055. func (v *CaptureSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  3056. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot14(l, v)
  3057. }
  3058. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot15(in *jlexer.Lexer, out *CaptureSnapshotParams) {
  3059. isTopLevel := in.IsStart()
  3060. if in.IsNull() {
  3061. if isTopLevel {
  3062. in.Consumed()
  3063. }
  3064. in.Skip()
  3065. return
  3066. }
  3067. in.Delim('{')
  3068. for !in.IsDelim('}') {
  3069. key := in.UnsafeFieldName(false)
  3070. in.WantColon()
  3071. if in.IsNull() {
  3072. in.Skip()
  3073. in.WantComma()
  3074. continue
  3075. }
  3076. switch key {
  3077. case "computedStyles":
  3078. if in.IsNull() {
  3079. in.Skip()
  3080. out.ComputedStyles = nil
  3081. } else {
  3082. in.Delim('[')
  3083. if out.ComputedStyles == nil {
  3084. if !in.IsDelim(']') {
  3085. out.ComputedStyles = make([]string, 0, 4)
  3086. } else {
  3087. out.ComputedStyles = []string{}
  3088. }
  3089. } else {
  3090. out.ComputedStyles = (out.ComputedStyles)[:0]
  3091. }
  3092. for !in.IsDelim(']') {
  3093. var v121 string
  3094. v121 = string(in.String())
  3095. out.ComputedStyles = append(out.ComputedStyles, v121)
  3096. in.WantComma()
  3097. }
  3098. in.Delim(']')
  3099. }
  3100. case "includePaintOrder":
  3101. out.IncludePaintOrder = bool(in.Bool())
  3102. case "includeDOMRects":
  3103. out.IncludeDOMRects = bool(in.Bool())
  3104. case "includeBlendedBackgroundColors":
  3105. out.IncludeBlendedBackgroundColors = bool(in.Bool())
  3106. case "includeTextColorOpacities":
  3107. out.IncludeTextColorOpacities = bool(in.Bool())
  3108. default:
  3109. in.SkipRecursive()
  3110. }
  3111. in.WantComma()
  3112. }
  3113. in.Delim('}')
  3114. if isTopLevel {
  3115. in.Consumed()
  3116. }
  3117. }
  3118. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot15(out *jwriter.Writer, in CaptureSnapshotParams) {
  3119. out.RawByte('{')
  3120. first := true
  3121. _ = first
  3122. {
  3123. const prefix string = ",\"computedStyles\":"
  3124. out.RawString(prefix[1:])
  3125. if in.ComputedStyles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  3126. out.RawString("null")
  3127. } else {
  3128. out.RawByte('[')
  3129. for v122, v123 := range in.ComputedStyles {
  3130. if v122 > 0 {
  3131. out.RawByte(',')
  3132. }
  3133. out.String(string(v123))
  3134. }
  3135. out.RawByte(']')
  3136. }
  3137. }
  3138. if in.IncludePaintOrder {
  3139. const prefix string = ",\"includePaintOrder\":"
  3140. out.RawString(prefix)
  3141. out.Bool(bool(in.IncludePaintOrder))
  3142. }
  3143. if in.IncludeDOMRects {
  3144. const prefix string = ",\"includeDOMRects\":"
  3145. out.RawString(prefix)
  3146. out.Bool(bool(in.IncludeDOMRects))
  3147. }
  3148. if in.IncludeBlendedBackgroundColors {
  3149. const prefix string = ",\"includeBlendedBackgroundColors\":"
  3150. out.RawString(prefix)
  3151. out.Bool(bool(in.IncludeBlendedBackgroundColors))
  3152. }
  3153. if in.IncludeTextColorOpacities {
  3154. const prefix string = ",\"includeTextColorOpacities\":"
  3155. out.RawString(prefix)
  3156. out.Bool(bool(in.IncludeTextColorOpacities))
  3157. }
  3158. out.RawByte('}')
  3159. }
  3160. // MarshalJSON supports json.Marshaler interface
  3161. func (v CaptureSnapshotParams) MarshalJSON() ([]byte, error) {
  3162. w := jwriter.Writer{}
  3163. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot15(&w, v)
  3164. return w.Buffer.BuildBytes(), w.Error
  3165. }
  3166. // MarshalEasyJSON supports easyjson.Marshaler interface
  3167. func (v CaptureSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
  3168. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot15(w, v)
  3169. }
  3170. // UnmarshalJSON supports json.Unmarshaler interface
  3171. func (v *CaptureSnapshotParams) UnmarshalJSON(data []byte) error {
  3172. r := jlexer.Lexer{Data: data}
  3173. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot15(&r, v)
  3174. return r.Error()
  3175. }
  3176. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  3177. func (v *CaptureSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  3178. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot15(l, v)
  3179. }