зеркало из https://github.com/mozilla/pjs.git
Bug 619282 continuing is always false in nsFind::Find
r=neil
This commit is contained in:
Родитель
838a96c08a
Коммит
1769882ad0
|
@ -974,9 +974,6 @@ nsFind::Find(const PRUnichar *aPatText, nsIDOMRange* aSearchRange,
|
|||
// (only matters when we're matching)
|
||||
PRBool inWhitespace = PR_FALSE;
|
||||
|
||||
// Have we extended a search past the endpoint?
|
||||
PRBool continuing = PR_FALSE;
|
||||
|
||||
// Place to save the range start point in case we find a match:
|
||||
nsCOMPtr<nsIDOMNode> matchAnchorNode;
|
||||
PRInt32 matchAnchorOffset = 0;
|
||||
|
@ -1004,7 +1001,7 @@ nsFind::Find(const PRUnichar *aPatText, nsIDOMRange* aSearchRange,
|
|||
{
|
||||
// Are we in the middle of a match?
|
||||
// If so, try again with continuation.
|
||||
if (matchAnchorNode && !continuing)
|
||||
if (matchAnchorNode)
|
||||
NextNode(aSearchRange, aStartPoint, aEndPoint, PR_TRUE);
|
||||
|
||||
// Reset the iterator, so this nsFind will be usable if
|
||||
|
@ -1125,7 +1122,7 @@ nsFind::Find(const PRUnichar *aPatText, nsIDOMRange* aSearchRange,
|
|||
|
||||
// Have we gone past the endpoint yet?
|
||||
// If we have, and we're not in the middle of a match, return.
|
||||
if (mIterNode == endNode && !continuing &&
|
||||
if (mIterNode == endNode &&
|
||||
((mFindBackward && (findex < endOffset)) ||
|
||||
(!mFindBackward && (findex > endOffset))))
|
||||
{
|
||||
|
@ -1278,11 +1275,6 @@ nsFind::Find(const PRUnichar *aPatText, nsIDOMRange* aSearchRange,
|
|||
#ifdef DEBUG_FIND
|
||||
printf("NOT: %c == %c\n", c, patc);
|
||||
#endif
|
||||
// If we were continuing, then this ends our search.
|
||||
if (continuing) {
|
||||
ResetAll();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// If we didn't match, go back to the beginning of patStr,
|
||||
// and set findex back to the next char after
|
||||
|
|
Загрузка…
Ссылка в новой задаче