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

Unified Diff: chrome/browser/ui/views/payments/view_stack.cc

Issue 2579513002: [WebPayments] Factor out sheet-specific logic in Controllers. (Closed)
Patch Set: Address comments. Created 4 years 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
Index: chrome/browser/ui/views/payments/view_stack.cc
diff --git a/chrome/browser/ui/views/payments/view_stack.cc b/chrome/browser/ui/views/payments/view_stack.cc
index 65bbb2d98d6d562375a29244c6bc2500fb9fc2ce..4c07b508e90175276f6efb34f25c1df0afd049b2 100644
--- a/chrome/browser/ui/views/payments/view_stack.cc
+++ b/chrome/browser/ui/views/payments/view_stack.cc
@@ -12,6 +12,11 @@ ViewStack::ViewStack()
SetLayoutManager(new views::FillLayout());
slide_out_animator_->AddObserver(this);
+ // Paint to a layer and Mask to Bounds, otherwise descendant views that paint
+ // to a layer themselves will still paint while they're being animated out and
+ // are out of bounds of their parent.
+ SetPaintToLayer(true);
+ layer()->SetMasksToBounds(true);
}
ViewStack::~ViewStack() {}
@@ -19,6 +24,7 @@ ViewStack::~ViewStack() {}
void ViewStack::Push(std::unique_ptr<views::View> view, bool animate) {
gfx::Rect destination = bounds();
destination.set_origin(gfx::Point(0, 0));
+
if (animate) {
// First add the new view out of bounds since it'll slide in from right to
// left.

Powered by Google App Engine
This is Rietveld 408576698