| Index: Source/WebCore/testing/Internals.cpp
|
| ===================================================================
|
| --- Source/WebCore/testing/Internals.cpp (revision 94880)
|
| +++ Source/WebCore/testing/Internals.cpp (working copy)
|
| @@ -303,4 +303,34 @@
|
| return false;
|
| }
|
|
|
| +String Internals::suggestedValue(Element* inputElement, ExceptionCode& ec)
|
| +{
|
| + if (!inputElement) {
|
| + ec = INVALID_ACCESS_ERR;
|
| + return String();
|
| + }
|
| +
|
| + if (!inputElement->hasTagName(HTMLNames::inputTag)) {
|
| + ec = INVALID_NODE_TYPE_ERR;
|
| + return String();
|
| + }
|
| +
|
| + return static_cast<HTMLInputElement*>(inputElement)->suggestedValue();
|
| }
|
| +
|
| +void Internals::setSuggestedValue(Element* inputElement, const String& value, ExceptionCode& ec)
|
| +{
|
| + if (!inputElement) {
|
| + ec = INVALID_ACCESS_ERR;
|
| + return;
|
| + }
|
| +
|
| + if (!inputElement->hasTagName(HTMLNames::inputTag)) {
|
| + ec = INVALID_NODE_TYPE_ERR;
|
| + return;
|
| + }
|
| +
|
| + static_cast<HTMLInputElement*>(inputElement)->setSuggestedValue(value);
|
| +}
|
| +
|
| +}
|
|
|