feat: support more color formats for backgroundColor
(#31868)
This commit is contained in:
parent
4b8b492b62
commit
db79734bfb
13 changed files with 144 additions and 55 deletions
|
@ -154,11 +154,11 @@ gfx::Rect BrowserView::GetBounds() {
|
|||
}
|
||||
|
||||
void BrowserView::SetBackgroundColor(const std::string& color_name) {
|
||||
view_->SetBackgroundColor(ParseHexColor(color_name));
|
||||
view_->SetBackgroundColor(ParseCSSColor(color_name));
|
||||
|
||||
if (web_contents()) {
|
||||
auto* wc = web_contents()->web_contents();
|
||||
wc->SetPageBaseBackgroundColor(ParseHexColor(color_name));
|
||||
wc->SetPageBaseBackgroundColor(ParseCSSColor(color_name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue