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

Unified Diff: ui/views/window/non_client_view.cc

Issue 1773393002: Address some bubble clipping issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no aa 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 | « ui/views/window/non_client_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/window/non_client_view.cc
diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc
index 0718c2c2aee36ef114ade8027bdb79dd39374875..a6d38a24f4c255282b11977e03fe1a37ac80bf30 100644
--- a/ui/views/window/non_client_view.cc
+++ b/ui/views/window/non_client_view.cc
@@ -31,6 +31,14 @@ static const int kClientViewIndex = 1;
// The overlay view is always on top (index == child_count() - 1).
////////////////////////////////////////////////////////////////////////////////
+// NonClientFrameView, default implementations:
+
+bool NonClientFrameView::GetClientMask(const gfx::Size& size,
+ gfx::Path* mask) const {
+ return false;
+}
+
+////////////////////////////////////////////////////////////////////////////////
// NonClientView, public:
NonClientView::NonClientView()
@@ -159,6 +167,10 @@ void NonClientView::Layout() {
// Then layout the ClientView, using those bounds.
client_view_->SetBoundsRect(frame_view_->GetBoundsForClientView());
+ gfx::Path client_clip;
+ if (frame_view_->GetClientMask(client_view_->size(), &client_clip))
+ client_view_->set_clip_path(client_clip);
+
// We need to manually call Layout on the ClientView as well for the same
// reason as above.
client_view_->Layout();
« no previous file with comments | « ui/views/window/non_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698