Commit fbaaaf60 authored by Mohamad Ahmadi's avatar Mohamad Ahmadi Committed by Commit Bot

[AF] Fixes the scrolling problem with the FormSuggestionView

Bug: 792879
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ic86fa2a72adeab804c22a62efa9b291408e5b482
Reviewed-on: https://chromium-review.googlesource.com/827725Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524396}
parent d33b073d
...@@ -71,10 +71,12 @@ const CGFloat kSuggestionHorizontalMargin = 6; ...@@ -71,10 +71,12 @@ const CGFloat kSuggestionHorizontalMargin = 6;
return self; return self;
} }
- (void)setFrame:(CGRect)frame { - (void)layoutSubviews {
[super setFrame:frame]; [super layoutSubviews];
CGFloat contentwidth = kSuggestionHorizontalMargin * 2; CGRect frame = self.frame;
CGFloat contentwidth = kSuggestionHorizontalMargin;
for (UIView* label in self.subviews) { for (UIView* label in self.subviews) {
contentwidth += CGRectGetWidth([label frame]) + kSuggestionHorizontalMargin; contentwidth += CGRectGetWidth([label frame]) + kSuggestionHorizontalMargin;
} }
......
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