mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Update chromedp to fix console errors (#1521)
This commit is contained in:
2411
vendor/github.com/chromedp/cdproto/overlay/easyjson.go
generated
vendored
2411
vendor/github.com/chromedp/cdproto/overlay/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
274
vendor/github.com/chromedp/cdproto/overlay/overlay.go
generated
vendored
274
vendor/github.com/chromedp/cdproto/overlay/overlay.go
generated
vendored
@@ -50,10 +50,11 @@ func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// GetHighlightObjectForTestParams for testing.
|
||||
type GetHighlightObjectForTestParams struct {
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Id of the node to get highlight object for.
|
||||
IncludeDistance bool `json:"includeDistance,omitempty"` // Whether to include distance info.
|
||||
IncludeStyle bool `json:"includeStyle,omitempty"` // Whether to include style info.
|
||||
ColorFormat ColorFormat `json:"colorFormat,omitempty"` // The color format to get config with (default: hex)
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Id of the node to get highlight object for.
|
||||
IncludeDistance bool `json:"includeDistance,omitempty"` // Whether to include distance info.
|
||||
IncludeStyle bool `json:"includeStyle,omitempty"` // Whether to include style info.
|
||||
ColorFormat ColorFormat `json:"colorFormat,omitempty"` // The color format to get config with (default: hex).
|
||||
ShowAccessibilityInfo bool `json:"showAccessibilityInfo,omitempty"` // Whether to show accessibility info (default: true).
|
||||
}
|
||||
|
||||
// GetHighlightObjectForTest for testing.
|
||||
@@ -86,6 +87,13 @@ func (p GetHighlightObjectForTestParams) WithColorFormat(colorFormat ColorFormat
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithShowAccessibilityInfo whether to show accessibility info (default:
|
||||
// true).
|
||||
func (p GetHighlightObjectForTestParams) WithShowAccessibilityInfo(showAccessibilityInfo bool) *GetHighlightObjectForTestParams {
|
||||
p.ShowAccessibilityInfo = showAccessibilityInfo
|
||||
return &p
|
||||
}
|
||||
|
||||
// GetHighlightObjectForTestReturns return values.
|
||||
type GetHighlightObjectForTestReturns struct {
|
||||
Highlight easyjson.RawMessage `json:"highlight,omitempty"`
|
||||
@@ -106,6 +114,81 @@ func (p *GetHighlightObjectForTestParams) Do(ctx context.Context) (highlight eas
|
||||
return res.Highlight, nil
|
||||
}
|
||||
|
||||
// GetGridHighlightObjectsForTestParams for Persistent Grid testing.
|
||||
type GetGridHighlightObjectsForTestParams struct {
|
||||
NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the node to get highlight object for.
|
||||
}
|
||||
|
||||
// GetGridHighlightObjectsForTest for Persistent Grid testing.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getGridHighlightObjectsForTest
|
||||
//
|
||||
// parameters:
|
||||
// nodeIds - Ids of the node to get highlight object for.
|
||||
func GetGridHighlightObjectsForTest(nodeIds []cdp.NodeID) *GetGridHighlightObjectsForTestParams {
|
||||
return &GetGridHighlightObjectsForTestParams{
|
||||
NodeIds: nodeIds,
|
||||
}
|
||||
}
|
||||
|
||||
// GetGridHighlightObjectsForTestReturns return values.
|
||||
type GetGridHighlightObjectsForTestReturns struct {
|
||||
Highlights easyjson.RawMessage `json:"highlights,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Overlay.getGridHighlightObjectsForTest against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// highlights - Grid Highlight data for the node ids provided.
|
||||
func (p *GetGridHighlightObjectsForTestParams) Do(ctx context.Context) (highlights easyjson.RawMessage, err error) {
|
||||
// execute
|
||||
var res GetGridHighlightObjectsForTestReturns
|
||||
err = cdp.Execute(ctx, CommandGetGridHighlightObjectsForTest, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Highlights, nil
|
||||
}
|
||||
|
||||
// GetSourceOrderHighlightObjectForTestParams for Source Order Viewer
|
||||
// testing.
|
||||
type GetSourceOrderHighlightObjectForTestParams struct {
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Id of the node to highlight.
|
||||
}
|
||||
|
||||
// GetSourceOrderHighlightObjectForTest for Source Order Viewer testing.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getSourceOrderHighlightObjectForTest
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to highlight.
|
||||
func GetSourceOrderHighlightObjectForTest(nodeID cdp.NodeID) *GetSourceOrderHighlightObjectForTestParams {
|
||||
return &GetSourceOrderHighlightObjectForTestParams{
|
||||
NodeID: nodeID,
|
||||
}
|
||||
}
|
||||
|
||||
// GetSourceOrderHighlightObjectForTestReturns return values.
|
||||
type GetSourceOrderHighlightObjectForTestReturns struct {
|
||||
Highlight easyjson.RawMessage `json:"highlight,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Overlay.getSourceOrderHighlightObjectForTest against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// highlight - Source order highlight data for the node id provided.
|
||||
func (p *GetSourceOrderHighlightObjectForTestParams) Do(ctx context.Context) (highlight easyjson.RawMessage, err error) {
|
||||
// execute
|
||||
var res GetSourceOrderHighlightObjectForTestReturns
|
||||
err = cdp.Execute(ctx, CommandGetSourceOrderHighlightObjectForTest, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Highlight, nil
|
||||
}
|
||||
|
||||
// HideHighlightParams hides any highlight.
|
||||
type HideHighlightParams struct{}
|
||||
|
||||
@@ -296,6 +379,53 @@ func (p *HighlightRectParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandHighlightRect, p, nil)
|
||||
}
|
||||
|
||||
// HighlightSourceOrderParams highlights the source order of the children of
|
||||
// the DOM node with given id or with the given JavaScript object wrapper.
|
||||
// Either nodeId or objectId must be specified.
|
||||
type HighlightSourceOrderParams struct {
|
||||
SourceOrderConfig *SourceOrderConfig `json:"sourceOrderConfig"` // A descriptor for the appearance of the overlay drawing.
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node to highlight.
|
||||
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to highlight.
|
||||
ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node to be highlighted.
|
||||
}
|
||||
|
||||
// HighlightSourceOrder highlights the source order of the children of the
|
||||
// DOM node with given id or with the given JavaScript object wrapper. Either
|
||||
// nodeId or objectId must be specified.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightSourceOrder
|
||||
//
|
||||
// parameters:
|
||||
// sourceOrderConfig - A descriptor for the appearance of the overlay drawing.
|
||||
func HighlightSourceOrder(sourceOrderConfig *SourceOrderConfig) *HighlightSourceOrderParams {
|
||||
return &HighlightSourceOrderParams{
|
||||
SourceOrderConfig: sourceOrderConfig,
|
||||
}
|
||||
}
|
||||
|
||||
// WithNodeID identifier of the node to highlight.
|
||||
func (p HighlightSourceOrderParams) WithNodeID(nodeID cdp.NodeID) *HighlightSourceOrderParams {
|
||||
p.NodeID = nodeID
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithBackendNodeID identifier of the backend node to highlight.
|
||||
func (p HighlightSourceOrderParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *HighlightSourceOrderParams {
|
||||
p.BackendNodeID = backendNodeID
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithObjectID JavaScript object id of the node to be highlighted.
|
||||
func (p HighlightSourceOrderParams) WithObjectID(objectID runtime.RemoteObjectID) *HighlightSourceOrderParams {
|
||||
p.ObjectID = objectID
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Overlay.highlightSourceOrder against the provided context.
|
||||
func (p *HighlightSourceOrderParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandHighlightSourceOrder, p, nil)
|
||||
}
|
||||
|
||||
// SetInspectModeParams enters the 'inspect' mode. In this mode, elements
|
||||
// that user is hovering over are highlighted. Backend then generates
|
||||
// 'inspectNodeRequested' event upon element selection.
|
||||
@@ -425,6 +555,73 @@ func (p *SetShowFPSCounterParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowFPSCounter, p, nil)
|
||||
}
|
||||
|
||||
// SetShowGridOverlaysParams highlight multiple elements with the CSS Grid
|
||||
// overlay.
|
||||
type SetShowGridOverlaysParams struct {
|
||||
GridNodeHighlightConfigs []*GridNodeHighlightConfig `json:"gridNodeHighlightConfigs"` // An array of node identifiers and descriptors for the highlight appearance.
|
||||
}
|
||||
|
||||
// SetShowGridOverlays highlight multiple elements with the CSS Grid overlay.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowGridOverlays
|
||||
//
|
||||
// parameters:
|
||||
// gridNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
func SetShowGridOverlays(gridNodeHighlightConfigs []*GridNodeHighlightConfig) *SetShowGridOverlaysParams {
|
||||
return &SetShowGridOverlaysParams{
|
||||
GridNodeHighlightConfigs: gridNodeHighlightConfigs,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Overlay.setShowGridOverlays against the provided context.
|
||||
func (p *SetShowGridOverlaysParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowGridOverlays, p, nil)
|
||||
}
|
||||
|
||||
// SetShowFlexOverlaysParams [no description].
|
||||
type SetShowFlexOverlaysParams struct {
|
||||
FlexNodeHighlightConfigs []*FlexNodeHighlightConfig `json:"flexNodeHighlightConfigs"` // An array of node identifiers and descriptors for the highlight appearance.
|
||||
}
|
||||
|
||||
// SetShowFlexOverlays [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowFlexOverlays
|
||||
//
|
||||
// parameters:
|
||||
// flexNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
func SetShowFlexOverlays(flexNodeHighlightConfigs []*FlexNodeHighlightConfig) *SetShowFlexOverlaysParams {
|
||||
return &SetShowFlexOverlaysParams{
|
||||
FlexNodeHighlightConfigs: flexNodeHighlightConfigs,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Overlay.setShowFlexOverlays against the provided context.
|
||||
func (p *SetShowFlexOverlaysParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowFlexOverlays, p, nil)
|
||||
}
|
||||
|
||||
// SetShowScrollSnapOverlaysParams [no description].
|
||||
type SetShowScrollSnapOverlaysParams struct {
|
||||
ScrollSnapHighlightConfigs []*ScrollSnapHighlightConfig `json:"scrollSnapHighlightConfigs"` // An array of node identifiers and descriptors for the highlight appearance.
|
||||
}
|
||||
|
||||
// SetShowScrollSnapOverlays [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowScrollSnapOverlays
|
||||
//
|
||||
// parameters:
|
||||
// scrollSnapHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
func SetShowScrollSnapOverlays(scrollSnapHighlightConfigs []*ScrollSnapHighlightConfig) *SetShowScrollSnapOverlaysParams {
|
||||
return &SetShowScrollSnapOverlaysParams{
|
||||
ScrollSnapHighlightConfigs: scrollSnapHighlightConfigs,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Overlay.setShowScrollSnapOverlays against the provided context.
|
||||
func (p *SetShowScrollSnapOverlaysParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowScrollSnapOverlays, p, nil)
|
||||
}
|
||||
|
||||
// SetShowPaintRectsParams requests that backend shows paint rectangles.
|
||||
type SetShowPaintRectsParams struct {
|
||||
Result bool `json:"result"` // True for showing paint rectangles
|
||||
@@ -519,6 +716,30 @@ func (p *SetShowHitTestBordersParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowHitTestBorders, p, nil)
|
||||
}
|
||||
|
||||
// SetShowWebVitalsParams request that backend shows an overlay with web
|
||||
// vital metrics.
|
||||
type SetShowWebVitalsParams struct {
|
||||
Show bool `json:"show"`
|
||||
}
|
||||
|
||||
// SetShowWebVitals request that backend shows an overlay with web vital
|
||||
// metrics.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowWebVitals
|
||||
//
|
||||
// parameters:
|
||||
// show
|
||||
func SetShowWebVitals(show bool) *SetShowWebVitalsParams {
|
||||
return &SetShowWebVitalsParams{
|
||||
Show: show,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Overlay.setShowWebVitals against the provided context.
|
||||
func (p *SetShowWebVitalsParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowWebVitals, p, nil)
|
||||
}
|
||||
|
||||
// SetShowViewportSizeOnResizeParams paints viewport size upon main frame
|
||||
// resize.
|
||||
type SetShowViewportSizeOnResizeParams struct {
|
||||
@@ -569,23 +790,30 @@ func (p *SetShowHingeParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandDisable = "Overlay.disable"
|
||||
CommandEnable = "Overlay.enable"
|
||||
CommandGetHighlightObjectForTest = "Overlay.getHighlightObjectForTest"
|
||||
CommandHideHighlight = "Overlay.hideHighlight"
|
||||
CommandHighlightFrame = "Overlay.highlightFrame"
|
||||
CommandHighlightNode = "Overlay.highlightNode"
|
||||
CommandHighlightQuad = "Overlay.highlightQuad"
|
||||
CommandHighlightRect = "Overlay.highlightRect"
|
||||
CommandSetInspectMode = "Overlay.setInspectMode"
|
||||
CommandSetShowAdHighlights = "Overlay.setShowAdHighlights"
|
||||
CommandSetPausedInDebuggerMessage = "Overlay.setPausedInDebuggerMessage"
|
||||
CommandSetShowDebugBorders = "Overlay.setShowDebugBorders"
|
||||
CommandSetShowFPSCounter = "Overlay.setShowFPSCounter"
|
||||
CommandSetShowPaintRects = "Overlay.setShowPaintRects"
|
||||
CommandSetShowLayoutShiftRegions = "Overlay.setShowLayoutShiftRegions"
|
||||
CommandSetShowScrollBottleneckRects = "Overlay.setShowScrollBottleneckRects"
|
||||
CommandSetShowHitTestBorders = "Overlay.setShowHitTestBorders"
|
||||
CommandSetShowViewportSizeOnResize = "Overlay.setShowViewportSizeOnResize"
|
||||
CommandSetShowHinge = "Overlay.setShowHinge"
|
||||
CommandDisable = "Overlay.disable"
|
||||
CommandEnable = "Overlay.enable"
|
||||
CommandGetHighlightObjectForTest = "Overlay.getHighlightObjectForTest"
|
||||
CommandGetGridHighlightObjectsForTest = "Overlay.getGridHighlightObjectsForTest"
|
||||
CommandGetSourceOrderHighlightObjectForTest = "Overlay.getSourceOrderHighlightObjectForTest"
|
||||
CommandHideHighlight = "Overlay.hideHighlight"
|
||||
CommandHighlightFrame = "Overlay.highlightFrame"
|
||||
CommandHighlightNode = "Overlay.highlightNode"
|
||||
CommandHighlightQuad = "Overlay.highlightQuad"
|
||||
CommandHighlightRect = "Overlay.highlightRect"
|
||||
CommandHighlightSourceOrder = "Overlay.highlightSourceOrder"
|
||||
CommandSetInspectMode = "Overlay.setInspectMode"
|
||||
CommandSetShowAdHighlights = "Overlay.setShowAdHighlights"
|
||||
CommandSetPausedInDebuggerMessage = "Overlay.setPausedInDebuggerMessage"
|
||||
CommandSetShowDebugBorders = "Overlay.setShowDebugBorders"
|
||||
CommandSetShowFPSCounter = "Overlay.setShowFPSCounter"
|
||||
CommandSetShowGridOverlays = "Overlay.setShowGridOverlays"
|
||||
CommandSetShowFlexOverlays = "Overlay.setShowFlexOverlays"
|
||||
CommandSetShowScrollSnapOverlays = "Overlay.setShowScrollSnapOverlays"
|
||||
CommandSetShowPaintRects = "Overlay.setShowPaintRects"
|
||||
CommandSetShowLayoutShiftRegions = "Overlay.setShowLayoutShiftRegions"
|
||||
CommandSetShowScrollBottleneckRects = "Overlay.setShowScrollBottleneckRects"
|
||||
CommandSetShowHitTestBorders = "Overlay.setShowHitTestBorders"
|
||||
CommandSetShowWebVitals = "Overlay.setShowWebVitals"
|
||||
CommandSetShowViewportSizeOnResize = "Overlay.setShowViewportSizeOnResize"
|
||||
CommandSetShowHinge = "Overlay.setShowHinge"
|
||||
)
|
||||
|
||||
234
vendor/github.com/chromedp/cdproto/overlay/types.go
generated
vendored
234
vendor/github.com/chromedp/cdproto/overlay/types.go
generated
vendored
@@ -12,40 +12,150 @@ import (
|
||||
"github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// SourceOrderConfig configuration data for drawing the source order of an
|
||||
// elements children.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-SourceOrderConfig
|
||||
type SourceOrderConfig struct {
|
||||
ParentOutlineColor *cdp.RGBA `json:"parentOutlineColor"` // the color to outline the givent element in.
|
||||
ChildOutlineColor *cdp.RGBA `json:"childOutlineColor"` // the color to outline the child elements in.
|
||||
}
|
||||
|
||||
// GridHighlightConfig configuration data for the highlighting of Grid
|
||||
// elements.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-GridHighlightConfig
|
||||
type GridHighlightConfig struct {
|
||||
ShowGridExtensionLines bool `json:"showGridExtensionLines,omitempty"` // Whether the extension lines from grid cells to the rulers should be shown (default: false).
|
||||
GridBorderColor *cdp.RGBA `json:"gridBorderColor,omitempty"` // The grid container border highlight color (default: transparent).
|
||||
CellBorderColor *cdp.RGBA `json:"cellBorderColor,omitempty"` // The cell border color (default: transparent).
|
||||
GridBorderDash bool `json:"gridBorderDash,omitempty"` // Whether the grid border is dashed (default: false).
|
||||
CellBorderDash bool `json:"cellBorderDash,omitempty"` // Whether the cell border is dashed (default: false).
|
||||
RowGapColor *cdp.RGBA `json:"rowGapColor,omitempty"` // The row gap highlight fill color (default: transparent).
|
||||
RowHatchColor *cdp.RGBA `json:"rowHatchColor,omitempty"` // The row gap hatching fill color (default: transparent).
|
||||
ColumnGapColor *cdp.RGBA `json:"columnGapColor,omitempty"` // The column gap highlight fill color (default: transparent).
|
||||
ColumnHatchColor *cdp.RGBA `json:"columnHatchColor,omitempty"` // The column gap hatching fill color (default: transparent).
|
||||
ShowGridExtensionLines bool `json:"showGridExtensionLines,omitempty"` // Whether the extension lines from grid cells to the rulers should be shown (default: false).
|
||||
ShowPositiveLineNumbers bool `json:"showPositiveLineNumbers,omitempty"` // Show Positive line number labels (default: false).
|
||||
ShowNegativeLineNumbers bool `json:"showNegativeLineNumbers,omitempty"` // Show Negative line number labels (default: false).
|
||||
ShowAreaNames bool `json:"showAreaNames,omitempty"` // Show area name labels (default: false).
|
||||
ShowLineNames bool `json:"showLineNames,omitempty"` // Show line name labels (default: false).
|
||||
ShowTrackSizes bool `json:"showTrackSizes,omitempty"` // Show track size labels (default: false).
|
||||
GridBorderColor *cdp.RGBA `json:"gridBorderColor,omitempty"` // The grid container border highlight color (default: transparent).
|
||||
RowLineColor *cdp.RGBA `json:"rowLineColor,omitempty"` // The row line color (default: transparent).
|
||||
ColumnLineColor *cdp.RGBA `json:"columnLineColor,omitempty"` // The column line color (default: transparent).
|
||||
GridBorderDash bool `json:"gridBorderDash,omitempty"` // Whether the grid border is dashed (default: false).
|
||||
RowLineDash bool `json:"rowLineDash,omitempty"` // Whether row lines are dashed (default: false).
|
||||
ColumnLineDash bool `json:"columnLineDash,omitempty"` // Whether column lines are dashed (default: false).
|
||||
RowGapColor *cdp.RGBA `json:"rowGapColor,omitempty"` // The row gap highlight fill color (default: transparent).
|
||||
RowHatchColor *cdp.RGBA `json:"rowHatchColor,omitempty"` // The row gap hatching fill color (default: transparent).
|
||||
ColumnGapColor *cdp.RGBA `json:"columnGapColor,omitempty"` // The column gap highlight fill color (default: transparent).
|
||||
ColumnHatchColor *cdp.RGBA `json:"columnHatchColor,omitempty"` // The column gap hatching fill color (default: transparent).
|
||||
AreaBorderColor *cdp.RGBA `json:"areaBorderColor,omitempty"` // The named grid areas border color (Default: transparent).
|
||||
GridBackgroundColor *cdp.RGBA `json:"gridBackgroundColor,omitempty"` // The grid container background color (Default: transparent).
|
||||
}
|
||||
|
||||
// FlexContainerHighlightConfig configuration data for the highlighting of
|
||||
// Flex container elements.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-FlexContainerHighlightConfig
|
||||
type FlexContainerHighlightConfig struct {
|
||||
ContainerBorder *LineStyle `json:"containerBorder,omitempty"` // The style of the container border
|
||||
LineSeparator *LineStyle `json:"lineSeparator,omitempty"` // The style of the separator between lines
|
||||
ItemSeparator *LineStyle `json:"itemSeparator,omitempty"` // The style of the separator between items
|
||||
MainDistributedSpace *BoxStyle `json:"mainDistributedSpace,omitempty"` // Style of content-distribution space on the main axis (justify-content).
|
||||
CrossDistributedSpace *BoxStyle `json:"crossDistributedSpace,omitempty"` // Style of content-distribution space on the cross axis (align-content).
|
||||
RowGapSpace *BoxStyle `json:"rowGapSpace,omitempty"` // Style of empty space caused by row gaps (gap/row-gap).
|
||||
ColumnGapSpace *BoxStyle `json:"columnGapSpace,omitempty"` // Style of empty space caused by columns gaps (gap/column-gap).
|
||||
CrossAlignment *LineStyle `json:"crossAlignment,omitempty"` // Style of the self-alignment line (align-items).
|
||||
}
|
||||
|
||||
// FlexItemHighlightConfig configuration data for the highlighting of Flex
|
||||
// item elements.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-FlexItemHighlightConfig
|
||||
type FlexItemHighlightConfig struct {
|
||||
BaseSizeBox *BoxStyle `json:"baseSizeBox,omitempty"` // Style of the box representing the item's base size
|
||||
BaseSizeBorder *LineStyle `json:"baseSizeBorder,omitempty"` // Style of the border around the box representing the item's base size
|
||||
FlexibilityArrow *LineStyle `json:"flexibilityArrow,omitempty"` // Style of the arrow representing if the item grew or shrank
|
||||
}
|
||||
|
||||
// LineStyle style information for drawing a line.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-LineStyle
|
||||
type LineStyle struct {
|
||||
Color *cdp.RGBA `json:"color,omitempty"` // The color of the line (default: transparent)
|
||||
Pattern LineStylePattern `json:"pattern,omitempty"` // The line pattern (default: solid)
|
||||
}
|
||||
|
||||
// BoxStyle style information for drawing a box.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-BoxStyle
|
||||
type BoxStyle struct {
|
||||
FillColor *cdp.RGBA `json:"fillColor,omitempty"` // The background color for the box (default: transparent)
|
||||
HatchColor *cdp.RGBA `json:"hatchColor,omitempty"` // The hatching color for the box (default: transparent)
|
||||
}
|
||||
|
||||
// ContrastAlgorithm [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-ContrastAlgorithm
|
||||
type ContrastAlgorithm string
|
||||
|
||||
// String returns the ContrastAlgorithm as string value.
|
||||
func (t ContrastAlgorithm) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// ContrastAlgorithm values.
|
||||
const (
|
||||
ContrastAlgorithmAa ContrastAlgorithm = "aa"
|
||||
ContrastAlgorithmAaa ContrastAlgorithm = "aaa"
|
||||
ContrastAlgorithmApca ContrastAlgorithm = "apca"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t ContrastAlgorithm) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t ContrastAlgorithm) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContrastAlgorithm) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContrastAlgorithm(in.String()) {
|
||||
case ContrastAlgorithmAa:
|
||||
*t = ContrastAlgorithmAa
|
||||
case ContrastAlgorithmAaa:
|
||||
*t = ContrastAlgorithmAaa
|
||||
case ContrastAlgorithmApca:
|
||||
*t = ContrastAlgorithmApca
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContrastAlgorithm value"))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *ContrastAlgorithm) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// HighlightConfig configuration data for the highlighting of page elements.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-HighlightConfig
|
||||
type HighlightConfig struct {
|
||||
ShowInfo bool `json:"showInfo,omitempty"` // Whether the node info tooltip should be shown (default: false).
|
||||
ShowStyles bool `json:"showStyles,omitempty"` // Whether the node styles in the tooltip (default: false).
|
||||
ShowRulers bool `json:"showRulers,omitempty"` // Whether the rulers should be shown (default: false).
|
||||
ShowExtensionLines bool `json:"showExtensionLines,omitempty"` // Whether the extension lines from node to the rulers should be shown (default: false).
|
||||
ContentColor *cdp.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: transparent).
|
||||
PaddingColor *cdp.RGBA `json:"paddingColor,omitempty"` // The padding highlight fill color (default: transparent).
|
||||
BorderColor *cdp.RGBA `json:"borderColor,omitempty"` // The border highlight fill color (default: transparent).
|
||||
MarginColor *cdp.RGBA `json:"marginColor,omitempty"` // The margin highlight fill color (default: transparent).
|
||||
EventTargetColor *cdp.RGBA `json:"eventTargetColor,omitempty"` // The event target element highlight fill color (default: transparent).
|
||||
ShapeColor *cdp.RGBA `json:"shapeColor,omitempty"` // The shape outside fill color (default: transparent).
|
||||
ShapeMarginColor *cdp.RGBA `json:"shapeMarginColor,omitempty"` // The shape margin fill color (default: transparent).
|
||||
CSSGridColor *cdp.RGBA `json:"cssGridColor,omitempty"` // The grid layout color (default: transparent).
|
||||
ColorFormat ColorFormat `json:"colorFormat,omitempty"` // The color format used to format color styles (default: hex).
|
||||
GridHighlightConfig *GridHighlightConfig `json:"gridHighlightConfig,omitempty"` // The grid layout highlight configuration (default: all transparent).
|
||||
ShowInfo bool `json:"showInfo,omitempty"` // Whether the node info tooltip should be shown (default: false).
|
||||
ShowStyles bool `json:"showStyles,omitempty"` // Whether the node styles in the tooltip (default: false).
|
||||
ShowRulers bool `json:"showRulers,omitempty"` // Whether the rulers should be shown (default: false).
|
||||
ShowAccessibilityInfo bool `json:"showAccessibilityInfo,omitempty"` // Whether the a11y info should be shown (default: true).
|
||||
ShowExtensionLines bool `json:"showExtensionLines,omitempty"` // Whether the extension lines from node to the rulers should be shown (default: false).
|
||||
ContentColor *cdp.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: transparent).
|
||||
PaddingColor *cdp.RGBA `json:"paddingColor,omitempty"` // The padding highlight fill color (default: transparent).
|
||||
BorderColor *cdp.RGBA `json:"borderColor,omitempty"` // The border highlight fill color (default: transparent).
|
||||
MarginColor *cdp.RGBA `json:"marginColor,omitempty"` // The margin highlight fill color (default: transparent).
|
||||
EventTargetColor *cdp.RGBA `json:"eventTargetColor,omitempty"` // The event target element highlight fill color (default: transparent).
|
||||
ShapeColor *cdp.RGBA `json:"shapeColor,omitempty"` // The shape outside fill color (default: transparent).
|
||||
ShapeMarginColor *cdp.RGBA `json:"shapeMarginColor,omitempty"` // The shape margin fill color (default: transparent).
|
||||
CSSGridColor *cdp.RGBA `json:"cssGridColor,omitempty"` // The grid layout color (default: transparent).
|
||||
ColorFormat ColorFormat `json:"colorFormat,omitempty"` // The color format used to format color styles (default: hex).
|
||||
GridHighlightConfig *GridHighlightConfig `json:"gridHighlightConfig,omitempty"` // The grid layout highlight configuration (default: all transparent).
|
||||
FlexContainerHighlightConfig *FlexContainerHighlightConfig `json:"flexContainerHighlightConfig,omitempty"` // The flex container highlight configuration (default: all transparent).
|
||||
FlexItemHighlightConfig *FlexItemHighlightConfig `json:"flexItemHighlightConfig,omitempty"` // The flex item highlight configuration (default: all transparent).
|
||||
ContrastAlgorithm ContrastAlgorithm `json:"contrastAlgorithm,omitempty"` // The contrast algorithm to use for the contrast ratio (default: aa).
|
||||
}
|
||||
|
||||
// ColorFormat [no description].
|
||||
@@ -95,6 +205,40 @@ func (t *ColorFormat) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// GridNodeHighlightConfig configurations for Persistent Grid Highlight.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-GridNodeHighlightConfig
|
||||
type GridNodeHighlightConfig struct {
|
||||
GridHighlightConfig *GridHighlightConfig `json:"gridHighlightConfig"` // A descriptor for the highlight appearance.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to highlight.
|
||||
}
|
||||
|
||||
// FlexNodeHighlightConfig [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-FlexNodeHighlightConfig
|
||||
type FlexNodeHighlightConfig struct {
|
||||
FlexContainerHighlightConfig *FlexContainerHighlightConfig `json:"flexContainerHighlightConfig"` // A descriptor for the highlight appearance of flex containers.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to highlight.
|
||||
}
|
||||
|
||||
// ScrollSnapContainerHighlightConfig [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-ScrollSnapContainerHighlightConfig
|
||||
type ScrollSnapContainerHighlightConfig struct {
|
||||
SnapportBorder *LineStyle `json:"snapportBorder,omitempty"` // The style of the snapport border (default: transparent)
|
||||
SnapAreaBorder *LineStyle `json:"snapAreaBorder,omitempty"` // The style of the snap area border (default: transparent)
|
||||
ScrollMarginColor *cdp.RGBA `json:"scrollMarginColor,omitempty"` // The margin highlight fill color (default: transparent).
|
||||
ScrollPaddingColor *cdp.RGBA `json:"scrollPaddingColor,omitempty"` // The padding highlight fill color (default: transparent).
|
||||
}
|
||||
|
||||
// ScrollSnapHighlightConfig [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-ScrollSnapHighlightConfig
|
||||
type ScrollSnapHighlightConfig struct {
|
||||
ScrollSnapContainerHighlightConfig *ScrollSnapContainerHighlightConfig `json:"scrollSnapContainerHighlightConfig"` // A descriptor for the highlight appearance of scroll snap containers.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to highlight.
|
||||
}
|
||||
|
||||
// HingeConfig configuration for dual screen hinge.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-HingeConfig
|
||||
@@ -156,3 +300,47 @@ func (t *InspectMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
func (t *InspectMode) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// LineStylePattern the line pattern (default: solid).
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-LineStyle
|
||||
type LineStylePattern string
|
||||
|
||||
// String returns the LineStylePattern as string value.
|
||||
func (t LineStylePattern) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// LineStylePattern values.
|
||||
const (
|
||||
LineStylePatternDashed LineStylePattern = "dashed"
|
||||
LineStylePatternDotted LineStylePattern = "dotted"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t LineStylePattern) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t LineStylePattern) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *LineStylePattern) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch LineStylePattern(in.String()) {
|
||||
case LineStylePatternDashed:
|
||||
*t = LineStylePatternDashed
|
||||
case LineStylePatternDotted:
|
||||
*t = LineStylePatternDotted
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown LineStylePattern value"))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *LineStylePattern) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user