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

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

Issue 2433733002: Revert "Reusing Ok/Cancel buttons for intent picker" (Closed)
Patch Set: Created 4 years, 2 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 | « ui/views/controls/scroll_view.h ('k') | no next file » | 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 58fa126eef183ec28cd56d4df166419611c4366f..a358128a5a8d73940bde2ebf762cc8c0d123dab6 100644
--- a/ui/views/controls/scroll_view.cc
+++ b/ui/views/controls/scroll_view.cc
@@ -183,7 +183,12 @@ ScrollView::ScrollView()
if (!base::FeatureList::IsEnabled(kToolkitViewsScrollWithLayers))
return;
- EnableViewPortLayer();
+
+ background_color_ = SK_ColorWHITE;
+ contents_viewport_->set_background(
+ Background::CreateSolidBackground(background_color_));
+ contents_viewport_->SetPaintToLayer(true);
+ contents_viewport_->layer()->SetMasksToBounds(true);
}
ScrollView::~ScrollView() {
@@ -694,14 +699,6 @@ bool ScrollView::ScrollsWithLayers() const {
return contents_viewport_->layer() != nullptr;
}
-void ScrollView::EnableViewPortLayer() {
- background_color_ = SK_ColorWHITE;
- contents_viewport_->set_background(
- Background::CreateSolidBackground(background_color_));
- contents_viewport_->SetPaintToLayer(true);
- contents_viewport_->layer()->SetMasksToBounds(true);
-}
-
void ScrollView::OnLayerScrolled() {
UpdateScrollBarPositions();
ScrollHeader();
« no previous file with comments | « ui/views/controls/scroll_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698