зеркало из https://github.com/mozilla/pjs.git
Merging whitespace changes/renames/cleanup from TX_WALKER_BRANCH to ease merging, no functional changes. Bug 151002. r=sicking.
This commit is contained in:
Родитель
ff0ab23931
Коммит
77fdd8dfd7
|
@ -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"
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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<NodeSet> mNodeSet;
|
||||
nsRefPtr<txNodeSet> 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<NodeSet> mEmptyNodeSet;
|
||||
nsRefPtr<txNodeSet> mEmptyNodeSet;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -395,7 +395,8 @@ nsresult txXSLKey::testNode(Node* aNode,
|
|||
txNodeSet* res = NS_STATIC_CAST(txNodeSet*,
|
||||
NS_STATIC_CAST(txAExprResult*,
|
||||
exprResult));
|
||||
for (int i=0; i<res->size(); i++) {
|
||||
PRInt32 i;
|
||||
for (i = 0; i < res->size(); ++i) {
|
||||
val.Truncate();
|
||||
XMLDOMUtils::getNodeValue(res->get(i), val);
|
||||
|
||||
|
|
|
@ -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<NodeSet> sortedNodes;
|
||||
nsRefPtr<txNodeSet> 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);
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче