diff options
Diffstat (limited to 'devel/electron29/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc')
-rw-r--r-- | devel/electron29/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/devel/electron29/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc b/devel/electron29/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc new file mode 100644 index 000000000000..291f9ed5f155 --- /dev/null +++ b/devel/electron29/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc @@ -0,0 +1,92 @@ +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-02-21 00:20:37 UTC ++++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc +@@ -58,7 +58,7 @@ + #include "ui/aura/window.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" + #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura_linux.h" + #endif +@@ -90,7 +90,7 @@ constexpr int kTopControlsHeight = 34; + // The height of the controls bar at the top of the window. + constexpr int kTopControlsHeight = 34; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Frame border when window shadow is not drawn. + constexpr int kFrameBorderThickness = 4; + #endif +@@ -185,7 +185,7 @@ class WindowEventObserver : public ui::EventObserver { + + gfx::Rect input_bounds = pip_browser_frame_view_->GetLocalBounds(); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Calculate input bounds for Linux. This is needed because the input bounds + // is not necessary the same as the local bounds on Linux. + if (pip_browser_frame_view_->ShouldDrawFrameShadow()) { +@@ -575,7 +575,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow + AddChildView(std::move(auto_pip_setting_overlay)); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + frame_background_ = std::make_unique<views::FrameBackground>(); + #endif + +@@ -751,7 +751,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( + for (ContentSettingImageView* view : content_setting_views_) + view->SetIconColor(color_provider->GetColor(kColorPipWindowForeground)); + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + // On Linux the top bar background will be drawn in OnPaint(). + top_bar_container_view_->SetBackground(views::CreateSolidBackground( + color_provider->GetColor(kColorPipWindowTopBarBackground))); +@@ -830,7 +830,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg + BrowserNonClientFrameView::RemovedFromWidget(); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + gfx::Insets PictureInPictureBrowserFrameView::MirroredFrameBorderInsets() + const { + auto border = FrameBorderInsets(); +@@ -1084,7 +1084,7 @@ void PictureInPictureBrowserFrameView::OnPaint(gfx::Ca + // views::View implementations: + + void PictureInPictureBrowserFrameView::OnPaint(gfx::Canvas* canvas) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Draw the PiP window frame borders and shadows, including the top bar + // background. + if (window_frame_provider_) { +@@ -1208,7 +1208,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor + } + + gfx::Insets PictureInPictureBrowserFrameView::FrameBorderInsets() const { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (window_frame_provider_) { + const auto insets = window_frame_provider_->GetFrameThicknessDip(); + const bool tiled = frame()->tiled(); +@@ -1226,7 +1226,7 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBo + } + + gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return FrameBorderInsets(); + #elif BUILDFLAG(IS_CHROMEOS_ASH) + return gfx::Insets(chromeos::kResizeInsideBoundsSize); +@@ -1247,7 +1247,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie + top_height + border_thickness.bottom()); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void PictureInPictureBrowserFrameView::SetWindowFrameProvider( + ui::WindowFrameProvider* window_frame_provider) { + DCHECK(window_frame_provider); |