Commit 4393d7d2 authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

Fix anchoring of permission dialog in full screen mode

This CL updates GetPageInfoAnchorView() to check visibility of the view
hierarchy instead of just single view elements. In Linux/Windows fullscreen
the ToolbarView is not visible while its children's visibility are still set to
true so it's not enough to only check their visibility.

Before:
https://bugs.chromium.org/p/chromium/issues/attachment?aid=337120&signed_aid=2W8EBRpI7WsrXmCDI0TVEA==&inline=1

After:
https://bugs.chromium.org/p/chromium/issues/attachment?aid=337121&signed_aid=aiaQuXt1dB53LM_ahvCL7Q==&inline=1

Bug: 838079
Change-Id: I223f5f78f61e80f7873347ff77ed21949b405949
Reviewed-on: https://chromium-review.googlesource.com/1036964
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555325}
parent 126f8961
......@@ -23,15 +23,13 @@ views::View* GetPageInfoAnchorView(Browser* browser, Anchor anchor) {
#endif
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser);
if (anchor == kLocationBar &&
browser_view->GetLocationBarView()->visible()) {
if (anchor == kLocationBar && browser_view->GetLocationBarView()->IsDrawn())
return browser_view->GetLocationBarView()->GetSecurityBubbleAnchorView();
}
// Fall back to menu button if no location bar present.
views::View* app_menu_button =
browser_view->toolbar_button_provider()->GetAppMenuButton();
if (app_menu_button && app_menu_button->visible())
if (app_menu_button && app_menu_button->IsDrawn())
return app_menu_button;
return nullptr;
}
......
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