当前位置: 首页>>代码示例>>C++>>正文


C++ HTMLTextAreaElement类代码示例

本文整理汇总了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);
  }
}
开发者ID:Noctem,项目名称:gecko-dev,代码行数:18,代码来源:HTMLFormControlAccessible.cpp

示例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();
}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:43,代码来源:nsXBLPrototypeHandler.cpp

示例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));
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例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;
    }
    }
}
开发者ID:Chingliu,项目名称:EAWebkit,代码行数:60,代码来源:JSHTMLTextAreaElement.cpp

示例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);
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:6,代码来源:DOMHTMLClasses.cpp

示例6: HTMLTextAreaElement

HTMLTextAreaElement* HTMLTextAreaElement::create(Document& document,
                                                 HTMLFormElement* form) {
  HTMLTextAreaElement* textArea = new HTMLTextAreaElement(document, form);
  textArea->ensureUserAgentShadowRoot();
  return textArea;
}
开发者ID:mirror,项目名称:chromium,代码行数:6,代码来源:HTMLTextAreaElement.cpp

示例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());
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例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());
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例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));
}
开发者ID:,项目名称:,代码行数:5,代码来源:

示例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));
}
开发者ID:,项目名称:,代码行数:5,代码来源:

示例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));
}
开发者ID:,项目名称:,代码行数:5,代码来源:

示例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());
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例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());
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例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());
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例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());
}
开发者ID:,项目名称:,代码行数:6,代码来源:


注:本文中的HTMLTextAreaElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。