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

Unified Diff: ui/views/controls/menu/menu_scroll_view_container.cc

Issue 1812303002: Added Layer based clipping to MenuScrollViewContainer::MenuScrollView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_scroll_view_container.cc
diff --git a/ui/views/controls/menu/menu_scroll_view_container.cc b/ui/views/controls/menu/menu_scroll_view_container.cc
index 381bef70f6f8147990c13a0c7d0235500fb10d34..5e2b9f28f84d976b6be9bbd5dcfd76e0886094e2 100644
--- a/ui/views/controls/menu/menu_scroll_view_container.cc
+++ b/ui/views/controls/menu/menu_scroll_view_container.cc
@@ -8,6 +8,7 @@
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
#include "ui/accessibility/ax_view_state.h"
+#include "ui/compositor/layer.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
#include "ui/views/border.h"
@@ -135,6 +136,9 @@ class MenuScrollButton : public View {
class MenuScrollViewContainer::MenuScrollView : public View {
public:
explicit MenuScrollView(View* child) {
+ SetPaintToLayer(true);
varkha 2016/03/22 14:30:01 I wonder if this should be an optional behavior tr
bruthig 2016/03/22 21:45:29 I will consider this once I have the other issues
bruthig 2016/04/12 19:09:51 It is not straightforward for the owner of the men
+ layer()->SetMasksToBounds(true);
+ layer()->SetFillsBoundsOpaquely(false);
Evan Stade 2016/03/18 19:07:02 is this correct/necessary?
bruthig 2016/03/18 19:26:43 Yeah it's necessary. Without it the child menu it
Evan Stade 2016/03/18 19:34:40 that seems better as opaquely filling bounds allow
bruthig 2016/03/22 21:45:29 So I've played around with this for 2 days now and
bruthig 2016/04/12 19:09:51 It has turned in to a bit of a rabbit hole trying
AddChildView(child);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698