Commit graph

10 commits

Author SHA1 Message Date
Kafji
34047f8da8
Allow domain-like as URL location input (#35756)
* Allow domain-like as URL location input

Before this patch, domain with subdomain (e.g. book.servo.org) won't be
treated as URL location.

This patch retifies that by adding Firefox's location bar behavior:

  - book.servo.org is URL location
  - book.servo.org. is URL location
  - .book.servo.org is not URL location

Fixes #35754.

Signed-off-by: Kafji <k@kafji.net>

* Chain location input interpretation attempts

Signed-off-by: Kafji <k@kafji.net>

---------

Signed-off-by: Kafji <k@kafji.net>
2025-03-10 03:24:48 +00:00
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
Mukilan Thiyagarajan
7fcde1f7a3
build: upgrade rustc to 1.81.0 (#34270)
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-12-12 07:26:16 +00:00
Jonathan Schwender
09684a3501
Fix various clippy warnings on OpenHarmony (#34281)
* ohos: Fix more clippy warnings

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

* Remove unnecessary `macro_use`

We can use `use` instead. Removes a warning about
unused macro_use on OpenHarmony.

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

---------

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2024-11-19 05:21:48 +00:00
Jonathan Schwender
4f6283d7fe
ohos/android: Fix some compiler warnings (#34178)
* ohos: Remove unnecessary library links

`ohos-sys` now correctly links all required libraries, so we
don't need to specify them here again.
We still specify `ace_napi.z`, since we use napi via `napi-ohos`, which currently does not add the required link.

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* Disable some unused functions on ohos/android

- get_default_url()
- parse_url_or_filename()
- add_noto_fallback_families

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* ohos: Remove unneeded import

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

---------

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
2024-11-07 19:53:57 +00:00
Jonathan Schwender
7d7574373b
android: Use location_bar_input_to_url instead of re-implementing (#32586)
We can use the same function as the desktop version

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
2024-06-24 15:25:07 +00:00
eri
6c7fe31db1
clippy: fix warnings on modules outside components (#31567) 2024-03-07 23:42:39 +00:00
atbrakhi
bbbdb77a7a
Handle URL without scheme (#30148)
* cleanup and move user input logix into servoshell

* fix fmt

* add more tests

* rename sanitize_url and add location bar test for unix system

* fmt and missing rename

* check for host, fix test-error

* remove println, add condtion for not-none

* fmt

* clean up

* review update

* fix build failure cause by embedder_traits::resources

* add cfg target-os windows

* fmt

* use to_file_path() instead of path()
2023-11-09 16:37:22 +00:00
Delan Azabani
90ad5920e2
[NFC] servoshell: fix rust-analyzer and rustfmt breakage (#30340) 2023-09-12 06:27:10 +00:00
Atbrakhi
3df284cf54
Move user input logic into servoshell (#30238)
* cleanup and move user input logix into servoshell

* fix fmt

* moves test from servoshell file

* move command-line args into servoshell

* remove feature media-gstreamer

* fix fmt

* move user input logic code into lib to make it more testable

* remove opts_matches in fn instead get it from main2

* remove pub and fix import

* add licence in new file

* revert passing Matches, instead pass Option String

* review update, also move sanitize fn to parser file

* fmt fix

* review fix: remove extra line
2023-09-06 11:45:56 +00:00