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

Issue 11876036: Alternate NTP: Don't hide bookmark bar on instant (Closed)

Created:
7 years, 11 months ago by sail
Modified:
7 years, 11 months ago
Reviewers:
Nico, kuan, dhollowa
CC:
chromium-reviews, melevin, samarth, sreeram, sail+watch_chromium.org, gideonwald, dominich, David Black, Jered
Visibility:
Public.

Description

Alternate NTP: Don't hide bookmark bar on instant Currently when typing in the omnibox the instant search results are shown next to omnibox by hiding the bookmark bar. This causes the web contents to jump up by 26 pixels. This CL works around this by changing the zorder such that the bookmark bar is under the web contents. With this approach there's no need to hide the bookmark bar and the web contents doesn't jump when typing. Screen recording: New: https://docs.google.com/file/d/0B0Odde3V7EhWcnBBRVBxUXdnN2c/edit New Infobar: https://docs.google.com/file/d/0B0Odde3V7EhWOG4wVWZ6WGp0aDQ/edit Old: https://docs.google.com/file/d/0B0Odde3V7EhWOFYzeTlVbzRXX2s/edit Sample build: https://docs.google.com/file/d/0B0Odde3V7EhWLXdnYVpHa0xEcFk/edit BUG=170835 TBR=thakis@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178367 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178392

Patch Set 1 #

Patch Set 2 : a #

Patch Set 3 : a #

Patch Set 4 : a #

Patch Set 5 : a #

Patch Set 6 : a #

Total comments: 20

Patch Set 7 : address review comments #

Patch Set 8 : address review comments #

Patch Set 9 : address review comments #

Patch Set 10 : remove BOOKMARK_BAR_STATE_CHANGE_INSTANT_PREVIEW_STATE #

Patch Set 11 : BrowserWindowController tests #

Patch Set 12 : more test #

Total comments: 20

Patch Set 13 : address review comments #

Patch Set 14 : tests actually pass! #

Total comments: 5

Patch Set 15 : address review comments #

Patch Set 16 : rebase #

Patch Set 17 : " #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+771 lines, -231 lines) Patch
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +6 lines, -8 lines 1 comment Download
M chrome/browser/ui/cocoa/background_gradient_view.mm View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm View 1 2 3 4 5 2 chunks +2 lines, -5 lines 0 comments Download
D chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_browsertest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -143 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +15 lines, -4 lines 1 comment Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10 chunks +24 lines, -22 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +342 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.mm View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +136 lines, -29 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/fast_resize_view.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/fast_resize_view.mm View 1 2 2 chunks +13 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/nsview_additions.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/nsview_additions.mm View 1 2 3 4 5 6 7 8 9 10 2 chunks +34 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/nsview_additions_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +98 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/instant_preview_controller_mac.mm View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +18 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +30 lines, -3 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
sail
7 years, 11 months ago (2013-01-17 04:46:59 UTC) #1
sail
Note, I'm still working on adding tests to this CL.
7 years, 11 months ago (2013-01-17 06:28:11 UTC) #2
dhollowa
Nice. A couple general questions: (1) Have you tested this with --enable-instant-extended-api turned off? (2) ...
7 years, 11 months ago (2013-01-17 17:47:58 UTC) #3
sail
> (1) Have you tested this with --enable-instant-extended-api turned off? Yep! I'll add tests to ...
7 years, 11 months ago (2013-01-17 18:17:12 UTC) #4
kuan
https://codereview.chromium.org/11876036/diff/11001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/11876036/diff/11001/chrome/browser/ui/browser.cc#newcode2274 chrome/browser/ui/browser.cc:2274: reason == BOOKMARK_BAR_STATE_CHANGE_INSTANT_PREVIEW_STATE; per latest discussion, we don't want ...
7 years, 11 months ago (2013-01-17 18:25:51 UTC) #5
sail
https://codereview.chromium.org/11876036/diff/11001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/11876036/diff/11001/chrome/browser/ui/browser.cc#newcode2274 chrome/browser/ui/browser.cc:2274: reason == BOOKMARK_BAR_STATE_CHANGE_INSTANT_PREVIEW_STATE; On 2013/01/17 18:25:51, kuan wrote: > ...
7 years, 11 months ago (2013-01-17 18:54:54 UTC) #6
sail
Oops, forgot to remove BOOKMARK_BAR_STATE_CHANGE_INSTANT_PREVIEW_STATE. Done now.
7 years, 11 months ago (2013-01-17 18:56:12 UTC) #7
kuan
lgtm for browser.*; thx for making the changes!
7 years, 11 months ago (2013-01-18 00:16:38 UTC) #8
dhollowa
To clarify, you mentioned tests were coming, so I'll wait for those. Correct?
7 years, 11 months ago (2013-01-18 00:20:16 UTC) #9
sail
On 2013/01/18 00:20:16, dhollowa wrote: > To clarify, you mentioned tests were coming, so I'll ...
7 years, 11 months ago (2013-01-18 00:28:15 UTC) #10
dhollowa
Looks good. Just nits and questions. https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/browser.cc#newcode2245 chrome/browser/ui/browser.cc:2245: (!search_model_->mode().is_ntp() && state ...
7 years, 11 months ago (2013-01-18 00:55:11 UTC) #11
sail
https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/browser.cc#newcode2245 chrome/browser/ui/browser.cc:2245: (!search_model_->mode().is_ntp() && state == BookmarkBar::DETACHED)) { On 2013/01/18 00:55:11, ...
7 years, 11 months ago (2013-01-18 01:37:09 UTC) #12
sail
+thakis: for another pair of eyes
7 years, 11 months ago (2013-01-18 04:11:07 UTC) #13
kuan
https://codereview.chromium.org/11876036/diff/32022/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/11876036/diff/32022/chrome/browser/ui/browser.cc#newcode2241 chrome/browser/ui/browser.cc:2241: // TODO(sail): Stop hidding the bookmark bar on other ...
7 years, 11 months ago (2013-01-18 14:22:11 UTC) #14
kuan
https://codereview.chromium.org/11876036/diff/32022/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/11876036/diff/32022/chrome/browser/ui/browser.cc#newcode2241 chrome/browser/ui/browser.cc:2241: // TODO(sail): Stop hidding the bookmark bar on other ...
7 years, 11 months ago (2013-01-18 14:23:16 UTC) #15
dhollowa
LGTM. https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/browser.cc#newcode2245 chrome/browser/ui/browser.cc:2245: (!search_model_->mode().is_ntp() && state == BookmarkBar::DETACHED)) { On 2013/01/18 ...
7 years, 11 months ago (2013-01-18 15:59:57 UTC) #16
kuan
https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm (right): https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm#newcode2358 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm:2358: - (BOOL)shouldShowAtBottomWhenDetached { On 2013/01/18 15:59:58, dhollowa wrote: > ...
7 years, 11 months ago (2013-01-18 16:09:28 UTC) #17
sail
https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm (right): https://codereview.chromium.org/11876036/diff/33001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm#newcode2358 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm:2358: - (BOOL)shouldShowAtBottomWhenDetached { On 2013/01/18 16:09:29, kuan wrote: > ...
7 years, 11 months ago (2013-01-18 16:28:51 UTC) #18
Nico
I haven't looked at the CL, but from the description: Shouldn't it be possible to ...
7 years, 11 months ago (2013-01-18 18:04:01 UTC) #19
sail
On 2013/01/18 18:04:01, Nico wrote: > I haven't looked at the CL, but from the ...
7 years, 11 months ago (2013-01-18 18:15:00 UTC) #20
sail
On 2013/01/18 18:15:00, sail wrote: > On 2013/01/18 18:04:01, Nico wrote: > > I haven't ...
7 years, 11 months ago (2013-01-18 19:30:09 UTC) #21
sail
Rebased. thakis: please take a look
7 years, 11 months ago (2013-01-19 01:55:55 UTC) #22
Nico
7 years, 11 months ago (2013-01-23 21:00:04 UTC) #23
Message was sent while issue was closed.
On 2013/01/18 18:15:00, sail wrote:
> On 2013/01/18 18:04:01, Nico wrote:
> > I haven't looked at the CL, but from the description: Shouldn't it be
possible
> > to hide the bookmarks bar without resizing the web content? Just call
> > setHidden:YES
> 
> Most of this change is to move the web content above the bookmark bar and info
> bar.
> The zorder make a few things easier. For example, the tip of the info bar
needs
> to be visible.

Eh, not seeing the infobar tip while the overlay is open doesn't seem terrible.

Anyways, I stopped reviewing when I noticed that this is already in.

https://codereview.chromium.org/11876036/diff/43001/chrome/browser/ui/browser.cc
File chrome/browser/ui/browser.cc (right):

https://codereview.chromium.org/11876036/diff/43001/chrome/browser/ui/browser...
chrome/browser/ui/browser.cc:2235: #endif
Why is this different on OS X than elsewhere? This looks wrong.

https://codereview.chromium.org/11876036/diff/43001/chrome/browser/ui/cocoa/b...
File chrome/browser/ui/cocoa/browser_window_controller.h (right):

https://codereview.chromium.org/11876036/diff/43001/chrome/browser/ui/cocoa/b...
chrome/browser/ui/cocoa/browser_window_controller.h:342: -
(void)updateBookmarkBarStateForInstantPreview;
needs method comment

Powered by Google App Engine
This is Rietveld 408576698