Commit 7b8bbfb4 authored by Trent Apted's avatar Trent Apted Committed by Commit Bot

Ash: Ensure touch selection menus do not appear below the omnibox popup.

The touch menu is a regular popup bubble; using BubbleDialogDelegateView
to get the desired look with minimal effort. However, that engages its
CreateBubbleWidget(), which invokes widget->StackAbove(context). That
causes the bubble to stack _immediately_ above |context|; below any
already-existing bubbles.

That doesn't make sense for a menu-like Widget, so put it back on top.

This only really affects ChromeOS. Windows also uses this touch menu,
but the call to Widget::Show() already causes the Widget to stack on
top again.

Bug: 848327
Change-Id: Icf115c69b0d0ca0e4a5af4ac6ce0f2b0c54c1678
Reviewed-on: https://chromium-review.googlesource.com/1100668Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567938}
parent 000b11bd
...@@ -131,6 +131,11 @@ TouchSelectionMenuRunnerViews::Menu::Menu(TouchSelectionMenuRunnerViews* owner, ...@@ -131,6 +131,11 @@ TouchSelectionMenuRunnerViews::Menu::Menu(TouchSelectionMenuRunnerViews* owner,
bounds.AdjustToFit(work_area); bounds.AdjustToFit(work_area);
widget->SetBounds(bounds); widget->SetBounds(bounds);
} }
// Using BubbleDialogDelegateView engages its CreateBubbleWidget() which
// invokes widget->StackAbove(context). That causes the bubble to stack
// _immediately_ above |context|; below any already-existing bubbles. That
// doesn't make sense for a menu, so put it back on top.
widget->StackAtTop();
widget->Show(); widget->Show();
} }
......
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