зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
4c5d9f8102
Коммит
e74ffb7257
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче