Bug 206953

Summary: [GTK] Wrong web view background color when using dark GTK theme
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: bugs-noreply, cassidy, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
See Also: https://bugs.webkit.org/show_bug.cgi?id=197947
Attachments:
Description Flags
Screenshot demonstrating bug none

Description Michael Catanzaro 2020-01-29 11:21:52 PST
Created attachment 389165 [details]
Screenshot demonstrating bug

Since r255342, we attempt to use only the light GTK theme for rendering in the web process.

However, we fail when displaying the first two of these simple test cases:

https://cassidyjames.com/dark-demo/
https://cassidyjames.com/dark-demo/mixed.html
https://cassidyjames.com/dark-demo/dark.html

Screenshot of the first test page attached. The page background should be light, not dark.
Comment 1 Michael Catanzaro 2020-01-29 14:32:52 PST
It's caused by EphyWebView's style_updated_cb(). Ephy will need to stop setting its own background color.
Comment 2 Michael Catanzaro 2020-01-29 15:06:22 PST
Removing this call from Epiphany reintroduces https://gitlab.gnome.org/GNOME/epiphany/issues/960. We need WebKit to use the UI process background color as its default background color temporarily, just until web content loads, but not longer than that....
Comment 3 Michael Catanzaro 2020-01-30 02:47:55 PST
Workaround: https://gitlab.gnome.org/GNOME/epiphany/merge_requests/559