mirror of
https://github.com/MontFerret/ferret.git
synced 2025-03-19 21:28:32 +02:00
Fixed use of deprecated CDP API methods (#637)
This commit is contained in:
parent
1d64cb5da7
commit
53bcfc92d4
@ -78,8 +78,8 @@ func getClickablePoint(ctx context.Context, client *cdp.Client, qargs *dom.GetCo
|
||||
return Quad{}, err
|
||||
}
|
||||
|
||||
clientWidth := layoutMetricsReply.LayoutViewport.ClientWidth
|
||||
clientHeight := layoutMetricsReply.LayoutViewport.ClientHeight
|
||||
clientWidth := layoutMetricsReply.CSSLayoutViewport.ClientWidth
|
||||
clientHeight := layoutMetricsReply.CSSLayoutViewport.ClientHeight
|
||||
|
||||
quads := make([][]Quad, 0, len(contentQuadsReply.Quads))
|
||||
|
||||
|
@ -478,11 +478,11 @@ func (p *HTMLPage) CaptureScreenshot(ctx context.Context, params drivers.Screens
|
||||
}
|
||||
|
||||
if params.Width <= 0 {
|
||||
params.Width = values.Float(metrics.LayoutViewport.ClientWidth) - params.X
|
||||
params.Width = values.Float(metrics.CSSLayoutViewport.ClientWidth) - params.X
|
||||
}
|
||||
|
||||
if params.Height <= 0 {
|
||||
params.Height = values.Float(metrics.LayoutViewport.ClientHeight) - params.Y
|
||||
params.Height = values.Float(metrics.CSSLayoutViewport.ClientHeight) - params.Y
|
||||
}
|
||||
|
||||
clip := page.Viewport{
|
||||
|
Loading…
x
Reference in New Issue
Block a user