| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index d82d4768cb905e46cdcb10b2e65337ed8882ef8d..5df6b8faf403f30e95208cfd8917f0de3a2a3d4a 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -1019,12 +1019,18 @@ String Internals::suggestedValue(Element* element, ExceptionState& exceptionStat
|
| return String();
|
| }
|
|
|
| - if (!element->hasTagName(inputTag)) {
|
| + if (!element->isFormControlElement()) {
|
| exceptionState.throwUninformativeAndGenericDOMException(InvalidNodeTypeError);
|
| return String();
|
| }
|
|
|
| - return toHTMLInputElement(element)->suggestedValue();
|
| + String suggestedValue;
|
| + if (element->hasTagName(inputTag))
|
| + suggestedValue = toHTMLInputElement(element)->suggestedValue();
|
| +
|
| + if (element->hasTagName(textareaTag))
|
| + suggestedValue = toHTMLTextAreaElement(element)->suggestedValue();
|
| + return suggestedValue;
|
| }
|
|
|
| void Internals::setSuggestedValue(Element* element, const String& value, ExceptionState& exceptionState)
|
| @@ -1034,12 +1040,16 @@ void Internals::setSuggestedValue(Element* element, const String& value, Excepti
|
| return;
|
| }
|
|
|
| - if (!element->hasTagName(inputTag)) {
|
| + if (!element->isFormControlElement()) {
|
| exceptionState.throwUninformativeAndGenericDOMException(InvalidNodeTypeError);
|
| return;
|
| }
|
|
|
| - toHTMLInputElement(element)->setSuggestedValue(value);
|
| + if (element->hasTagName(inputTag))
|
| + toHTMLInputElement(element)->setSuggestedValue(value);
|
| +
|
| + if (element->hasTagName(textareaTag))
|
| + toHTMLTextAreaElement(element)->setSuggestedValue(value);
|
| }
|
|
|
| void Internals::setEditingValue(Element* element, const String& value, ExceptionState& exceptionState)
|
|
|