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-