Commit 947bd682 authored by stkhapugin@chromium.org's avatar stkhapugin@chromium.org Committed by Commit Bot

[iOS] Do not reset the location bar font size on rotation.

Avoids resetting the scale when -resetTransform is called.

Bug: 869379
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Id649065208060cf1c3fbd4394947acad2f67cec3
Reviewed-on: https://chromium-review.googlesource.com/1180896Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584414}
parent 0e8d43a6
...@@ -287,8 +287,17 @@ typedef NS_ENUM(int, TrailingButtonState) { ...@@ -287,8 +287,17 @@ typedef NS_ENUM(int, TrailingButtonState) {
} }
- (void)resetTransforms { - (void)resetTransforms {
self.editView.transform = CGAffineTransformIdentity; // Focus/defocus animations only affect translations and not scale. So reset
self.locationBarSteadyView.transform = CGAffineTransformIdentity; // translation and keep the scale.
self.editView.transform = CGAffineTransformMake(
self.editView.transform.a, self.editView.transform.b,
self.editView.transform.c, self.editView.transform.d, 0, 0);
self.locationBarSteadyView.transform =
CGAffineTransformMake(self.locationBarSteadyView.transform.a,
self.locationBarSteadyView.transform.b,
self.locationBarSteadyView.transform.c,
self.locationBarSteadyView.transform.d, 0, 0);
;
} }
#pragma mark animation helpers #pragma mark animation helpers
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
- (void)setSteadyViewHidden:(BOOL)hidden; - (void)setSteadyViewHidden:(BOOL)hidden;
// Resets tranforms of edit and steady view. Used for post-animation cleanup. // Resets tranforms of edit and steady view. Used for post-animation cleanup.
// Only resets the translation, and leaves scale intact.
- (void)resetTransforms; - (void)resetTransforms;
@end @end
......
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