Commit graph

4 commits

Author SHA1 Message Date
Martin Robinson
0e616e0c5d
api: Flatten and simplify Servo preferences (#34966)
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>
2025-01-14 13:54:06 +00:00
Jonathan Schwender
6a816649d6
Upgrade Rust to 1.82.0 (#34592)
* Fix deprecated PanicInfo alias

Fixes:
```rust
use of deprecated type alias `std::panic::PanicInfo`: use `PanicHookInfo` instead
```

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* build: upgrade rustc to 1.82.0

Tracking issue for the silenced lints:
https://github.com/servo/servo/issues/34591

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2024-12-12 12:00:51 +00:00
Martin Robinson
c9fbe018f1
testing: Trigger a crash more reliably when panicking and hard fail is active (#32947)
Before when handling panics and hard-fail was activated, Servo would
just exit with an error return code. This isn't interpreted as a crash
by the WPT test runner. This change raises a SEGV signal instead, which
means that panics should more reliably be treated as crashes.

This doesn't seem to change any test results, at least any non-flaky
test results. It is necessary for the test in #32782 to work though.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-08-06 17:43:06 +00:00
Jonathan Schwender
ff4cd4af96
Split servoshell into Desktop and common part (#32457)
* 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
2024-06-14 06:26:35 +00:00