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

Issue 2134663002: Use only toolbar to transition from fakebox to real omnibox. (Closed)

Created:
4 years, 5 months ago by Bernhard Bauer
Modified:
4 years, 4 months ago
CC:
chromium-reviews, ntp-dev+reviews_chromium.org, Ted C
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use only toolbar to transition from fakebox to real omnibox. Previously, we would fade out the fakebox and fade in the real omnibox during the scroll transition, which created discrepancies. With this change, the toolbar omnibox does the full transition. The search box on the NTP is still kept, both to get the starting point of the transition, and for the tablet toolbar, where the omnibox stays at the top, so there are two boxes. Because the two boxes now have to match, their dimensions and padding are slightly updated. The height is 56dp, and the padding on the sides is 12dp. Also, in the focused state the omnibox now has 1dp bleed at the sides, which moves the rounded corners out of view. The remaining changes are not user-visible: * Opacity of the fakebox is now driven by the toolbar. This lets us centralize the logic (the toolbar can decide its own opacity and the opacity of the fakebox) and use different behavior on tablets, where the fakebox will simply fade out as before. * Rename variables to (hopefully) make them more consistent / self-explanatory. * |mLocationBarBackgroundBounds| (formerly |mUrlViewportBounds|) more accurately reflects the visible omnibox bounds in the absence of the NTP / when the NTP is scrolled so that the omnibox is at the top. To do that, we no longer include the Y translation we apply to position it where the fakebox is (it's instead applied to the |mLocationBarBackgroundNtpOffset|), and we always use an expansion value of 1 if the current tab is an NTP. * Remove the |inset_textbox| drawable -- it was the same as |textbox|, but with a margin added at the top and bottom (but *not* left or right). Since we calculate the omnibox bounds manually anyway, this allows us to account for the omnibox padding in the same way in either dimension. * Remove the |isInTabSwitcherMode| parameter from some methods in favor of using the member variable. BUG=605054, 625108, 618955, 616728, 612520 Committed: https://crrev.com/7a676cfc5291809bf2a95fd16ba1d57907f7961a Cr-Commit-Position: refs/heads/master@{#408885}

Patch Set 1 #

Total comments: 4

Patch Set 2 : review #

Patch Set 3 : sync #

Patch Set 4 : fixes #

Total comments: 20

Patch Set 5 : review #

Total comments: 3

Patch Set 6 : fix #

Total comments: 35

Patch Set 7 : review #

Patch Set 8 : review #

Patch Set 9 : review #

Patch Set 10 : review #

Total comments: 4

Patch Set 11 : review #

Messages

Total messages: 49 (27 generated)
PEConn
Two early nits - I'm still making my way through the body of the actual ...
4 years, 5 months ago (2016-07-08 12:53:29 UTC) #5
Bernhard Bauer
https://codereview.chromium.org/2134663002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java (right): https://codereview.chromium.org/2134663002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java#newcode418 chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java:418: if (getWrapperView().getHeight() == 0) return 0; On 2016/07/08 12:53:29, ...
4 years, 5 months ago (2016-07-08 15:33:43 UTC) #6
Bernhard Bauer
I think this is now ready for a full review (I'll add toolbar OWNERS later). ...
4 years, 5 months ago (2016-07-12 15:21:15 UTC) #10
mcwilliams
I know you have spend a fair amount of time understanding what the code is ...
4 years, 5 months ago (2016-07-12 16:20:48 UTC) #11
Bernhard Bauer
https://codereview.chromium.org/2134663002/diff/60001/chrome/android/java/res/values/dimens.xml File chrome/android/java/res/values/dimens.xml (right): https://codereview.chromium.org/2134663002/diff/60001/chrome/android/java/res/values/dimens.xml#newcode228 chrome/android/java/res/values/dimens.xml:228: <dimen name="location_bar_vertical_margin">8dp</dimen> On 2016/07/12 16:20:47, mcwilliams wrote: > Group ...
4 years, 5 months ago (2016-07-12 16:54:38 UTC) #12
mcwilliams
lgtm https://codereview.chromium.org/2134663002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java (right): https://codereview.chromium.org/2134663002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java#newcode105 chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java:105: private LocationBarPhone mLocationBar; Playing devils advocate - if ...
4 years, 5 months ago (2016-07-13 13:57:54 UTC) #13
mcwilliams
lgtm
4 years, 5 months ago (2016-07-13 13:57:58 UTC) #14
Bernhard Bauer
Matthew, could you take a look at the toolbar changes? Thanks! Also, +ted FHI once ...
4 years, 5 months ago (2016-07-14 15:06:30 UTC) #16
mdjones
I pulled this patch to play with it; it looks like the compositor version of ...
4 years, 5 months ago (2016-07-14 21:19:17 UTC) #17
Bernhard Bauer
On 2016/07/14 21:19:17, mdjones wrote: > I pulled this patch to play with it; it ...
4 years, 5 months ago (2016-07-19 15:59:43 UTC) #20
mdjones
lgtm
4 years, 5 months ago (2016-07-19 18:31:41 UTC) #23
Ted C
https://codereview.chromium.org/2134663002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java (right): https://codereview.chromium.org/2134663002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java#newcode105 chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java:105: private LocationBarPhone mLocationBar; On 2016/07/19 15:59:43, Bernhard Bauer wrote: ...
4 years, 5 months ago (2016-07-19 19:11:32 UTC) #25
Bernhard Bauer
Thanks for the detailed review! https://codereview.chromium.org/2134663002/diff/100001/chrome/android/java/res/values/dimens.xml File chrome/android/java/res/values/dimens.xml (right): https://codereview.chromium.org/2134663002/diff/100001/chrome/android/java/res/values/dimens.xml#newcode232 chrome/android/java/res/values/dimens.xml:232: <dimen name="location_bar_icon_width">32dp</dimen> On 2016/07/19 ...
4 years, 5 months ago (2016-07-21 13:10:04 UTC) #30
Ted C
lgtm (with a bit of hesitation, but can't blame you for logic that isn't easy ...
4 years, 5 months ago (2016-07-22 01:04:15 UTC) #33
Bernhard Bauer
On 2016/07/22 01:04:15, Ted C wrote: > Yeah, I thought so as much. Please check ...
4 years, 5 months ago (2016-07-25 15:06:35 UTC) #34
Bernhard Bauer
OK, I've updated the expansion animation to work correctly in RTL, and checked with Alan ...
4 years, 4 months ago (2016-07-28 14:46:58 UTC) #35
Ted C
lgtm still w/ a couple small nits https://codereview.chromium.org/2134663002/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java (right): https://codereview.chromium.org/2134663002/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java#newcode848 chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java:848: boolean isThisRtl ...
4 years, 4 months ago (2016-07-29 17:29:34 UTC) #36
Bernhard Bauer
Thanks! https://codereview.chromium.org/2134663002/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java (right): https://codereview.chromium.org/2134663002/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java#newcode848 chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java:848: boolean isThisRtl = ApiCompatibilityUtils.isLayoutRtl(this); On 2016/07/29 17:29:34, Ted ...
4 years, 4 months ago (2016-07-30 12:38:30 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2134663002/200001
4 years, 4 months ago (2016-07-31 14:44:20 UTC) #44
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 4 months ago (2016-07-31 15:23:33 UTC) #46
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/7a676cfc5291809bf2a95fd16ba1d57907f7961a Cr-Commit-Position: refs/heads/master@{#408885}
4 years, 4 months ago (2016-07-31 15:25:12 UTC) #48
gab
4 years, 4 months ago (2016-08-01 19:50:18 UTC) #49
Message was sent while issue was closed.
A revert of this CL (patchset #11 id:200001) has been created in
https://codereview.chromium.org/2198993002/ by gab@chromium.org.

The reason for reverting is: Suspect for http://crbug.com/633321, will re-land
if not..

Powered by Google App Engine
This is Rietveld 408576698