JSValue* JSHTMLTextAreaElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case DefaultValueAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->defaultValue()); } case FormAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return toJS(exec, WTF::getPtr(imp->form())); } case AccessKeyAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->accessKey()); } case ColsAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsNumber(exec, imp->cols()); } case DisabledAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsBoolean(imp->disabled()); } case AutofocusAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsBoolean(imp->autofocus()); } case NameAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->name()); } case ReadOnlyAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsBoolean(imp->readOnly()); } case RowsAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsNumber(exec, imp->rows()); } case TypeAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->type()); } case ValueAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsString(exec, imp->value()); } case SelectionStartAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsNumber(exec, imp->selectionStart()); } case SelectionEndAttrNum: { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl()); return jsNumber(exec, imp->selectionEnd()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }
HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::value( /* [retval][out] */ BSTR* result) { ASSERT(m_element && m_element->hasTagName(textareaTag)); HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element); WTF::String valueString = textareaElement->value(); *result = BString(valueString.characters(), valueString.length()).release(); if (valueString.length() && !*result) return E_OUTOFMEMORY; return S_OK; }
void RenderTextControlMultiLine::updateFromElement() { createSubtreeIfNeeded(0); RenderTextControl::updateFromElement(); HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(node()); if (m_placeholderVisible) setInnerTextValue(textArea->getAttribute(HTMLNames::placeholderAttr)); else setInnerTextValue(textArea->value()); }
HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::value( /* [retval][out] */ BSTR* result) { ASSERT(m_element && isHTMLTextAreaElement(m_element)); HTMLTextAreaElement* textareaElement = toHTMLTextAreaElement(m_element); WTF::String valueString = textareaElement->value(); *result = BString(valueString).release(); if (valueString.length() && !*result) return E_OUTOFMEMORY; return S_OK; }
static v8::Handle<v8::Value> valueAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.HTMLTextAreaElement.value._get"); HTMLTextAreaElement* imp = V8HTMLTextAreaElement::toNative(info.Holder()); return v8String(imp->value()); }
const char* DOMHTMLTextAreaElement::value() { ASSERT(m_element && m_element->hasTagName(textareaTag)); HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element); return strdup(textareaElement->value().utf8().data()); }
JSValue jsHTMLTextAreaElementValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { UNUSED_PARAM(exec); HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); return jsString(exec, imp->value()); }
WebCore::String DOMHTMLTextAreaElement::value() { ASSERT(m_element && m_element->hasTagName(textareaTag)); HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element); return textareaElement->value(); }