summaryrefslogtreecommitdiffstats
path: root/ui/views/bubble
diff options
context:
space:
mode:
authorakhaustov <akhaustov@yandex-team.ru>2015-08-31 00:40:38 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-31 07:41:16 +0000
commitf0757bc698e2cc3ff8ce9aab1fafe526ebfddb62 (patch)
treeb5165831321bf65136ed7c35e3aee905dec56073 /ui/views/bubble
parentb72d3180d73de7d374bdd91635ed473af359772d (diff)
downloadchromium_src-f0757bc698e2cc3ff8ce9aab1fafe526ebfddb62.zip
chromium_src-f0757bc698e2cc3ff8ce9aab1fafe526ebfddb62.tar.gz
chromium_src-f0757bc698e2cc3ff8ce9aab1fafe526ebfddb62.tar.bz2
Fixed arrow positioning for extension bubble with devtools
When causing horizontal mirror of an extension bubble (e.g. Google Translate) with activated devtools (e.g. by moving browser window close to screen bounds) the bubble arrow wouldn't move accordingly https://code.google.com/p/chromium/issues/detail?id=526620 R=msw@chromium.org BUG= TEST=see above Review URL: https://codereview.chromium.org/1321473002 Cr-Commit-Position: refs/heads/master@{#346355}
Diffstat (limited to 'ui/views/bubble')
-rw-r--r--ui/views/bubble/bubble_frame_view.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
index f792c7f..88025b0 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -397,10 +397,13 @@ void BubbleFrameView::MirrorArrowIfOffScreen(
// Otherwise it should invoke parent's Layout() to layout the content based
// on the new bubble border.
if (GetOffScreenLength(available_bounds, mirror_bounds, vertical) >=
- GetOffScreenLength(available_bounds, window_bounds, vertical))
+ GetOffScreenLength(available_bounds, window_bounds, vertical)) {
bubble_border_->set_arrow(arrow);
- else if (parent())
- parent()->Layout();
+ } else {
+ if (parent())
+ parent()->Layout();
+ SchedulePaint();
+ }
}
}