@@ -72,31 +72,6 @@ struct Converter<electron::NativeWindow::TitleBarStyle> {
7272
7373namespace electron {
7474
75- namespace {
76-
77- #if BUILDFLAG(IS_WIN)
78- gfx::Size GetExpandedWindowSize (const NativeWindow* window,
79- bool transparent,
80- gfx::Size size) {
81- if (!base::FeatureList::IsEnabled (
82- views::features::kEnableTransparentHwndEnlargement ) ||
83- !transparent) {
84- return size;
85- }
86-
87- gfx::Size min_size = display::win::GetScreenWin ()->ScreenToDIPSize (
88- window->GetAcceleratedWidget (), gfx::Size{64 , 64 });
89-
90- // Some AMD drivers can't display windows that are less than 64x64 pixels,
91- // so expand them to be at least that size. http://crbug.com/286609
92- gfx::Size expanded (std::max (size.width (), min_size.width ()),
93- std::max (size.height (), min_size.height ()));
94- return expanded;
95- }
96- #endif
97-
98- } // namespace
99-
10075NativeWindow::NativeWindow (const gin_helper::Dictionary& options,
10176 NativeWindow* parent)
10277 : title_bar_style_{options.ValueOrDefault (options::kTitleBarStyle ,
@@ -409,15 +384,7 @@ gfx::Size NativeWindow::GetContentMinimumSize() const {
409384}
410385
411386gfx::Size NativeWindow::GetContentMaximumSize () const {
412- const auto size_constraints = GetContentSizeConstraints ();
413- gfx::Size maximum_size = size_constraints.GetMaximumSize ();
414-
415- #if BUILDFLAG(IS_WIN)
416- if (size_constraints.HasMaximumSize ())
417- maximum_size = GetExpandedWindowSize (this , transparent (), maximum_size);
418- #endif
419-
420- return maximum_size;
387+ return GetContentSizeConstraints ().GetMaximumSize ();
421388}
422389
423390void NativeWindow::SetSheetOffset (const double offsetX, const double offsetY) {
0 commit comments