fix: BrowserWindow backgroundColor (#30778)
* fix: BrowserWindow backgroundColor * refactor: propagate transparency via backgroundColor
This commit is contained in:
parent
26f981fa3e
commit
7379e5eb36
6 changed files with 27 additions and 22 deletions
|
@ -748,7 +748,7 @@ WebContents::WebContents(v8::Isolate* isolate,
|
|||
}
|
||||
} else if (IsOffScreen()) {
|
||||
bool transparent = false;
|
||||
options.Get("transparent", &transparent);
|
||||
options.Get(options::kTransparent, &transparent);
|
||||
|
||||
content::WebContents::CreateParams params(session->browser_context());
|
||||
auto* view = new OffScreenWebContentsView(
|
||||
|
@ -1373,8 +1373,8 @@ void WebContents::HandleNewRenderFrame(
|
|||
// Set the background color of RenderWidgetHostView.
|
||||
auto* web_preferences = WebContentsPreferences::From(web_contents());
|
||||
if (web_preferences) {
|
||||
std::string color_name;
|
||||
rwhv->SetBackgroundColor(web_preferences->GetBackgroundColor());
|
||||
web_contents()->SetPageBaseBackgroundColor(
|
||||
web_preferences->GetBackgroundColor());
|
||||
}
|
||||
|
||||
if (!background_throttling_)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue