Skip to content

Commit 21b1886

Browse files
committed
Write about more API changes (and triage 2 commits)
1 parent 56f2345 commit 21b1886

File tree

3 files changed

+35
-18
lines changed

3 files changed

+35
-18
lines changed

_posts/2026-01-19-december-in-servo.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,21 @@ We now use the **system root certificates** by default (@Narfinger, @mrobinson,
2727
If you don’t want to trust the system root certificates, you can instead continue to use Mozilla’s root certificates with `--pref network_use_webpki_roots`.
2828
As always, you can also add your own root certificates via [`Opts`](https://doc.servo.org/servo/opts/struct.Opts.html)::[`certificate_path`](https://doc.servo.org/servo/opts/struct.Opts.html#structfield.certificate_path) (`--certificate-path=`).
2929

30+
We have a new [`SiteDataManager`](???) API for managing **localStorage**, **sessionStorage**, and **cookies** (@janvarga, #41236, #41255, #41378, #41523, #41528), and a new [`NetworkManager`](???) API for managing the **cache** (@janvarga, @mrobinson, #41255, #41474, #41386).
31+
To clear the cache, call [`NetworkManager`](???)::[`clear_cache`](???), and to list cache entries, call [`NetworkManager`](???)::[`cache_entries`](???).
32+
33+
[**Simple dialogs**](https://html.spec.whatwg.org/multipage/#simple-dialogs) – that is alert(), confirm(), and prompt() – are now exposed to embedders via a new [`SimpleDialog`](https://doc.servo.org/servo/enum.SimpleDialog.html) type in [`EmbedderControl`](https://doc.servo.org/servo/webview_delegate/enum.EmbedderControl.html) (@mrobinson, @mukilan, #40982).
34+
This new interface is harder to misuse, and no longer requires boilerplate for embedders that wish to [ignore simple dialogs](https://html.spec.whatwg.org/multipage/#cannot-show-simple-dialogs).
35+
36+
**Web console messages**, including messages from the [Console API](https://developer.mozilla.org/en-US/docs/Web/API/Console_API), are now accessible via [`ServoDelegate`](https://doc.servo.org/servo/trait.ServoDelegate.html)::[`show_console_message`](https://doc.servo.org/servo/trait.ServoDelegate.html#method.show_console_message) and [`WebViewDelegate`](https://doc.servo.org/servo/trait.WebViewDelegate.html)::[`show_console_message`](https://doc.servo.org/servo/trait.WebViewDelegate.html#method.show_console_message) (@atbrakhi, #41351).
37+
3038
[`Servo`](https://doc.servo.org/servo/struct.Servo.html), the main handle for controlling Servo, is now cloneable for sharing within the same thread (@mukilan, @mrobinson, #41010).
39+
To shut down Servo, simply [drop](https://doc.rust-lang.org/std/mem/fn.drop.html) the last `Servo` handle or let it go out of scope.
40+
`Servo`::`start_shutting_down` and `Servo`::`deinit` have been removed (@mukilan, @mrobinson, #41012).
3141

3242
Several interfaces have also been renamed:
3343

44+
- [`Servo`](https://doc.servo.org/servo/struct.Servo.html)::`clear_cookies` is now [`SiteDataManager`](???)::[`clear_cookies`](???) (@janvarga, #41236, #41255)
3445
- `DebugOpts`::`disable_share_style_cache` is now [`Preferences`](https://doc.servo.org/servo/prefs/struct.Preferences.html)::[`layout_style_sharing_cache_enabled`](https://doc.servo.org/servo/prefs/struct.Preferences.html#structfield.layout_style_sharing_cache_enabled) (@atbrakhi, #40959)
3546
- The rest of `DebugOpts` has been moved to [`DiagnosticsLogging`](https://doc.servo.org/servo/opts/struct.DiagnosticsLogging.html), and the options have been renamed (@atbrakhi, #40960)
3647

commits.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ https://github.com/servo/servo/pull/40902 (@Loirooriol, @mrobinson, #40902) scri
654654
# caret or selections get correctly updated.
655655
# Testing: Manually tested that #38989 is not regressing
656656
+https://github.com/servo/servo/pull/40982 (@mrobinson, @mukilan, #40982) libservo: Finish the `SimpleDialog` API (#40982)
657-
api; new SimpleDialog / AlertDialog / ConfirmDialog / PromptDialog interface, harder to misuse and reduces boilerplate for embedders that want to ignore dialogs
657+
;api; new SimpleDialog / AlertDialog / ConfirmDialog / PromptDialog interface, harder to misuse and reduces boilerplate for embedders that want to ignore dialogs
658658
# Finish exposing the `SimpleDialog` API in libservo, abstracting away the
659659
# response senders into structures with methods. In addition, add a
660660
# default behavior so that embedders do not have to explicitly send a
@@ -922,7 +922,7 @@ https://github.com/servo/servo/pull/41032 (@Narfinger, #41032) Documentation: Ad
922922
# messages.
923923
# Testing: No behavioral change. Existing tests suffice.
924924
+https://github.com/servo/servo/pull/41012 (@mukilan, @mrobinson, #41012) libservo: Trigger shutdown internally from `Servo`'s `Drop` impl (#41012)
925-
api; Servo::start_shutting_down() and deinit() removed in favour of Drop the last handle
925+
;api; Servo::start_shutting_down() and deinit() removed in favour of Drop the last handle
926926
# Remove the public API to trigger shutdown and instead trigger the process from `Servo`'s implementation of `Drop`
927927
# trait.
928928
# This makes it hard to create issues involving the order of destruction of `Servo` and `WebView`s. It will also
@@ -2463,7 +2463,8 @@ https://github.com/servo/servo/pull/41257 (@mrobinson, #41257) mach: Allow updat
24632463
# logging in via the web interface, doing this via the API requires an
24642464
# access token.
24652465
# Testing: This change adds a unit test for the regex that matches GitHub Action URLs.
2466-
https://github.com/servo/servo/pull/41236 (@janvarga, #41236) libservo: Introduce `CookieManager` for embedders (#41236)
2466+
+https://github.com/servo/servo/pull/41236 (@janvarga, #41236) libservo: Introduce `CookieManager` for embedders (#41236)
2467+
;api; basis of #41255
24672468
# This PR introduces an initial CookieManager abstraction intended primarily
24682469
# for embedders to inspect and manage cookies.
24692470
# At this stage, only clearing all cookies is supported. Additional
@@ -2780,7 +2781,7 @@ https://github.com/servo/servo/pull/41314 (@mrobinson, #41314) servoshell: Do no
27802781
# approach has never been adopted. We fall back to longer implicit wait time now.
27812782
# Testing: https://github.com/servo/servo/actions/runs/20264413218
27822783
+https://github.com/servo/servo/pull/41255 (@janvarga, #41255) libservo: Introduce `SiteDataManager` and `NetworkManager` (#41255)
2783-
api; new SiteDataManager allowing clearing cache and cookies; old CookieManager renamed to NetworkManager
2784+
;api; new SiteDataManager allowing clearing cache and cookies; old CookieManager renamed to NetworkManager
27842785
# This PR introduces an initial `SiteDataManager` abstraction intended
27852786
# primarily for embedders to inspect and manage site data.
27862787
# At this stage, `SiteDataManager` supports clearing network cache and
@@ -3157,7 +3158,7 @@ https://github.com/servo/servo/pull/41014 (@Taym95, #41014) IndexedDB: Handle er
31573158
# Fixes: #17635.
31583159
# Fixes: #14941.
31593160
+https://github.com/servo/servo/pull/41351 (@atbrakhi, #41351) Add `ServoDelegate` and `WebViewDelegate` methods for Console API (#41351)
3160-
api; new show_console_message() method in both ServoDelegate and WebViewDelegate
3161+
;api; new show_console_message() method in both ServoDelegate and WebViewDelegate
31613162
# Route console messages through the embedding API instead of printing directly, giving embedders control over
31623163
# console output handling.
31633164
# Testing: Should be covered by exsisting tests
@@ -3568,7 +3569,7 @@ https://github.com/servo/servo/pull/41401 (@yezhizhen, #41401) servoshell: Prope
35683569
# 3. `cargo build -p servoshell --features "gamepad,webxr,..."` (Gamepad & WebXR Enabled)
35693570
# Fixes: #40897
35703571
+https://github.com/servo/servo/pull/41378 (@janvarga, #41378) libservo: Add initial `SiteDataManager::site_data` API (#41378)
3571-
api; new SiteDataManager API for listing sites that are storing data
3572+
;api; new SiteDataManager API for listing sites that are storing data
35723573
# This PR adds an initial `site_data` API to `SiteDataManager`, allowing
35733574
# embedders to obtain a unified list of sites that have associated site data.
35743575
# The implementation introduces supporting infrastructure across storage and
@@ -3603,7 +3604,8 @@ https://github.com/servo/servo/pull/41441 (@yezhizhen, #41441) wpt: Disable prox
36033604
https://github.com/servo/servo/pull/41486 (@leo030303, #41486) LocalStorage: Add table initialisation for in memory databases (#41486)
36043605
# Fixes #41485
36053606
# Added a unit test.
3606-
https://github.com/servo/servo/pull/41474 (@janvarga, #41474) libservo: Move network cache management to `NetworkManager` (#41474)
3607+
+https://github.com/servo/servo/pull/41474 (@janvarga, #41474) libservo: Move network cache management to `NetworkManager` (#41474)
3608+
;api; NetworkManager::clear_cache (initially added in #41255)
36073609
# This PR moves network cache management out of `SiteDataManager` and into
36083610
# `NetworkManager`, aligning the API with how browser engines conceptually
36093611
# separate network layer state from site scoped data.
@@ -4029,7 +4031,7 @@ https://github.com/servo/servo/pull/41519 (@sagudev, #41519) script: Use more wr
40294031
# Instead of storing the sizes of the start and end floats separately, we can just use a `LogicalSides1D`.
40304032
# Testing: Not needed, no behavior change
40314033
+https://github.com/servo/servo/pull/41523 (@janvarga, #41523) libservo: Group site data entries by eTLD+1 and simplify related tests (#41523)
4032-
api; SiteDataManager (localStorage, sessionStorage, etc) now groups data by eTLD+1 (public suffix list), not just origin.
4034+
;api; SiteDataManager (localStorage, sessionStorage, etc) now groups data by eTLD+1 (public suffix list), not just origin.
40334035
# This PR updates `SiteDataManager::site_data` to group entries by eTLD+1
40344036
# instead of origin, matching how site data is typically presented in browser
40354037
# UI and aligning the API with user expectations.
@@ -4070,7 +4072,7 @@ https://github.com/servo/servo/pull/41540 (@jschwe, #41540) servoshell: ohos: Mo
40704072
# across multiple algorithms.
40714073
# Testing: Refactoring. Existing tests suffice.
40724074
+https://github.com/servo/servo/pull/41528 (@janvarga, #41528) libservo: Extend `SiteDataManager::site_data` to include cookie sites (#41528)
4073-
api; SiteDataManager now exposes cookies, not just localStorage and sessionStorage. are supercookies blocked yet?
4075+
;api; SiteDataManager now exposes cookies, not just localStorage and sessionStorage. are supercookies blocked yet?
40744076
# Extend `SiteDataManager::site_data` to include sites that have cookies
40754077
# stored by the networking layer.
40764078
# This aligns cookie handling with the grouping model already used for
@@ -4283,7 +4285,7 @@ https://github.com/servo/servo/pull/41520 (@sagudev, #41520) script: Support new
42834285
# still spawned, see [mach try ohos, with failing build step](https://github.com/servo/servo/actions/runs/20556664058)
42844286
# and [upstream issue](https://github.com/actions/toolkit/issues/581)
42854287
+https://github.com/servo/servo/pull/41386 (@janvarga, @mrobinson, #41386) libservo: Add initial `NetworkManager::cache_entries` API (#41386)
4286-
api; NetworkManager method for listing entries in HTTP cache
4288+
;api; NetworkManager method for listing entries in HTTP cache
42874289
# Add initial support in `NetworkManager` for listing entries currently stored
42884290
# in the HTTP cache. Each returned entry is identified by its cache key (URL).
42894291
# The necessary support has been added to the net crate to expose cache entry

outline.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
api; see SERVO_DIAGNOSTICS patch
88
- DONE https://github.com/servo/servo/pull/41010 (@mukilan, @mrobinson, #41010) libservo: Make `Servo` an opaque cloneable handle (#41010)
99
api; `Servo` is now cloneable to share within a thread
10-
- https://github.com/servo/servo/pull/40982 (@mrobinson, @mukilan, #40982) libservo: Finish the `SimpleDialog` API (#40982)
10+
- DONE https://github.com/servo/servo/pull/40982 (@mrobinson, @mukilan, #40982) libservo: Finish the `SimpleDialog` API (#40982)
1111
api; new SimpleDialog / AlertDialog / ConfirmDialog / PromptDialog interface, harder to misuse and reduces boilerplate for embedders that want to ignore dialogs
12-
- https://github.com/servo/servo/pull/41012 (@mukilan, @mrobinson, #41012) libservo: Trigger shutdown internally from `Servo`'s `Drop` impl (#41012)
12+
- DONE https://github.com/servo/servo/pull/41012 (@mukilan, @mrobinson, #41012) libservo: Trigger shutdown internally from `Servo`'s `Drop` impl (#41012)
1313
api; Servo::start_shutting_down() and deinit() removed in favour of Drop the last handle
1414
- DONE https://github.com/servo/servo/pull/41013 (@atbrakhi, #41013) config: Add `SERVO_DIAGNOSTICS` environment variable for diagnostic options (#41013)
1515
api; see SERVO_DIAGNOSTICS patch
@@ -19,19 +19,23 @@
1919
api; see other root certs change
2020
- DONE https://github.com/servo/servo/pull/41209 (@Narfinger, #41209) config: Set the default value of the `network_http_proxy_uri` setting via the `http_proxy` variable (#41209)
2121
api; respect `http_proxy` environment variable
22+
- DONE https://github.com/servo/servo/pull/41236 (@janvarga, #41236) libservo: Introduce `CookieManager` for embedders (#41236)
23+
api; basis of #41255
2224
- DONE https://github.com/servo/servo/pull/41268 (@treeshateorcs, @yezhizhen, #41268) prefs: Handle uppercase HTTP_PROXY variable (#41268)
2325
api; respect `HTTP_PROXY` environment variable
24-
- https://github.com/servo/servo/pull/41255 (@janvarga, #41255) libservo: Introduce `SiteDataManager` and `NetworkManager` (#41255)
26+
- DONE https://github.com/servo/servo/pull/41255 (@janvarga, #41255) libservo: Introduce `SiteDataManager` and `NetworkManager` (#41255)
2527
api; new SiteDataManager allowing clearing cache and cookies; old CookieManager renamed to NetworkManager
26-
- https://github.com/servo/servo/pull/41351 (@atbrakhi, #41351) Add `ServoDelegate` and `WebViewDelegate` methods for Console API (#41351)
28+
- DONE https://github.com/servo/servo/pull/41351 (@atbrakhi, #41351) Add `ServoDelegate` and `WebViewDelegate` methods for Console API (#41351)
2729
api; new show_console_message() method in both ServoDelegate and WebViewDelegate
28-
- https://github.com/servo/servo/pull/41378 (@janvarga, #41378) libservo: Add initial `SiteDataManager::site_data` API (#41378)
30+
- DONE https://github.com/servo/servo/pull/41378 (@janvarga, #41378) libservo: Add initial `SiteDataManager::site_data` API (#41378)
2931
api; new SiteDataManager API for listing sites that are storing data
30-
- https://github.com/servo/servo/pull/41523 (@janvarga, #41523) libservo: Group site data entries by eTLD+1 and simplify related tests (#41523)
32+
- DONE https://github.com/servo/servo/pull/41474 (@janvarga, #41474) libservo: Move network cache management to `NetworkManager` (#41474)
33+
api; NetworkManager::clear_cache (initially added in #41255)
34+
- DONE https://github.com/servo/servo/pull/41523 (@janvarga, #41523) libservo: Group site data entries by eTLD+1 and simplify related tests (#41523)
3135
api; SiteDataManager (localStorage, sessionStorage, etc) now groups data by eTLD+1 (public suffix list), not just origin.
32-
- https://github.com/servo/servo/pull/41528 (@janvarga, #41528) libservo: Extend `SiteDataManager::site_data` to include cookie sites (#41528)
36+
- DONE https://github.com/servo/servo/pull/41528 (@janvarga, #41528) libservo: Extend `SiteDataManager::site_data` to include cookie sites (#41528)
3337
api; SiteDataManager now exposes cookies, not just localStorage and sessionStorage. are supercookies blocked yet?
34-
- https://github.com/servo/servo/pull/41386 (@janvarga, @mrobinson, #41386) libservo: Add initial `NetworkManager::cache_entries` API (#41386)
38+
- DONE https://github.com/servo/servo/pull/41386 (@janvarga, @mrobinson, #41386) libservo: Add initial `NetworkManager::cache_entries` API (#41386)
3539
api; NetworkManager method for listing entries in HTTP cache
3640
- crash
3741
- https://github.com/servo/servo/pull/40743 (@mrobinson, #40743) script: Make a Layout-safe version of `Element::each_custom_state` (#40743)

0 commit comments

Comments
 (0)