113562 - nsIContent needs HasAttr method, r=jag, sr=jst
git-svn-id: svn://10.0.0.236/trunk@110204 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -320,6 +320,7 @@ public:
|
||||
nsHTMLValue& aValue) const;
|
||||
NS_IMETHOD GetAttribute(nsIAtom* aAttrName,
|
||||
const nsHTMLValue** aValue) const;
|
||||
NS_IMETHOD_(PRBool) HasAttribute(nsIAtom* aAttrName) const;
|
||||
|
||||
NS_IMETHOD GetAttributeCount(PRInt32& aCount) const;
|
||||
|
||||
@@ -626,6 +627,16 @@ nsHTMLMappedAttributes::GetAttribute(nsIAtom* aAttrName,
|
||||
return NS_CONTENT_ATTR_NOT_THERE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLMappedAttributes::HasAttribute(nsIAtom* aAttrName) const
|
||||
{
|
||||
if (!aAttrName)
|
||||
return PR_FALSE;
|
||||
|
||||
const HTMLAttribute* attr = HTMLAttribute::FindHTMLAttribute(aAttrName, &mFirst);
|
||||
return attr != nsnull;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLMappedAttributes::GetAttributeCount(PRInt32& aCount) const
|
||||
{
|
||||
@@ -846,6 +857,8 @@ public:
|
||||
NS_IMETHOD GetAttribute(nsIAtom* aAttribute,
|
||||
const nsHTMLValue** aValue) const;
|
||||
|
||||
NS_IMETHOD_(PRBool) HasAttribute(nsIAtom* aAttrName) const;
|
||||
|
||||
NS_IMETHOD GetAttributeNameAt(PRInt32 aIndex,
|
||||
nsIAtom*& aName) const;
|
||||
|
||||
@@ -1358,6 +1371,18 @@ HTMLAttributesImpl::GetAttribute(nsIAtom* aAttrName,
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
HTMLAttributesImpl::HasAttribute(nsIAtom* aAttrName) const
|
||||
{
|
||||
if (mMapped)
|
||||
return mMapped->HasAttribute(aAttrName);
|
||||
|
||||
const HTMLAttribute* attr = HTMLAttribute::FindHTMLAttribute(aAttrName, mFirstUnmapped);
|
||||
return attr != nsnull;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLAttributesImpl::GetAttributeNameAt(PRInt32 aIndex,
|
||||
nsIAtom*& aName) const
|
||||
|
||||
Reference in New Issue
Block a user