Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Issue 304007: Make sure the RootView is sized to the correct bounds when the opaque frame i... (Closed)

Created:
11 years, 2 months ago by Ben Goodger (Google)
Modified:
9 years, 6 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews_googlegroups.com, ben+cc_chromium.org
Visibility:
Public.

Description

Make sure the RootView is sized to the correct bounds when the opaque frame is maximized.It seems that now, when an opaque frame is maximized we also need to add the SM_CXSIZEFRAME to the top of the client rect. I don't know why, it's just is.I reworked the way Widget allows subclasses to handle sizing of the RootView... I delegate responsibility for determining the RootView's bounds to a helper virtual function which BrowserFrameWin overrides. This seems cleaner to me. I make sure this handling only occurs when the window is not maximized.http://crbug.com/25227TEST=use to a theme or switch off glass on vista or use Xp. Maximize the browser window. The tabs should be entirely visible. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29882

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 7

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 10

Patch Set 6 : '' #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -110 lines) Patch
M chrome/browser/views/frame/browser_frame_win.h View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/views/frame/browser_frame_win.cc View 1 2 3 4 5 3 chunks +12 lines, -77 lines 0 comments Download
M views/widget/widget_win.h View 1 2 3 4 5 2 chunks +3 lines, -7 lines 1 comment Download
M views/widget/widget_win.cc View 1 2 3 4 5 3 chunks +17 lines, -12 lines 1 comment Download
M views/window/window_win.h View 4 5 3 chunks +7 lines, -1 line 0 comments Download
M views/window/window_win.cc View 4 5 5 chunks +70 lines, -10 lines 3 comments Download

Messages

Total messages: 10 (0 generated)
Ben Goodger (Google)
11 years, 2 months ago (2009-10-19 22:26:00 UTC) #1
Peter Kasting
http://codereview.chromium.org/304007/diff/6001/7004 File chrome/browser/views/frame/browser_frame_win.cc (right): http://codereview.chromium.org/304007/diff/6001/7004#newcode209 Line 209: client_rect->top += border_thickness; I know why this is ...
11 years, 2 months ago (2009-10-19 22:53:18 UTC) #2
Ben Goodger (Google)
http://codereview.chromium.org/304007/diff/6001/7004 File chrome/browser/views/frame/browser_frame_win.cc (right): http://codereview.chromium.org/304007/diff/6001/7004#newcode249 Line 249: --client_rect->bottom; On 2009/10/19 22:53:19, Peter Kasting wrote: > ...
11 years, 2 months ago (2009-10-20 00:46:11 UTC) #3
Ben Goodger (Google)
I've updated this CL a bit. I took your suggestions to the next degree and ...
11 years, 2 months ago (2009-10-20 02:46:47 UTC) #4
Peter Kasting
Concept seems OK to me. http://codereview.chromium.org/304007/diff/5003/4003 File views/widget/widget_win.cc (right): http://codereview.chromium.org/304007/diff/5003/4003#newcode974 Line 974: PaintNow(gfx::Rect(0, 0, size.width(), ...
11 years, 2 months ago (2009-10-20 18:47:04 UTC) #5
Ben Goodger (Google)
http://codereview.chromium.org/304007/diff/5003/4003 File views/widget/widget_win.cc (right): http://codereview.chromium.org/304007/diff/5003/4003#newcode974 Line 974: PaintNow(gfx::Rect(0, 0, size.width(), size.height())); On 2009/10/20 18:47:04, Peter ...
11 years, 2 months ago (2009-10-20 19:28:21 UTC) #6
Ben Goodger (Google)
Possibly. I'll look into it when I get back to my home system this evening. ...
11 years, 2 months ago (2009-10-20 20:00:00 UTC) #7
Ben Goodger (Google)
I updated this CL. I didn't change PaintNow since it's actually part of the public ...
11 years, 2 months ago (2009-10-23 02:25:10 UTC) #8
Ben Goodger (Google)
BTW the glitches I was seeing was a result of me returning WVR_REDRAW in too ...
11 years, 2 months ago (2009-10-23 02:25:38 UTC) #9
Peter Kasting
11 years, 2 months ago (2009-10-23 05:09:30 UTC) #10
LGTM.  So after all this, have you determined whether it's feasible to make the
whole window (or close to it)  client area for the glass frame, so we could fix
the caption button position?

http://codereview.chromium.org/304007/diff/11001/12001
File views/widget/widget_win.cc (right):

http://codereview.chromium.org/304007/diff/11001/12001#newcode963
Line 963: gfx::Size size = GetRootViewSize();
Nit: Constructor style?

http://codereview.chromium.org/304007/diff/11001/12002
File views/widget/widget_win.h (right):

http://codereview.chromium.org/304007/diff/11001/12002#newcode390
Line 390: // Returns the size that the RootView should be set to in
|LayoutRootView|.
Nit: LayoutRootView() rather than |LayoutRootView|?

http://codereview.chromium.org/304007/diff/11001/12003
File views/window/window_win.cc (right):

http://codereview.chromium.org/304007/diff/11001/12003#newcode555
Line 555: return gfx::Insets(0, 0, !IsFullscreen() ? 1 : 0, 0);
Nit: Could remove the ! and reverse the condition

http://codereview.chromium.org/304007/diff/11001/12003#newcode735
Line 735: if (insets.width() == 0 && insets.height() == 0)
Nit: I'm not in a position to check, but is there an Insets::empty() function? 
Should there be?

http://codereview.chromium.org/304007/diff/11001/12003#newcode785
Line 785: // We special case when left and top insets are 0, since these
conditions
Nit: and -> or

Powered by Google App Engine
This is Rietveld 408576698