Skip to content

Latest commit

 

History

History
157 lines (130 loc) · 8.67 KB

PARITY.md

File metadata and controls

157 lines (130 loc) · 8.67 KB

Parity

What Heion is missing before it behaves like a browser people can use, roughly in the order the gaps hurt. Most of it is embedder work that belongs here rather than in the engine — the delegate methods exist and are simply not implemented yet.

Nothing below is a Servo limitation unless it says so.

Already there

Navigation and history, tabs and workspaces, favicons, page titles, cursors, window.open (as a new tab), clipboard, copy/cut/paste, ⌘Q, and the theme propagated into prefers-color-scheme.

As of 0.3.0, also: alert/confirm/prompt, <select> popups, <input type=color>, <input type=file> through the system open panel, the context menu, input methods, cookies and logins surviving a restart, file:// URLs, page console output to the log, and — in released builds — file downloads and audio and video playback.

Since then: HTTP authentication (request_authentication), page zoom on ⌘+, ⌘- and ⌘0, the address bar following same-document navigation (notify_url_changed, so pushState no longer leaves it stale), media session metadata and playback actions (notify_media_session_event, which is what the player widgets drive), a searchable history, favourites, and a login vault kept in the system keychain.

As of 0.4.2: permission prompts (request_permission), the link target on hover (notify_status_text_changed), beforeunload (request_unload), filling a saved login into a page's form (evaluate_javascript, on ⌘⇧L), web notifications (show_notification, shown in the window and collected behind a bell in the address bar), and a preferences block that turns on IntersectionObserver — without which loading="lazy" images never load at all — the async clipboard, adopted stylesheets, container queries, multi-column layout, variable fonts, the visual viewport, the Permissions API, and WebGL 2 (WebGL 1 still answers for anything that asks for it).

Notifications needed an engine patch of their own, though not the one it looks like: the delegate hook has always been dispatched, but Servo only reached it after fetching a notification's icon, so one carrying no icon was never shown at all. See SERVO.md.

Notifications are shown inside the window rather than handed to the system — that wants a signed bundle and UNUserNotificationCenter on macOS, and an equivalent everywhere else — and their icons, badges and images are dropped.

As of 0.5.0: the whole chrome, on a design study — one material with every number settable, four seams with a transition each, the composed new tab page, five pages for a page that will not load, and a first run. See the changelog. ⌘R is bound, having been advertised in two tooltips and bound nowhere.

Crash handling is done: notify_crashed rewrites the tab into zervo://crashed, carrying the address it was on and the engine's own reason, so a dead content process is a page that says what happened and offers to load it again rather than the last frame it painted, frozen. It is the only failure this engine version reports — there is still no load-failure callback and no certificate hook, which is why the other four pages in src/trouble.rs are reachable by address and nothing else.

Tier 0 is done. What is left is the list below.

Streaming video does not work

Local and progressive <video> plays. YouTube, Netflix, Twitch and most other video sites do not, and report "this browser can't play video". Two engine-side reasons, measured from a page in Heion:

  • MediaSource is undefined. Servo has no Media Source Extensions, and adaptive streaming is built on it. This alone is enough for YouTube to refuse before it tries anything.
  • canPlayType('video/mp4') returns "", so H.264 is advertised as unsupported and sites that feature-detect will not offer it — even though the bundled GStreamer decodes H.264 perfectly well, which is easy to confirm with a local .mp4. WebM/VP9, Ogg/Theora and Vorbis all report probably.

Neither is fixable from the embedder side. navigator.requestMediaKeySystemAccess is also absent, so anything DRM-protected is out regardless.

Tier 1 — expected behaviour, and the API already exists

Each of these is a delegate method or a WebView call away.

  • Fullscreen. notify_fullscreen_state_changed is not implemented, so the fullscreen button on a video player does nothing useful. WebView::exit_fullscreen is there for the way back out.
  • What a permission prompt can actually grant. The prompt itself is wired, but there is nothing behind some of the doors: the engine ships no Geolocation and no getUserMedia IDL, so a page cannot ask for location, camera or microphone in the first place and the prompt will never appear for them. navigator.permissions.query and notifications do reach it. Removing this entry needs engine work, not embedder work.
  • Clearing browsing data. Servo::site_data_manager offers clear_cookies, clear_session_cookies and clear_site_data, and nothing in Settings calls them. Now that cookies persist, there is no way to get rid of them.
  • Dropped files. Dragging a file onto the window should open it.
  • Extensions. Servo has no extension support.
  • screen.availWidth/availHeight report the whole display rather than subtracting the menu bar and Dock.
  • Offering to save a login from a form. There is no embedder hook for a submitted form, so Heion cannot notice you signing in and offer to remember it; logins have to be added by hand in Settings. Filling one is done — ⌘⇧L writes the saved credential into the page through evaluate_javascript — and this entry claimed for a long time that it could not be, which was never true. Note the engine resolves that script against the top-level document only, so a login form inside a cross-origin iframe is out of reach.
  • Protocol handlers (request_protocol_handler) — a delegate method with a default empty body, so embedder work rather than engine work.
  • The page's accessibility tree. notify_accessibility_tree_update is a delegate method and is not implemented, so VoiceOver sees the chrome — which has its own AccessKit tree as of 0.4.0 — and nothing inside the page.
  • Session restore. Pure chrome work, no engine involvement: workspaces and tabs written out and read back at launch.
  • Favicons for history and favourites. They are fetched per live webview and kept in memory, so a saved page has no icon until it is open. A small on-disk icon store would fix both lists at once.

Tier 2 — needs engine work, or is genuinely expensive

  • Find in page. There is no find API on WebView in Servo 0.5.0 at all. This cannot be done from the embedder side and needs engine work first.
  • Pausing and resuming a download. The transfer is an HTTP response being streamed to disk with no way to suspend it and no range-request restart, so the downloads card offers stop and start-again and nothing between. Real pause/resume means teaching the fetch layer about it.
  • Devtools. Console output goes to Heion's log and nowhere the user can see; there is no inspector, network panel or JavaScript console in the browser. Servo has a devtools server and Preferences::devtools_server_enabled starts it, so this is a large piece of embedder work rather than an engine gap — but it is a whole application, which is why it sits down here.
  • Extensions, sync, profiles. Not planned.

Known rough edges

  • Cookies are only written when Servo shuts down cleanly. That is how Servo works: the jar is flushed when the constellation is told to exit, and there is no incremental save and no flush API. A force quit or a crash loses the session.
  • Two dialogs at once. Only the most recent page-initiated control is drawn; anything queued behind it waits. A page cannot reasonably need two answers at once, and stacked modals are worse than a queue.
  • Linux and Windows have never been run. The packages build and install; whether the window opens is unknown. Windows' one known crash is fixed in 0.4.1 and unconfirmed. See the platform table in the README.

A note on where fixes go

Downloads needed an engine patch, and find-in-page needs one. When the gap really is in the engine, contribute it to Servo directly — but note that Servo does not accept AI-generated contributions, and check whether the work is already assigned before starting.

Every build — local and released alike — compiles against a fork carrying the download patch, pinned to a revision by the [patch.crates-io] block in .cargo/config.toml. See SERVO.md for the details.