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

Issue 3050021: Rework somewhat how the folder menu window and main view sizes and positions ... (Closed)

Created:
10 years, 5 months ago by mrossetti
Modified:
9 years, 7 months ago
Reviewers:
John Grabowski
CC:
chromium-reviews, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Rework somewhat how the folder menu window and main view sizes and positions are calculated. Handle edge case where the top scroll arrow is not showing. Proposed window height was not taking into account the one additional vertical separation. BUG=46101 TEST=Setup: Create a bookmark folder on the bookmark bar with plenty of bookmarks, more than enough to fill the screen, and so that it is scrollable. 1) Bring up the bookmark folder menu but do not cause it to scroll. 2) Using the contextual menu delete a bookmark midway in the menu. 3) Verify that the top of the menu window and contents do not move relative to the bookmark bar folder button. 4) Bring up the bookmark folder menu again. 5) Cause the menu to scroll up to fill the screen and then scroll it down so that the top scroll arrow is not showing. 6) Using the contextual menu delete a bookmark midway in the menu. 7) Verify that the top of the menu window and contents have not moved in relation to the screen top. 8) Bring up the bookmark folder menu and cause it to scroll such that both the top and bottom scroll arrows are showing. 9) Using the contextual menu, delete a bookmark midway in the menu. 10) Verify that the top scroll arrow, the top-most item showing in the menu, and the menu window have not changed position relative to the top of the window. Note that the contents of the folder menu below the bookmark item being delete should adjust upward to fill the slot originally occupied by the deleted bookmark. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=54187

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -41 lines) Patch
M chrome/browser/cocoa/bookmark_bar_folder_controller.mm View 1 2 5 chunks +42 lines, -23 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm View 2 12 chunks +69 lines, -18 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
mrossetti
Note that there is a pre-existing problem (i.e. this fix did not introduce this problem) ...
10 years, 5 months ago (2010-07-27 23:13:57 UTC) #1
John Grabowski
http://codereview.chromium.org/3050021/diff/1/2 File chrome/browser/cocoa/bookmark_bar_folder_controller.mm (right): http://codereview.chromium.org/3050021/diff/1/2#newcode373 chrome/browser/cocoa/bookmark_bar_folder_controller.mm:373: - (void)adjustWindowForHeight:(int)windowHeight { function very long. Can you break ...
10 years, 4 months ago (2010-07-28 04:01:49 UTC) #2
mrossetti
Unit test added. http://codereview.chromium.org/3050021/diff/1/2 File chrome/browser/cocoa/bookmark_bar_folder_controller.mm (right): http://codereview.chromium.org/3050021/diff/1/2#newcode373 chrome/browser/cocoa/bookmark_bar_folder_controller.mm:373: - (void)adjustWindowForHeight:(int)windowHeight { On 2010/07/28 04:01:49, ...
10 years, 4 months ago (2010-07-28 17:18:43 UTC) #3
John Grabowski
10 years, 4 months ago (2010-07-28 18:48:13 UTC) #4
LGTM++

http://codereview.chromium.org/3050021/diff/5001/6002
File chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm (right):

http://codereview.chromium.org/3050021/diff/5001/6002#newcode506
chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm:506:
TEST_F(BookmarkBarFolderControllerTest, MenuPlacementWhileScrollingDeleting) {
excellent

Powered by Google App Engine
This is Rietveld 408576698