Index: Source/core/testing/Internals.cpp |
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp |
index be9e1f67c858db4e22160f0fa1fdba59cca56e51..3d9faad1a38d5ef8e94aee30f432192236fcb08b 100644 |
--- a/Source/core/testing/Internals.cpp |
+++ b/Source/core/testing/Internals.cpp |
@@ -1080,11 +1080,11 @@ void Internals::setEditingValue(Element* element, const String& value, Exception |
void Internals::setAutofilled(Element* element, bool enabled, ExceptionState& es) |
{ |
- if (!element->hasTagName(inputTag)) { |
+ if (!element->isFormControlElement()) { |
es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
return; |
} |
- toHTMLInputElement(element)->setAutofilled(enabled); |
+ toHTMLFormControlElement(element)->setAutofilled(enabled); |
} |
void Internals::scrollElementToRect(Element* element, long x, long y, long w, long h, ExceptionState& es) |