Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1053)

Unified Diff: ui/views/controls/scroll_view.cc

Issue 2895003002: Fix the white background regression on the Extensions overflow menu. (Closed)
Patch Set: Fix comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/scroll_view.cc
diff --git a/ui/views/controls/scroll_view.cc b/ui/views/controls/scroll_view.cc
index c28b51349a29256aaea3138651c7fd2114859ae9..2cc36ef6942b3e3f2ab61830121db7593dcfbae4 100644
--- a/ui/views/controls/scroll_view.cc
+++ b/ui/views/controls/scroll_view.cc
@@ -747,10 +747,18 @@ void ScrollView::EnableViewPortLayer() {
return;
viewport_layer_enabled_ = true;
- background_color_ = SK_ColorWHITE;
- contents_viewport_->set_background(
- Background::CreateSolidBackground(background_color_));
+
contents_viewport_->SetPaintToLayer();
sky 2017/05/22 16:23:40 Does supplying LAYER_SOLID_COLOR work for your nee
ananta 2017/05/22 19:22:43 Sadly no. The content does not show up.
+
+ if (scroll_with_layers_enabled_) {
+ background_color_ = SK_ColorWHITE;
+ contents_viewport_->set_background(
+ Background::CreateSolidBackground(background_color_));
+ } else {
+ // We may have transparent children who want to blend into the default
+ // background.
+ contents_viewport_->layer()->SetFillsBoundsOpaquely(false);
+ }
contents_viewport_->layer()->SetMasksToBounds(true);
}
« no previous file with comments | « no previous file | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698