aboutsummaryrefslogtreecommitdiffstats
path: root/ports/servoshell/desktop/cli.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-1/+1
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* compositing: Move image output and shutdown management out of the compositor ↵Martin Robinson2025-02-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | (#35538) This is a step toward the renderer-per-WebView goal. It moves various details out of `IOCompositor`. - Image output: This is moved to servoshell as now applications can access the image contents of a `WebView` via `RenderingContext::read_to_image`. Most options for this are moved to `ServoShellPreferences` apart from `wait_for_stable_image` as this requires a specific kind of coordination in the `ScriptThread` that is also very expensive. Instead, paint is now simply delayed until a stable image is reached and `WebView::paint()` returns a boolean. Maybe this can be revisited in the future. - Shutdown: Shutdown is now managed by libservo itself. Shutdown state is shared between the compositor and `Servo` instance. In the future, this sharing might be unecessary. - `CompositeTarget` has been removed entirely. This no longer needs to be passed when creating a Servo instance. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Ngo Iok Ui (Wu Yu Wei) <yuweiwu@pm.me>
* Add cli option for tracing-filter (#35370)Jonathan Schwender2025-02-081-1/+2
| | | | | | | | Using environment variables is not really an option on ohos/android, so add a CLI option to configure tracing. Making it a `pref`, so that we can persist the filter might also be desirable. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* servoshell: Move `headless` setting to ServoShellPreferences (#35377)Martin Robinson2025-02-071-1/+1
| | | | | | | | | | This is only used in servoshell, even though it was plumbed through script previously. It's just about how the `RenderingContext` is set up, which is something managed entirely outside of servo itself. In addition, make the name of `servo_shell_preferences` in `app.rs` more consistent with the rest of the codebase. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* servoshell: Port desktop servoshell to use delegate API (#35284)Martin Robinson2025-02-061-3/+4
| | | | | Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* api: Flatten and simplify Servo preferences (#34966)Martin Robinson2025-01-141-90/+11
| | | | | | | | | | | | | | | | | | | Flatten and simplify Servo's preferences code. In addition, have both preferences and options passed in as arguments to `Servo::new()` and make sure not to use the globally set preferences in `servoshell` (as much as possible now). Instead of a complex procedural macro to generate preferences, just expose a very simple derive macro that adds string based getters and setters. - All command-line parsing is moved to servoshell. - There is no longer the concept of a missing preference. - Preferences no longer have to be part of the resources bundle because they now have reasonable default values. - servoshell specific preferences are no longer part of the preferences exposed by the Servo API. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Update all network-related dependencies to the latest versions (#34630)Josh Matthews2025-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update all network-related dependencies to the latest versions: * rustls * hyper * http * headers * tungstenite * async-tungstenite Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Fix panics with 1xx responses in WPT tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Use reported response length when calculating available ranges. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Remove unreachable match arm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Clean up commented fragments in blob and file handlers. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Remove unreachable match arm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Fix clippy warning. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Cleanup. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Fix up unit tests for dependency upgrades. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Update aws-lc-sys to fix Windows builds. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Use ring instead of aws-lc-sys. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * embedding: Require embedder to initialize a rustls CryptoProvider. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Disable aws-lc-rs pending OhOS build fixes. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* chore: remove `WindowMethods::rendering_context` (#34780)Ngo Iok Ui (Wu Yu Wei)2025-01-011-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create Servo without initial webview ID Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Add rendering context in App struct Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Make webview manager optional Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Move window creation to init Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Create window from external rendering context Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Resize surface in compositor Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Obey clippy Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Update Android and OHOS Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Add missing arguent on OHOS Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Show webview after focused on Android and OH Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Remove rendering_context in ServoWindowCallbacks Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Create surface before swapchain in headless mode Signed-off-by: Wu Yuwei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yuwei <yuweiwu@pm.me>
* fix(wayland): segfault because of double free surfaces (#34752)Ngo Iok Ui (Wu Yu Wei)2024-12-241-4/+24
| | | | | | | | | | | | | | | | | * Fix segfault because of double free surfaces Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Add warn log if glvideo is enabled on headless Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Add FIXME comment Signed-off-by: Wu Yuwei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yuwei <yuweiwu@pm.me>
* chore: remove deprecated winit method (#34638)Ngo Iok Ui (Wu Yu Wei)2024-12-191-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add ApplicationHandler stub Signed-off-by: Wu Wayne <yuweiwu@pm.me> * Implement ApplicationHandler Signed-off-by: Wu Wayne <yuweiwu@pm.me> * Abstract common methods Signed-off-by: Wu Wayne <yuweiwu@pm.me> * Impliment headless mode Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Apply suggestions Signed-off-by: Wu Yuwei <yuweiwu@pm.me> --------- Signed-off-by: Wu Wayne <yuweiwu@pm.me> Signed-off-by: Wu Yuwei <yuweiwu@pm.me>
* Make tracing available on all platforms, with or without perfetto (#33301)Delan Azabani2024-09-041-30/+1
| | | | | | | | | | | | | * Make tracing available on all platforms Signed-off-by: Delan Azabani <dazabani@igalia.com> * Gate perfetto support behind its own feature Signed-off-by: Delan Azabani <dazabani@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Add initial support for tracing and tracing-perfetto (#33188)atbrakhi2024-09-041-0/+29
| | | | Signed-off-by: atbrakhi <atbrakhi@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com>
* Allow prefs to be overridden from a file and set WPT-specific prefs from ↵Daniel Adams2024-08-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file (#33163) * Allow prefs to be passed in from a separate file Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add wpt-prefs.json for setting WPT-specific prefs Signed-off-by: Daniel Adams <msub2official@gmail.com> * fix argument to read_prefs_file Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update test_parse_pref test Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add line in executorservo.py to read from wpt-prefs.json Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update MANIFEST.json Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Disable dom.webxr.test for interfaces test Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Split servoshell into Desktop and common part (#32457)Jonathan Schwender2024-06-141-0/+104
* servoshell: Move desktop files Move files related to winit into a desktop module. This is a preparation to merge the android and ohos apps into servoshell. * servoshell: Format imports * servoshell: Move panic hook into separate file * servoshell: Move desktop main * Consider ohos as not desktop * servoshell: Adjust dependencies for shared code * servoshell: Remove native-bluetooth from default features There currently is no good way to have target specific default features. * Rename desktop_main.rs to cli.rs * Remove todo