Chromium Code Reviews| Index: ui/views/bubble/bubble_frame_view.cc |
| diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc |
| index 4c342a52a64a02d58b35d863afb5ee1806b720e1..34f9bc1613dcb0caf697fd7c140943a0de11496b 100644 |
| --- a/ui/views/bubble/bubble_frame_view.cc |
| +++ b/ui/views/bubble/bubble_frame_view.cc |
| @@ -139,8 +139,13 @@ gfx::Rect BubbleFrameView::GetWindowBoundsForClientBounds( |
| bool BubbleFrameView::GetClientMask(const gfx::Size& size, |
| gfx::Path* path) const { |
| const int radius = bubble_border_->GetBorderCornerRadius(); |
| + gfx::Insets content_insets = GetInsets(); |
| + // If the client bounds don't touch the edges, no need to mask. |
|
Evan Stade
2016/03/29 01:27:58
This additional early return is not necessary for
|
| + if (content_insets.top() > radius && content_insets.left() > radius && |
| + content_insets.bottom() > radius && content_insets.right()) { |
|
msw
2016/03/29 22:54:55
Did you mean to check |content_insets.right() > ra
Evan Stade
2016/03/29 23:04:41
good idea, done.
|
| + return false; |
| + } |
| gfx::RectF rect((gfx::Rect(size))); |
|
msw
2016/03/29 22:54:55
nit: remove extra parens?
Evan Stade
2016/03/29 23:04:41
that produces an error message:
../../ui/views/bu
msw
2016/03/29 23:08:27
Weird, but this seems familiar, and likely came up
|
| - rect.Inset(gfx::InsetsF(0.5f)); |
| path->addRoundRect(gfx::RectFToSkRect(rect), radius, radius); |
| return true; |
| } |