From d7010df4c6fff92026bdfe1a26156ce3d3387c87 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Mon, 16 May 2011 20:12:58 +0000 Subject: We were returning the wrong value of ShouldUseNativeFrame for popup windows when a theme is installed and the rest of the desktop is in glass mode. We were returning false instead of true, even though themes are applied only to tabbed browser windows. This means that even though the window was rendered using the glass frame (due to a correct check somewhere else) the widget calculated the client size incorrectly. http://crbug.com/80774 TEST=none Review URL: http://codereview.chromium.org/7015057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85528 0039d316-1c4b-4281-b951-d872f2087c98 --- views/widget/widget_win.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'views/widget') diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc index 67166ff..2267112 100644 --- a/views/widget/widget_win.cc +++ b/views/widget/widget_win.cc @@ -1101,7 +1101,8 @@ void WidgetWin::RedrawLayeredWindowContents() { void WidgetWin::ClientAreaSizeChanged() { RECT r; - if (GetWidget()->GetThemeProvider()->ShouldUseNativeFrame() || IsZoomed()) + Window* window = GetWidget()->GetContainingWindow(); + if (IsZoomed() || (window && window->ShouldUseNativeFrame())) GetClientRect(&r); else GetWindowRect(&r); -- cgit v1.1