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

Issue 1052123006: Prevent bookmarks bar toggling from decreasing window height to 0. (Closed)

Created:
5 years, 8 months ago by shrike
Modified:
5 years, 8 months ago
Reviewers:
Avi (use Gerrit)
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent bookmarks bar toggling from decreasing window height to 0. Toggling the bookmarks bar changes the height of the browser window when viewing a regular web page but does not change its height when viewing a NTP. As a result, it is possible for the browser window to creep taller or shorter with the right sequence of steps. When the browser window gets shorter, it's possible to decrease its height to 0. This change does not address the difference in behavior between NTPs and regular web pages with the bookmarks bar, but it prevents the browser window from programmatically dropping below its min height. Added a unit test, and also had to adjust a unit test that created browser windows with a height < 200 (min height for a browser window is 272). BUG=230400 TEST=Create a browser window, confirm that View -> Always Show Bookmarks Bar is checked, navigate to www.google.com, resize the window to its minimum height, choose View -> Always Show Bookmarks Bar - the browser window's bookmarks bar should disappear, but the browser window's height should not change. Committed: https://crrev.com/3d0f62159e9655f42bbdb80dae29f0e2d40db0c9 Cr-Commit-Position: refs/heads/master@{#325267}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -10 lines) Patch
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_unittest.mm View 1 11 chunks +32 lines, -10 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
shrike
PTAL
5 years, 8 months ago (2015-04-14 23:44:34 UTC) #2
Avi (use Gerrit)
LGTM with nits. https://codereview.chromium.org/1052123006/diff/1/chrome/browser/ui/cocoa/browser_window_controller.mm File chrome/browser/ui/cocoa/browser_window_controller.mm (right): https://codereview.chromium.org/1052123006/diff/1/chrome/browser/ui/cocoa/browser_window_controller.mm#newcode844 chrome/browser/ui/cocoa/browser_window_controller.mm:844: NSSize minWindowSize = [window minSize]; Might ...
5 years, 8 months ago (2015-04-15 04:27:26 UTC) #3
shrike
PTAL https://codereview.chromium.org/1052123006/diff/1/chrome/browser/ui/cocoa/browser_window_controller.mm File chrome/browser/ui/cocoa/browser_window_controller.mm (right): https://codereview.chromium.org/1052123006/diff/1/chrome/browser/ui/cocoa/browser_window_controller.mm#newcode844 chrome/browser/ui/cocoa/browser_window_controller.mm:844: NSSize minWindowSize = [window minSize]; On 2015/04/15 04:27:26, ...
5 years, 8 months ago (2015-04-15 17:01:34 UTC) #4
shrike
Actually, I realize you said LGTM (with nits). I fixed the nits, so I will ...
5 years, 8 months ago (2015-04-15 17:02:18 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1052123006/20001
5 years, 8 months ago (2015-04-15 17:04:11 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 8 months ago (2015-04-15 17:43:07 UTC) #9
commit-bot: I haz the power
5 years, 8 months ago (2015-04-15 17:44:04 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/3d0f62159e9655f42bbdb80dae29f0e2d40db0c9
Cr-Commit-Position: refs/heads/master@{#325267}

Powered by Google App Engine
This is Rietveld 408576698