mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibWeb: Allow (explicitly) converting CSSPixels to float and int
...and remove some unnecessary cast chains.
This commit is contained in:
parent
c20df34b79
commit
5f0d3c083f
11 changed files with 16 additions and 14 deletions
|
@ -1163,7 +1163,7 @@ void Window::scroll(ScrollToOptions const& options)
|
|||
// 1. If invoked with one argument, follow these substeps:
|
||||
|
||||
// 1. Let options be the argument.
|
||||
auto viewport_rect = top_level_browsing_context.viewport_rect().to_type<double>().to_type<float>();
|
||||
auto viewport_rect = top_level_browsing_context.viewport_rect().to_type<float>();
|
||||
|
||||
// 2. Let x be the value of the left dictionary member of options, if present, or the viewport’s current scroll
|
||||
// position on the x axis otherwise.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue