diff --git a/content/xslt/src/xslt/txFunctionAvailableFnCall.cpp b/content/xslt/src/xslt/txFunctionAvailableFnCall.cpp index bcdf930a10b0..340ff0565840 100644 --- a/content/xslt/src/xslt/txFunctionAvailableFnCall.cpp +++ b/content/xslt/src/xslt/txFunctionAvailableFnCall.cpp @@ -38,10 +38,10 @@ * ***** END LICENSE BLOCK ***** */ #include "txIXPathContext.h" +#include "ExprResult.h" #include "txAtoms.h" #include "XMLUtils.h" #include "XSLTFunctions.h" -#include "ExprResult.h" #include "txNamespaceMap.h" /* diff --git a/content/xslt/src/xslt/txGenerateIdFunctionCall.cpp b/content/xslt/src/xslt/txGenerateIdFunctionCall.cpp index 6584bf99f9c0..fa743d1de70f 100644 --- a/content/xslt/src/xslt/txGenerateIdFunctionCall.cpp +++ b/content/xslt/src/xslt/txGenerateIdFunctionCall.cpp @@ -26,7 +26,7 @@ #include "txIXPathContext.h" #include "XSLTFunctions.h" #include "prprf.h" -#include "NodeSet.h" +#include "txNodeSet.h" /* Implementation of XSLT 1.0 extension function: generate-id @@ -78,9 +78,9 @@ GenerateIdFunctionCall::evaluate(txIEvalContext* aContext, return NS_ERROR_XSLT_NODESET_EXPECTED; } - NodeSet* nodes = NS_STATIC_CAST(NodeSet*, - NS_STATIC_CAST(txAExprResult*, - exprResult)); + txNodeSet* nodes = NS_STATIC_CAST(txNodeSet*, + NS_STATIC_CAST(txAExprResult*, + exprResult)); if (nodes->isEmpty()) { aContext->recycler()->getEmptyStringResult(aResult); diff --git a/content/xslt/src/xslt/txKey.h b/content/xslt/src/xslt/txKey.h index 6559056652ff..a1c1d61e1077 100644 --- a/content/xslt/src/xslt/txKey.h +++ b/content/xslt/src/xslt/txKey.h @@ -40,10 +40,10 @@ #define txKey_h__ #include "nsDoubleHashtable.h" -#include "XMLUtils.h" -#include "NodeSet.h" +#include "txNodeSet.h" #include "List.h" #include "txXSLTPatterns.h" +#include "XMLUtils.h" class txPattern; class Expr; @@ -70,7 +70,7 @@ struct txKeyValueHashEntry : public PLDHashEntryHdr { txKeyValueHashEntry(const void* aKey) : mKey(*NS_STATIC_CAST(const txKeyValueHashKey*, aKey)), - mNodeSet(new NodeSet(nsnull)) + mNodeSet(new txNodeSet(nsnull)) { } @@ -80,7 +80,7 @@ struct txKeyValueHashEntry : public PLDHashEntryHdr static PLDHashNumber HashKey(const void* aKey); txKeyValueHashKey mKey; - nsRefPtr mNodeSet; + nsRefPtr mNodeSet; }; DECL_DHASH_WRAPPER(txKeyValueHash, txKeyValueHashEntry, txKeyValueHashKey&) @@ -207,7 +207,7 @@ public: const nsAString& aKeyValue, PRBool aIndexIfNotFound, txExecutionState& aEs, - NodeSet** aResult); + txNodeSet** aResult); private: // Hash of all indexed key-values @@ -220,7 +220,7 @@ private: const txExpandedNameMap& mKeys; // Empty nodeset returned if no key is found - nsRefPtr mEmptyNodeSet; + nsRefPtr mEmptyNodeSet; }; diff --git a/content/xslt/src/xslt/txKeyFunctionCall.cpp b/content/xslt/src/xslt/txKeyFunctionCall.cpp index 46b9f5a8d2b1..a211e963f4de 100644 --- a/content/xslt/src/xslt/txKeyFunctionCall.cpp +++ b/content/xslt/src/xslt/txKeyFunctionCall.cpp @@ -395,7 +395,8 @@ nsresult txXSLKey::testNode(Node* aNode, txNodeSet* res = NS_STATIC_CAST(txNodeSet*, NS_STATIC_CAST(txAExprResult*, exprResult)); - for (int i=0; isize(); i++) { + PRInt32 i; + for (i = 0; i < res->size(); ++i) { val.Truncate(); XMLDOMUtils::getNodeValue(res->get(i), val); diff --git a/content/xslt/src/xslt/txNodeSorter.cpp b/content/xslt/src/xslt/txNodeSorter.cpp index 22d7e59544b9..580bc4c80a14 100644 --- a/content/xslt/src/xslt/txNodeSorter.cpp +++ b/content/xslt/src/xslt/txNodeSorter.cpp @@ -45,7 +45,7 @@ #include "ExprResult.h" #include "Expr.h" #include "txStringUtils.h" -#include "NodeSet.h" +#include "txNodeSet.h" #include "prmem.h" #include "nsQuickSort.h" @@ -168,8 +168,8 @@ txNodeSorter::addSortElement(Expr* aSelectExpr, Expr* aLangExpr, } nsresult -txNodeSorter::sortNodeSet(NodeSet* aNodes, txExecutionState* aEs, - NodeSet** aResult) +txNodeSorter::sortNodeSet(txNodeSet* aNodes, txExecutionState* aEs, + txNodeSet** aResult) { if (mNKeys == 0 || aNodes->isEmpty()) { NS_ADDREF(*aResult = aNodes); @@ -179,7 +179,7 @@ txNodeSorter::sortNodeSet(NodeSet* aNodes, txExecutionState* aEs, *aResult = nsnull; - nsRefPtr sortedNodes; + nsRefPtr sortedNodes; nsresult rv = aEs->recycler()->getNodeSet(getter_AddRefs(sortedNodes)); NS_ENSURE_SUCCESS(rv, rv); @@ -250,7 +250,6 @@ txNodeSorter::compareNodes(const void* aIndexA, const void* aIndexB, SortData* sortData = NS_STATIC_CAST(SortData*, aSortData); NS_ENSURE_SUCCESS(sortData->mRv, -1); - nsresult rv = NS_OK; txListIterator iter(&sortData->mNodeSorter->mSortKeys); PRUint32 indexA = *NS_STATIC_CAST(const PRUint32*, aIndexA); PRUint32 indexB = *NS_STATIC_CAST(const PRUint32*, aIndexB); diff --git a/content/xslt/src/xslt/txNodeSorter.h b/content/xslt/src/xslt/txNodeSorter.h index 08e2b6a02607..452a3393a375 100644 --- a/content/xslt/src/xslt/txNodeSorter.h +++ b/content/xslt/src/xslt/txNodeSorter.h @@ -47,8 +47,8 @@ class Element; class Expr; class Node; -class NodeSet; class txExecutionState; +class txNodeSet; class TxObject; class txXPathResultComparator; class txIEvalContext; @@ -67,8 +67,8 @@ public: nsresult addSortElement(Expr* aSelectExpr, Expr* aLangExpr, Expr* aDataTypeExpr, Expr* aOrderExpr, Expr* aCaseOrderExpr, txIEvalContext* aContext); - nsresult sortNodeSet(NodeSet* aNodes, txExecutionState* aEs, - NodeSet** aResult); + nsresult sortNodeSet(txNodeSet* aNodes, txExecutionState* aEs, + txNodeSet** aResult); private: struct SortData