1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
|
package dom
// Code generated by cdproto-gen. DO NOT EDIT.
import (
"fmt"
"github.com/mailru/easyjson"
"github.com/mailru/easyjson/jlexer"
"github.com/mailru/easyjson/jwriter"
)
// PhysicalAxes containerSelector physical axes.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-PhysicalAxes
type PhysicalAxes string
// String returns the PhysicalAxes as string value.
func (t PhysicalAxes) String() string {
return string(t)
}
// PhysicalAxes values.
const (
PhysicalAxesHorizontal PhysicalAxes = "Horizontal"
PhysicalAxesVertical PhysicalAxes = "Vertical"
PhysicalAxesBoth PhysicalAxes = "Both"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t PhysicalAxes) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t PhysicalAxes) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *PhysicalAxes) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch PhysicalAxes(v) {
case PhysicalAxesHorizontal:
*t = PhysicalAxesHorizontal
case PhysicalAxesVertical:
*t = PhysicalAxesVertical
case PhysicalAxesBoth:
*t = PhysicalAxesBoth
default:
in.AddError(fmt.Errorf("unknown PhysicalAxes value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *PhysicalAxes) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// LogicalAxes containerSelector logical axes.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-LogicalAxes
type LogicalAxes string
// String returns the LogicalAxes as string value.
func (t LogicalAxes) String() string {
return string(t)
}
// LogicalAxes values.
const (
LogicalAxesInline LogicalAxes = "Inline"
LogicalAxesBlock LogicalAxes = "Block"
LogicalAxesBoth LogicalAxes = "Both"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t LogicalAxes) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t LogicalAxes) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *LogicalAxes) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch LogicalAxes(v) {
case LogicalAxesInline:
*t = LogicalAxesInline
case LogicalAxesBlock:
*t = LogicalAxesBlock
case LogicalAxesBoth:
*t = LogicalAxesBoth
default:
in.AddError(fmt.Errorf("unknown LogicalAxes value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *LogicalAxes) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// Quad an array of quad vertices, x immediately followed by y for each
// point, points clock-wise.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-Quad
type Quad []float64
// BoxModel box model.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-BoxModel
type BoxModel struct {
Content Quad `json:"content"` // Content box
Padding Quad `json:"padding"` // Padding box
Border Quad `json:"border"` // Border box
Margin Quad `json:"margin"` // Margin box
Width int64 `json:"width"` // Node width
Height int64 `json:"height"` // Node height
ShapeOutside *ShapeOutsideInfo `json:"shapeOutside,omitempty"` // Shape outside coordinates
}
// ShapeOutsideInfo CSS Shape Outside details.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-ShapeOutsideInfo
type ShapeOutsideInfo struct {
Bounds Quad `json:"bounds"` // Shape bounds
Shape []easyjson.RawMessage `json:"shape"` // Shape coordinate details
MarginShape []easyjson.RawMessage `json:"marginShape"` // Margin shape bounds
}
// Rect Rectangle.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-Rect
type Rect struct {
X float64 `json:"x"` // X coordinate
Y float64 `json:"y"` // Y coordinate
Width float64 `json:"width"` // Rectangle width
Height float64 `json:"height"` // Rectangle height
}
// CSSComputedStyleProperty [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-CSSComputedStyleProperty
type CSSComputedStyleProperty struct {
Name string `json:"name"` // Computed style property name.
Value string `json:"value"` // Computed style property value.
}
// EnableIncludeWhitespace whether to include whitespaces in the children
// array of returned Nodes.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-enable
type EnableIncludeWhitespace string
// String returns the EnableIncludeWhitespace as string value.
func (t EnableIncludeWhitespace) String() string {
return string(t)
}
// EnableIncludeWhitespace values.
const (
EnableIncludeWhitespaceNone EnableIncludeWhitespace = "none"
EnableIncludeWhitespaceAll EnableIncludeWhitespace = "all"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t EnableIncludeWhitespace) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t EnableIncludeWhitespace) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *EnableIncludeWhitespace) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch EnableIncludeWhitespace(v) {
case EnableIncludeWhitespaceNone:
*t = EnableIncludeWhitespaceNone
case EnableIncludeWhitespaceAll:
*t = EnableIncludeWhitespaceAll
default:
in.AddError(fmt.Errorf("unknown EnableIncludeWhitespace value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *EnableIncludeWhitespace) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
|