Merge pull request #11956 from brenca/transparent-window-devtools-fix
Fix transparent windows losing transparency when devtools detaches
This commit is contained in:
commit
f7ec346e9f
1 changed files with 1 additions and 3 deletions
|
@ -167,10 +167,8 @@ void RendererClientBase::RenderViewCreated(content::RenderView* render_view) {
|
||||||
if (cmd->HasSwitch(switches::kGuestInstanceID)) { // webview.
|
if (cmd->HasSwitch(switches::kGuestInstanceID)) { // webview.
|
||||||
web_frame_widget->SetBaseBackgroundColor(SK_ColorTRANSPARENT);
|
web_frame_widget->SetBaseBackgroundColor(SK_ColorTRANSPARENT);
|
||||||
} else { // normal window.
|
} else { // normal window.
|
||||||
// If backgroundColor is specified then use it.
|
|
||||||
std::string name = cmd->GetSwitchValueASCII(switches::kBackgroundColor);
|
std::string name = cmd->GetSwitchValueASCII(switches::kBackgroundColor);
|
||||||
// Otherwise use white background.
|
SkColor color = name.empty() ? SK_ColorTRANSPARENT : ParseHexColor(name);
|
||||||
SkColor color = name.empty() ? SK_ColorWHITE : ParseHexColor(name);
|
|
||||||
web_frame_widget->SetBaseBackgroundColor(color);
|
web_frame_widget->SetBaseBackgroundColor(color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue