headless-browser: Store the viewport size as DevicePixelSize

This will just avoid a bunch of needless conversion to/from IntSize in
and upcoming commit.
This commit is contained in:
Timothy Flynn 2024-11-12 10:36:53 -05:00 committed by Andreas Kling
commit 71ccaeda16
Notes: github-actions[bot] 2024-11-13 10:02:13 +00:00
7 changed files with 13 additions and 14 deletions

View file

@ -72,7 +72,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto theme = TRY(Gfx::load_system_theme(theme_path.string()));
// FIXME: Allow passing the window size as an argument.
static constexpr Gfx::IntSize window_size { 800, 600 };
static constexpr Web::DevicePixelSize window_size { 800, 600 };
if (!app->test_root_path.is_empty()) {
app->test_root_path = LexicalPath::absolute_path(TRY(FileSystem::current_working_directory()), app->test_root_path);