NEW287514
WebkitGTK: About blank is white when dark theme is active
https://bugs.webkit.org/show_bug.cgi?id=287514
Summary WebkitGTK: About blank is white when dark theme is active
Caden Mitchell
Reported 2025-02-11 14:52:34 PST
Created attachment 474210 [details] Screenshot of About: blank in Epiphany not conforming to the dark theme # Description When the user has a dark theme applied, the blank page will still appear white. This means that every time a page is loaded/reloaded, there will be a white flash. This is unpleasant and could be unsafe for people with epilepsy (photosensitive seizures). It also breaks the UI in browsers like GNOME Web (Epiphany) which can use a blank page as the new tab page. It means the entire UI has a dark theme except the new tab page. Most UI toolkits and websites support dark themes so naturally, a basic feature like about: blank needs to support it as well as it is used as a fallback in several places. # Proposal Please either 1. Add a hard-coded dark value and show it when WebKitGTK detects a dark theme user preference or, 2. Add an API for the browser developer to specify a light and dark color for About: blank and toggle based on user preference. I think the former would be a good temporary and immediate solution. The latter would be more useful and elegant. Consider that different browsers may use different UI toolkits and they may have different light/dark theme base colors. This would let them match it to those base colors. Also, user themes still exists and the browser could re-color the background based on user themes which would be a plus for those users.
Attachments
Screenshot of About: blank in Epiphany not conforming to the dark theme (90.80 KB, image/png)
2025-02-11 14:52 PST, Caden Mitchell
no flags
Video showing the problem with Incognito Window (161.63 KB, video/mp4)
2025-05-19 17:33 PDT, Jeff Fortin
no flags
Jeff Fortin
Comment 1 2025-05-19 17:33:05 PDT
Created attachment 475310 [details] Video showing the problem with Incognito Window As can be seen in this demonstration video, this not only affects blank new tabs, but also newly created "Incognito" private browsing windows, which inherit the dark theme background but briefly show a flash of white background of the blank tab before that incognito window's styled explanation page shows up with the correct dark background.
Jeff Fortin
Comment 2 2025-05-19 17:40:15 PDT
Is the WebKit blank tab a regular HTML page, or some sort of special widget? If it's a HTML page, then you might be able to fix it in a similar way to how Mozilla did it for Firefox in https://bugzilla.mozilla.org/show_bug.cgi?id=1798802#c7 Specifically, this one-liner diff: https://hg-edge.mozilla.org/mozilla-central/rev/510fd2811bcd
Jeff Fortin
Comment 3 2025-05-19 17:45:38 PDT
Also, somone with elevated privileges here should probably mark bug #267208 as potentially related, if the blank pages are considered local files by WebKit...
rui.nibau
Comment 4 2025-12-21 03:15:11 PST
Problem seems to come from the css rules in the web page loaded as the blank page : `color-scheme` rule is set on the `<body>` element ; it should be set in the root element (`<html>`).
Note You need to log in before you can comment on or make changes to this bug.