| Index: ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm
|
| diff --git a/ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm b/ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm
|
| index 406a69eb4711ab1f13ca20146acf676a09765c07..fd12324afecd2af2cd7b7b1116dd5136a6cef3e4 100644
|
| --- a/ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm
|
| +++ b/ios/chrome/browser/ui/autofill/cells/autofill_edit_item.mm
|
| @@ -28,7 +28,7 @@ const CGFloat kLabelAndFieldGap = 5;
|
|
|
| @synthesize textFieldName = _textFieldName;
|
| @synthesize textFieldValue = _textFieldValue;
|
| -@synthesize cardTypeIcon = _cardTypeIcon;
|
| +@synthesize identifyingIcon = _identifyingIcon;
|
| @synthesize inputView = _inputView;
|
| @synthesize textFieldEnabled = _textFieldEnabled;
|
| @synthesize autofillUIType = _autofillUIType;
|
| @@ -62,7 +62,7 @@ const CGFloat kLabelAndFieldGap = 5;
|
| action:@selector(textFieldChanged:)
|
| forControlEvents:UIControlEventEditingChanged];
|
| cell.textField.inputView = self.inputView;
|
| - cell.cardTypeIconView.image = self.cardTypeIcon;
|
| + cell.identifyingIconView.image = self.identifyingIcon;
|
| }
|
|
|
| #pragma mark - Actions
|
| @@ -81,7 +81,7 @@ const CGFloat kLabelAndFieldGap = 5;
|
|
|
| @synthesize textField = _textField;
|
| @synthesize textLabel = _textLabel;
|
| -@synthesize cardTypeIconView = _cardTypeIconView;
|
| +@synthesize identifyingIconView = _identifyingIconView;
|
|
|
| - (instancetype)initWithFrame:(CGRect)frame {
|
| self = [super initWithFrame:frame];
|
| @@ -114,19 +114,19 @@ const CGFloat kLabelAndFieldGap = 5;
|
| UseRTLLayout() ? NSTextAlignmentLeft : NSTextAlignmentRight;
|
|
|
| // Card type icon.
|
| - _cardTypeIconView = [[UIImageView alloc] initWithFrame:CGRectZero];
|
| - _cardTypeIconView.translatesAutoresizingMaskIntoConstraints = NO;
|
| - [contentView addSubview:_cardTypeIconView];
|
| + _identifyingIconView = [[UIImageView alloc] initWithFrame:CGRectZero];
|
| + _identifyingIconView.translatesAutoresizingMaskIntoConstraints = NO;
|
| + [contentView addSubview:_identifyingIconView];
|
|
|
| // Set up the icons size constraints. They are activated here and updated in
|
| // layoutSubviews.
|
| _iconHeightConstraint =
|
| - [_cardTypeIconView.heightAnchor constraintEqualToConstant:0];
|
| + [_identifyingIconView.heightAnchor constraintEqualToConstant:0];
|
| _iconWidthConstraint =
|
| - [_cardTypeIconView.widthAnchor constraintEqualToConstant:0];
|
| + [_identifyingIconView.widthAnchor constraintEqualToConstant:0];
|
|
|
| _textFieldTrailingConstraint = [_textField.trailingAnchor
|
| - constraintEqualToAnchor:_cardTypeIconView.leadingAnchor];
|
| + constraintEqualToAnchor:_identifyingIconView.leadingAnchor];
|
|
|
| // Set up the constraints.
|
| [NSLayoutConstraint activateConstraints:@[
|
| @@ -143,10 +143,10 @@ const CGFloat kLabelAndFieldGap = 5;
|
| [_textField.leadingAnchor
|
| constraintEqualToAnchor:_textLabel.trailingAnchor
|
| constant:kLabelAndFieldGap],
|
| - [_cardTypeIconView.trailingAnchor
|
| + [_identifyingIconView.trailingAnchor
|
| constraintEqualToAnchor:contentView.trailingAnchor
|
| constant:-kHorizontalPadding],
|
| - [_cardTypeIconView.centerYAnchor
|
| + [_identifyingIconView.centerYAnchor
|
| constraintEqualToAnchor:contentView.centerYAnchor],
|
| _iconHeightConstraint,
|
| _iconWidthConstraint,
|
| @@ -160,12 +160,12 @@ const CGFloat kLabelAndFieldGap = 5;
|
| #pragma mark - UIView
|
|
|
| - (void)layoutSubviews {
|
| - if (self.cardTypeIconView.image) {
|
| + if (self.identifyingIconView.image) {
|
| _textFieldTrailingConstraint.constant = -kLabelAndFieldGap;
|
|
|
| // Set the size constraints of the icon view to the dimensions of the image.
|
| - _iconHeightConstraint.constant = self.cardTypeIconView.image.size.height;
|
| - _iconWidthConstraint.constant = self.cardTypeIconView.image.size.width;
|
| + _iconHeightConstraint.constant = self.identifyingIconView.image.size.height;
|
| + _iconWidthConstraint.constant = self.identifyingIconView.image.size.width;
|
| } else {
|
| _textFieldTrailingConstraint.constant = 0;
|
|
|
| @@ -191,7 +191,7 @@ const CGFloat kLabelAndFieldGap = 5;
|
| [self.textField removeTarget:nil
|
| action:nil
|
| forControlEvents:UIControlEventAllEvents];
|
| - self.cardTypeIconView.image = nil;
|
| + self.identifyingIconView.image = nil;
|
| }
|
|
|
| #pragma mark - Accessibility
|
|
|