зеркало из https://github.com/mozilla/pjs.git
Bug 311827: Make GetAttr return a bool rather then an nsresult.
r/sr=bz
This commit is contained in:
Родитель
53bc03cd15
Коммит
70f1191de9
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче