From 36644310c79b70ece5b5196767aca90d749a2bca Mon Sep 17 00:00:00 2001 From: astar76 Date: Fri, 13 Nov 2026 21:23:00 -0600 Subject: [PATCH] S053: Servo wording out of src, smokes and engine-test; About shows WebKitGTK version --- src/app.rs | 2 +- src/main.rs | 5 +++++ src/net/bridge.rs | 5 ++--- src/net/download.rs | 4 ++-- src/pdf.rs | 2 +- src/perf.rs | 4 ++-- src/store/cookies.rs | 13 ++++++------- src/store/scripts.rs | 2 +- src/store/session.rs | 2 +- src/ui/pages/apps.rs | 2 +- src/ui/pages/misc.rs | 8 ++++---- src/ui/pages/settings.rs | 8 ++++---- src/window.rs | 2 +- tests/smoke/crash-adblock.txt | 5 ++--- tests/smoke/heavy-web.txt | 17 ++++++++--------- tests/smoke/mse-player.txt | 2 +- tests/smoke/mse.txt | 16 ++++++---------- tests/smoke/pages/crash-timers.html | 5 ++--- tests/smoke/pages/fingerprint.html | 2 +- tests/smoke/pages/mse-basic.html | 4 ++-- tests/smoke/pages/mse-clip-audio.js | 2 +- tests/smoke/pages/mse-clip-mp4.js | 2 +- tests/smoke/pages/mse-clip-video.js | 2 +- tests/smoke/pages/mse-clip-webm.js | 2 +- tests/smoke/pages/mse-spec.html | 25 ++----------------------- tests/smoke/privacy-mode.txt | 2 +- tests/smoke/site-doctor.txt | 8 ++++---- tests/smoke/youtube-mse.txt | 2 +- tools/engine-test/run.sh | 15 ++------------- tools/engine-test/servo_script.py | 27 --------------------------- tools/engine-test/sites.txt | 2 +- 31 files changed, 68 insertions(+), 131 deletions(-) delete mode 100755 tools/engine-test/servo_script.py diff --git a/src/app.rs b/src/app.rs index 749300f..c24de39 100644 --- a/src/app.rs +++ b/src/app.rs @@ -896,7 +896,7 @@ impl App { } /// A pop-up opened as a tab next to its opener (WebKit already made its view, related to the opener's). - /// Pop-ups open as tabs next to their opener (as with Servo; a related view keeps `window.opener`). + /// Pop-ups open as tabs next to their opener (a related view keeps `window.opener`). fn on_create_new(&mut self, parent: ViewId, view: View, url: Option) { let found = self.find_webview(parent); let blocked = found.is_some_and(|(w, i)| { diff --git a/src/main.rs b/src/main.rs index bd534e7..6a6c55a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -100,6 +100,11 @@ fn choose_gl(settings: &store::settings::Settings) { } } +/// "WebKitGTK 2.52.1". +pub fn engine_version() -> String { + format!("WebKitGTK {}.{}.{}", webkit::functions::major_version(), webkit::functions::minor_version(), webkit::functions::micro_version()) +} + fn main() { let launch = match parse_args() { Ok(launch) => launch, diff --git a/src/net/bridge.rs b/src/net/bridge.rs index 9c1d581..1a7c637 100644 --- a/src/net/bridge.rs +++ b/src/net/bridge.rs @@ -1,7 +1,6 @@ -//! The bridge: a small proxy on 127.0.0.1 that every connection Servo makes goes through. +//! The bridge: a small proxy on 127.0.0.1 that every connection the engine makes goes through. //! -//! Servo reads its proxy settings once at start and only speaks to HTTP proxies, so it is always -//! pointed here. The bridge decides per connection where the bytes go: +//! The engine's proxy setting is fixed at start, so it is always pointed here. The bridge decides per connection where the bytes go: //! - local addresses (localhost, LAN, .local) always go direct, never through the VPN; //! - VPN on and ready: through its SOCKS5 proxy (names resolved by the proxy, so Tor sees them, //! not the local DNS) or its HTTP proxy; diff --git a/src/net/download.rs b/src/net/download.rs index dfafb73..3c496b9 100644 --- a/src/net/download.rs +++ b/src/net/download.rs @@ -1,4 +1,4 @@ -//! Downloads. Servo 0.7 cannot save files, so Nacre fetches them itself (through the bridge, with +//! Downloads. Nacre fetches files itself (through the bridge, with //! the page's cookies), writes to ".part" and renames when done. Paused and interrupted //! downloads resume with a Range request when the server allows it. @@ -74,7 +74,7 @@ fn extension(url: &Url) -> Option { (!ext.is_empty() && ext.chars().all(|c| c.is_ascii_alphanumeric())).then(|| ext.to_owned()) } -/// Whether Servo can show this content type itself. +/// Whether the engine can show this content type itself. pub fn displayable(content_type: &str) -> bool { let mime = content_type.split(';').next().unwrap_or("").trim().to_ascii_lowercase(); if mime.is_empty() { diff --git a/src/pdf.rs b/src/pdf.rs index d06cb40..116fd50 100644 --- a/src/pdf.rs +++ b/src/pdf.rs @@ -1,4 +1,4 @@ -//! A one-page PDF holding a picture of the page ("Save as PDF"; Servo 0.7 can't print). +//! A one-page PDF holding a picture of the page ("Save as PDF"; WebKit's print dialog isn't used). use std::io::Write; use std::path::Path; diff --git a/src/perf.rs b/src/perf.rs index 47521bc..20551fc 100644 --- a/src/perf.rs +++ b/src/perf.rs @@ -1,7 +1,7 @@ //! Performance: memory use, low-memory mode, energy saver and battery state. //! //! Low-memory mode is on by itself on PCs with about 4 GB of RAM or two CPU threads (setting -//! "Auto"). It lowers Servo's thread and memory limits and makes background tabs rest sooner. +//! "Auto"). It lowers the engine's memory limits and makes background tabs rest sooner. use crate::store::settings::{AutoOnOff, EnergySaver, Settings}; @@ -23,7 +23,7 @@ pub fn system_memory() -> (u64, u64) { } } -/// Memory used by Nacre (one process; Servo runs in it): proportional set size, else resident. +/// Memory used by Nacre (the web processes are separate): proportional set size, else resident. pub fn own_memory() -> u64 { #[cfg(target_os = "linux")] { diff --git a/src/store/cookies.rs b/src/store/cookies.rs index e45c4e7..d357b86 100644 --- a/src/store/cookies.rs +++ b/src/store/cookies.rs @@ -1,12 +1,11 @@ //! Cookies encrypted at rest (R1-19). //! -//! Servo 0.7 keeps its cookie jar as plain JSON (`engine/cookie_jar.json`), which an infostealer copying the profile -//! can replay to take over signed-in sessions. The vendored servo-net hands the jar to Nacre instead -//! (`net::nacre::set_cookie_persistence`); Nacre keeps it in `cookies.bin`, sealed like the vault +//! A plain cookie jar (`engine/cookie_jar.json`) can be replayed by an infostealer copying the profile to take over +//! signed-in sessions. Nacre keeps the jar in `cookies.bin` instead, sealed like the vault //! (XChaCha20-Poly1305) with a 256-bit key held in the OS keyring: Secret Service (GNOME Keyring, KWallet) on Linux, //! Credential Manager on Windows. The file alone is useless without the user's unlocked keyring. //! -//! - Loaded before Servo starts; saved every few seconds when the jar changed, and when Servo exits. +//! - Loaded before the engine starts; saved every few seconds when the jar changed, and when the engine exits. //! - A plain cookie_jar.json from older builds is read once and deleted after the first encrypted save reads back. //! - No keyring: cookies stay in memory for this run only (nothing plain is written); Settings says so. //! - A file that doesn't decrypt (key gone, keyring reset) is moved to `cookies-unreadable-