Commit a587ecec authored by Viktor Semeniuk's avatar Viktor Semeniuk Committed by Commit Bot

[iOS][Password Check] Changed selection highlight style

This change adds default selection style to Password Check Details cell
on Passwords screen and to Change password button on Passwords details
screen.

Bug: 1113816
Change-Id: I7ae74f009e62c9700c4a85480ddf416102e71d70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353260Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Viktor Semeniuk <vsemeniuk@google.com>
Cr-Commit-Position: refs/heads/master@{#798485}
parent 197a39ac
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
[super configureCell:cell withStyler:styler]; [super configureCell:cell withStyler:styler];
cell.textLabel.text = self.text; cell.textLabel.text = self.text;
cell.detailTextLabel.text = self.detailText; cell.detailTextLabel.text = self.detailText;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (self.enabled) { if (self.enabled) {
[cell setInfoButtonHidden:self.infoButtonHidden]; [cell setInfoButtonHidden:self.infoButtonHidden];
[cell setLeadingImage:self.leadingImage [cell setLeadingImage:self.leadingImage
......
...@@ -266,8 +266,6 @@ typedef NS_ENUM(NSInteger, ReauthenticationReason) { ...@@ -266,8 +266,6 @@ typedef NS_ENUM(NSInteger, ReauthenticationReason) {
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
// TODO:(crbug.com/1075494) - Add action to Show/Hide password when user tap
// eye icon.
NSInteger itemType = [self.tableViewModel itemTypeForIndexPath:indexPath]; NSInteger itemType = [self.tableViewModel itemTypeForIndexPath:indexPath];
switch (itemType) { switch (itemType) {
case ItemTypePassword: { case ItemTypePassword: {
...@@ -280,9 +278,11 @@ typedef NS_ENUM(NSInteger, ReauthenticationReason) { ...@@ -280,9 +278,11 @@ typedef NS_ENUM(NSInteger, ReauthenticationReason) {
forControlEvents:UIControlEventTouchUpInside]; forControlEvents:UIControlEventTouchUpInside];
return textFieldCell; return textFieldCell;
} }
case ItemTypeChangePasswordButton:
cell.selectionStyle = UITableViewCellSelectionStyleDefault;
break;
case ItemTypeWebsite: case ItemTypeWebsite:
case ItemTypeUsername: case ItemTypeUsername:
case ItemTypeChangePasswordButton:
case ItemTypeChangePasswordRecommendation: case ItemTypeChangePasswordRecommendation:
break; break;
} }
......
...@@ -1382,8 +1382,17 @@ std::vector<std::unique_ptr<autofill::PasswordForm>> CopyOf( ...@@ -1382,8 +1382,17 @@ std::vector<std::unique_ptr<autofill::PasswordForm>> CopyOf(
- (BOOL)tableView:(UITableView*)tableView - (BOOL)tableView:(UITableView*)tableView
shouldHighlightRowAtIndexPath:(NSIndexPath*)indexPath { shouldHighlightRowAtIndexPath:(NSIndexPath*)indexPath {
return [self.tableViewModel sectionIdentifierForSection:indexPath.section] != NSInteger itemType = [self.tableViewModel itemTypeForIndexPath:indexPath];
SectionIdentifierSavePasswordsSwitch; switch (itemType) {
case ItemTypeSavePasswordsSwitch:
return NO;
case ItemTypePasswordCheckStatus:
return self.passwordCheckState == PasswordCheckStateUnSafe;
case ItemTypeCheckForProblemsButton:
return self.passwordCheckState != PasswordCheckStateRunning &&
self.passwordCheckState != PasswordCheckStateDisabled;
}
return YES;
} }
- (UIView*)tableView:(UITableView*)tableView - (UIView*)tableView:(UITableView*)tableView
......
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