diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 23:10:53 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 23:10:53 +0000 |
commit | 6ef08fe1cbf13b0fa2498d7354a95a58ee317338 (patch) | |
tree | 5afa12de672e4eac4288325597eaeef33b9130b4 /ui/views | |
parent | 50bf40caed49ad436b6eba8f3534a2c839b845f3 (diff) | |
download | chromium_src-6ef08fe1cbf13b0fa2498d7354a95a58ee317338.zip chromium_src-6ef08fe1cbf13b0fa2498d7354a95a58ee317338.tar.gz chromium_src-6ef08fe1cbf13b0fa2498d7354a95a58ee317338.tar.bz2 |
Revert 224285 "Re-instate client size hack on Aura and compensate"
Broke omnibox (and probably tab dragging) in non-Aura.
BUG=296820,296836
> Re-instate client size hack on Aura and compensate
>
> Per extensive comment, fake out the client area so that Windows
> doesn't stop treating black as transparent. On non-Aura we inset
> by 1, but that breaks the bottom row of pixels when drawn by
> Aura (crbug.com/172099) so instead make the client area 1 larger
> and compensate in ClientAreaSizeChanged so that the browser
> compositor can still draw the entire UI area.
>
> R=sky@chromium.org
> BUG=277228,172099,267131,276310
>
> Review URL: https://chromiumcodereview.appspot.com/23475055
TBR=scottmg@chromium.org
Review URL: https://codereview.chromium.org/24400003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224824 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r-- | ui/views/win/hwnd_message_handler.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc index c02c66e..c09dceb 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -1038,8 +1038,6 @@ void HWNDMessageHandler::ClientAreaSizeChanged() { // GetClientAreaInsets for more details. if (remove_standard_frame_ && !IsMaximized()) r.bottom += kClientAreaBottomInsetHack; - else if (!fullscreen_handler_->fullscreen()) - r.bottom += kClientAreaBottomInsetHack; } else { GetWindowRect(hwnd(), &r); } @@ -1096,6 +1094,11 @@ bool HWNDMessageHandler::GetClientAreaInsets(gfx::Insets* insets) const { return true; } +#if defined(USE_AURA) + // The -1 hack below breaks rendering in Aura. + // See http://crbug.com/172099 http://crbug.com/267131 + *insets = gfx::Insets(); +#else // This is weird, but highly essential. If we don't offset the bottom edge // of the client rect, the window client area and window area will match, // and when returning to glass rendering mode from non-glass, the client @@ -1107,11 +1110,8 @@ bool HWNDMessageHandler::GetClientAreaInsets(gfx::Insets* insets) const { // rect when using the opaque frame. // Note: this is only required for non-fullscreen windows. Note that // fullscreen windows are in restored state, not maximized. - // Note that previously we used to inset by 1 instead of outset, but that - // doesn't work with Aura: http://crbug.com/172099 http://crbug.com/277228 - *insets = gfx::Insets( - 0, 0, - fullscreen_handler_->fullscreen() ? 0 : kClientAreaBottomInsetHack, 0); + *insets = gfx::Insets(0, 0, fullscreen_handler_->fullscreen() ? 0 : 1, 0); +#endif return true; } |