| 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 7b011c549fd193dff4f3cb26d1a1a1edab73e196..083c88328503cb2548747e085e3c71615aba9d4f 100644
|
| --- a/ui/views/bubble/bubble_frame_view.cc
|
| +++ b/ui/views/bubble/bubble_frame_view.cc
|
| @@ -79,7 +79,8 @@ BubbleFrameView::~BubbleFrameView() {}
|
| gfx::Rect BubbleFrameView::GetBoundsForClientView() const {
|
| gfx::Rect client_bounds = GetLocalBounds();
|
| client_bounds.Inset(GetInsets());
|
| - client_bounds.Inset(bubble_border_->GetInsets());
|
| + if (bubble_border_)
|
| + client_bounds.Inset(bubble_border_->GetInsets());
|
| return client_bounds;
|
| }
|
|
|
| @@ -110,7 +111,8 @@ int BubbleFrameView::NonClientHitTest(const gfx::Point& point) {
|
|
|
| void BubbleFrameView::GetWindowMask(const gfx::Size& size,
|
| gfx::Path* window_mask) {
|
| - if (bubble_border_->shadow() != BubbleBorder::NO_SHADOW_OPAQUE_BORDER)
|
| + if (bubble_border_ &&
|
| + bubble_border_->shadow() != BubbleBorder::NO_SHADOW_OPAQUE_BORDER)
|
| return;
|
|
|
| // Use a window mask roughly matching the border in the image assets.
|
| @@ -158,7 +160,8 @@ gfx::Size BubbleFrameView::GetPreferredSize() {
|
|
|
| void BubbleFrameView::Layout() {
|
| gfx::Rect bounds(GetLocalBounds());
|
| - bounds.Inset(border()->GetInsets());
|
| + if (border())
|
| + bounds.Inset(border()->GetInsets());
|
| // Small additional insets yield the desired 10px visual close button insets.
|
| bounds.Inset(0, 0, close_->width() + 1, 0);
|
| close_->SetPosition(gfx::Point(bounds.right(), bounds.y() + 2));
|
|
|