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

Unified Diff: Source/core/testing/Internals.cpp

Issue 26622007: Move isAutofilled and setAutofilled from HTMLInputElement to HTMLFormControlElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months 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: 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)

Powered by Google App Engine
This is Rietveld 408576698