fix: BrowserView setBackgroundColor needs two calls (#31863)
This commit is contained in:
parent
38d2ec0cb6
commit
239ba7d905
1 changed files with 5 additions and 4 deletions
|
@ -155,12 +155,13 @@ gfx::Rect BrowserView::GetBounds() {
|
|||
}
|
||||
|
||||
void BrowserView::SetBackgroundColor(const std::string& color_name) {
|
||||
if (!web_contents())
|
||||
return;
|
||||
view_->SetBackgroundColor(ParseHexColor(color_name));
|
||||
|
||||
if (web_contents()) {
|
||||
auto* wc = web_contents()->web_contents();
|
||||
wc->SetPageBaseBackgroundColor(ParseHexColor(color_name));
|
||||
}
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> BrowserView::GetWebContents(v8::Isolate* isolate) {
|
||||
if (web_contents_.IsEmpty()) {
|
||||
|
|
Loading…
Reference in a new issue