Setting the background color for OSR doesn't work as expected

Issue #2369 resolved
Callum Linden created an issue

CEF 3239.1723.g071d1c1_windows64

My understanding is that in an OSR application, to set the background color you see before a page is loaded or when pages that do not specify a background color load, you set the color in CefSettings::background_color (ARGB) and pass that structure to CefInitialize().

In my test application, I tried passing 0xff0000ff (blue with full opacity) to the background_color setting and then rendering a page with no background color set like this:

<html>
<head>
<style>
body {
    color: #00ff00
}
</style>
</head>
<body>
<h1>This is a page with no background information at all and should take on the background color set by CEF</h1>
</body>
</html>

I expected to see a blue colored background before the page loaded and then blue one it had loaded. Instead I see a white background.

I also tried changing the CefSetting background_color for the cefclient test application, running it with the --off-screen-rendering-enabled and got the same result.

Comments (6)

  1. Callum Linden reporter

    Thank you - once that build appears on the Spotify builds page, I'll grab it and confirm.

  2. Log in to comment