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


C++ HTMLFieldSetElement类代码示例

本文整理汇总了C++中HTMLFieldSetElement的典型用法代码示例。如果您正苦于以下问题:C++ HTMLFieldSetElement类的具体用法?C++ HTMLFieldSetElement怎么用?C++ HTMLFieldSetElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了HTMLFieldSetElement类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: do_QueryInterface

void
nsIConstraintValidation::SetBarredFromConstraintValidation(bool aBarred)
{
  bool previousBarred = mBarredFromConstraintValidation;

  mBarredFromConstraintValidation = aBarred;

  // Inform the form and fieldset elements if our status regarding constraint
  // validation is going to change.
  if (!IsValid() && previousBarred != mBarredFromConstraintValidation) {
    nsCOMPtr<nsIFormControl> formCtrl = do_QueryInterface(this);
    NS_ASSERTION(formCtrl, "This interface should be used by form elements!");

    // If the element is going to be barred from constraint validation, we can
    // inform the form and fieldset that we are now valid. Otherwise, we are now
    // invalid.
    HTMLFormElement* form =
      static_cast<HTMLFormElement*>(formCtrl->GetFormElement());
    if (form) {
      form->UpdateValidity(aBarred);
    }
    HTMLFieldSetElement* fieldSet = formCtrl->GetFieldSet();
    if (fieldSet) {
      fieldSet->UpdateValidity(aBarred);
    }
  }
}
开发者ID:Neil511,项目名称:gecko-dev,代码行数:27,代码来源:nsIConstraintValidation.cpp

示例2: setCustomValidityCallback

 static v8::Handle<v8::Value> setCustomValidityCallback(const v8::Arguments& args) {
   INC_STATS("DOM.HTMLFieldSetElement.setCustomValidity");
   HTMLFieldSetElement* imp = V8HTMLFieldSetElement::toNative(args.Holder());
   V8Parameter<WithUndefinedOrNullCheck> error = args[0];
   imp->setCustomValidity(error);
   return v8::Handle<v8::Value>();
 }
开发者ID:,项目名称:,代码行数:7,代码来源:

示例3: IsValid

void
nsIConstraintValidation::SetValidityState(ValidityStateType aState,
                                          bool aValue)
{
  bool previousValidity = IsValid();

  if (aValue) {
    mValidityBitField |= aState;
  } else {
    mValidityBitField &= ~aState;
  }

  // Inform the form and fieldset elements if our validity has changed.
  if (previousValidity != IsValid() && IsCandidateForConstraintValidation()) {
    nsCOMPtr<nsIFormControl> formCtrl = do_QueryInterface(this);
    NS_ASSERTION(formCtrl, "This interface should be used by form elements!");

    HTMLFormElement* form =
      static_cast<HTMLFormElement*>(formCtrl->GetFormElement());
    if (form) {
      form->UpdateValidity(IsValid());
    }
    HTMLFieldSetElement* fieldSet = formCtrl->GetFieldSet();
      if (fieldSet) {
      fieldSet->UpdateValidity(IsValid());
    }
  }
}
开发者ID:Neil511,项目名称:gecko-dev,代码行数:28,代码来源:nsIConstraintValidation.cpp

示例4: fieldSetAncestorsSetNeedsValidityCheck

void HTMLFormControlElement::fieldSetAncestorsSetNeedsValidityCheck(Node* node)
{
    if (!node)
        return;
    for (HTMLFieldSetElement* fieldSet = Traversal<HTMLFieldSetElement>::firstAncestorOrSelf(*node); fieldSet; fieldSet = Traversal<HTMLFieldSetElement>::firstAncestor(*fieldSet)) {
        fieldSet->pseudoStateChanged(CSSSelector::PseudoValid);
        fieldSet->pseudoStateChanged(CSSSelector::PseudoInvalid);
    }
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:9,代码来源:HTMLFormControlElement.cpp

示例5: toHTMLFieldSetElement

void HTMLFormControlElement::updateAncestorDisabledState() const
{
    HTMLFieldSetElement* fieldSetAncestor = 0;
    ContainerNode* legendAncestor = 0;
    for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
        if (!legendAncestor && ancestor->hasTagName(legendTag))
            legendAncestor = ancestor;
        if (ancestor->hasTagName(fieldsetTag)) {
            fieldSetAncestor = toHTMLFieldSetElement(ancestor);
            break;
        }
    }
    m_ancestorDisabledState = (fieldSetAncestor && fieldSetAncestor->isDisabledFormControl() && !(legendAncestor && legendAncestor == fieldSetAncestor->legend())) ? AncestorDisabledStateDisabled : AncestorDisabledStateEnabled;
}
开发者ID:vinayurala,项目名称:CSE608,代码行数:14,代码来源:HTMLFormControlElement.cpp

示例6: toHTMLFieldSetElement

void HTMLFormControlElement::updateAncestorDisabledState() const
{
    HTMLFieldSetElement* fieldSetAncestor = 0;
    ContainerNode* legendAncestor = 0;
    for (HTMLElement* ancestor = Traversal<HTMLElement>::firstAncestor(*this); ancestor; ancestor = Traversal<HTMLElement>::firstAncestor(*ancestor)) {
        if (!legendAncestor && isHTMLLegendElement(*ancestor))
            legendAncestor = ancestor;
        if (isHTMLFieldSetElement(*ancestor)) {
            fieldSetAncestor = toHTMLFieldSetElement(ancestor);
            break;
        }
    }
    m_ancestorDisabledState = (fieldSetAncestor && fieldSetAncestor->isDisabledFormControl() && !(legendAncestor && legendAncestor == fieldSetAncestor->legend())) ? AncestorDisabledStateDisabled : AncestorDisabledStateEnabled;
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:14,代码来源:HTMLFormControlElement.cpp

示例7: checkValidityCallback

 static v8::Handle<v8::Value> checkValidityCallback(const v8::Arguments& args) {
   INC_STATS("DOM.HTMLFieldSetElement.checkValidity");
   HTMLFieldSetElement* imp = V8HTMLFieldSetElement::toNative(args.Holder());
   return v8Boolean(imp->checkValidity());
 }
开发者ID:,项目名称:,代码行数:5,代码来源:

示例8: validationMessageAttrGetter

 static v8::Handle<v8::Value> validationMessageAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
   INC_STATS("DOM.HTMLFieldSetElement.validationMessage._get");
   HTMLFieldSetElement* imp = V8HTMLFieldSetElement::toNative(info.Holder());
   return v8String(imp->validationMessage());
 }
开发者ID:,项目名称:,代码行数:5,代码来源:

示例9: willValidateAttrGetter

 static v8::Handle<v8::Value> willValidateAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
   INC_STATS("DOM.HTMLFieldSetElement.willValidate._get");
   HTMLFieldSetElement* imp = V8HTMLFieldSetElement::toNative(info.Holder());
   return v8Boolean(imp->willValidate());
 }
开发者ID:,项目名称:,代码行数:5,代码来源:

示例10: formAttrGetter

 static v8::Handle<v8::Value> formAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
   INC_STATS("DOM.HTMLFieldSetElement.form._get");
   HTMLFieldSetElement* imp = V8HTMLFieldSetElement::toNative(info.Holder());
   return toV8(imp->form());
 }
开发者ID:,项目名称:,代码行数:5,代码来源:


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