diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 20:57:28 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 20:57:28 +0000 |
commit | d62e6ce58cdc20ddfe6d36d9ff2becac68b9903d (patch) | |
tree | 4354162218cd36e2f7fc2f643fb2d49ef4450216 | |
parent | 121ad29fbef74b1e07977d3b3357ac9ae4943498 (diff) | |
download | chromium_src-d62e6ce58cdc20ddfe6d36d9ff2becac68b9903d.zip chromium_src-d62e6ce58cdc20ddfe6d36d9ff2becac68b9903d.tar.gz chromium_src-d62e6ce58cdc20ddfe6d36d9ff2becac68b9903d.tar.bz2 |
Merge 225067 "Fixes the issue with omnibox suggestions, etc not ..."
> Fixes the issue with omnibox suggestions, etc not showing up on non AURA trunk on Windows.
>
> In the client size changed notification, we were adjusting for the inset adjustment which we do in the
> WM_NCCALCSIZE handling without checking whether this adjustment was applied in the first place
> leading to the windows not showing up.
>
> BUG=296820,296836
> R=scottmg@chromium.org, sky@chromium.org, scottmg, sky
>
> Review URL: https://codereview.chromium.org/24353005
TBR=ananta@chromium.org
Review URL: https://codereview.chromium.org/24671002
git-svn-id: svn://svn.chromium.org/chrome/branches/1650/src@225245 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/views/win/hwnd_message_handler.cc | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc index c09dceb..77dbd86 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -1033,9 +1033,17 @@ void HWNDMessageHandler::ClientAreaSizeChanged() { if (!IsMinimized()) { if (delegate_->WidgetSizeIsClientSize()) { GetClientRect(hwnd(), &r); - // This is needed due to a hack that works around a "feature" in - // Windows's handling of WM_NCCALCSIZE. See the comment near the end of - // GetClientAreaInsets for more details. + gfx::Insets insets; + bool got_insets = GetClientAreaInsets(&insets); + if (got_insets) { + // This is needed due to a hack that works around a "feature" in + // Windows's handling of WM_NCCALCSIZE. See the comment near the end of + // GetClientAreaInsets for more details. + if ((remove_standard_frame_ && !IsMaximized()) || + !fullscreen_handler_->fullscreen()) { + r.bottom += kClientAreaBottomInsetHack; + } + } if (remove_standard_frame_ && !IsMaximized()) r.bottom += kClientAreaBottomInsetHack; } else { @@ -1094,11 +1102,6 @@ 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 @@ -1110,8 +1113,11 @@ 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. - *insets = gfx::Insets(0, 0, fullscreen_handler_->fullscreen() ? 0 : 1, 0); -#endif + // 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); return true; } |