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

Issue 391035: [Mac] Add support for growing or shrinking the window during animations.... (Closed)

Created:
11 years, 1 month ago by rohitrao (ping after 24h)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, Paweł Hajdan Jr., pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

[Mac] Add support for growing or shrinking the window during animations. BUG=http://crbug.com/14900 TEST=No visible impact, yet. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=32560

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 16

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 12

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -44 lines) Patch
M chrome/browser/cocoa/bookmark_bar_controller.mm View 6 7 8 9 2 chunks +0 lines, -18 lines 0 comments Download
M chrome/browser/cocoa/browser_window_controller.h View 1 2 3 4 5 6 7 8 9 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 9 8 chunks +94 lines, -4 lines 0 comments Download
M chrome/browser/cocoa/browser_window_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 5 chunks +65 lines, -8 lines 0 comments Download
M chrome/browser/cocoa/toolbar_controller.h View 6 7 8 9 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/toolbar_controller.mm View 6 7 8 9 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/cocoa/toolbar_controller_unittest.mm View 6 7 8 9 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
rohitrao (ping after 24h)
+trung because he's been doing bookmark bar animations. +avi because this used to be his ...
11 years, 1 month ago (2009-11-12 23:37:32 UTC) #1
viettrungluu
LGTM with my comments addressed. http://codereview.chromium.org/391035/diff/4001/8 File chrome/browser/cocoa/browser_window_controller.h (right): http://codereview.chromium.org/391035/diff/4001/8#newcode79 Line 79: BOOL initializing_; Could ...
11 years, 1 month ago (2009-11-13 01:43:40 UTC) #2
TVL
drive by http://codereview.chromium.org/391035/diff/4001/9 File chrome/browser/cocoa/browser_window_controller.mm (right): http://codereview.chromium.org/391035/diff/4001/9#newcode471 Line 471: NSRect windowFrame = [[self window] frame]; ...
11 years, 1 month ago (2009-11-13 03:41:24 UTC) #3
Avi (use Gerrit)
Nothing more to say than the other reviewers. LG.
11 years, 1 month ago (2009-11-13 16:18:45 UTC) #4
rohitrao (ping after 24h)
http://codereview.chromium.org/391035/diff/4001/8 File chrome/browser/cocoa/browser_window_controller.h (right): http://codereview.chromium.org/391035/diff/4001/8#newcode184 Line 184: // height is not adjusted. If the growing ...
11 years, 1 month ago (2009-11-13 18:26:11 UTC) #5
rohitrao (ping after 24h)
11 years, 1 month ago (2009-11-19 17:14:23 UTC) #6
viettrungluu
Is the Mac try result for the current patch? If so, please fix the unit ...
11 years, 1 month ago (2009-11-19 17:48:18 UTC) #7
rohitrao (ping after 24h)
http://codereview.chromium.org/391035/diff/11001/12003 File chrome/browser/cocoa/browser_window_controller.mm (right): http://codereview.chromium.org/391035/diff/11001/12003#newcode559 Line 559: andState:bookmarks::kShowingState]); On 2009/11/19 17:48:19, viettrungluu wrote: > Please ...
11 years, 1 month ago (2009-11-19 19:15:46 UTC) #8
viettrungluu
11 years, 1 month ago (2009-11-19 20:08:50 UTC) #9
LGTM.

http://codereview.chromium.org/391035/diff/11001/12003
File chrome/browser/cocoa/browser_window_controller.mm (right):

http://codereview.chromium.org/391035/diff/11001/12003#newcode559
Line 559: andState:bookmarks::kShowingState]);
On 2009/11/19 19:15:46, rohitrao wrote:
> On 2009/11/19 17:48:19, viettrungluu wrote:
> > Please line this up along the :.
> 
> Lining up the colons makes the line too long.  I've lined it up with
> isAnimating.

Lies! It would fill up 80 columns exactly. Moreover, you have an extra pair of
(round) parens.

http://codereview.chromium.org/391035/diff/11001/12004
File chrome/browser/cocoa/browser_window_controller_unittest.mm (right):

http://codereview.chromium.org/391035/diff/11001/12004#newcode209
Line 209: EXPECT_GT(NSHeight(finalFrame), NSHeight(initialFrame));
On 2009/11/19 19:15:46, rohitrao wrote:
> On 2009/11/19 17:48:19, viettrungluu wrote:
> > Assuming the workarea is reasonably high, couldn't you test that the window
> > height is exactly (or at least close to, since there might be rounding in
> Cocoa)
> > 40 higher?
> 
> I'm running into trouble with this change, especially on the bots, which have
> tiny screens.  I'm not yet sure how to make this change bulletproof across all
> screen sizes, so I'm going to hold off for now.

Are you sure it's not just a floating point rounding/comparison problem? (The
screens aren't *that* tiny.) In which case you can check something like:

EXPECT_GE(NSHeight(finalFrame), NSHeight(initialFrame) + 40 - 0.5);
EXPECT_LE(NSHeight(finalFrame), NSHeight(initialFrame) + 40 + 0.5);

http://codereview.chromium.org/391035/diff/11001/12004#newcode234
Line 234: }
On 2009/11/19 19:15:46, rohitrao wrote:
> On 2009/11/19 17:48:19, viettrungluu wrote:
> > Should you have tests which grow the window (in either/both direction(s))
> until
> > it reaches the workarea height?
> 
> Added a couple more tests.

Thanks.

Powered by Google App Engine
This is Rietveld 408576698