Bug 343077 - Find Again toolbarbutton doesn't switch back to normal-find if the findbar is opened after links TAF. r=masayuki.

This commit is contained in:
mozilla.mano%sent.com 2006-12-01 12:19:26 +00:00
Родитель 4c5d9f8102
Коммит e74ffb7257
3 изменённых файлов: 12 добавлений и 7 удалений

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

@ -51,7 +51,7 @@ interface nsIDocShell;
/****************************** nsTypeAheadFind ******************************/
[scriptable, uuid(e6a9966a-5fc8-41a4-9d9d-9c15e9664c45)]
[scriptable, uuid(1280e20d-d739-45cc-980b-182abda4fbe0)]
interface nsITypeAheadFind : nsISupports
{
/****************************** Initializer ******************************/
@ -70,7 +70,7 @@ interface nsITypeAheadFind : nsISupports
unsigned short find(in AString aSearchString, in boolean aLinksOnly, in boolean aHasFocus);
/* Find another match in the page. */
unsigned short findAgain(in boolean findBackwards, in boolean aHasFocus);
unsigned short findAgain(in boolean findBackwards, in boolean aLinksOnly, in boolean aHasFocus);
/**************************** Helper functions ***************************/

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

@ -868,13 +868,15 @@ nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
*aIsStartingLink = PR_FALSE;
}
NS_IMETHODIMP
nsTypeAheadFind::FindAgain(PRBool aFindBackwards, PRBool aHasFocus,
PRUint16* aResult)
/* Find another match in the page. */
NS_IMETHODIMP
nsTypeAheadFind::FindAgain(PRBool aFindBackwards, PRBool aLinksOnly,
PRBool aHasFocus, PRUint16* aResult)
{
*aResult = FIND_NOTFOUND;
mLinksOnly = aLinksOnly;
if (!mTypeAheadBuffer.IsEmpty())
FindItNow(nsnull, mLinksOnly, PR_FALSE, aFindBackwards, aHasFocus, aResult);

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

@ -1113,8 +1113,11 @@
<parameter name="aFindPrevious"/>
<body><![CDATA[
var fastFind = this._browser.fastFind;
var findFieldFocused = this._findField.getAttribute("focused") == "true";
var res = fastFind.findAgain(aFindPrevious, findFieldFocused);
var findFieldFocused =
this._findField.getAttribute("focused") == "true";
var res = fastFind.findAgain(aFindPrevious,
this._findMode == this.FIND_LINKS,
findFieldFocused);
this._updateFoundLink(res);
this._updateStatusUI(res, aFindPrevious);