Commit 5ee30f65 authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

[MacRTL] Position permission bubbles correctly in content fullscreen

Bug: 803343
Change-Id: Ida606541b5391c38bbe776ef558ae2e342b6ac2b
Reviewed-on: https://chromium-review.googlesource.com/894022
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533019}
parent 94c0f7d4
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "chrome/browser/ui/bubble_anchor_util.h" #include "chrome/browser/ui/bubble_anchor_util.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h" #import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_controller.h" #import "chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_controller.h"
#import "chrome/browser/ui/cocoa/l10n_util.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
#import "ui/base/cocoa/cocoa_base_utils.h" #import "ui/base/cocoa/cocoa_base_utils.h"
...@@ -47,9 +48,13 @@ NSPoint GetPageInfoAnchorPointForBrowser(Browser* browser, ...@@ -47,9 +48,13 @@ NSPoint GetPageInfoAnchorPointForBrowser(Browser* browser,
// Position the bubble on the left of the screen if there is no page info // Position the bubble on the left of the screen if there is no page info
// button to point at. // button to point at.
NSRect contentFrame = [[parentWindow contentView] frame]; NSRect contentFrame = [[parentWindow contentView] frame];
anchor = NSMakePoint( CGFloat x_offset =
NSMinX(contentFrame) + bubble_anchor_util::kNoToolbarLeftOffset, NSMinX(contentFrame) + bubble_anchor_util::kNoToolbarLeftOffset;
NSMaxY(contentFrame)); if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) {
x_offset =
NSMaxX(contentFrame) - bubble_anchor_util::kNoToolbarLeftOffset;
}
anchor = NSMakePoint(x_offset, NSMaxY(contentFrame));
} }
return ui::ConvertPointFromWindowToScreen(parentWindow, anchor); return ui::ConvertPointFromWindowToScreen(parentWindow, anchor);
......
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