cef/patch/patches/mac_platform_style_bubble_893292.patch
2025-01-08 17:19:43 -05:00

29 lines
1.5 KiB
Diff

diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
index 5383396da441c..a53441bcd1c74 100644
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -1198,8 +1198,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
->GetDisplayNearestPoint(anchor_rect.CenterPoint())
.work_area();
int available_space = screen_space.bottom() - anchor_rect.bottom();
-#if BUILDFLAG(IS_WIN)
- // On Windows the bubble can also be show to the top of the anchor.
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+ // On Windows and macOS the bubble can also be show to the top of the anchor.
available_space =
std::max(available_space, anchor_rect.y() - screen_space.y());
#endif
diff --git ui/views/style/platform_style.h ui/views/style/platform_style.h
index 59d9211565b48..63bc255add57f 100644
--- ui/views/style/platform_style.h
+++ ui/views/style/platform_style.h
@@ -77,7 +77,7 @@ class VIEWS_EXPORT PlatformStyle {
// Default setting at bubble creation time for whether arrow will be adjusted
// for bubbles going off-screen to bring more bubble area into view. Linux
// clips bubble windows that extend outside their parent window bounds.
- static constexpr bool kAdjustBubbleIfOffscreen = !BUILDFLAG(IS_LINUX);
+ static constexpr bool kAdjustBubbleIfOffscreen = BUILDFLAG(IS_WIN);
// Default focus behavior on the platform.
static constexpr View::FocusBehavior kDefaultFocusBehavior =