In the GTK+ port there is the following in the API: void webkit_web_view_set_background_color (WebKitWebView *web_view, const GdkRGBA *rgba); but in WPE there is no equivalent function. Having something similar would be handy in certain scenarios, to avoid flashing white frames while content is being loaded. For example: 1. A device boots with a splash screen, which has a dark background. 2. Right after boot, a program using WPE is launched, and starts loading some content. This is designed to have the same background color as the splash screen. 3. The content takes some time to complete loading, and during this time WebKit may render a few frames which are white (or almost completely white), while the styling for the content is not yet available. 4. The Web content finishes loading, and goes back to using the same dark background as the splash screen. This way, step (3.) causes the device screen to produce a white flash, even if the Web content is loaded quite fast.
Created attachment 344945 [details] Patch which hardcodes black as background As an example, this is a patch which changes Color::white to Color::black in a few places to avoid the white flash for a device I am working with at the moment. It could be that there is a better way, but this is working well for me right now. IMHO there is value in providing API for this, I can easily imagine more situations in which setting the background may be useful.
Adri, can close this as duplicate of bug 192305? (I know this is older, but the other one has the fix)
Yep, a dupe indeed. Sorry I've just noticed this bug and didn't reuse it for the bg-color patch :) *** This bug has been marked as a duplicate of bug 192305 ***