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

Unified Diff: components/autofill/renderer/form_cache.cc

Issue 13831013: Don't include forms without fields in has_more_forms calculation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some test coverage Created 7 years, 8 months 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
« no previous file with comments | « chrome/renderer/autofill/form_autofill_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/renderer/form_cache.cc
diff --git a/components/autofill/renderer/form_cache.cc b/components/autofill/renderer/form_cache.cc
index 27441adcc6db64e5a704705960e137fe06c87902..5d0bed092341e8f391fd6faad976f1439015bba2 100644
--- a/components/autofill/renderer/form_cache.cc
+++ b/components/autofill/renderer/form_cache.cc
@@ -124,7 +124,8 @@ bool FormCache::ExtractFormsAndFormElements(
// To avoid overly expensive computation, we impose a minimum number of
// allowable fields. The corresponding maximum number of allowable fields
// is imposed by WebFormElementToFormData().
- if (num_editable_elements < minimum_required_fields) {
+ if (num_editable_elements < minimum_required_fields &&
+ control_elements.size() > 0) {
has_skipped_forms = true;
continue;
}
« no previous file with comments | « chrome/renderer/autofill/form_autofill_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698