fix: broken OSR transparent option (#32885)
This commit is contained in:
parent
41b2945ced
commit
08e26175fd
1 changed files with 6 additions and 2 deletions
|
@ -767,8 +767,12 @@ WebContents::WebContents(v8::Isolate* isolate,
|
||||||
#if BUILDFLAG(ENABLE_OSR)
|
#if BUILDFLAG(ENABLE_OSR)
|
||||||
}
|
}
|
||||||
} else if (IsOffScreen()) {
|
} else if (IsOffScreen()) {
|
||||||
bool transparent = false;
|
// webPreferences does not have a transparent option, so if the window needs
|
||||||
options.Get(options::kTransparent, &transparent);
|
// to be transparent, that will be set at electron_api_browser_window.cc#L57
|
||||||
|
// and we then need to pull it back out and check it here.
|
||||||
|
std::string background_color;
|
||||||
|
options.GetHidden(options::kBackgroundColor, &background_color);
|
||||||
|
bool transparent = ParseHexColor(background_color) == SK_ColorTRANSPARENT;
|
||||||
|
|
||||||
content::WebContents::CreateParams params(session->browser_context());
|
content::WebContents::CreateParams params(session->browser_context());
|
||||||
auto* view = new OffScreenWebContentsView(
|
auto* view = new OffScreenWebContentsView(
|
||||||
|
|
Loading…
Reference in a new issue