Commit 92064dc6 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Remove the border when expanding the location bar

This CL makes sure the location bar has the border only during
animations and when the it is contracted.

Bug: 791460
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I12f1edcfe7e1c674b07826ed9e01c46c4cdee8e2
Reviewed-on: https://chromium-review.googlesource.com/809152Reviewed-by: default avatarElodie Banel <lod@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522115}
parent 13417e32
...@@ -134,6 +134,13 @@ ...@@ -134,6 +134,13 @@
self.contractButton.hidden = NO; self.contractButton.hidden = NO;
self.contractButton.alpha = 1; self.contractButton.alpha = 1;
}]; }];
[animator addCompletion:^(UIViewAnimatingPosition finalPosition) {
CGFloat borderWidth = (finalPosition == UIViewAnimatingPositionEnd)
? 0
: kLocationBarBorderWidth;
self.locationBarContainer.layer.borderWidth = borderWidth;
}];
self.expanded = YES; self.expanded = YES;
} }
...@@ -143,6 +150,7 @@ ...@@ -143,6 +150,7 @@
[NSLayoutConstraint deactivateConstraints:self.expandedToolbarConstraints]; [NSLayoutConstraint deactivateConstraints:self.expandedToolbarConstraints];
[NSLayoutConstraint activateConstraints:self.regularToolbarConstraints]; [NSLayoutConstraint activateConstraints:self.regularToolbarConstraints];
[animator addAnimations:^{ [animator addAnimations:^{
self.locationBarContainer.layer.borderWidth = kLocationBarBorderWidth;
[self.view layoutIfNeeded]; [self.view layoutIfNeeded];
self.contractButton.hidden = YES; self.contractButton.hidden = YES;
self.contractButton.alpha = 0; self.contractButton.alpha = 0;
......
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