本文整理汇总了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);
}
}
}
示例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>();
}
示例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());
}
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}