WebInputElement.cpp [plain text]
#include "config.h"
#include "WebInputElement.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "WebString.h"
#include <wtf/PassRefPtr.h>
using namespace WebCore;
namespace WebKit {
bool WebInputElement::autoComplete() const
{
return constUnwrap<HTMLInputElement>()->autoComplete();
}
bool WebInputElement::isEnabledFormControl() const
{
return constUnwrap<HTMLInputElement>()->isEnabledFormControl();
}
WebInputElement::InputType WebInputElement::inputType() const
{
return static_cast<InputType>(constUnwrap<HTMLInputElement>()->inputType());
}
int WebInputElement::maxLength() const
{
return constUnwrap<HTMLInputElement>()->maxLength();
}
bool WebInputElement::isActivatedSubmit() const
{
return constUnwrap<HTMLInputElement>()->isActivatedSubmit();
}
void WebInputElement::setActivatedSubmit(bool activated)
{
unwrap<HTMLInputElement>()->setActivatedSubmit(activated);
}
void WebInputElement::setValue(const WebString& value)
{
unwrap<HTMLInputElement>()->setValue(value);
}
WebString WebInputElement::value() const
{
return constUnwrap<HTMLInputElement>()->value();
}
void WebInputElement::setAutofilled(bool autoFilled)
{
unwrap<HTMLInputElement>()->setAutofilled(autoFilled);
}
void WebInputElement::dispatchFormControlChangeEvent()
{
unwrap<HTMLInputElement>()->dispatchFormControlChangeEvent();
}
void WebInputElement::setSelectionRange(int start, int end)
{
unwrap<HTMLInputElement>()->setSelectionRange(start, end);
}
WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem)
: WebFormControlElement(elem)
{
}
WebInputElement& WebInputElement::operator=(const PassRefPtr<HTMLInputElement>& elem)
{
m_private = elem;
return *this;
}
WebInputElement::operator PassRefPtr<HTMLInputElement>() const
{
return static_cast<HTMLInputElement*>(m_private.get());
}
}