fix: css transparent background being lost (#32593)
This commit is contained in:
parent
86f8faea6b
commit
3768a7b25f
10 changed files with 836 additions and 5 deletions
|
@ -373,8 +373,11 @@ void BrowserWindow::SetBackgroundColor(const std::string& color_name) {
|
|||
SkColor color = ParseHexColor(color_name);
|
||||
web_contents()->SetPageBaseBackgroundColor(color);
|
||||
auto* rwhv = web_contents()->GetRenderWidgetHostView();
|
||||
if (rwhv)
|
||||
if (rwhv) {
|
||||
rwhv->SetBackgroundColor(color);
|
||||
static_cast<content::RenderWidgetHostViewBase*>(rwhv)
|
||||
->SetContentBackgroundColor(color);
|
||||
}
|
||||
// Also update the web preferences object otherwise the view will be reset on
|
||||
// the next load URL call
|
||||
if (api_web_contents_) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue