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

Unified Diff: chrome/browser/autofill/autofill_scanner.h

Issue 11415221: Add support for autofilling radio buttons and checkboxes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix browser tests (added more data in .out files, skip checkable elements when trying to parse with… Created 8 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: chrome/browser/autofill/autofill_scanner.h
diff --git a/chrome/browser/autofill/autofill_scanner.h b/chrome/browser/autofill/autofill_scanner.h
index 186e864deaa4a6f1433d216629c4a8f5f70ecb83..4b4644706f83266c9dcca2260c6ee0108db4507c 100644
--- a/chrome/browser/autofill/autofill_scanner.h
+++ b/chrome/browser/autofill/autofill_scanner.h
@@ -13,6 +13,9 @@
class AutofillField;
// A helper class for parsing a stream of |AutofillField|'s with lookahead.
+// Ignores checkable AutofillFields as they interfere when parsers assume
+// correct context (Eg., while parsing address, "Is PO box" checkbox
+// interferes with correctly understanding ADDRESS_LINE2).
Ilya Sherman 2012/12/15 01:08:36 Rather than changing the scanner class, please cha
Raman Kakilate 2012/12/17 20:11:01 Done.
class AutofillScanner {
public:
explicit AutofillScanner(const std::vector<const AutofillField*>& fields);
@@ -23,10 +26,10 @@ class AutofillScanner {
// Returns the current field in the stream, or |NULL| if there are no more
// fields in the stream.
- const AutofillField* Cursor() const;
+ const AutofillField* Cursor();
// Returns |true| if the cursor has reached the end of the stream.
- bool IsEnd() const;
+ bool IsEnd();
// Restores the most recently saved cursor. See also |SaveCursor()|.
void Rewind();
@@ -51,6 +54,9 @@ class AutofillScanner {
// The past-the-end pointer for the stream.
const std::vector<const AutofillField*>::const_iterator end_;
+ // Skip all clickable fields.
+ void SkipClickables();
+
DISALLOW_COPY_AND_ASSIGN(AutofillScanner);
};

Powered by Google App Engine
This is Rietveld 408576698