Move all nsIEnumerator usage over to NS_ENUMERATOR_FALSE from NS_COMFALSE in anticipation of nixing NS_COMFALSE in the near future.

r=scc
This commit is contained in:
braddr%puremagic.com 1999-10-28 03:16:48 +00:00
Родитель 7006901820
Коммит ea13be0a26
29 изменённых файлов: 110 добавлений и 106 удалений

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

@ -679,7 +679,7 @@ nsresult nsContentIterator::IsDone()
if (mIsDone)
return NS_OK;
else
return NS_COMFALSE;
return NS_ENUMERATOR_FALSE;
}

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

@ -796,7 +796,7 @@ nsresult nsRange::PopRanges(nsIDOMNode* aDestNode, PRInt32 aOffset, nsIContent*
nsVoidArray* theRangeList;
iter->CurrentNode(getter_AddRefs(cN));
while (cN && (NS_COMFALSE == iter->IsDone()))
while (cN && (NS_ENUMERATOR_FALSE == iter->IsDone()))
{
cN->GetRangeList(theRangeList);
if (theRangeList)
@ -1173,7 +1173,7 @@ nsresult nsRange::DeleteContents()
// close tag order, and mark for deletion any node that is not an ancestor
// of the start node.
iter->CurrentNode(getter_AddRefs(cN));
while (cN && (NS_COMFALSE == iter->IsDone()))
while (cN && (NS_ENUMERATOR_FALSE == iter->IsDone()))
{
// if node is not an ancestor of start node, delete it
if (startAncestorList.IndexOf(NS_STATIC_CAST(void*,cN)) == -1)
@ -1526,7 +1526,7 @@ nsresult nsRange::ToString(nsString& aReturn)
// loop through the content iterator, which returns nodes in the range in
// close tag order, and grab the text from any text node
iter->CurrentNode(getter_AddRefs(cN));
while (cN && (NS_COMFALSE == iter->IsDone()))
while (cN && (NS_ENUMERATOR_FALSE == iter->IsDone()))
{
#ifdef DEBUG_range
// If debug, dump it:

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

@ -648,7 +648,7 @@ NS_IMETHODIMP
CSSMediaRuleImpl::EnumerateRulesForwards(nsISupportsArrayEnumFunc aFunc, void * aData) const
{
if (mRules) {
return ((mRules->EnumerateForwards(aFunc, aData)) ? NS_OK : NS_COMFALSE);
return ((mRules->EnumerateForwards(aFunc, aData)) ? NS_OK : NS_ENUMERATOR_FALSE);
}
return NS_OK;
}

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

@ -337,7 +337,7 @@ NS_IMETHODIMP DeleteRangeTxn::CreateTxnsToDeleteNodesBetween()
result = iter->Init(mRange);
if (NS_FAILED(result)) return result;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIContent> content;

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

@ -421,7 +421,7 @@ nsHTMLEditor::GetFirstSelectedCell(nsCOMPtr<nsIDOMElement> &aCell)
// loop through the content iterator for each content node
nsCOMPtr<nsIContent> content;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
res = iter->CurrentNode(getter_AddRefs(content));
// Not likely!

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

@ -1749,7 +1749,7 @@ nsresult nsEditor::GetFirstEditableNode(nsIDOMNode *aRoot, nsIDOMNode* *outFirst
iter->MakePre();
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
nsCOMPtr<nsIContent> curNode;
rv = iter->CurrentNode(getter_AddRefs(curNode));
@ -1794,7 +1794,7 @@ nsresult nsEditor::GetLastEditableNode(nsIDOMNode *aRoot, nsIDOMNode* *outLastNo
iter->MakePre();
iter->Last();
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
nsCOMPtr<nsIContent> curNode;
rv = iter->CurrentNode(getter_AddRefs(curNode));
@ -2501,7 +2501,7 @@ nsEditor::GetBlockSectionsForRange(nsIDOMRange *aRange, nsISupportsArray *aSecti
iter->Init(aRange);
nsCOMPtr<nsIContent> currentContent;
iter->CurrentNode(getter_AddRefs(currentContent));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode>currentNode = do_QueryInterface(currentContent);
if (currentNode)
@ -2614,7 +2614,7 @@ nsEditor::IntermediateNodesAreInline(nsIDOMRange *aRange,
iter->Init(aRange);
nsCOMPtr<nsIContent> content;
iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
if ((content.get() != startContent.get()) &&
(content.get() != endContent.get()))
@ -3492,7 +3492,7 @@ nsEditor::NextNodeInBlock(nsIDOMNode *aNode, IterDirection aDir)
if (NS_FAILED(iter->Init(blockContent))) return nullNode;
if (NS_FAILED(iter->PositionAt(content))) return nullNode;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
if (NS_FAILED(iter->CurrentNode(getter_AddRefs(content)))) return nullNode;
// ignore nodes that aren't elements or text, or that are the block parent

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

@ -455,7 +455,7 @@ IsNodeInSelection(nsIDOMNode *aInNode, nsIDOMSelection *aInSelection, PRBool &aO
iter->Init(range);
nsCOMPtr<nsIContent> currentContent;
iter->CurrentNode(getter_AddRefs(currentContent));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode>currentNode = do_QueryInterface(currentContent);
if (currentNode.get()==aInNode)

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

@ -1806,7 +1806,7 @@ nsHTMLEditRules::IsEmptyNode(nsIDOMNode *aNode, PRBool *outIsEmptyNode)
res = iter->Init(nodeAsContent);
if (NS_FAILED(res)) return res;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIContent> content;
@ -2308,7 +2308,7 @@ nsHTMLEditRules::GetNodesForOperation(nsISupportsArray *inArrayOfRanges,
res = iter->Init(opRange);
if (NS_FAILED(res)) return res;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIContent> content;
@ -3332,7 +3332,7 @@ nsHTMLEditRules::CleanUpSelection(nsIDOMSelection *aSelection)
if (NS_FAILED(res)) return res;
// gather up a list of empty nodes
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIContent> content;

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

@ -734,7 +734,7 @@ NS_IMETHODIMP nsHTMLEditor::TabInTable(PRBool inIsShift, PRBool *outHandled)
*outHandled = PR_TRUE;
return NS_OK;
}
} while (iter->IsDone() == NS_COMFALSE);
} while (iter->IsDone() == NS_ENUMERATOR_FALSE);
}
return NS_OK;
}
@ -982,7 +982,7 @@ NS_IMETHODIMP nsHTMLEditor::GetInlineProperty(nsIAtom *aProperty,
iter->Init(range);
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
//if (gNoisy) { printf(" checking node %p\n", content.get()); }
nsCOMPtr<nsIDOMCharacterData>text;
@ -2485,7 +2485,7 @@ nsHTMLEditor::GetSelectedElement(const nsString& aTagName, nsIDOMElement** aRetu
iter->Init(range);
// loop through the content iterator for each content node
nsCOMPtr<nsIContent> content;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
res = iter->CurrentNode(getter_AddRefs(content));
// Note likely!
@ -3351,7 +3351,7 @@ nsHTMLEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList)
iter->Init(rootContent);
// loop through the content iterator for each content node
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIContent> content;
res = iter->CurrentNode(getter_AddRefs(content));
@ -4115,7 +4115,7 @@ nsresult nsHTMLEditor::GetAbsoluteOffsetsForPoints(nsIDOMNode *aInStartNode,
// loop through the content iterator for each content node
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
textNode = do_QueryInterface(content);
if (textNode)
@ -4202,7 +4202,7 @@ nsHTMLEditor::GetTextSelectionOffsetsForRange(nsIDOMSelection *aSelection,
// loop through the content iterator for each content node
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
textNode = do_QueryInterface(content);
if (textNode)
@ -4251,7 +4251,7 @@ void nsHTMLEditor::ResetTextSelectionForRange(nsIDOMNode *aParent,
// loop through the content iterator for each content node
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
textNode = do_QueryInterface(content);
if (textNode)
@ -5775,7 +5775,7 @@ nsHTMLEditor::SetTextPropertiesForNodeWithDifferentParents(nsIDOMRange *aRange,
iter->CurrentNode(getter_AddRefs(content));
nsAutoString tag;
aPropName->ToString(tag);
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
if ((content.get() != startContent.get()) &&
(content.get() != endContent.get()))
@ -6311,7 +6311,7 @@ nsHTMLEditor::RemoveTextPropertiesForNodeWithDifferentParents(nsIDOMNode *aStar
iter->CurrentNode(getter_AddRefs(content));
nsAutoString propName; // the property we are removing
aPropName->ToString(propName);
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
if ((content.get() != startContent.get()) &&
(content.get() != endContent.get()))
@ -6476,7 +6476,7 @@ nsHTMLEditor::CollapseAdjacentTextNodes(nsIDOMSelection *aInSelection)
if (NS_FAILED(result)) return result;
if (!currentItem) return NS_OK; // there are no ranges in the selection, so nothing to do
while ((NS_COMFALSE == enumerator->IsDone()))
while ((NS_ENUMERATOR_FALSE == enumerator->IsDone()))
{
nsCOMPtr<nsIDOMRange> range( do_QueryInterface(currentItem) );
nsCOMPtr<nsIContentIterator> iter;
@ -6489,7 +6489,7 @@ nsHTMLEditor::CollapseAdjacentTextNodes(nsIDOMSelection *aInSelection)
iter->Init(range);
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMCharacterData> text = do_QueryInterface(content);
if (text && anchorText.get() != text.get() && focusText.get() != text.get())

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

@ -337,7 +337,7 @@ NS_IMETHODIMP DeleteRangeTxn::CreateTxnsToDeleteNodesBetween()
result = iter->Init(mRange);
if (NS_FAILED(result)) return result;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIContent> content;

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

@ -1749,7 +1749,7 @@ nsresult nsEditor::GetFirstEditableNode(nsIDOMNode *aRoot, nsIDOMNode* *outFirst
iter->MakePre();
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
nsCOMPtr<nsIContent> curNode;
rv = iter->CurrentNode(getter_AddRefs(curNode));
@ -1794,7 +1794,7 @@ nsresult nsEditor::GetLastEditableNode(nsIDOMNode *aRoot, nsIDOMNode* *outLastNo
iter->MakePre();
iter->Last();
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
nsCOMPtr<nsIContent> curNode;
rv = iter->CurrentNode(getter_AddRefs(curNode));
@ -2501,7 +2501,7 @@ nsEditor::GetBlockSectionsForRange(nsIDOMRange *aRange, nsISupportsArray *aSecti
iter->Init(aRange);
nsCOMPtr<nsIContent> currentContent;
iter->CurrentNode(getter_AddRefs(currentContent));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode>currentNode = do_QueryInterface(currentContent);
if (currentNode)
@ -2614,7 +2614,7 @@ nsEditor::IntermediateNodesAreInline(nsIDOMRange *aRange,
iter->Init(aRange);
nsCOMPtr<nsIContent> content;
iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
if ((content.get() != startContent.get()) &&
(content.get() != endContent.get()))
@ -3492,7 +3492,7 @@ nsEditor::NextNodeInBlock(nsIDOMNode *aNode, IterDirection aDir)
if (NS_FAILED(iter->Init(blockContent))) return nullNode;
if (NS_FAILED(iter->PositionAt(content))) return nullNode;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
if (NS_FAILED(iter->CurrentNode(getter_AddRefs(content)))) return nullNode;
// ignore nodes that aren't elements or text, or that are the block parent

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

@ -1806,7 +1806,7 @@ nsHTMLEditRules::IsEmptyNode(nsIDOMNode *aNode, PRBool *outIsEmptyNode)
res = iter->Init(nodeAsContent);
if (NS_FAILED(res)) return res;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIContent> content;
@ -2308,7 +2308,7 @@ nsHTMLEditRules::GetNodesForOperation(nsISupportsArray *inArrayOfRanges,
res = iter->Init(opRange);
if (NS_FAILED(res)) return res;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIContent> content;
@ -3332,7 +3332,7 @@ nsHTMLEditRules::CleanUpSelection(nsIDOMSelection *aSelection)
if (NS_FAILED(res)) return res;
// gather up a list of empty nodes
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIContent> content;

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

@ -734,7 +734,7 @@ NS_IMETHODIMP nsHTMLEditor::TabInTable(PRBool inIsShift, PRBool *outHandled)
*outHandled = PR_TRUE;
return NS_OK;
}
} while (iter->IsDone() == NS_COMFALSE);
} while (iter->IsDone() == NS_ENUMERATOR_FALSE);
}
return NS_OK;
}
@ -982,7 +982,7 @@ NS_IMETHODIMP nsHTMLEditor::GetInlineProperty(nsIAtom *aProperty,
iter->Init(range);
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
//if (gNoisy) { printf(" checking node %p\n", content.get()); }
nsCOMPtr<nsIDOMCharacterData>text;
@ -2485,7 +2485,7 @@ nsHTMLEditor::GetSelectedElement(const nsString& aTagName, nsIDOMElement** aRetu
iter->Init(range);
// loop through the content iterator for each content node
nsCOMPtr<nsIContent> content;
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
res = iter->CurrentNode(getter_AddRefs(content));
// Note likely!
@ -3351,7 +3351,7 @@ nsHTMLEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList)
iter->Init(rootContent);
// loop through the content iterator for each content node
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIContent> content;
res = iter->CurrentNode(getter_AddRefs(content));
@ -4115,7 +4115,7 @@ nsresult nsHTMLEditor::GetAbsoluteOffsetsForPoints(nsIDOMNode *aInStartNode,
// loop through the content iterator for each content node
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
textNode = do_QueryInterface(content);
if (textNode)
@ -4202,7 +4202,7 @@ nsHTMLEditor::GetTextSelectionOffsetsForRange(nsIDOMSelection *aSelection,
// loop through the content iterator for each content node
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
textNode = do_QueryInterface(content);
if (textNode)
@ -4251,7 +4251,7 @@ void nsHTMLEditor::ResetTextSelectionForRange(nsIDOMNode *aParent,
// loop through the content iterator for each content node
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
textNode = do_QueryInterface(content);
if (textNode)
@ -5775,7 +5775,7 @@ nsHTMLEditor::SetTextPropertiesForNodeWithDifferentParents(nsIDOMRange *aRange,
iter->CurrentNode(getter_AddRefs(content));
nsAutoString tag;
aPropName->ToString(tag);
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
if ((content.get() != startContent.get()) &&
(content.get() != endContent.get()))
@ -6311,7 +6311,7 @@ nsHTMLEditor::RemoveTextPropertiesForNodeWithDifferentParents(nsIDOMNode *aStar
iter->CurrentNode(getter_AddRefs(content));
nsAutoString propName; // the property we are removing
aPropName->ToString(propName);
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
if ((content.get() != startContent.get()) &&
(content.get() != endContent.get()))
@ -6476,7 +6476,7 @@ nsHTMLEditor::CollapseAdjacentTextNodes(nsIDOMSelection *aInSelection)
if (NS_FAILED(result)) return result;
if (!currentItem) return NS_OK; // there are no ranges in the selection, so nothing to do
while ((NS_COMFALSE == enumerator->IsDone()))
while ((NS_ENUMERATOR_FALSE == enumerator->IsDone()))
{
nsCOMPtr<nsIDOMRange> range( do_QueryInterface(currentItem) );
nsCOMPtr<nsIContentIterator> iter;
@ -6489,7 +6489,7 @@ nsHTMLEditor::CollapseAdjacentTextNodes(nsIDOMSelection *aInSelection)
iter->Init(range);
nsCOMPtr<nsIContent> content;
result = iter->CurrentNode(getter_AddRefs(content));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMCharacterData> text = do_QueryInterface(content);
if (text && anchorText.get() != text.get() && focusText.get() != text.get())

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

@ -455,7 +455,7 @@ IsNodeInSelection(nsIDOMNode *aInNode, nsIDOMSelection *aInSelection, PRBool &aO
iter->Init(range);
nsCOMPtr<nsIContent> currentContent;
iter->CurrentNode(getter_AddRefs(currentContent));
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
nsCOMPtr<nsIDOMNode>currentNode = do_QueryInterface(currentContent);
if (currentNode.get()==aInNode)

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

@ -435,7 +435,7 @@ nsTextServicesDocument::FirstBlock()
nsCOMPtr<nsIContent> content;
while (NS_COMFALSE == mIterator->IsDone())
while (NS_ENUMERATOR_FALSE == mIterator->IsDone())
{
result = mIterator->CurrentNode(getter_AddRefs(content));
@ -505,7 +505,7 @@ nsTextServicesDocument::LastBlock()
nsCOMPtr<nsIContent> content;
nsCOMPtr<nsIContent> last;
while (NS_COMFALSE == mIterator->IsDone())
while (NS_ENUMERATOR_FALSE == mIterator->IsDone())
{
result = mIterator->CurrentNode(getter_AddRefs(content));
@ -729,7 +729,7 @@ nsTextServicesDocument::FirstSelectedBlock(TSDBlockSelectionStatus *aSelStatus,
return result;
}
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -856,7 +856,7 @@ nsTextServicesDocument::FirstSelectedBlock(TSDBlockSelectionStatus *aSelStatus,
// Now walk through the range till we find a text node.
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -975,7 +975,7 @@ nsTextServicesDocument::FirstSelectedBlock(TSDBlockSelectionStatus *aSelStatus,
return result;
}
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -1210,7 +1210,7 @@ nsTextServicesDocument::LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, P
return result;
}
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -1337,7 +1337,7 @@ nsTextServicesDocument::LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, P
// Now walk through the range till we find a text node.
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -1456,7 +1456,7 @@ nsTextServicesDocument::LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, P
return result;
}
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -1543,7 +1543,7 @@ nsTextServicesDocument::PrevBlock()
return result;
}
if (mIterator->IsDone() != NS_COMFALSE)
if (mIterator->IsDone() != NS_ENUMERATOR_FALSE)
{
mIteratorStatus = nsTextServicesDocument::eIsDone;
UNLOCK_DOC(this);
@ -1616,7 +1616,7 @@ nsTextServicesDocument::NextBlock()
return result;
}
if (mIterator->IsDone() != NS_COMFALSE)
if (mIterator->IsDone() != NS_ENUMERATOR_FALSE)
{
mIteratorStatus = nsTextServicesDocument::eIsDone;
UNLOCK_DOC(this);
@ -3313,7 +3313,7 @@ nsTextServicesDocument::GetCollapsedSelection(nsITextServicesDocument::TSDBlockS
// the text block, to find the first text node you
// come across.
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3364,7 +3364,7 @@ nsTextServicesDocument::GetCollapsedSelection(nsITextServicesDocument::TSDBlockS
if (NS_FAILED(result))
return result;
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3619,7 +3619,7 @@ nsTextServicesDocument::GetUncollapsedSelection(nsITextServicesDocument::TSDBloc
{
found = PR_FALSE;
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3660,7 +3660,7 @@ nsTextServicesDocument::GetUncollapsedSelection(nsITextServicesDocument::TSDBloc
{
found = PR_FALSE;
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3896,7 +3896,7 @@ nsTextServicesDocument::FirstTextNodeInCurrentBlock(nsIContentIterator *iter)
// Walk backwards over adjacent text nodes until
// we hit a block boundary:
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3970,7 +3970,7 @@ nsTextServicesDocument::FirstTextNodeInNextBlock(nsIContentIterator *aIterator)
if (!aIterator)
return NS_ERROR_NULL_POINTER;
while (NS_COMFALSE == aIterator->IsDone())
while (NS_ENUMERATOR_FALSE == aIterator->IsDone())
{
result = aIterator->CurrentNode(getter_AddRefs(content));
if (NS_FAILED(result))
@ -4021,7 +4021,7 @@ nsTextServicesDocument::GetFirstTextNodeInPrevBlock(nsIContent **aContent)
return result;
}
if (mIterator->IsDone() == NS_COMFALSE)
if (mIterator->IsDone() == NS_ENUMERATOR_FALSE)
{
result = mIterator->CurrentNode(aContent);
@ -4065,7 +4065,7 @@ nsTextServicesDocument::GetFirstTextNodeInNextBlock(nsIContent **aContent)
return result;
}
if (mIterator->IsDone() == NS_COMFALSE)
if (mIterator->IsDone() == NS_ENUMERATOR_FALSE)
{
result = mIterator->CurrentNode(aContent);
@ -4115,7 +4115,7 @@ nsTextServicesDocument::CreateOffsetTable(nsString *aStr)
PRInt32 offset = 0;
while (NS_COMFALSE == mIterator->IsDone())
while (NS_ENUMERATOR_FALSE == mIterator->IsDone())
{
result = mIterator->CurrentNode(getter_AddRefs(content));

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

@ -435,7 +435,7 @@ nsTextServicesDocument::FirstBlock()
nsCOMPtr<nsIContent> content;
while (NS_COMFALSE == mIterator->IsDone())
while (NS_ENUMERATOR_FALSE == mIterator->IsDone())
{
result = mIterator->CurrentNode(getter_AddRefs(content));
@ -505,7 +505,7 @@ nsTextServicesDocument::LastBlock()
nsCOMPtr<nsIContent> content;
nsCOMPtr<nsIContent> last;
while (NS_COMFALSE == mIterator->IsDone())
while (NS_ENUMERATOR_FALSE == mIterator->IsDone())
{
result = mIterator->CurrentNode(getter_AddRefs(content));
@ -729,7 +729,7 @@ nsTextServicesDocument::FirstSelectedBlock(TSDBlockSelectionStatus *aSelStatus,
return result;
}
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -856,7 +856,7 @@ nsTextServicesDocument::FirstSelectedBlock(TSDBlockSelectionStatus *aSelStatus,
// Now walk through the range till we find a text node.
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -975,7 +975,7 @@ nsTextServicesDocument::FirstSelectedBlock(TSDBlockSelectionStatus *aSelStatus,
return result;
}
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -1210,7 +1210,7 @@ nsTextServicesDocument::LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, P
return result;
}
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -1337,7 +1337,7 @@ nsTextServicesDocument::LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, P
// Now walk through the range till we find a text node.
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -1456,7 +1456,7 @@ nsTextServicesDocument::LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, P
return result;
}
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -1543,7 +1543,7 @@ nsTextServicesDocument::PrevBlock()
return result;
}
if (mIterator->IsDone() != NS_COMFALSE)
if (mIterator->IsDone() != NS_ENUMERATOR_FALSE)
{
mIteratorStatus = nsTextServicesDocument::eIsDone;
UNLOCK_DOC(this);
@ -1616,7 +1616,7 @@ nsTextServicesDocument::NextBlock()
return result;
}
if (mIterator->IsDone() != NS_COMFALSE)
if (mIterator->IsDone() != NS_ENUMERATOR_FALSE)
{
mIteratorStatus = nsTextServicesDocument::eIsDone;
UNLOCK_DOC(this);
@ -3313,7 +3313,7 @@ nsTextServicesDocument::GetCollapsedSelection(nsITextServicesDocument::TSDBlockS
// the text block, to find the first text node you
// come across.
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3364,7 +3364,7 @@ nsTextServicesDocument::GetCollapsedSelection(nsITextServicesDocument::TSDBlockS
if (NS_FAILED(result))
return result;
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3619,7 +3619,7 @@ nsTextServicesDocument::GetUncollapsedSelection(nsITextServicesDocument::TSDBloc
{
found = PR_FALSE;
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3660,7 +3660,7 @@ nsTextServicesDocument::GetUncollapsedSelection(nsITextServicesDocument::TSDBloc
{
found = PR_FALSE;
while (iter->IsDone() == NS_COMFALSE)
while (iter->IsDone() == NS_ENUMERATOR_FALSE)
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3896,7 +3896,7 @@ nsTextServicesDocument::FirstTextNodeInCurrentBlock(nsIContentIterator *iter)
// Walk backwards over adjacent text nodes until
// we hit a block boundary:
while (NS_COMFALSE == iter->IsDone())
while (NS_ENUMERATOR_FALSE == iter->IsDone())
{
result = iter->CurrentNode(getter_AddRefs(content));
@ -3970,7 +3970,7 @@ nsTextServicesDocument::FirstTextNodeInNextBlock(nsIContentIterator *aIterator)
if (!aIterator)
return NS_ERROR_NULL_POINTER;
while (NS_COMFALSE == aIterator->IsDone())
while (NS_ENUMERATOR_FALSE == aIterator->IsDone())
{
result = aIterator->CurrentNode(getter_AddRefs(content));
if (NS_FAILED(result))
@ -4021,7 +4021,7 @@ nsTextServicesDocument::GetFirstTextNodeInPrevBlock(nsIContent **aContent)
return result;
}
if (mIterator->IsDone() == NS_COMFALSE)
if (mIterator->IsDone() == NS_ENUMERATOR_FALSE)
{
result = mIterator->CurrentNode(aContent);
@ -4065,7 +4065,7 @@ nsTextServicesDocument::GetFirstTextNodeInNextBlock(nsIContent **aContent)
return result;
}
if (mIterator->IsDone() == NS_COMFALSE)
if (mIterator->IsDone() == NS_ENUMERATOR_FALSE)
{
result = mIterator->CurrentNode(aContent);
@ -4115,7 +4115,7 @@ nsTextServicesDocument::CreateOffsetTable(nsString *aStr)
PRInt32 offset = 0;
while (NS_COMFALSE == mIterator->IsDone())
while (NS_ENUMERATOR_FALSE == mIterator->IsDone())
{
result = mIterator->CurrentNode(getter_AddRefs(content));

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

@ -170,7 +170,7 @@ nsFrameIterator::CurrentItem(nsISupports **aItem)
return NS_ERROR_NULL_POINTER;
*aItem = mCurrent;
if (mOffEdge)
return NS_COMFALSE;
return NS_ENUMERATOR_FALSE;
return NS_OK;
}
@ -181,7 +181,7 @@ nsFrameIterator::IsDone()//what does this mean??off edge? yes
{
if (mOffEdge != 0)
return NS_OK;
return NS_COMFALSE;
return NS_ENUMERATOR_FALSE;
}

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

@ -679,7 +679,7 @@ nsresult nsContentIterator::IsDone()
if (mIsDone)
return NS_OK;
else
return NS_COMFALSE;
return NS_ENUMERATOR_FALSE;
}

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

@ -170,7 +170,7 @@ nsFrameIterator::CurrentItem(nsISupports **aItem)
return NS_ERROR_NULL_POINTER;
*aItem = mCurrent;
if (mOffEdge)
return NS_COMFALSE;
return NS_ENUMERATOR_FALSE;
return NS_OK;
}
@ -181,7 +181,7 @@ nsFrameIterator::IsDone()//what does this mean??off edge? yes
{
if (mOffEdge != 0)
return NS_OK;
return NS_COMFALSE;
return NS_ENUMERATOR_FALSE;
}

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

@ -796,7 +796,7 @@ nsresult nsRange::PopRanges(nsIDOMNode* aDestNode, PRInt32 aOffset, nsIContent*
nsVoidArray* theRangeList;
iter->CurrentNode(getter_AddRefs(cN));
while (cN && (NS_COMFALSE == iter->IsDone()))
while (cN && (NS_ENUMERATOR_FALSE == iter->IsDone()))
{
cN->GetRangeList(theRangeList);
if (theRangeList)
@ -1173,7 +1173,7 @@ nsresult nsRange::DeleteContents()
// close tag order, and mark for deletion any node that is not an ancestor
// of the start node.
iter->CurrentNode(getter_AddRefs(cN));
while (cN && (NS_COMFALSE == iter->IsDone()))
while (cN && (NS_ENUMERATOR_FALSE == iter->IsDone()))
{
// if node is not an ancestor of start node, delete it
if (startAncestorList.IndexOf(NS_STATIC_CAST(void*,cN)) == -1)
@ -1526,7 +1526,7 @@ nsresult nsRange::ToString(nsString& aReturn)
// loop through the content iterator, which returns nodes in the range in
// close tag order, and grab the text from any text node
iter->CurrentNode(getter_AddRefs(cN));
while (cN && (NS_COMFALSE == iter->IsDone()))
while (cN && (NS_ENUMERATOR_FALSE == iter->IsDone()))
{
#ifdef DEBUG_range
// If debug, dump it:

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

@ -555,7 +555,7 @@ nsRangeListIterator::IsDone()
nsresult rv = mDomSelection->mRangeArray->Count(&cnt);
if (NS_FAILED(rv)) return rv;
if (mIndex >= 0 && mIndex < (PRInt32)cnt ) {
return NS_COMFALSE;
return NS_ENUMERATOR_FALSE;
}
return NS_OK;
}
@ -1855,7 +1855,7 @@ nsDOMSelection::selectFrames(nsIPresContext* aPresContext,
if (NS_SUCCEEDED(result))
{
nsCOMPtr<nsIContent> innercontent;
while (NS_COMFALSE == aInnerIter->IsDone())
while (NS_ENUMERATOR_FALSE == aInnerIter->IsDone())
{
result = aInnerIter->CurrentNode(getter_AddRefs(innercontent));
if (NS_FAILED(result) || !innercontent)
@ -1918,7 +1918,7 @@ nsDOMSelection::selectFrames(nsIPresContext* aPresContext, nsIDOMRange *aRange,
}
//end start content
result = iter->First();
while (NS_SUCCEEDED(result) && NS_COMFALSE == iter->IsDone())
while (NS_SUCCEEDED(result) && NS_ENUMERATOR_FALSE == iter->IsDone())
{
result = iter->CurrentNode(getter_AddRefs(content));
if (NS_FAILED(result) || !content)

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

@ -648,7 +648,7 @@ NS_IMETHODIMP
CSSMediaRuleImpl::EnumerateRulesForwards(nsISupportsArrayEnumFunc aFunc, void * aData) const
{
if (mRules) {
return ((mRules->EnumerateForwards(aFunc, aData)) ? NS_OK : NS_COMFALSE);
return ((mRules->EnumerateForwards(aFunc, aData)) ? NS_OK : NS_ENUMERATOR_FALSE);
}
return NS_OK;
}

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

@ -648,7 +648,7 @@ NS_IMETHODIMP
CSSMediaRuleImpl::EnumerateRulesForwards(nsISupportsArrayEnumFunc aFunc, void * aData) const
{
if (mRules) {
return ((mRules->EnumerateForwards(aFunc, aData)) ? NS_OK : NS_COMFALSE);
return ((mRules->EnumerateForwards(aFunc, aData)) ? NS_OK : NS_ENUMERATOR_FALSE);
}
return NS_OK;
}

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

@ -1076,7 +1076,7 @@ nsRegSubtreeEnumerator::CurrentItem( nsISupports **result) {
------------------------------------------------------------------------------*/
NS_IMETHODIMP
nsRegSubtreeEnumerator::IsDone() {
nsresult rv = mDone ? NS_OK : NS_COMFALSE;
nsresult rv = mDone ? NS_OK : NS_ENUMERATOR_FALSE;
return rv;
}

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

@ -1126,7 +1126,7 @@ nsBaseWidget::Enumerator::IsDone()
return NS_OK;
}
else {
return NS_COMFALSE;
return NS_ENUMERATOR_FALSE;
}
return NS_OK;
}

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

@ -1076,7 +1076,7 @@ nsRegSubtreeEnumerator::CurrentItem( nsISupports **result) {
------------------------------------------------------------------------------*/
NS_IMETHODIMP
nsRegSubtreeEnumerator::IsDone() {
nsresult rv = mDone ? NS_OK : NS_COMFALSE;
nsresult rv = mDone ? NS_OK : NS_ENUMERATOR_FALSE;
return rv;
}

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

@ -87,7 +87,7 @@ nsConjoiningEnumerator::IsDone(void)
{
return (mCurrent == mFirst && mCurrent->IsDone() == NS_OK)
|| (mCurrent == mSecond && mCurrent->IsDone() == NS_OK)
? NS_OK : NS_COMFALSE;
? NS_OK : NS_ENUMERATOR_FALSE;
}
////////////////////////////////////////////////////////////////////////////////
@ -156,7 +156,7 @@ nsEnumeratorContains(nsIEnumerator* e, nsISupports* item)
}
NS_RELEASE(other);
}
return NS_COMFALSE; // false -- doesn't exist
return NS_ENUMERATOR_FALSE; // false -- doesn't exist
}
////////////////////////////////////////////////////////////////////////////////
@ -343,7 +343,7 @@ NS_IMETHODIMP
nsUnionEnumerator::IsDone(void)
{
return (mFirst->IsDone() == NS_OK && mSecond->IsDone() == NS_OK)
? NS_OK : NS_COMFALSE;
? NS_OK : NS_ENUMERATOR_FALSE;
}
////////////////////////////////////////////////////////////////////////////////

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

@ -18,6 +18,10 @@
#include "nsISupports.idl"
%{C++
#define NS_ENUMERATOR_FALSE 1
%}
[scriptable, uuid(D1899240-F9D2-11D2-BDD6-000064657374)]
interface nsISimpleEnumerator : nsISupports {
boolean HasMoreElements();

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

@ -84,7 +84,7 @@ nsSupportsArrayEnumerator::IsDone()
nsresult rv = mArray->Count(&cnt);
if (NS_FAILED(rv)) return rv;
return (mCursor >= 0 && mCursor < (PRInt32)cnt)
? NS_COMFALSE : NS_OK;
? NS_ENUMERATOR_FALSE : NS_OK;
}
////////////////////////////////////////////////////////////////////////////////