Commit 8b6133b4 authored by David Bienvenu's avatar David Bienvenu Committed by Commit Bot

Revert "remove WS_THICKFRAME for full screen in pre 1903 Windows"

This reverts commit 3de603ce.

Reason for revert: <a user reported this affects win 1909>

Original change's description:
> remove WS_THICKFRAME for full screen in pre 1903 Windows
>
> Not doing so caused issues with playing videos in full screen mode on
> older versions of Windows, when we stopped removing WS_THICKFRAME in
> crrev.com/c/1972258.
>
> Bug: 1014720,1141059
> Change-Id: I57b01051c457b35b37c465ce3b38d60bf896c32e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2510354
> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
> Reviewed-by: Robert Liao <robliao@chromium.org>
> Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#824543}

TBR=sadrul@chromium.org,robliao@chromium.org,davidbienvenu@chromium.org

Change-Id: I30477800e3c32351ff6ab12cb0717a94c47e7a53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1014720
Bug: 1141059
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522573Reviewed-by: default avatarDavid Bienvenu <davidbienvenu@chromium.org>
Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824727}
parent 7580a7d0
...@@ -1168,7 +1168,6 @@ if (is_win) { ...@@ -1168,7 +1168,6 @@ if (is_win) {
"fullscreen_win.cc", "fullscreen_win.cc",
"fullscreen_win.h", "fullscreen_win.h",
] ]
deps = [ ":base" ]
} }
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#include <shellapi.h> #include <shellapi.h>
#include "base/win/windows_version.h"
namespace ui { namespace ui {
namespace { namespace {
...@@ -53,16 +51,7 @@ bool IsFullScreenWindowMode() { ...@@ -53,16 +51,7 @@ bool IsFullScreenWindowMode() {
// style should not have WS_EX_WINDOWEDGE and WS_EX_TOOLWINDOW. // style should not have WS_EX_WINDOWEDGE and WS_EX_TOOLWINDOW.
LONG style = ::GetWindowLong(wnd, GWL_STYLE); LONG style = ::GetWindowLong(wnd, GWL_STYLE);
LONG ext_style = ::GetWindowLong(wnd, GWL_EXSTYLE); LONG ext_style = ::GetWindowLong(wnd, GWL_EXSTYLE);
LONG styles_not_to_have = WS_DLGFRAME; return !((style & WS_DLGFRAME) ||
// Chrome removes WS_THICKFRAME in older versions of Windows. See
// crbug.com/1141059 and crbug.com/1014720. The version here must match the
// version checked in ui/views/win/fullscreen_handler.cc's
// FullscreenHandler::SetFullscreenImpl.
if (base::win::GetVersion() < base::win::Version::WIN10_19H1)
styles_not_to_have |= WS_THICKFRAME;
return !((style & styles_not_to_have) ||
(ext_style & (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW))); (ext_style & (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW)));
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <memory> #include <memory>
#include "base/win/win_util.h" #include "base/win/win_util.h"
#include "base/win/windows_version.h"
#include "ui/base/win/shell.h" #include "ui/base/win/shell.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
#include "ui/views/win/scoped_fullscreen_visibility.h" #include "ui/views/win/scoped_fullscreen_visibility.h"
...@@ -72,18 +71,8 @@ void FullscreenHandler::SetFullscreenImpl(bool fullscreen) { ...@@ -72,18 +71,8 @@ void FullscreenHandler::SetFullscreenImpl(bool fullscreen) {
fullscreen_ = fullscreen; fullscreen_ = fullscreen;
if (fullscreen_) { if (fullscreen_) {
LONG styles_to_remove = WS_CAPTION;
// Not removing WS_THICKFRAME causes an issue with full screen in older
// versions of Windows. See crbug.com/1141059 and crbug.com/1014720. The
// version here must match the version checked in
// ui/base/fullscreen_win.cc's IsFullScreenWindowMode.
if (base::win::GetVersion() < base::win::Version::WIN10_19H1)
styles_to_remove |= WS_THICKFRAME;
// Set new window style and size. // Set new window style and size.
SetWindowLong(hwnd_, GWL_STYLE, SetWindowLong(hwnd_, GWL_STYLE, saved_window_info_.style & ~WS_CAPTION);
saved_window_info_.style & ~styles_to_remove);
SetWindowLong( SetWindowLong(
hwnd_, GWL_EXSTYLE, hwnd_, GWL_EXSTYLE,
saved_window_info_.ex_style & ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | saved_window_info_.ex_style & ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE |
......
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