Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5822)

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_section_container.mm

Issue 51933002: [rAC, OSX] Autofill popup should be shown on 2nd click. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test helper. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
index 59343e0d281c3a237bc0100b1f0107035637d7e5..242afdf4835e76960a2833406ddb076d835a734d 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
@@ -262,16 +262,22 @@ bool CompareInputRows(const autofill::DetailInput* input1,
[view_ setFrameSize:viewFrame.size];
}
-- (void)fieldBecameFirstResponder:(NSControl<AutofillInputField>*)field {
+- (void)onMouseDown:(NSControl<AutofillInputField>*)field {
[self textfieldEditedOrActivated:field edited:NO];
[validationDelegate_ updateMessageForField:field];
}
+- (void)fieldBecameFirstResponder:(NSControl<AutofillInputField>*)field {
+ [validationDelegate_ updateMessageForField:field];
+}
+
- (void)didChange:(id)sender {
[self textfieldEditedOrActivated:sender edited:YES];
}
- (void)didEndEditing:(id)sender {
+ delegate_->FocusMoved();
+ [validationDelegate_ hideErrorBubble];
[self validateFor:autofill::VALIDATE_EDIT];
}
@@ -392,11 +398,11 @@ bool CompareInputRows(const autofill::DetailInput* input1,
gfx::Rect textFrameRect(NSRectToCGRect(textFrameInScreen));
delegate_->UserEditedOrActivatedInput(section_,
- [self detailInputForType:type],
- [self view],
- textFrameRect,
- fieldValue,
- edited);
+ [self detailInputForType:type],
+ [self view],
+ textFrameRect,
+ fieldValue,
+ edited);
// If the field is marked as invalid, check if the text is now valid.
// Many fields (i.e. CC#) are invalid for most of the duration of editing,
@@ -634,6 +640,7 @@ bool CompareInputRows(const autofill::DetailInput* input1,
NSControl<AutofillInputField>* field = [inputs_ viewWithTag:input.type];
[[field window] makeFirstResponder:field];
+ [self textfieldEditedOrActivated:field edited:NO];
}
@end
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_section_container.h ('k') | chrome/browser/ui/cocoa/autofill/autofill_textfield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698