Commit 731a900f authored by msw@chromium.org's avatar msw@chromium.org

Do not mirror views bubbles anchored to minimized widgets.

Bubbles should not use the anchor rect of minimized windows.

BUG=372713
TEST=Minimizing and restoring Chrome with a session restore bubble should leave the bubble anchored as it was.
R=sky@chromium.org

Review URL: https://codereview.chromium.org/332593002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276845 0039d316-1c4b-4281-b951-d872f2087c98
parent 6ed6f47f
...@@ -272,8 +272,9 @@ BubbleFrameView* BubbleDelegateView::GetBubbleFrameView() const { ...@@ -272,8 +272,9 @@ BubbleFrameView* BubbleDelegateView::GetBubbleFrameView() const {
gfx::Rect BubbleDelegateView::GetBubbleBounds() { gfx::Rect BubbleDelegateView::GetBubbleBounds() {
// The argument rect has its origin at the bubble's arrow anchor point; // The argument rect has its origin at the bubble's arrow anchor point;
// its size is the preferred size of the bubble's client view (this view). // its size is the preferred size of the bubble's client view (this view).
bool anchor_minimized = anchor_widget() && anchor_widget()->IsMinimized();
return GetBubbleFrameView()->GetUpdatedWindowBounds(GetAnchorRect(), return GetBubbleFrameView()->GetUpdatedWindowBounds(GetAnchorRect(),
GetPreferredSize(), adjust_if_offscreen_); GetPreferredSize(), adjust_if_offscreen_ && !anchor_minimized);
} }
void BubbleDelegateView::UpdateColorsFromTheme(const ui::NativeTheme* theme) { void BubbleDelegateView::UpdateColorsFromTheme(const ui::NativeTheme* theme) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment