Commit 51af7905 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Revert fakebox animation change for pre-UI refresh.

Bug: 865408
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I43ace7047750f8754cf6882d35fd598c3fffda3a
Reviewed-on: https://chromium-review.googlesource.com/1146209Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577139}
parent 26f4a8ec
...@@ -386,7 +386,11 @@ const UIEdgeInsets kSearchBoxStretchInsets = {3, 3, 3, 3}; ...@@ -386,7 +386,11 @@ const UIEdgeInsets kSearchBoxStretchInsets = {3, 3, 3, 3};
} }
- (void)fakeOmniboxTapped:(id)sender { - (void)fakeOmniboxTapped:(id)sender {
[self shiftTilesUp]; if (IsUIRefreshPhase1Enabled()) {
[self shiftTilesUp];
} else {
[self.dispatcher focusFakebox];
}
} }
// If Google is not the default search engine, hide the logo, doodle and // If Google is not the default search engine, hide the logo, doodle and
...@@ -446,7 +450,9 @@ const UIEdgeInsets kSearchBoxStretchInsets = {3, 3, 3, 3}; ...@@ -446,7 +450,9 @@ const UIEdgeInsets kSearchBoxStretchInsets = {3, 3, 3, 3};
- (void)shiftTilesUp { - (void)shiftTilesUp {
void (^completionBlock)() = ^{ void (^completionBlock)() = ^{
[self.dispatcher focusFakebox]; if (IsUIRefreshPhase1Enabled()) {
[self.dispatcher focusFakebox];
}
if ((IsUIRefreshPhase1Enabled() && IsSplitToolbarMode()) || if ((IsUIRefreshPhase1Enabled() && IsSplitToolbarMode()) ||
(!IsUIRefreshPhase1Enabled() && (!IsUIRefreshPhase1Enabled() &&
!content_suggestions::IsRegularXRegularSizeClass(self.view))) { !content_suggestions::IsRegularXRegularSizeClass(self.view))) {
...@@ -502,7 +508,7 @@ const UIEdgeInsets kSearchBoxStretchInsets = {3, 3, 3, 3}; ...@@ -502,7 +508,7 @@ const UIEdgeInsets kSearchBoxStretchInsets = {3, 3, 3, 3};
self.omniboxFocused = YES; self.omniboxFocused = YES;
if (![self.delegate isScrolledToTop]) if (!IsUIRefreshPhase1Enabled() || ![self.delegate isScrolledToTop])
[self shiftTilesUp]; [self shiftTilesUp];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment