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

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 1488093002: autofill: save pasted passwords on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't always quit the runloop on text changes Created 5 years 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: components/autofill/content/renderer/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index d2bea330cd760d16e0f3dc9958fd13ddd8bd00cd..129075a9e39ff7f8605adca0ec15fbe2313054fd 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -386,10 +386,14 @@ void AutofillAgent::textFieldDidEndEditing(const WebInputElement& element) {
void AutofillAgent::textFieldDidChange(const WebFormControlElement& element) {
DCHECK(toWebInputElement(&element) || form_util::IsTextAreaElement(element));
+
if (ignore_text_changes_)
return;
- if (!IsUserGesture())
+ // Disregard text changes that aren't caused by user gestures or pastes. Note
+ // that pastes aren't necessarily user gestures because Blink's conception of
+ // user gestures is centered around creating new windows/tabs.
+ if (!IsUserGesture() && !render_frame()->IsPasting())
return;
// We post a task for doing the Autofill as the caret position is not set
« no previous file with comments | « chrome/browser/autofill/autofill_interactive_uitest.cc ('k') | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698