mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix missing user-agent from servo-shell (#36859)
Properly passes user-agent from servoshell args to the preferences. Testing: ```bash RUST_LOG=warn WAYLAND_DISPLAY='' ./mach run -r --screen-size=375x812 --window-size=375x812 --pref=dom_svg_enabled --pref=dom_intersection_observer_enabled --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1" RUST_LOG=warn WAYLAND_DISPLAY='' ./mach run -r --screen-size=375x812 --window-size=375x812 --pref=dom_svg_enabled --pref=dom_intersection_observer_enabled ``` Fixes: N/A --------- Signed-off-by: Astraea Quinn Skoutelli <astraea.quinn.skoutelli@huawei.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
2fa96cf961
commit
a77ee1521a
1 changed files with 4 additions and 0 deletions
|
@ -653,6 +653,10 @@ pub(crate) fn parse_command_line_arguments(args: Vec<String>) -> ArgumentParsing
|
|||
preferences.media_glvideo_enabled = false;
|
||||
}
|
||||
|
||||
if let Some(user_agent) = opt_match.opt_str("user-agent") {
|
||||
preferences.user_agent = user_agent;
|
||||
}
|
||||
|
||||
let opts = Opts {
|
||||
debug: debug_options.clone(),
|
||||
wait_for_stable_image,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue