Index: chrome/renderer/autofill/form_autofill_util.cc |
=================================================================== |
--- chrome/renderer/autofill/form_autofill_util.cc (revision 179750) |
+++ chrome/renderer/autofill/form_autofill_util.cc (working copy) |
@@ -574,14 +574,21 @@ |
} |
bool IsCheckableElement(const WebInputElement* element) { |
+ // Is static for improving performance. |
+ CR_DEFINE_STATIC_LOCAL(WebString, kRadio, ("radio")); |
+ CR_DEFINE_STATIC_LOCAL(WebString, kCheckbox, ("checkbox")); |
+ |
if (!element) |
return false; |
- return element->isCheckbox() || element->isRadioButton(); |
+ WebString formControlType = element->formControlType(); |
+ return formControlType == kCheckbox || formControlType == kRadio; |
} |
bool IsAutofillableInputElement(const WebInputElement* element) { |
- return IsTextInput(element) || IsCheckableElement(element); |
+ // TODO(ramankk): Uncomment IsCheckableElement part once we have solution |
+ // for the observed performance regression. |
+ return IsTextInput(element); // || IsCheckableElement(element); |
} |
const string16 GetFormIdentifier(const WebFormElement& form) { |