本文整理汇总了C++中HTMLTextAreaElement类的典型用法代码示例。如果您正苦于以下问题:C++ HTMLTextAreaElement类的具体用法?C++ HTMLTextAreaElement怎么用?C++ HTMLTextAreaElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HTMLTextAreaElement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Value
void HTMLTextFieldAccessible::Value(nsString& aValue) const {
aValue.Truncate();
if (NativeState() & states::PROTECTED) // Don't return password text!
return;
HTMLTextAreaElement* textArea = HTMLTextAreaElement::FromNode(mContent);
if (textArea) {
textArea->GetValue(aValue);
return;
}
HTMLInputElement* input = HTMLInputElement::FromNode(mContent);
if (input) {
// Pass NonSystem as the caller type, to be safe. We don't expect to have a
// file input here.
input->GetValue(aValue, CallerType::NonSystem);
}
}
示例2: targetContent
already_AddRefed<nsIController>
nsXBLPrototypeHandler::GetController(EventTarget* aTarget)
{
// XXX Fix this so there's a generic interface that describes controllers,
// This code should have no special knowledge of what objects might have controllers.
nsCOMPtr<nsIControllers> controllers;
nsCOMPtr<nsIContent> targetContent(do_QueryInterface(aTarget));
RefPtr<nsXULElement> xulElement =
nsXULElement::FromContentOrNull(targetContent);
if (xulElement) {
controllers = xulElement->GetControllers(IgnoreErrors());
}
if (!controllers) {
HTMLTextAreaElement* htmlTextArea = HTMLTextAreaElement::FromContent(targetContent);
if (htmlTextArea)
htmlTextArea->GetControllers(getter_AddRefs(controllers));
}
if (!controllers) {
nsCOMPtr<nsIDOMHTMLInputElement> htmlInputElement(do_QueryInterface(aTarget));
if (htmlInputElement)
htmlInputElement->GetControllers(getter_AddRefs(controllers));
}
if (!controllers) {
nsCOMPtr<nsPIDOMWindowOuter> domWindow(do_QueryInterface(aTarget));
if (domWindow) {
domWindow->GetControllers(getter_AddRefs(controllers));
}
}
// Return the first controller.
// XXX This code should be checking the command name and using supportscommand and
// iscommandenabled.
nsCOMPtr<nsIController> controller;
if (controllers) {
controllers->GetControllerAt(0, getter_AddRefs(controller));
}
return controller.forget();
}
示例3: requiredAttrGetter
static v8::Handle<v8::Value> requiredAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLTextAreaElement.required._get");
HTMLTextAreaElement* imp = V8HTMLTextAreaElement::toNative(info.Holder());
return v8Boolean(imp->hasAttribute(WebCore::HTMLNames::requiredAttr));
}
示例4: switch
void JSHTMLTextAreaElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
switch (token) {
case DefaultValueAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setDefaultValue(valueToStringWithNullCheck(exec, value));
break;
}
case AccessKeyAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setAccessKey(valueToStringWithNullCheck(exec, value));
break;
}
case ColsAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setCols(value->toInt32(exec));
break;
}
case DisabledAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setDisabled(value->toBoolean(exec));
break;
}
case AutofocusAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setAutofocus(value->toBoolean(exec));
break;
}
case NameAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setName(valueToStringWithNullCheck(exec, value));
break;
}
case ReadOnlyAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setReadOnly(value->toBoolean(exec));
break;
}
case RowsAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setRows(value->toInt32(exec));
break;
}
case ValueAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setValue(valueToStringWithNullCheck(exec, value));
break;
}
case SelectionStartAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setSelectionStart(value->toInt32(exec));
break;
}
case SelectionEndAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
imp->setSelectionEnd(value->toInt32(exec));
break;
}
}
}
示例5: ASSERT
void DOMHTMLTextAreaElement::setValue(WebCore::String value)
{
ASSERT(m_element && m_element->hasTagName(textareaTag));
HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element);
textareaElement->setValue(value);
}
示例6: HTMLTextAreaElement
HTMLTextAreaElement* HTMLTextAreaElement::create(Document& document,
HTMLFormElement* form) {
HTMLTextAreaElement* textArea = new HTMLTextAreaElement(document, form);
textArea->ensureUserAgentShadowRoot();
return textArea;
}
示例7: validityAttrGetter
static v8::Handle<v8::Value> validityAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLTextAreaElement.validity._get");
HTMLTextAreaElement* imp = V8HTMLTextAreaElement::toNative(info.Holder());
return toV8(imp->validity());
}
示例8: checkValidityCallback
static v8::Handle<v8::Value> checkValidityCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLTextAreaElement.checkValidity");
HTMLTextAreaElement* imp = V8HTMLTextAreaElement::toNative(args.Holder());
return v8Boolean(imp->checkValidity());
}
示例9: setJSHTMLTextAreaElementSelectionEnd
void setJSHTMLTextAreaElementSelectionEnd(ExecState* exec, JSObject* thisObject, JSValue value)
{
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(thisObject)->impl());
imp->setSelectionEnd(value.toInt32(exec));
}
示例10: setJSHTMLTextAreaElementValue
void setJSHTMLTextAreaElementValue(ExecState* exec, JSObject* thisObject, JSValue value)
{
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(thisObject)->impl());
imp->setValue(valueToStringWithNullCheck(exec, value));
}
示例11: setJSHTMLTextAreaElementReadOnly
void setJSHTMLTextAreaElementReadOnly(ExecState* exec, JSObject* thisObject, JSValue value)
{
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(thisObject)->impl());
imp->setReadOnly(value.toBoolean(exec));
}
示例12: jsHTMLTextAreaElementSelectionEnd
JSValue jsHTMLTextAreaElementSelectionEnd(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
UNUSED_PARAM(exec);
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl());
return jsNumber(exec, imp->selectionEnd());
}
示例13: jsHTMLTextAreaElementWillValidate
JSValue jsHTMLTextAreaElementWillValidate(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
UNUSED_PARAM(exec);
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl());
return jsBoolean(imp->willValidate());
}
示例14: jsHTMLTextAreaElementType
JSValue jsHTMLTextAreaElementType(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->type());
}
示例15: textLengthAttrGetter
static v8::Handle<v8::Value> textLengthAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLTextAreaElement.textLength._get");
HTMLTextAreaElement* imp = V8HTMLTextAreaElement::toNative(info.Holder());
return v8::Integer::NewFromUnsigned(imp->textLength());
}