Commit cb65f600 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Move AutofillEditItem to Legacy

This CL prepares the AutofillEditItem to be changed to be used with
UITableView.

Bug: 894791
Change-Id: Iee510dd6cf2df483ef2977fba9ff4ca3a85f9326
Reviewed-on: https://chromium-review.googlesource.com/c/1344135Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609766}
parent 877be382
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
source_set("cells") { source_set("cells") {
sources = [ sources = [
"autofill_edit_item.h",
"autofill_edit_item.mm",
"cvc_item.h", "cvc_item.h",
"cvc_item.mm", "cvc_item.mm",
"legacy_autofill_edit_item.h",
"legacy_autofill_edit_item.mm",
"status_item.h", "status_item.h",
"status_item.mm", "status_item.mm",
] ]
...@@ -36,8 +36,8 @@ source_set("cells") { ...@@ -36,8 +36,8 @@ source_set("cells") {
source_set("unit_tests") { source_set("unit_tests") {
testonly = true testonly = true
sources = [ sources = [
"autofill_edit_item_unittest.mm",
"cvc_item_unittest.mm", "cvc_item_unittest.mm",
"legacy_autofill_edit_item_unittest.mm",
"status_item_unittest.mm", "status_item_unittest.mm",
] ]
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_AUTOFILL_CELLS_AUTOFILL_EDIT_ITEM_H_ #ifndef IOS_CHROME_BROWSER_UI_AUTOFILL_CELLS_LEGACY_AUTOFILL_EDIT_ITEM_H_
#define IOS_CHROME_BROWSER_UI_AUTOFILL_CELLS_AUTOFILL_EDIT_ITEM_H_ #define IOS_CHROME_BROWSER_UI_AUTOFILL_CELLS_LEGACY_AUTOFILL_EDIT_ITEM_H_
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
#import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h" #import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h"
// Item to represent and configure an AutofillEditItem. It features a label and // Item to represent and configure an LegacyAutofillEditItem. It features a
// a text field. // label and a text field.
@interface AutofillEditItem : CollectionViewItem @interface LegacyAutofillEditItem : CollectionViewItem
// TODO(crbug.com/891299) remove when all collection and table views are fixed // TODO(crbug.com/891299) remove when all collection and table views are fixed
// for dynamic types. // for dynamic types.
...@@ -59,9 +59,9 @@ ...@@ -59,9 +59,9 @@
@end @end
// AutofillEditCell implements an MDCCollectionViewCell subclass containing a // LegacyAutofillEditCell implements an MDCCollectionViewCell subclass
// label and a text field. // containing a label and a text field.
@interface AutofillEditCell : MDCCollectionViewCell @interface LegacyAutofillEditCell : MDCCollectionViewCell
// Label at the leading edge of the cell. It displays the item's textFieldName. // Label at the leading edge of the cell. It displays the item's textFieldName.
@property(nonatomic, strong) UILabel* textLabel; @property(nonatomic, strong) UILabel* textLabel;
...@@ -75,4 +75,4 @@ ...@@ -75,4 +75,4 @@
@end @end
#endif // IOS_CHROME_BROWSER_UI_AUTOFILL_CELLS_AUTOFILL_EDIT_ITEM_H_ #endif // IOS_CHROME_BROWSER_UI_AUTOFILL_CELLS_LEGACY_AUTOFILL_EDIT_ITEM_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" #import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#include "ios/chrome/browser/ui/collection_view/cells/collection_view_cell_constants.h" #include "ios/chrome/browser/ui/collection_view/cells/collection_view_cell_constants.h"
#import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
...@@ -27,14 +27,14 @@ const CGFloat kVerticalPadding = 16; ...@@ -27,14 +27,14 @@ const CGFloat kVerticalPadding = 16;
const CGFloat kLabelAndFieldGap = 5; const CGFloat kLabelAndFieldGap = 5;
} // namespace } // namespace
@interface AutofillEditCell () @interface LegacyAutofillEditCell ()
// Updates the cell's fonts and colors for the given |cellStyle| and uses // Updates the cell's fonts and colors for the given |cellStyle| and uses
// dynamic font types if they are available (iOS 11+). // dynamic font types if they are available (iOS 11+).
- (void)updateForStyle:(CollectionViewCellStyle)cellStyle - (void)updateForStyle:(CollectionViewCellStyle)cellStyle
withFontScaling:(BOOL)withFontScaling; withFontScaling:(BOOL)withFontScaling;
@end @end
@implementation AutofillEditItem @implementation LegacyAutofillEditItem
@synthesize cellStyle = _cellStyle; @synthesize cellStyle = _cellStyle;
@synthesize textFieldName = _textFieldName; @synthesize textFieldName = _textFieldName;
...@@ -52,7 +52,7 @@ const CGFloat kLabelAndFieldGap = 5; ...@@ -52,7 +52,7 @@ const CGFloat kLabelAndFieldGap = 5;
- (instancetype)initWithType:(NSInteger)type { - (instancetype)initWithType:(NSInteger)type {
self = [super initWithType:type]; self = [super initWithType:type];
if (self) { if (self) {
self.cellClass = [AutofillEditCell class]; self.cellClass = [LegacyAutofillEditCell class];
_cellStyle = CollectionViewCellStyle::kMaterial; _cellStyle = CollectionViewCellStyle::kMaterial;
_returnKeyType = UIReturnKeyNext; _returnKeyType = UIReturnKeyNext;
_keyboardType = UIKeyboardTypeDefault; _keyboardType = UIKeyboardTypeDefault;
...@@ -63,7 +63,7 @@ const CGFloat kLabelAndFieldGap = 5; ...@@ -63,7 +63,7 @@ const CGFloat kLabelAndFieldGap = 5;
#pragma mark CollectionViewItem #pragma mark CollectionViewItem
- (void)configureCell:(AutofillEditCell*)cell { - (void)configureCell:(LegacyAutofillEditCell*)cell {
[super configureCell:cell]; [super configureCell:cell];
// Update fonts and colors before changing anything else. // Update fonts and colors before changing anything else.
...@@ -99,7 +99,7 @@ const CGFloat kLabelAndFieldGap = 5; ...@@ -99,7 +99,7 @@ const CGFloat kLabelAndFieldGap = 5;
@end @end
@implementation AutofillEditCell { @implementation LegacyAutofillEditCell {
NSLayoutConstraint* _iconHeightConstraint; NSLayoutConstraint* _iconHeightConstraint;
NSLayoutConstraint* _iconWidthConstraint; NSLayoutConstraint* _iconWidthConstraint;
NSLayoutConstraint* _textFieldTrailingConstraint; NSLayoutConstraint* _textFieldTrailingConstraint;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" #import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h" #import "testing/gtest_mac.h"
...@@ -14,12 +14,13 @@ ...@@ -14,12 +14,13 @@
namespace { namespace {
using AutofillEditItemTest = PlatformTest; using LegacyAutofillEditItemTest = PlatformTest;
// Tests that the label and text field are set properly after a call to // Tests that the label and text field are set properly after a call to
// |configureCell:|. // |configureCell:|.
TEST_F(AutofillEditItemTest, ConfigureCell) { TEST_F(LegacyAutofillEditItemTest, ConfigureCell) {
AutofillEditItem* item = [[AutofillEditItem alloc] initWithType:0]; LegacyAutofillEditItem* item =
[[LegacyAutofillEditItem alloc] initWithType:0];
NSString* name = @"Name"; NSString* name = @"Name";
NSString* value = @"Value"; NSString* value = @"Value";
BOOL enabled = NO; BOOL enabled = NO;
...@@ -29,9 +30,9 @@ TEST_F(AutofillEditItemTest, ConfigureCell) { ...@@ -29,9 +30,9 @@ TEST_F(AutofillEditItemTest, ConfigureCell) {
item.textFieldEnabled = enabled; item.textFieldEnabled = enabled;
id cell = [[[item cellClass] alloc] init]; id cell = [[[item cellClass] alloc] init];
ASSERT_TRUE([cell isMemberOfClass:[AutofillEditCell class]]); ASSERT_TRUE([cell isMemberOfClass:[LegacyAutofillEditCell class]]);
AutofillEditCell* autofillEditCell = cell; LegacyAutofillEditCell* autofillEditCell = cell;
EXPECT_EQ(0U, autofillEditCell.textLabel.text.length); EXPECT_EQ(0U, autofillEditCell.textLabel.text.length);
EXPECT_EQ(0U, autofillEditCell.textField.text.length); EXPECT_EQ(0U, autofillEditCell.textField.text.length);
EXPECT_TRUE(autofillEditCell.textField.enabled); EXPECT_TRUE(autofillEditCell.textField.enabled);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#import "ios/chrome/browser/ui/autofill/autofill_edit_accessory_view.h" #import "ios/chrome/browser/ui/autofill/autofill_edit_accessory_view.h"
#import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" #import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h" #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_switch_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_switch_item.h"
...@@ -40,10 +40,12 @@ const CGFloat kSeparatorEdgeInset = 14; ...@@ -40,10 +40,12 @@ const CGFloat kSeparatorEdgeInset = 14;
const CGFloat kFooterCellHorizontalPadding = 16; const CGFloat kFooterCellHorizontalPadding = 16;
// Returns the AutofillEditCell that is the parent view of the |textField|. // Returns the LegacyAutofillEditCell that is the parent view of the
AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) { // |textField|.
LegacyAutofillEditCell* AutofillEditCellForTextField(UITextField* textField) {
for (UIView* view = textField; view; view = [view superview]) { for (UIView* view = textField; view; view = [view superview]) {
AutofillEditCell* cell = base::mac::ObjCCast<AutofillEditCell>(view); LegacyAutofillEditCell* cell =
base::mac::ObjCCast<LegacyAutofillEditCell>(view);
if (cell) if (cell)
return cell; return cell;
} }
...@@ -101,7 +103,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -101,7 +103,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
UIPickerViewDelegate, UIPickerViewDelegate,
UITextFieldDelegate> { UITextFieldDelegate> {
// The currently focused cell. May be nil. // The currently focused cell. May be nil.
__weak AutofillEditCell* _currentEditingCell; __weak LegacyAutofillEditCell* _currentEditingCell;
AutofillEditAccessoryView* _accessoryView; AutofillEditAccessoryView* _accessoryView;
} }
...@@ -133,7 +135,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -133,7 +135,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
// Returns the text field with the given offset relative to the currently // Returns the text field with the given offset relative to the currently
// focused text field. May return nil. // focused text field. May return nil.
- (AutofillEditCell*)nextTextFieldWithOffset:(NSInteger)offset; - (LegacyAutofillEditCell*)nextTextFieldWithOffset:(NSInteger)offset;
// Enables or disables the accessory view's previous and next buttons depending // Enables or disables the accessory view's previous and next buttons depending
// on whether there is a text field before and after the currently focused text // on whether there is a text field before and after the currently focused text
...@@ -304,8 +306,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -304,8 +306,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
[model addSectionWithIdentifier:sectionIdentifier]; [model addSectionWithIdentifier:sectionIdentifier];
switch (field.fieldType) { switch (field.fieldType) {
case EditorFieldTypeTextField: { case EditorFieldTypeTextField: {
AutofillEditItem* item = LegacyAutofillEditItem* item =
[[AutofillEditItem alloc] initWithType:ItemTypeTextField]; [[LegacyAutofillEditItem alloc] initWithType:ItemTypeTextField];
item.useScaledFont = YES; item.useScaledFont = YES;
item.textFieldName = field.label; item.textFieldName = field.label;
item.textFieldEnabled = field.enabled; item.textFieldEnabled = field.enabled;
...@@ -390,8 +392,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -390,8 +392,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
- (void)setOptions:(NSArray<NSArray<NSString*>*>*)options - (void)setOptions:(NSArray<NSArray<NSString*>*>*)options
forEditorField:(EditorField*)field { forEditorField:(EditorField*)field {
DCHECK(field.fieldType == EditorFieldTypeTextField); DCHECK(field.fieldType == EditorFieldTypeTextField);
AutofillEditItem* item = LegacyAutofillEditItem* item =
base::mac::ObjCCastStrict<AutofillEditItem>(field.item); base::mac::ObjCCastStrict<LegacyAutofillEditItem>(field.item);
item.textFieldEnabled = field.enabled; item.textFieldEnabled = field.enabled;
item.textFieldValue = field.value; item.textFieldValue = field.value;
...@@ -457,7 +459,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -457,7 +459,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
- (BOOL)textFieldShouldReturn:(UITextField*)textField { - (BOOL)textFieldShouldReturn:(UITextField*)textField {
DCHECK([_currentEditingCell textField] == textField); DCHECK([_currentEditingCell textField] == textField);
AutofillEditCell* nextCell = [self nextTextFieldWithOffset:1]; LegacyAutofillEditCell* nextCell = [self nextTextFieldWithOffset:1];
if (nextCell) if (nextCell)
[self nextPressed]; [self nextPressed];
else else
...@@ -499,8 +501,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -499,8 +501,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
// Get the icon that identifies the field value and reload the cell if the // Get the icon that identifies the field value and reload the cell if the
// icon changes. // icon changes.
AutofillEditItem* item = LegacyAutofillEditItem* item =
base::mac::ObjCCastStrict<AutofillEditItem>(field.item); base::mac::ObjCCastStrict<LegacyAutofillEditItem>(field.item);
UIImage* oldIcon = item.identifyingIcon; UIImage* oldIcon = item.identifyingIcon;
item.identifyingIcon = [_dataSource iconIdentifyingEditorField:field]; item.identifyingIcon = [_dataSource iconIdentifyingEditorField:field];
if (item.identifyingIcon != oldIcon) { if (item.identifyingIcon != oldIcon) {
...@@ -518,13 +520,13 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -518,13 +520,13 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
#pragma mark - AutofillEditAccessoryDelegate #pragma mark - AutofillEditAccessoryDelegate
- (void)nextPressed { - (void)nextPressed {
AutofillEditCell* nextCell = [self nextTextFieldWithOffset:1]; LegacyAutofillEditCell* nextCell = [self nextTextFieldWithOffset:1];
if (nextCell) if (nextCell)
[nextCell.textField becomeFirstResponder]; [nextCell.textField becomeFirstResponder];
} }
- (void)previousPressed { - (void)previousPressed {
AutofillEditCell* previousCell = [self nextTextFieldWithOffset:-1]; LegacyAutofillEditCell* previousCell = [self nextTextFieldWithOffset:-1];
if (previousCell) if (previousCell)
[previousCell.textField becomeFirstResponder]; [previousCell.textField becomeFirstResponder];
} }
...@@ -601,8 +603,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -601,8 +603,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
[self.collectionViewModel itemAtIndexPath:indexPath]; [self.collectionViewModel itemAtIndexPath:indexPath];
switch (item.type) { switch (item.type) {
case ItemTypeTextField: { case ItemTypeTextField: {
AutofillEditCell* autofillEditCell = LegacyAutofillEditCell* autofillEditCell =
base::mac::ObjCCast<AutofillEditCell>(cell); base::mac::ObjCCast<LegacyAutofillEditCell>(cell);
autofillEditCell.textField.delegate = self; autofillEditCell.textField.delegate = self;
autofillEditCell.textField.clearButtonMode = UITextFieldViewModeNever; autofillEditCell.textField.clearButtonMode = UITextFieldViewModeNever;
SetUILabelScaledFont(autofillEditCell.textLabel, SetUILabelScaledFont(autofillEditCell.textLabel,
...@@ -679,8 +681,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -679,8 +681,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
id cell = [collectionView cellForItemAtIndexPath:indexPath]; id cell = [collectionView cellForItemAtIndexPath:indexPath];
// |cell| may be nil if the cell is not visible. // |cell| may be nil if the cell is not visible.
if (cell) { if (cell) {
AutofillEditCell* autofillEditCell = LegacyAutofillEditCell* autofillEditCell =
base::mac::ObjCCastStrict<AutofillEditCell>(cell); base::mac::ObjCCastStrict<LegacyAutofillEditCell>(cell);
[autofillEditCell.textField becomeFirstResponder]; [autofillEditCell.textField becomeFirstResponder];
} }
} }
...@@ -750,7 +752,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -750,7 +752,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
return nil; return nil;
} }
- (AutofillEditCell*)nextTextFieldWithOffset:(NSInteger)offset { - (LegacyAutofillEditCell*)nextTextFieldWithOffset:(NSInteger)offset {
UICollectionView* collectionView = [self collectionView]; UICollectionView* collectionView = [self collectionView];
NSIndexPath* currentCellPath = [self indexPathForCurrentTextField]; NSIndexPath* currentCellPath = [self indexPathForCurrentTextField];
DCHECK(currentCellPath); DCHECK(currentCellPath);
...@@ -758,7 +760,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -758,7 +760,7 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
[self indexPathWithSectionOffset:offset fromPath:currentCellPath]; [self indexPathWithSectionOffset:offset fromPath:currentCellPath];
while (nextCellPath) { while (nextCellPath) {
id nextCell = [collectionView cellForItemAtIndexPath:nextCellPath]; id nextCell = [collectionView cellForItemAtIndexPath:nextCellPath];
if ([nextCell isKindOfClass:[AutofillEditCell class]]) if ([nextCell isKindOfClass:[LegacyAutofillEditCell class]])
return nextCell; return nextCell;
nextCellPath = nextCellPath =
[self indexPathWithSectionOffset:offset fromPath:nextCellPath]; [self indexPathWithSectionOffset:offset fromPath:nextCellPath];
...@@ -767,10 +769,10 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -767,10 +769,10 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
} }
- (void)updateAccessoryViewButtonsStates { - (void)updateAccessoryViewButtonsStates {
AutofillEditCell* previousCell = [self nextTextFieldWithOffset:-1]; LegacyAutofillEditCell* previousCell = [self nextTextFieldWithOffset:-1];
[[_accessoryView previousButton] setEnabled:previousCell != nil]; [[_accessoryView previousButton] setEnabled:previousCell != nil];
AutofillEditCell* nextCell = [self nextTextFieldWithOffset:1]; LegacyAutofillEditCell* nextCell = [self nextTextFieldWithOffset:1];
[[_accessoryView nextButton] setEnabled:nextCell != nil]; [[_accessoryView nextButton] setEnabled:nextCell != nil];
} }
...@@ -823,8 +825,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) { ...@@ -823,8 +825,8 @@ PaymentsTextItem* ErrorMessageItemForError(NSString* errorMessage) {
id cell = [[self collectionView] cellForItemAtIndexPath:indexPath]; id cell = [[self collectionView] cellForItemAtIndexPath:indexPath];
// |cell| may be nil if the cell is not visible. // |cell| may be nil if the cell is not visible.
if (cell) { if (cell) {
AutofillEditCell* autofillEditCell = LegacyAutofillEditCell* autofillEditCell =
base::mac::ObjCCastStrict<AutofillEditCell>(cell); base::mac::ObjCCastStrict<LegacyAutofillEditCell>(cell);
[autofillEditCell.textField becomeFirstResponder]; [autofillEditCell.textField becomeFirstResponder];
} }
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "base/mac/foundation_util.h" #include "base/mac/foundation_util.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h"
#import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" #import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_switch_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_switch_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h"
...@@ -127,10 +127,10 @@ TEST_F(PaymentRequestEditViewControllerTest, TestModel) { ...@@ -127,10 +127,10 @@ TEST_F(PaymentRequestEditViewControllerTest, TestModel) {
id item = GetCollectionViewItem(0, 0); id item = GetCollectionViewItem(0, 0);
EXPECT_TRUE([item isMemberOfClass:[CollectionViewTextItem class]]); EXPECT_TRUE([item isMemberOfClass:[CollectionViewTextItem class]]);
// The next section has one item of the type AutofillEditItem. // The next section has one item of the type LegacyAutofillEditItem.
ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(1))); ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(1)));
item = GetCollectionViewItem(1, 0); item = GetCollectionViewItem(1, 0);
EXPECT_TRUE([item isMemberOfClass:[AutofillEditItem class]]); EXPECT_TRUE([item isMemberOfClass:[LegacyAutofillEditItem class]]);
// The next section has one item of the type PaymentsSelectorEditItem. // The next section has one item of the type PaymentsSelectorEditItem.
ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(2))); ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(2)));
......
...@@ -46,7 +46,7 @@ typedef NS_ENUM(NSInteger, EditorFieldType) { ...@@ -46,7 +46,7 @@ typedef NS_ENUM(NSInteger, EditorFieldType) {
UITextAutocapitalizationType autoCapitalizationType; UITextAutocapitalizationType autoCapitalizationType;
// The associated CollectionViewItem instance. May be nil. // The associated CollectionViewItem instance. May be nil.
@property(nonatomic, strong) CollectionViewItem* item; @property(nonatomic, strong) CollectionViewItem* item;
// The section identifier for the associated AutofillEditItem. // The section identifier for the associated LegacyAutofillEditItem.
@property(nonatomic, assign) NSInteger sectionIdentifier; @property(nonatomic, assign) NSInteger sectionIdentifier;
// Whether the field has been modified or not. // Whether the field has been modified or not.
@property(nonatomic, getter=isPristine) BOOL pristine; @property(nonatomic, getter=isPristine) BOOL pristine;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/application_context.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h" #import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h"
#import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" #import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#import "ios/chrome/browser/ui/collection_view/collection_view_model.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
#import "ios/chrome/browser/ui/commands/application_commands.h" #import "ios/chrome/browser/ui/commands/application_commands.h"
#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/commands/open_new_tab_command.h"
...@@ -117,8 +117,9 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -117,8 +117,9 @@ typedef NS_ENUM(NSInteger, ItemType) {
for (NSInteger itemIndex = 0; itemIndex < itemCount; ++itemIndex) { for (NSInteger itemIndex = 0; itemIndex < itemCount; ++itemIndex) {
NSIndexPath* path = NSIndexPath* path =
[NSIndexPath indexPathForItem:itemIndex inSection:section]; [NSIndexPath indexPathForItem:itemIndex inSection:section];
AutofillEditItem* item = base::mac::ObjCCastStrict<AutofillEditItem>( LegacyAutofillEditItem* item =
[model itemAtIndexPath:path]); base::mac::ObjCCastStrict<LegacyAutofillEditItem>(
[model itemAtIndexPath:path]);
_creditCard.SetInfo(autofill::AutofillType(AutofillTypeFromAutofillUIType( _creditCard.SetInfo(autofill::AutofillType(AutofillTypeFromAutofillUIType(
item.autofillUIType)), item.autofillUIType)),
base::SysNSStringToUTF16(item.textFieldValue), base::SysNSStringToUTF16(item.textFieldValue),
...@@ -143,8 +144,8 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -143,8 +144,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
BOOL isEditing = self.editor.editing; BOOL isEditing = self.editor.editing;
[model addSectionWithIdentifier:SectionIdentifierFields]; [model addSectionWithIdentifier:SectionIdentifierFields];
AutofillEditItem* cardholderNameitem = LegacyAutofillEditItem* cardholderNameitem =
[[AutofillEditItem alloc] initWithType:ItemTypeCardholderName]; [[LegacyAutofillEditItem alloc] initWithType:ItemTypeCardholderName];
cardholderNameitem.cellStyle = CollectionViewCellStyle::kUIKit; cardholderNameitem.cellStyle = CollectionViewCellStyle::kUIKit;
cardholderNameitem.textFieldName = cardholderNameitem.textFieldName =
l10n_util::GetNSString(IDS_IOS_AUTOFILL_CARDHOLDER); l10n_util::GetNSString(IDS_IOS_AUTOFILL_CARDHOLDER);
...@@ -156,8 +157,8 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -156,8 +157,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
toSectionWithIdentifier:SectionIdentifierFields]; toSectionWithIdentifier:SectionIdentifierFields];
// Card number (PAN). // Card number (PAN).
AutofillEditItem* cardNumberItem = LegacyAutofillEditItem* cardNumberItem =
[[AutofillEditItem alloc] initWithType:ItemTypeCardNumber]; [[LegacyAutofillEditItem alloc] initWithType:ItemTypeCardNumber];
cardNumberItem.cellStyle = CollectionViewCellStyle::kUIKit; cardNumberItem.cellStyle = CollectionViewCellStyle::kUIKit;
cardNumberItem.textFieldName = cardNumberItem.textFieldName =
l10n_util::GetNSString(IDS_IOS_AUTOFILL_CARD_NUMBER); l10n_util::GetNSString(IDS_IOS_AUTOFILL_CARD_NUMBER);
...@@ -176,8 +177,8 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -176,8 +177,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
toSectionWithIdentifier:SectionIdentifierFields]; toSectionWithIdentifier:SectionIdentifierFields];
// Expiration month. // Expiration month.
AutofillEditItem* expirationMonthItem = LegacyAutofillEditItem* expirationMonthItem =
[[AutofillEditItem alloc] initWithType:ItemTypeExpirationMonth]; [[LegacyAutofillEditItem alloc] initWithType:ItemTypeExpirationMonth];
expirationMonthItem.cellStyle = CollectionViewCellStyle::kUIKit; expirationMonthItem.cellStyle = CollectionViewCellStyle::kUIKit;
expirationMonthItem.textFieldName = expirationMonthItem.textFieldName =
l10n_util::GetNSString(IDS_IOS_AUTOFILL_EXP_MONTH); l10n_util::GetNSString(IDS_IOS_AUTOFILL_EXP_MONTH);
...@@ -190,8 +191,8 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -190,8 +191,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
toSectionWithIdentifier:SectionIdentifierFields]; toSectionWithIdentifier:SectionIdentifierFields];
// Expiration year. // Expiration year.
AutofillEditItem* expirationYearItem = LegacyAutofillEditItem* expirationYearItem =
[[AutofillEditItem alloc] initWithType:ItemTypeExpirationYear]; [[LegacyAutofillEditItem alloc] initWithType:ItemTypeExpirationYear];
expirationYearItem.cellStyle = CollectionViewCellStyle::kUIKit; expirationYearItem.cellStyle = CollectionViewCellStyle::kUIKit;
expirationYearItem.textFieldName = expirationYearItem.textFieldName =
l10n_util::GetNSString(IDS_IOS_AUTOFILL_EXP_YEAR); l10n_util::GetNSString(IDS_IOS_AUTOFILL_EXP_YEAR);
...@@ -227,8 +228,9 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -227,8 +228,9 @@ typedef NS_ENUM(NSInteger, ItemType) {
// Find the respective item for the text field. // Find the respective item for the text field.
NSIndexPath* indexPath = [self indexPathForCurrentTextField]; NSIndexPath* indexPath = [self indexPathForCurrentTextField];
DCHECK(indexPath); DCHECK(indexPath);
AutofillEditItem* item = base::mac::ObjCCastStrict<AutofillEditItem>( LegacyAutofillEditItem* item =
[self.collectionViewModel itemAtIndexPath:indexPath]); base::mac::ObjCCastStrict<LegacyAutofillEditItem>(
[self.collectionViewModel itemAtIndexPath:indexPath]);
// If the user is typing in the credit card number field, update the card type // If the user is typing in the credit card number field, update the card type
// icon (e.g. "Visa") to reflect the number being typed. // icon (e.g. "Visa") to reflect the number being typed.
...@@ -271,7 +273,8 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -271,7 +273,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
NSInteger itemType = NSInteger itemType =
[self.collectionViewModel itemTypeForIndexPath:indexPath]; [self.collectionViewModel itemTypeForIndexPath:indexPath];
AutofillEditCell* textFieldCell = base::mac::ObjCCast<AutofillEditCell>(cell); LegacyAutofillEditCell* textFieldCell =
base::mac::ObjCCast<LegacyAutofillEditCell>(cell);
textFieldCell.textField.delegate = self; textFieldCell.textField.delegate = self;
switch (itemType) { switch (itemType) {
case ItemTypeCardholderName: case ItemTypeCardholderName:
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "base/logging.h" #include "base/logging.h"
#import "base/mac/foundation_util.h" #import "base/mac/foundation_util.h"
#import "ios/chrome/browser/ui/autofill/autofill_edit_accessory_view.h" #import "ios/chrome/browser/ui/autofill/autofill_edit_accessory_view.h"
#import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" #import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#import "ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller+protected.h" #import "ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller+protected.h"
#import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h" #import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h"
...@@ -17,10 +17,11 @@ ...@@ -17,10 +17,11 @@
namespace { namespace {
AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) { LegacyAutofillEditCell* AutofillEditCellForTextField(UITextField* textField) {
AutofillEditCell* settingsCell = nil; LegacyAutofillEditCell* settingsCell = nil;
for (UIView* view = textField; view; view = [view superview]) { for (UIView* view = textField; view; view = [view superview]) {
AutofillEditCell* cell = base::mac::ObjCCast<AutofillEditCell>(view); LegacyAutofillEditCell* cell =
base::mac::ObjCCast<LegacyAutofillEditCell>(view);
if (cell) { if (cell) {
settingsCell = cell; settingsCell = cell;
break; break;
...@@ -36,7 +37,7 @@ AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) { ...@@ -36,7 +37,7 @@ AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) {
@interface AutofillEditCollectionViewController ()< @interface AutofillEditCollectionViewController ()<
AutofillEditAccessoryDelegate> { AutofillEditAccessoryDelegate> {
AutofillEditCell* _currentEditingCell; LegacyAutofillEditCell* _currentEditingCell;
AutofillEditAccessoryView* _accessoryView; AutofillEditAccessoryView* _accessoryView;
} }
@end @end
...@@ -106,14 +107,14 @@ AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) { ...@@ -106,14 +107,14 @@ AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) {
#pragma mark - UITextFieldDelegate #pragma mark - UITextFieldDelegate
- (void)textFieldDidBeginEditing:(UITextField*)textField { - (void)textFieldDidBeginEditing:(UITextField*)textField {
AutofillEditCell* cell = AutofillEditCellForTextField(textField); LegacyAutofillEditCell* cell = AutofillEditCellForTextField(textField);
_currentEditingCell = cell; _currentEditingCell = cell;
[textField setInputAccessoryView:_accessoryView]; [textField setInputAccessoryView:_accessoryView];
[self updateAccessoryViewButtonState]; [self updateAccessoryViewButtonState];
} }
- (void)textFieldDidEndEditing:(UITextField*)textField { - (void)textFieldDidEndEditing:(UITextField*)textField {
AutofillEditCell* cell = AutofillEditCellForTextField(textField); LegacyAutofillEditCell* cell = AutofillEditCellForTextField(textField);
DCHECK(_currentEditingCell == cell); DCHECK(_currentEditingCell == cell);
[textField setInputAccessoryView:nil]; [textField setInputAccessoryView:nil];
_currentEditingCell = nil; _currentEditingCell = nil;
...@@ -156,8 +157,9 @@ AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) { ...@@ -156,8 +157,9 @@ AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) {
if (!nextCellPath) { if (!nextCellPath) {
[[_currentEditingCell textField] resignFirstResponder]; [[_currentEditingCell textField] resignFirstResponder];
} else { } else {
AutofillEditCell* nextCell = base::mac::ObjCCastStrict<AutofillEditCell>( LegacyAutofillEditCell* nextCell =
[collectionView cellForItemAtIndexPath:nextCellPath]); base::mac::ObjCCastStrict<LegacyAutofillEditCell>(
[collectionView cellForItemAtIndexPath:nextCellPath]);
[nextCell.textField becomeFirstResponder]; [nextCell.textField becomeFirstResponder];
} }
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/application_context.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h" #import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h"
#import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" #import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#import "ios/chrome/browser/ui/collection_view/collection_view_model.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
#include "ios/chrome/browser/ui/commands/application_commands.h" #include "ios/chrome/browser/ui/commands/application_commands.h"
#import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/commands/open_new_tab_command.h"
...@@ -149,8 +149,9 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = { ...@@ -149,8 +149,9 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = {
for (NSInteger itemIndex = 0; itemIndex < itemCount; ++itemIndex) { for (NSInteger itemIndex = 0; itemIndex < itemCount; ++itemIndex) {
NSIndexPath* path = NSIndexPath* path =
[NSIndexPath indexPathForItem:itemIndex inSection:section]; [NSIndexPath indexPathForItem:itemIndex inSection:section];
AutofillEditItem* item = base::mac::ObjCCastStrict<AutofillEditItem>( LegacyAutofillEditItem* item =
[model itemAtIndexPath:path]); base::mac::ObjCCastStrict<LegacyAutofillEditItem>(
[model itemAtIndexPath:path]);
autofill::ServerFieldType serverFieldType = autofill::ServerFieldType serverFieldType =
AutofillTypeFromAutofillUIType(item.autofillUIType); AutofillTypeFromAutofillUIType(item.autofillUIType);
if (item.autofillUIType == AutofillUITypeProfileHomeAddressCountry) { if (item.autofillUIType == AutofillUITypeProfileHomeAddressCountry) {
...@@ -183,8 +184,8 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = { ...@@ -183,8 +184,8 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = {
[model addSectionWithIdentifier:SectionIdentifierFields]; [model addSectionWithIdentifier:SectionIdentifierFields];
for (size_t i = 0; i < base::size(kFieldsToDisplay); ++i) { for (size_t i = 0; i < base::size(kFieldsToDisplay); ++i) {
const AutofillFieldDisplayInfo& field = kFieldsToDisplay[i]; const AutofillFieldDisplayInfo& field = kFieldsToDisplay[i];
AutofillEditItem* item = LegacyAutofillEditItem* item =
[[AutofillEditItem alloc] initWithType:ItemTypeField]; [[LegacyAutofillEditItem alloc] initWithType:ItemTypeField];
item.cellStyle = CollectionViewCellStyle::kUIKit; item.cellStyle = CollectionViewCellStyle::kUIKit;
item.textFieldName = l10n_util::GetNSString(field.displayStringID); item.textFieldName = l10n_util::GetNSString(field.displayStringID);
item.textFieldValue = base::SysUTF16ToNSString(_autofillProfile.GetInfo( item.textFieldValue = base::SysUTF16ToNSString(_autofillProfile.GetInfo(
...@@ -220,8 +221,8 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = { ...@@ -220,8 +221,8 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = {
UICollectionViewCell* cell = UICollectionViewCell* cell =
[super collectionView:collectionView cellForItemAtIndexPath:indexPath]; [super collectionView:collectionView cellForItemAtIndexPath:indexPath];
AutofillEditCell* textFieldCell = LegacyAutofillEditCell* textFieldCell =
base::mac::ObjCCastStrict<AutofillEditCell>(cell); base::mac::ObjCCastStrict<LegacyAutofillEditCell>(cell);
textFieldCell.accessibilityIdentifier = textFieldCell.textLabel.text; textFieldCell.accessibilityIdentifier = textFieldCell.textLabel.text;
textFieldCell.textField.delegate = self; textFieldCell.textField.delegate = self;
return textFieldCell; return textFieldCell;
...@@ -234,8 +235,8 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = { ...@@ -234,8 +235,8 @@ static const AutofillFieldDisplayInfo kFieldsToDisplay[] = {
if (self.editor.editing) { if (self.editor.editing) {
UICollectionViewCell* cell = UICollectionViewCell* cell =
[self.collectionView cellForItemAtIndexPath:indexPath]; [self.collectionView cellForItemAtIndexPath:indexPath];
AutofillEditCell* textFieldCell = LegacyAutofillEditCell* textFieldCell =
base::mac::ObjCCastStrict<AutofillEditCell>(cell); base::mac::ObjCCastStrict<LegacyAutofillEditCell>(cell);
[textFieldCell.textField becomeFirstResponder]; [textFieldCell.textField becomeFirstResponder];
} }
return [super collectionView:collectionView return [super collectionView:collectionView
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
#import "ios/chrome/browser/ui/authentication/signin_promo_view_configurator.h" #import "ios/chrome/browser/ui/authentication/signin_promo_view_configurator.h"
#import "ios/chrome/browser/ui/authentication/signin_promo_view_delegate.h" #import "ios/chrome/browser/ui/authentication/signin_promo_view_delegate.h"
#import "ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h" #import "ios/chrome/browser/ui/authentication/signin_promo_view_mediator.h"
#import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h"
#import "ios/chrome/browser/ui/autofill/cells/cvc_item.h" #import "ios/chrome/browser/ui/autofill/cells/cvc_item.h"
#import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#import "ios/chrome/browser/ui/autofill/cells/status_item.h" #import "ios/chrome/browser/ui/autofill/cells/status_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h" #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_account_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_account_item.h"
...@@ -721,8 +721,8 @@ const CGFloat kCardIssuerNetworkIconDimension = 25.0; ...@@ -721,8 +721,8 @@ const CGFloat kCardIssuerNetworkIconDimension = 25.0;
} }
- (CollectionViewItem*)autofillEditItem { - (CollectionViewItem*)autofillEditItem {
AutofillEditItem* item = LegacyAutofillEditItem* item = [[LegacyAutofillEditItem alloc]
[[AutofillEditItem alloc] initWithType:ItemTypeAutofillDynamicHeight]; initWithType:ItemTypeAutofillDynamicHeight];
item.cellStyle = CollectionViewCellStyle::kUIKit; item.cellStyle = CollectionViewCellStyle::kUIKit;
item.textFieldName = @"Required Card Number"; item.textFieldName = @"Required Card Number";
item.textFieldValue = @"4111111111111111"; item.textFieldValue = @"4111111111111111";
...@@ -732,8 +732,8 @@ const CGFloat kCardIssuerNetworkIconDimension = 25.0; ...@@ -732,8 +732,8 @@ const CGFloat kCardIssuerNetworkIconDimension = 25.0;
} }
- (CollectionViewItem*)autofillEditItemWithIcon { - (CollectionViewItem*)autofillEditItemWithIcon {
AutofillEditItem* item = LegacyAutofillEditItem* item = [[LegacyAutofillEditItem alloc]
[[AutofillEditItem alloc] initWithType:ItemTypeAutofillDynamicHeight]; initWithType:ItemTypeAutofillDynamicHeight];
item.cellStyle = CollectionViewCellStyle::kUIKit; item.cellStyle = CollectionViewCellStyle::kUIKit;
item.textFieldName = @"Card Number"; item.textFieldName = @"Card Number";
item.textFieldValue = @"4111111111111111"; item.textFieldValue = @"4111111111111111";
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h" #import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h"
#import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" #import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h" #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h"
#import "ios/chrome/browser/ui/payments/cells/payments_text_item.h" #import "ios/chrome/browser/ui/payments/cells/payments_text_item.h"
#import "ios/chrome/browser/ui/payments/payment_request_edit_consumer.h" #import "ios/chrome/browser/ui/payments/payment_request_edit_consumer.h"
......
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