Bug 163905. [typeaheadfind] F3 hangs browser after selection returns to normal color. r=kyle, sr=alecf. Bug 163913: [typeaheadfind] status messages no longer displayed. r=kyle, sr=alecf

This commit is contained in:
aaronl%netscape.com 2002-08-22 22:28:44 +00:00
Родитель f3d9b2a348
Коммит 197230e6cc
4 изменённых файлов: 45 добавлений и 10 удалений

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

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:typeaheadfind"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:typeaheadfind"
chrome:displayName="Type Ahead Find"
chrome:author="mozilla.org"
chrome:name="typeaheadfind"
chrome:localeVersion="1.1b">
</RDF:Description>
</RDF:RDF>

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

@ -1,4 +1,5 @@
typeaheadfind.jar:
locale/en-US/typeaheadfind/contents.rdf (locale/en-US/contents.rdf)
locale/en-US/typeaheadfind/typeaheadfind.properties (locale/en-US/typeaheadfind.properties)
content/typeaheadfind/contents.rdf (content/contents.rdf)

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

@ -8,7 +8,10 @@
</RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US">
<RDF:Description about="urn:mozilla:locale:en-US"
chrome:displayName="English (US)"
chrome:author="mozilla.org"
chrome:name="en-US">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:typeaheadfind"/>
@ -16,6 +19,6 @@
</chrome:packages>
<RDF:Description about="urn:mozilla:locale:en-US:typeaheadfind"
chrome:localeVersion="1.0.0"/>
chrome:localeVersion="1.1b"/>
</RDF:RDF>

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

@ -842,23 +842,32 @@ nsTypeAheadFind::KeyPress(nsIDOMEvent* aEvent)
// ----- Nothing found -----
DisplayStatus(PR_FALSE, nsnull, PR_FALSE); // Display failure status
nsCOMPtr<nsISound> soundInterface =
do_CreateInstance("@mozilla.org/sound;1");
if (soundInterface) {
soundInterface->Beep();
mRepeatingMode = eRepeatingNone;
if (!isBackspace) {
// Error beep (don't been when backspace is pressed, they're
// trying to correct the mistake!)
nsCOMPtr<nsISound> soundInterface =
do_CreateInstance("@mozilla.org/sound;1");
if (soundInterface) {
soundInterface->Beep();
}
}
// Remove bad character from buffer, so we can continue typing from
// last matched character
#ifdef DONT_ADD_CHAR_IF_NOT_FOUND
// If first character is bad, flush it away anyway
if (mTypeAheadBuffer.Length == 1)
#ifdef TYPEAHEADFIND_REMOVE_ALL_BAD_KEYS
// Remove all bad characters
if (mTypeAheadBuffer.Length() >= 1 && !isBackspace) {
#else
// Remove bad *first* characters only
if (mTypeAheadBuffer.Length() == 1 && !isBackspace) {
#endif
// Note the if above inside the #ifdef!
// Notice if () in #ifdef above!
mTypeAheadBuffer = Substring(mTypeAheadBuffer, 0,
mTypeAheadBuffer.Length() - 1);
}
}
return NS_OK;
@ -968,6 +977,9 @@ nsTypeAheadFind::FindItNow(PRBool aIsRepeatingSameChar, PRBool aIsLinksOnly,
findBuffer = PromiseFlatString(mTypeAheadBuffer);
}
if (findBuffer.IsEmpty())
return NS_ERROR_FAILURE;
while (PR_TRUE) { // ----- Outer while loop: go through all docs -----
while (PR_TRUE) { // === Inner while loop: go through a single doc ===
mFind->Find(findBuffer.get(), mSearchRange, mStartPointRange,