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

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

Issue 734983006: Autofill - Fix Harry and David checkout: ignore role="presentation" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enum Created 6 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/form_autofill_util.cc
diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc
index 628711cc486975011c8641e6b2b11a7ffd3f750d..679e5eb71baf93213d8c7a178beab28362c0dde0 100644
--- a/components/autofill/content/renderer/form_autofill_util.cc
+++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -956,6 +956,7 @@ void WebFormControlElementToFormField(const WebFormControlElement& element,
DCHECK(field);
DCHECK(!element.isNull());
CR_DEFINE_STATIC_LOCAL(WebString, kAutocomplete, ("autocomplete"));
+ CR_DEFINE_STATIC_LOCAL(WebString, kRole, ("role"));
// The label is not officially part of a WebFormControlElement; however, the
// labels for all form control elements are scraped from the DOM and set in
@@ -970,6 +971,8 @@ void WebFormControlElementToFormField(const WebFormControlElement& element,
// attribute was present.
field->autocomplete_attribute = "x-max-data-length-exceeded";
}
+ if (LowerCaseEqualsASCII(element.getAttribute(kRole), "presentation"))
+ field->role = FormFieldData::ROLE_ATTRIBUTE_PRESENTATION;
if (!IsAutofillableElement(element))
return;
« no previous file with comments | « components/autofill/content/common/autofill_messages.h ('k') | components/autofill/core/browser/form_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698