| 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 c5d30307b7ecf401ce6fa64d1b07320388b62cdb..9bc1dbfbc4beea5e13397f226e811a2ba8e80b21 100644
|
| --- a/components/autofill/content/renderer/form_autofill_util.cc
|
| +++ b/components/autofill/content/renderer/form_autofill_util.cc
|
| @@ -567,7 +567,15 @@ base::string16 InferLabelForElement(const WebFormControlElement& element) {
|
| // If we didn't find a label from the table, check for div table case if we
|
| // haven't already.
|
| inferred_label = InferLabelFromDivTable(element);
|
| + if (!inferred_label.empty())
|
| + return inferred_label;
|
| }
|
| +
|
| + // Not all web pages put useful info in the title attribute, thus use this as
|
| + // a last resort.
|
| + CR_DEFINE_STATIC_LOCAL(WebString, kTitle, ("title"));
|
| + if (element.hasAttribute(kTitle))
|
| + inferred_label = element.getAttribute(kTitle);
|
| return inferred_label;
|
| }
|
|
|
|
|