| Index: Source/web/WebFormControlElement.cpp
|
| diff --git a/Source/web/WebFormControlElement.cpp b/Source/web/WebFormControlElement.cpp
|
| index d833087906325288ae0a1ca59221e875b3841718..527db7713b3a61050cd5921cfee3971103d6ec93 100644
|
| --- a/Source/web/WebFormControlElement.cpp
|
| +++ b/Source/web/WebFormControlElement.cpp
|
| @@ -33,6 +33,9 @@
|
|
|
| #include "core/html/HTMLFormControlElement.h"
|
| #include "core/html/HTMLFormElement.h"
|
| +#include "core/html/HTMLInputElement.h"
|
| +#include "core/html/HTMLTextAreaElement.h"
|
| +
|
| #include "wtf/PassRefPtr.h"
|
|
|
| using namespace WebCore;
|
| @@ -79,6 +82,33 @@ WebString WebFormControlElement::nameForAutofill() const
|
| return constUnwrap<HTMLFormControlElement>()->nameForAutofill();
|
| }
|
|
|
| +WebString WebFormControlElement::editingValue() const
|
| +{
|
| + if (m_private->hasTagName(HTMLNames::inputTag))
|
| + return constUnwrap<HTMLInputElement>()->innerTextValue();
|
| + if (m_private->hasTagName(HTMLNames::textareaTag))
|
| + return constUnwrap<HTMLTextAreaElement>()->innerTextValue();
|
| + return WebString();
|
| +}
|
| +
|
| +int WebFormControlElement::selectionStart() const
|
| +{
|
| + if (m_private->hasTagName(HTMLNames::inputTag))
|
| + return constUnwrap<HTMLInputElement>()->selectionStart();
|
| + if (m_private->hasTagName(HTMLNames::textareaTag))
|
| + return constUnwrap<HTMLTextAreaElement>()->selectionStart();
|
| + return 0;
|
| +}
|
| +
|
| +int WebFormControlElement::selectionEnd() const
|
| +{
|
| + if (m_private->hasTagName(HTMLNames::inputTag))
|
| + return constUnwrap<HTMLInputElement>()->selectionEnd();
|
| + if (m_private->hasTagName(HTMLNames::textareaTag))
|
| + return constUnwrap<HTMLTextAreaElement>()->selectionEnd();
|
| + return 0;
|
| +}
|
| +
|
| WebFormElement WebFormControlElement::form() const
|
| {
|
| return WebFormElement(constUnwrap<HTMLFormControlElement>()->form());
|
|
|