Bug 1302470 Part 1: Remove trailing whitespace. r?mstange
MozReview-Commit-ID: 1vlEVEn07Qb
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -418,17 +418,17 @@ nsTypeAheadFind::FindItNow(nsIPresShell
return NS_ERROR_FAILURE;
mFind->SetFindBackwards(aFindPrev);
while (true) { // ----- Outer while loop: go through all docs -----
while (true) { // === Inner while loop: go through a single doc ===
mFind->Find(mTypeAheadBuffer.get(), mSearchRange, mStartPointRange,
mEndPointRange, getter_AddRefs(returnRange));
-
+
if (!returnRange)
break; // Nothing found in this doc, go to outer loop (try next doc)
// ------- Test resulting found range for success conditions ------
bool isInsideLink = false, isStartingLink = false;
if (aIsLinksOnly) {
// Don't check if inside link when searching all text
@@ -1004,28 +1004,28 @@ nsTypeAheadFind::Find(const nsAString& a
// is typed
mStartFindRange = nullptr;
mSelectionController = nullptr;
*aResult = FIND_FOUND;
return NS_OK;
}
- bool atEnd = false;
+ bool atEnd = false;
if (mTypeAheadBuffer.Length()) {
const nsAString& oldStr = Substring(mTypeAheadBuffer, 0, mTypeAheadBuffer.Length());
const nsAString& newStr = Substring(aSearchString, 0, mTypeAheadBuffer.Length());
if (oldStr.Equals(newStr))
atEnd = true;
-
+
const nsAString& newStr2 = Substring(aSearchString, 0, aSearchString.Length());
const nsAString& oldStr2 = Substring(mTypeAheadBuffer, 0, aSearchString.Length());
if (oldStr2.Equals(newStr2))
atEnd = true;
-
+
if (!atEnd)
mStartFindRange = nullptr;
}
if (!mIsSoundInitialized && !mNotFoundSoundURL.IsEmpty()) {
// This makes sure system sound library is loaded so that
// there's no lag before the first sound is played
// by waiting for the first keystroke, we still get the startup time benefits.
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.h
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.h
@@ -90,17 +90,17 @@ protected:
// mLastFindLength is the character length of the last find string. It is used for
// disabling the "not found" sound when using backspace or delete
uint32_t mLastFindLength;
// Sound is played asynchronously on some platforms.
// If we destroy mSoundInterface before sound has played, it won't play
nsCOMPtr<nsISound> mSoundInterface;
bool mIsSoundInitialized;
-
+
// where selection was when user started the find
nsCOMPtr<nsIDOMRange> mStartFindRange;
nsCOMPtr<nsIDOMRange> mSearchRange;
nsCOMPtr<nsIDOMRange> mStartPointRange;
nsCOMPtr<nsIDOMRange> mEndPointRange;
// Cached useful interfaces
nsCOMPtr<nsIFind> mFind;