Bug 311827: Make GetAttr return a bool rather then an nsresult.

r/sr=bz
This commit is contained in:
cvshook%sicking.cc 2005-11-02 07:43:09 +00:00
Родитель 53bc03cd15
Коммит 70f1191de9
2 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -352,8 +352,7 @@ txXPathNodeUtils::getAttr(const txXPathNode& aNode, nsIAtom* aLocalName,
return PR_FALSE;
}
nsresult rv = aNode.mContent->GetAttr(aNSID, aLocalName, aValue);
return NS_SUCCEEDED(rv) && rv != NS_CONTENT_ATTR_NOT_THERE;
return aNode.mContent->GetAttr(aNSID, aLocalName, aValue);
}
/* static */

Просмотреть файл

@ -370,8 +370,8 @@ MBool txIdPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
if (!idAttr) {
return MB_FALSE; // no ID for this element defined, can't match
}
nsresult rv = content->GetAttr(kNameSpaceID_None, idAttr, value);
if (rv != NS_CONTENT_ATTR_HAS_VALUE) {
content->GetAttr(kNameSpaceID_None, idAttr, value);
if (value.IsEmpty()) {
return MB_FALSE; // no ID attribute given
}
#endif // TX_EXE