Commit bc63b466 authored by Moe Ahmadi's avatar Moe Ahmadi Committed by Commit Bot

[AF][IOS] Fixes bug where autofill suggestions are shown in reverse order

After crrev.com/c/1078871 that updated FormSuggestionView and
FormSuggestionLabel to use AutoLayout, autofill suggestions started showing
in reverse order (i.e., the first suggestion was shown last and had to be
scrolled to get to). This CL fixes that regression.

Bug: 852910
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I6aebe579a8ec958ba9a12339396c2b0ddef45406
Reviewed-on: https://chromium-review.googlesource.com/1101482Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568467}
parent d1fd8fc9
...@@ -85,6 +85,13 @@ const CGFloat kSuggestionHorizontalMargin = 6; ...@@ -85,6 +85,13 @@ const CGFloat kSuggestionHorizontalMargin = 6;
[stackView.heightAnchor constraintEqualToAnchor:self.heightAnchor].active = [stackView.heightAnchor constraintEqualToAnchor:self.heightAnchor].active =
true; true;
// Rotate the UIScrollView and its UIStackView subview 180 degrees so that the
// first suggestion actually shows up first.
if (base::i18n::IsRTL()) {
self.transform = CGAffineTransformMakeRotation(M_PI);
stackView.transform = CGAffineTransformMakeRotation(M_PI);
}
auto setupBlock = ^(FormSuggestion* suggestion, NSUInteger idx, BOOL* stop) { auto setupBlock = ^(FormSuggestion* suggestion, NSUInteger idx, BOOL* stop) {
// Disable user interaction with suggestion if it is Google Pay logo. // Disable user interaction with suggestion if it is Google Pay logo.
BOOL userInteractionEnabled = BOOL userInteractionEnabled =
......
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