servoshell: Move initial_window_size and screen_size_override into ServoShellPreferences from Opts (#35407)

These settings just configure `servoshell` so should be in
`ServoShellPreferences` instead.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-02-10 21:48:48 +01:00 committed by GitHub
parent bea7a969f4
commit 118a813dba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 32 additions and 42 deletions

View file

@ -9,9 +9,7 @@ use std::default::Default;
use std::path::PathBuf;
use std::sync::{LazyLock, RwLock, RwLockReadGuard};
use euclid::Size2D;
use serde::{Deserialize, Serialize};
use servo_geometry::DeviceIndependentPixel;
use servo_url::ServoUrl;
/// Global flags for Servo, currently set on the command line.
@ -59,13 +57,6 @@ pub struct Opts {
/// remote WebDriver commands.
pub webdriver_port: Option<u16>,
/// The initial requested size of the window.
pub initial_window_size: Size2D<u32, DeviceIndependentPixel>,
/// An override for the screen resolution. This is useful for testing behavior on different screen sizes,
/// such as the screen of a mobile device.
pub screen_size_override: Option<Size2D<u32, DeviceIndependentPixel>>,
/// Whether we're running in multiprocess mode.
pub multiprocess: bool,
@ -213,8 +204,6 @@ impl Default for Opts {
output_file: None,
hard_fail: true,
webdriver_port: None,
initial_window_size: Size2D::new(1024, 740),
screen_size_override: None,
multiprocess: false,
background_hang_monitor: false,
random_pipeline_closure_probability: None,