您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ HasAttr函数代码示例

51自学网 2021-06-01 21:25:26
  C++
这篇教程C++ HasAttr函数代码示例写得很实用,希望能帮到您。

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

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

示例1: ShouldShowValidityUI

EventStatesHTMLTextAreaElement::IntrinsicState() const{  EventStates state = nsGenericHTMLFormElementWithState::IntrinsicState();  if (HasAttr(kNameSpaceID_None, nsGkAtoms::required)) {    state |= NS_EVENT_STATE_REQUIRED;  } else {    state |= NS_EVENT_STATE_OPTIONAL;  }  if (IsCandidateForConstraintValidation()) {    if (IsValid()) {      state |= NS_EVENT_STATE_VALID;    } else {      state |= NS_EVENT_STATE_INVALID;      // :-moz-ui-invalid always apply if the element suffers from a custom      // error and never applies if novalidate is set on the form owner.      if ((!mForm || !mForm->HasAttr(kNameSpaceID_None, nsGkAtoms::novalidate)) &&          (GetValidityState(VALIDITY_STATE_CUSTOM_ERROR) ||           (mCanShowInvalidUI && ShouldShowValidityUI()))) {        state |= NS_EVENT_STATE_MOZ_UI_INVALID;      }    }    // :-moz-ui-valid applies if all the following are true:    // 1. The element is not focused, or had either :-moz-ui-valid or    //    :-moz-ui-invalid applying before it was focused ;    // 2. The element is either valid or isn't allowed to have    //    :-moz-ui-invalid applying ;    // 3. The element has no form owner or its form owner doesn't have the    //    novalidate attribute set ;    // 4. The element has already been modified or the user tried to submit the    //    form owner while invalid.    if ((!mForm || !mForm->HasAttr(kNameSpaceID_None, nsGkAtoms::novalidate)) &&        (mCanShowValidUI && ShouldShowValidityUI() &&         (IsValid() || (state.HasState(NS_EVENT_STATE_MOZ_UI_INVALID) &&                        !mCanShowInvalidUI)))) {      state |= NS_EVENT_STATE_MOZ_UI_VALID;    }  }  if (HasAttr(kNameSpaceID_None, nsGkAtoms::placeholder) &&      IsValueEmpty()) {    state |= NS_EVENT_STATE_PLACEHOLDERSHOWN;  }  return state;}
开发者ID:alphan102,项目名称:gecko-dev,代码行数:49,


示例2: NS_ENSURE_SUCCESS

nsresultHTMLImageElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,                             nsIContent* aBindingParent,                             bool aCompileEventHandlers){  nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,                                                 aBindingParent,                                                 aCompileEventHandlers);  NS_ENSURE_SUCCESS(rv, rv);  nsImageLoadingContent::BindToTree(aDocument, aParent, aBindingParent,                                    aCompileEventHandlers);  if (aParent) {    UpdateFormOwner();  }  bool haveSrcset = IsSrcsetEnabled() &&                    HasAttr(kNameSpaceID_None, nsGkAtoms::srcset);  if (haveSrcset || HasAttr(kNameSpaceID_None, nsGkAtoms::src)) {    // FIXME: Bug 660963 it would be nice if we could just have    // ClearBrokenState update our state and do it fast...    ClearBrokenState();    RemoveStatesSilently(NS_EVENT_STATE_BROKEN);    // We don't handle responsive changes when not bound to a tree, update them    // now if necessary    if (haveSrcset) {      nsAutoString srcset;      GetAttr(kNameSpaceID_None, nsGkAtoms::srcset, srcset);      UpdateSourceSet(srcset);      if (mResponsiveSelector) {        nsAutoString src;        GetAttr(kNameSpaceID_None, nsGkAtoms::src, src);        mResponsiveSelector->SetDefaultSource(src);      }    }    // If loading is temporarily disabled, don't even launch MaybeLoadImage.    // Otherwise MaybeLoadImage may run later when someone has reenabled    // loading.    if (LoadingEnabled()) {      nsContentUtils::AddScriptRunner(        NS_NewRunnableMethod(this, &HTMLImageElement::MaybeLoadImage));    }  }  return rv;}
开发者ID:Treeeater,项目名称:ffmod,代码行数:49,


示例3: NS_ENSURE_SUCCESS

nsresultSVGIFrameElement::BindToTree(nsIDocument* aDocument,                             nsIContent* aParent,                             nsIContent* aBindingParent,                             bool aCompileEventHandlers){  nsresult rv = nsSVGElement::BindToTree(aDocument, aParent,                                         aBindingParent,                                         aCompileEventHandlers);  NS_ENSURE_SUCCESS(rv, rv);  if (aDocument) {    NS_ASSERTION(!nsContentUtils::IsSafeToRunScript(),                 "Missing a script blocker!");    PROFILER_LABEL("SVGIFrameElement", "BindToTree",      js::ProfileEntry::Category::OTHER);    // We're in a document now.  Kick off the frame load.    LoadSrc();    if (HasAttr(kNameSpaceID_None, nsGkAtoms::sandbox)) {      if (mFrameLoader) {        mFrameLoader->ApplySandboxFlags(GetSandboxFlags());      }    }  }  // We're now in document and scripts may move us, so clear  // the mNetworkCreated flag.  mNetworkCreated = false;  return rv;}
开发者ID:CodeSpeaker,项目名称:gecko-dev,代码行数:33,


示例4: SetBarredFromConstraintValidation

voidHTMLTextAreaElement::UpdateBarredFromConstraintValidation(){  SetBarredFromConstraintValidation(HasAttr(kNameSpaceID_None,                                            nsGkAtoms::readonly) ||                                    IsDisabled());}
开发者ID:JuannyWang,项目名称:gecko-dev,代码行数:7,


示例5: GetSrc

voidHTMLScriptElement::FreezeUriAsyncDefer(){  if (mFrozen) {    return;  }  // variation of this code in nsSVGScriptElement - check if changes  // need to be transfered when modifying  if (HasAttr(kNameSpaceID_None, nsGkAtoms::src)) {    nsAutoString src;    GetSrc(src);    NS_NewURI(getter_AddRefs(mUri), src);    // At this point mUri will be null for invalid URLs.    mExternal = true;    bool defer, async;    GetAsync(&async);    GetDefer(&defer);    mDefer = !async && defer;    mAsync = async;  }  mFrozen = true;}
开发者ID:brendandahl,项目名称:positron,代码行数:26,


示例6: RebuildPathAndVertices

// Helper to regenerate our path representation & its list of verticesvoidSVGMotionSMILAnimationFunction::  RebuildPathAndVertices(const nsIContent* aTargetElement){  NS_ABORT_IF_FALSE(mIsPathStale, "rebuilding path when it isn't stale");  // Clear stale data  mPath = nullptr;  mPathVertices.Clear();  mPathSourceType = ePathSourceType_None;  // Do we have a mpath child? if so, it trumps everything. Otherwise, we look  // through our list of path-defining attributes, in order of priority.  SVGMPathElement* firstMpathChild = GetFirstMPathChild(mAnimationElement);  if (firstMpathChild) {    RebuildPathAndVerticesFromMpathElem(firstMpathChild);    mValueNeedsReparsingEverySample = false;  } else if (HasAttr(nsGkAtoms::path)) {    RebuildPathAndVerticesFromPathAttr();    mValueNeedsReparsingEverySample = false;  } else {    // Get path & vertices from basic SMIL attrs: from/by/to/values    RebuildPathAndVerticesFromBasicAttrs(aTargetElement);    mValueNeedsReparsingEverySample = true;  }  mIsPathStale = false;}
开发者ID:MrKeiKun,项目名称:mozilla-central,代码行数:30,


示例7: CreateStaticImageClone

nsresultHTMLImageElement::CopyInnerTo(Element* aDest){  bool destIsStatic = aDest->OwnerDoc()->IsStaticDocument();  auto dest = static_cast<HTMLImageElement*>(aDest);  if (destIsStatic) {    CreateStaticImageClone(dest);  }  nsresult rv = nsGenericHTMLElement::CopyInnerTo(aDest);  if (NS_FAILED(rv)) {    return rv;  }  if (!destIsStatic) {    // In SetAttr (called from nsGenericHTMLElement::CopyInnerTo), dest skipped    // doing the image load because we passed in false for aNotify.  But we    // really do want it to do the load, so set it up to happen once the cloning    // reaches a stable state.    if (!dest->InResponsiveMode() &&        dest->HasAttr(kNameSpaceID_None, nsGkAtoms::src)) {      nsContentUtils::AddScriptRunner(        NS_NewRunnableMethod(dest, &HTMLImageElement::MaybeLoadImage));    }  }  return NS_OK;}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:28,


示例8: GetParent

EventStatesHTMLOptionElement::IntrinsicState() const{  EventStates state = nsGenericHTMLElement::IntrinsicState();  if (Selected()) {    state |= NS_EVENT_STATE_CHECKED;  }  if (DefaultSelected()) {    state |= NS_EVENT_STATE_DEFAULT;  }  // An <option> is disabled if it has @disabled set or if it's <optgroup> has  // @disabled set.  if (HasAttr(kNameSpaceID_None, nsGkAtoms::disabled)) {    state |= NS_EVENT_STATE_DISABLED;    state &= ~NS_EVENT_STATE_ENABLED;  } else {    nsIContent* parent = GetParent();    if (parent && parent->IsHTMLElement(nsGkAtoms::optgroup) &&        parent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled)) {      state |= NS_EVENT_STATE_DISABLED;      state &= ~NS_EVENT_STATE_ENABLED;    } else {      state &= ~NS_EVENT_STATE_DISABLED;      state |= NS_EVENT_STATE_ENABLED;    }  }  return state;}
开发者ID:Jar-win,项目名称:Waterfox,代码行数:30,


示例9: NS_ENSURE_SUCCESS

nsresultHTMLImageElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,                             nsIContent* aBindingParent,                             bool aCompileEventHandlers){  nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,                                                 aBindingParent,                                                 aCompileEventHandlers);  NS_ENSURE_SUCCESS(rv, rv);  nsImageLoadingContent::BindToTree(aDocument, aParent, aBindingParent,                                    aCompileEventHandlers);  if (HasAttr(kNameSpaceID_None, nsGkAtoms::src)) {    // FIXME: Bug 660963 it would be nice if we could just have    // ClearBrokenState update our state and do it fast...    ClearBrokenState();    RemoveStatesSilently(NS_EVENT_STATE_BROKEN);    // If loading is temporarily disabled, don't even launch MaybeLoadImage.    // Otherwise MaybeLoadImage may run later when someone has reenabled    // loading.    if (LoadingEnabled()) {      nsContentUtils::AddScriptRunner(        NS_NewRunnableMethod(this, &HTMLImageElement::MaybeLoadImage));    }  }  return rv;}
开发者ID:TelefonicaPushServer,项目名称:mozilla-central,代码行数:29,


示例10: UnlinkHrefTarget

nsresultSVGMPathElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,                              const nsAttrValue* aValue,                              const nsAttrValue* aOldValue,                              nsIPrincipal* aMaybeScriptedPrincipal,                              bool aNotify){  if (!aValue && aName == nsGkAtoms::href) {    // href attr being removed.    if (aNamespaceID == kNameSpaceID_None) {      UnlinkHrefTarget(true);      // After unsetting href, we may still have xlink:href, so we should      // try to add it back.      const nsAttrValue* xlinkHref =        mAttrsAndChildren.GetAttr(nsGkAtoms::href, kNameSpaceID_XLink);      if (xlinkHref) {        UpdateHrefTarget(GetParent(), xlinkHref->GetStringValue());      }    } else if (aNamespaceID == kNameSpaceID_XLink &&               !HasAttr(kNameSpaceID_None, nsGkAtoms::href)) {      UnlinkHrefTarget(true);    } // else: we unset some random-namespace href attribute, or unset xlink:href      // but still have href attribute, so keep the target linking to href.  }  return SVGMPathElementBase::AfterSetAttr(aNamespaceID, aName,                                           aValue, aOldValue,                                           aMaybeScriptedPrincipal, aNotify);}
开发者ID:heiher,项目名称:gecko-dev,代码行数:30,


示例11: GetAttr

voidSVGStyleElement::GetStyleSheetInfo(nsAString& aTitle,                                   nsAString& aType,                                   nsAString& aMedia,                                   bool* aIsScoped,                                   bool* aIsAlternate){  *aIsAlternate = false;  nsAutoString title;  GetAttr(kNameSpaceID_None, nsGkAtoms::title, title);  title.CompressWhitespace();  aTitle.Assign(title);  GetAttr(kNameSpaceID_None, nsGkAtoms::media, aMedia);  // The SVG spec is formulated in terms of the CSS2 spec,  // which specifies that media queries are case insensitive.  nsContentUtils::ASCIIToLower(aMedia);  GetAttr(kNameSpaceID_None, nsGkAtoms::type, aType);  if (aType.IsEmpty()) {    aType.AssignLiteral("text/css");  }  *aIsScoped = HasAttr(kNameSpaceID_None, nsGkAtoms::scoped);  return;}
开发者ID:bbondy,项目名称:mozilla-central,代码行数:28,


示例12: SetKeyPointsErrorFlag

voidSVGMotionSMILAnimationFunction::CheckKeyPoints(){  if (!HasAttr(nsGkAtoms::keyPoints))    return;  // attribute is ignored for calcMode="paced" (even if it's got errors)  if (GetCalcMode() == CALC_PACED) {    SetKeyPointsErrorFlag(false);  }  if (mKeyPoints.IsEmpty()) {    // keyPoints attr is set, but array is empty => it failed preliminary checks    SetKeyPointsErrorFlag(true);    return;  }  // Nothing else to check -- we can catch all keyPoints errors elsewhere.  // -  Formatting & range issues will be caught in SetKeyPoints, and will  //  result in an empty mKeyPoints array, which will drop us into the error  //  case above.  // -  Number-of-entries issues will be caught in CheckKeyTimes (and flagged  //  as a problem with |keyTimes|), since we use our keyPoints entries to  //  populate the "values" list, and that list's count gets passed to  //  CheckKeyTimes.}
开发者ID:MrKeiKun,项目名称:mozilla-central,代码行数:26,


示例13: double

/* * Scale the simple progress, taking into account any keyTimes. */voidnsSMILAnimationFunction::ScaleSimpleProgress(double& aProgress){  if (!HasAttr(nsGkAtoms::keyTimes))    return;  PRUint32 numTimes = mKeyTimes.Length();  if (numTimes < 2)    return;  PRUint32 i = 0;  for (; i < numTimes - 2 && aProgress >= mKeyTimes[i+1]; ++i);  double& intervalStart = mKeyTimes[i];  double& intervalEnd   = mKeyTimes[i+1];  double intervalLength = intervalEnd - intervalStart;  if (intervalLength <= 0.0) {    aProgress = intervalStart;    return;  }  aProgress = (i + (aProgress - intervalStart) / intervalLength) *         1.0 / double(numTimes - 1);}
开发者ID:lofter2011,项目名称:Icefox,代码行数:29,


示例14: IsToAnimation

bool SVGMotionSMILAnimationFunction::IsToAnimation() const {  // Rely on inherited method, but not if we have an <mpath> child or a |path|  // attribute, because they'll override any 'to' attr we might have.  // NOTE: We can't rely on mPathSourceType, because it might not have been  // set to a useful value yet (or it might be stale).  return !GetFirstMPathChild(mAnimationElement) && !HasAttr(nsGkAtoms::path) &&         SMILAnimationFunction::IsToAnimation();}
开发者ID:jasonLaster,项目名称:gecko-dev,代码行数:8,


示例15:

SVGPathElement*SVGMPathElement::GetReferencedPath(){  if (!HasAttr(kNameSpaceID_XLink, nsGkAtoms::href) &&      !HasAttr(kNameSpaceID_None, nsGkAtoms::href)) {    MOZ_ASSERT(!mPathTracker.get(),               "We shouldn't have a href target "               "if we don't have an xlink:href or href attribute");    return nullptr;  }  nsIContent* genericTarget = mPathTracker.get();  if (genericTarget && genericTarget->IsSVGElement(nsGkAtoms::path)) {    return static_cast<SVGPathElement*>(genericTarget);  }  return nullptr;}
开发者ID:heiher,项目名称:gecko-dev,代码行数:17,


示例16: U2ASSERT

//-------------------------------------------------------------------------------------------------void U2FrameXmlParser::ParseRenderTarget(TiXmlElement* elem, U2Frame* renderPath){	U2ASSERT(elem && renderPath);	U2FrameRenderTarget* pNewRT = U2_NEW U2FrameRenderTarget;	pNewRT->SetName(elem->Attribute("name"));	pNewRT->SetFormat(U2Dx9Texture::StringToPixelFormat(elem->Attribute("format")));	pNewRT->SetRelativeSize(GetFloatAttr(elem, "relSize", 1.0f));	if(HasAttr(elem, "width"))	{		pNewRT->SetWidth(GetIntAttr(elem, "width", 0));	}	if(HasAttr(elem, "height"))	{		pNewRT->SetHeight(GetIntAttr(elem, "height", 0));	}	renderPath->AddRenderTarget(pNewRT);}
开发者ID:DanielNeander,项目名称:my-3d-engine,代码行数:18,


示例17: GetUncomposedDoc

voidHTMLSharedElement::UnbindFromTree(bool aDeep, bool aNullParent){  nsIDocument* doc = GetUncomposedDoc();  nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);  // If we're removing a <base> from a document, we may need to update the  // document's base URI and base target  if (doc && mNodeInfo->Equals(nsGkAtoms::base)) {    if (HasAttr(kNameSpaceID_None, nsGkAtoms::href)) {      SetBaseURIUsingFirstBaseWithHref(doc, nullptr);    }    if (HasAttr(kNameSpaceID_None, nsGkAtoms::target)) {      SetBaseTargetUsingFirstBaseWithTarget(doc, nullptr);    }  }}
开发者ID:AtulKumar2,项目名称:gecko-dev,代码行数:18,


示例18: IsValueEmpty

boolHTMLTextAreaElement::IsValueMissing() const{  if (!HasAttr(kNameSpaceID_None, nsGkAtoms::required) || !IsMutable()) {    return false;  }  return IsValueEmpty();}
开发者ID:JuannyWang,项目名称:gecko-dev,代码行数:9,


示例19: CancelImageRequests

voidnsSVGImageElement::MaybeLoadSVGImage(){  if (HasAttr(kNameSpaceID_XLink, nsGkAtoms::href) &&      (NS_FAILED(LoadSVGImage(PR_FALSE, PR_TRUE)) ||       !LoadingEnabled())) {    CancelImageRequests(PR_TRUE);  }}
开发者ID:MozillaOnline,项目名称:gecko-dev,代码行数:9,


示例20: GetComposedDoc

boolHTMLAnchorElement::IsHTMLFocusable(bool aWithMouse,                                   bool *aIsFocusable, int32_t *aTabIndex){  if (nsGenericHTMLElement::IsHTMLFocusable(aWithMouse, aIsFocusable, aTabIndex)) {    return true;  }  // cannot focus links if there is no link handler  nsIDocument* doc = GetComposedDoc();  if (doc) {    nsIPresShell* presShell = doc->GetShell();    if (presShell) {      nsPresContext* presContext = presShell->GetPresContext();      if (presContext && !presContext->GetLinkHandler()) {        *aIsFocusable = false;        return false;      }    }  }  // Links that are in an editable region should never be focusable, even if  // they are in a contenteditable="false" region.  if (IsNodeInEditableRegion(this)) {    if (aTabIndex) {      *aTabIndex = -1;    }    *aIsFocusable = false;    return true;  }  if (!HasAttr(kNameSpaceID_None, nsGkAtoms::tabindex)) {    // check whether we're actually a link    if (!Link::HasURI()) {      // Not tabbable or focusable without href (bug 17605), unless      // forced to be via presence of nonnegative tabindex attribute      if (aTabIndex) {        *aTabIndex = -1;      }      *aIsFocusable = false;      return false;    }  }  if (aTabIndex && (sTabFocusModel & eTabFocus_linksMask) == 0) {    *aTabIndex = -1;  }  *aIsFocusable = true;  return false;}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:56,


示例21: NS_ENSURE_SUCCESS

nsresultHTMLImageElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,                             nsIContent* aBindingParent,                             bool aCompileEventHandlers){  nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,                                                 aBindingParent,                                                 aCompileEventHandlers);  NS_ENSURE_SUCCESS(rv, rv);  nsImageLoadingContent::BindToTree(aDocument, aParent, aBindingParent,                                    aCompileEventHandlers);  if (aParent) {    UpdateFormOwner();  }  if (HaveSrcsetOrInPicture()) {    if (aDocument && !mInDocResponsiveContent) {      aDocument->AddResponsiveContent(this);      mInDocResponsiveContent = true;    }    bool forceLoadEvent = HTMLPictureElement::IsPictureEnabled() &&      aParent && aParent->IsHTMLElement(nsGkAtoms::picture);    QueueImageLoadTask(forceLoadEvent);  } else if (!InResponsiveMode() &&             HasAttr(kNameSpaceID_None, nsGkAtoms::src)) {    // We skip loading when our attributes were set from parser land,    // so trigger a aForce=false load now to check if things changed.    // This isn't necessary for responsive mode, since creating the    // image load task is asynchronous we don't need to take special    // care to avoid doing so when being filled by the parser.    // FIXME: Bug 660963 it would be nice if we could just have    // ClearBrokenState update our state and do it fast...    ClearBrokenState();    RemoveStatesSilently(NS_EVENT_STATE_BROKEN);    // We still act synchronously for the non-responsive case (Bug    // 1076583), but still need to delay if it is unsafe to run    // script.    // If loading is temporarily disabled, don't even launch MaybeLoadImage.    // Otherwise MaybeLoadImage may run later when someone has reenabled    // loading.    if (LoadingEnabled()) {      nsContentUtils::AddScriptRunner(          NS_NewRunnableMethod(this, &HTMLImageElement::MaybeLoadImage));    }  }  return rv;}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:54,


示例22: CountMatchingAttrs

AttrCntType Combo::CountMatchingAttrs(Combo const& rOther) const {    AttrCntType result = 0;    for (AttrIndexType i_attr = 0; i_attr < msAttrCnt; i_attr++) {        AttrType const attr_value = rOther.mpArray[i_attr];        if (HasAttr(i_attr, attr_value)) {            ++result;        }    }    return result;}
开发者ID:stephengold,项目名称:gold-tiles,代码行数:11,


示例23:

PRBoolnsHTMLTextAreaElement::IsHTMLFocusable(PRBool *aIsFocusable, PRInt32 *aTabIndex){  if (nsGenericHTMLElement::IsHTMLFocusable(aIsFocusable, aTabIndex)) {    return PR_TRUE;  }  // disabled textareas are not focusable  *aIsFocusable = !HasAttr(kNameSpaceID_None, nsGkAtoms::disabled);  return PR_FALSE;}
开发者ID:AllenDou,项目名称:firefox,代码行数:11,


示例24:

void nsSVGMarkerElement::SetParentCoordCtxProvider(nsSVGSVGElement *aContext){  mCoordCtx = aContext;  mViewBoxToViewportTransform = nsnull;  if (mCoordCtx && !HasAttr(kNameSpaceID_None, nsGkAtoms::viewBox)) {    mViewBox.SetBaseValue(0, 0, mLengthAttributes[MARKERWIDTH].GetAnimValue(mCoordCtx),                          mLengthAttributes[MARKERHEIGHT].GetAnimValue(mCoordCtx),                          this, PR_FALSE);  }}
开发者ID:lofter2011,项目名称:Icefox,代码行数:12,


示例25: Draggable

boolHTMLAnchorElement::Draggable() const{  // links can be dragged as long as there is an href and the  // draggable attribute isn't false  if (!HasAttr(kNameSpaceID_None, nsGkAtoms::href)) {    // no href, so just use the same behavior as other elements    return nsGenericHTMLElement::Draggable();  }  return !AttrValueIs(kNameSpaceID_None, nsGkAtoms::draggable,                      nsGkAtoms::_false, eIgnoreCase);}
开发者ID:L2-D2,项目名称:gecko-dev,代码行数:13,


示例26: NS_ENSURE_SUCCESS

nsresultHTMLSharedElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,                              nsIContent* aBindingParent){  nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,                                                 aBindingParent);  NS_ENSURE_SUCCESS(rv, rv);  // The document stores a pointer to its base URI and base target, which we may  // need to update here.  if (mNodeInfo->Equals(nsGkAtoms::base) &&      aDocument) {    if (HasAttr(kNameSpaceID_None, nsGkAtoms::href)) {      SetBaseURIUsingFirstBaseWithHref(aDocument, this);    }    if (HasAttr(kNameSpaceID_None, nsGkAtoms::target)) {      SetBaseTargetUsingFirstBaseWithTarget(aDocument, this);    }  }  return NS_OK;}
开发者ID:staktrace,项目名称:gecko-dev,代码行数:22,


示例27: return

boolHTMLImageElement::HaveSrcsetOrInPicture(){  if (IsSrcsetEnabled() && HasAttr(kNameSpaceID_None, nsGkAtoms::srcset)) {    return true;  }  if (!HTMLPictureElement::IsPictureEnabled()) {    return false;  }  Element *parent = nsINode::GetParentElement();  return (parent && parent->IsHTMLElement(nsGkAtoms::picture));}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:14,



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


C++ HasCapture函数代码示例
C++ HasAnyFlags函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。