diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/Makefile.in mozilla/extensions/typeaheadfind/Makefile.in --- mozilla.orig/extensions/typeaheadfind/Makefile.in 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/Makefile.in 2005-03-26 11:39:29.000000000 -0500 @@ -31,7 +31,7 @@ include $(DEPTH)/config/autoconf.mk -MODULE = typeaheadfind +MODULE = typeaheadfindsea DIRS = public src resources include $(topsrcdir)/config/rules.mk diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/Makefile.in mozilla/extensions/typeaheadfind/public/Makefile.in --- mozilla.orig/extensions/typeaheadfind/public/Makefile.in 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/public/Makefile.in 2005-03-26 11:39:29.000000000 -0500 @@ -31,11 +31,11 @@ include $(DEPTH)/config/autoconf.mk -MODULE=typeaheadfind -XPIDL_MODULE=typeaheadfind +MODULE=typeaheadfindsea +XPIDL_MODULE=typeaheadfindsea GRE_MODULE = 1 -XPIDLSRCS= ./nsITypeAheadFind.idl \ +XPIDLSRCS= ./nsITypeAheadFindSea.idl \ $(NULL) diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl 1969-12-31 19:00:00.000000000 -0500 @@ -1,88 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Original Author: Aaron Leventhal (aaronl@netscape.com) - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "nsISupports.idl" -#include "domstubs.idl" -#include "nsISupportsPrimitives.idl" - -%{ C++ - #include "nsIDOMEvent.h" - - #define NS_TYPEAHEADFIND_CID \ - {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}} - - #define NS_TYPEAHEADFIND_CONTRACTID "@mozilla.org/typeaheadfind;1" -%} - -interface nsIDOMEvent; - -[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)] -interface nsITypeAheadFind : nsISupports -{ - /** Is type ahead find mode currently on? */ - readonly attribute boolean isActive; - - /** Manually start type ahead find mode */ - void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly); - - /** Manually cancel type ahead find mode */ - void cancelFind(); - - /** - * Will find as you type start automatically if the user - * types with the focus on page content other than a textfield or select? - * If autostart is off, the startNewFind() method can be used to enact - * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText. - */ - void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn); - boolean getAutoStart(in nsIDOMWindow aWindow); - - /** - * Find next recurrence if typeaheadfind was the last used find, - * as opposed to regular find. Returns false in nsISupportsPRBool if we - * don't handle the request. - */ - void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports); - - /* - * Go back and remove one character from find string - * Returns true if backspace used - */ - boolean backOneChar(); -}; - diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 1969-12-31 19:00:00.000000000 -0500 +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 2005-03-26 11:39:29.000000000 -0500 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Original Author: Aaron Leventhal (aaronl@netscape.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#include "nsISupports.idl" +#include "domstubs.idl" +#include "nsISupportsPrimitives.idl" + +%{ C++ + #include "nsIDOMEvent.h" + + #define NS_TYPEAHEADFINDSEA_CID \ + {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}} + + #define NS_TYPEAHEADFINDSEA_CONTRACTID "@mozilla.org/typeaheadfindsea;1" +%} + +interface nsIDOMEvent; + +[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)] +interface nsITypeAheadFindSea : nsISupports +{ + /** Is type ahead find mode currently on? */ + readonly attribute boolean isActive; + + /** Manually start type ahead find mode */ + void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly); + + /** Manually cancel type ahead find mode */ + void cancelFind(); + + /** + * Will find as you type start automatically if the user + * types with the focus on page content other than a textfield or select? + * If autostart is off, the startNewFind() method can be used to enact + * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText. + */ + void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn); + boolean getAutoStart(in nsIDOMWindow aWindow); + + /** + * Find next recurrence if typeaheadfindsea was the last used find, + * as opposed to regular find. Returns false in nsISupportsPRBool if we + * don't handle the request. + */ + void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports); + + /* + * Go back and remove one character from find string + * Returns true if backspace used + */ + boolean backOneChar(); +}; + diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js --- mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 11:39:29.000000000 -0500 @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -pref("accessibility.typeaheadfind", true); -pref("accessibility.typeaheadfind.linksonly", true); -pref("accessibility.typeaheadfind.startlinksonly", false); -pref("accessibility.typeaheadfind.timeout", 5000); +pref("accessibility.typeaheadfindsea", true); +pref("accessibility.typeaheadfindsea.linksonly", true); +pref("accessibility.typeaheadfindsea.startlinksonly", false); +pref("accessibility.typeaheadfindsea.timeout", 5000); diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/jar.mn mozilla/extensions/typeaheadfind/resources/jar.mn --- mozilla.orig/extensions/typeaheadfind/resources/jar.mn 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/resources/jar.mn 2005-03-26 11:39:29.000000000 -0500 @@ -1,5 +1,5 @@ en-US.jar: - locale/en-US/global/typeaheadfind.properties (locale/en-US/typeaheadfind.properties) + locale/en-US/global/typeaheadfindsea.properties (locale/en-US/typeaheadfindsea.properties) toolkit.jar: content/global/notfound.wav (content/notfound.wav) diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 1969-12-31 19:00:00.000000000 -0500 @@ -1,13 +0,0 @@ -openparen = ( -closeparen = ) -textfound = Text found: " -textnotfound = Text not found: " -linkfound = Link found: " -linknotfound = Link not found: " -closequote = " -stopfind = Find stopped. -starttextfind = Starting -- find text as you type -startlinkfind = Starting -- find links as you type -repeated = repeated -nextmatch = - next match -prevmatch = - previous match diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 1969-12-31 19:00:00.000000000 -0500 +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 2005-03-26 11:39:29.000000000 -0500 @@ -0,0 +1,13 @@ +openparen = ( +closeparen = ) +textfound = Text found: " +textnotfound = Text not found: " +linkfound = Link found: " +linknotfound = Link not found: " +closequote = " +stopfind = Find stopped. +starttextfind = Starting -- find text as you type +startlinkfind = Starting -- find links as you type +repeated = repeated +nextmatch = - next match +prevmatch = - previous match diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/Makefile.in mozilla/extensions/typeaheadfind/src/Makefile.in --- mozilla.orig/extensions/typeaheadfind/src/Makefile.in 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/src/Makefile.in 2005-03-26 11:39:29.000000000 -0500 @@ -31,15 +31,15 @@ include $(DEPTH)/config/autoconf.mk -MODULE = typeaheadfind -LIBRARY_NAME = typeaheadfind +MODULE = typeaheadfindsea +LIBRARY_NAME = typeaheadfindsea ifneq ($(OS_ARCH),WINNT) -SHORT_LIBNAME = typahead +SHORT_LIBNAME = typaheadsea endif GRE_MODULE = 1 MOZILLA_INTERNAL_API = 1 -PACKAGE_FILE = typeaheadfind.pkg +PACKAGE_FILE = typeaheadfindsea.pkg REQUIRES = appcomps \ embedcomponents \ @@ -66,7 +66,7 @@ EXPORT_LIBRARY = 1 IS_COMPONENT = 1 -MODULE_NAME = nsTypeAheadFind +MODULE_NAME = nsTypeAheadFindSea CPPSRCS = \ nsTypeAheadFind.cpp \ diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 11:39:29.000000000 -0500 @@ -114,8 +114,8 @@ //////////////////////////////////////////////////////////////////////// -NS_INTERFACE_MAP_BEGIN(nsTypeAheadFind) - NS_INTERFACE_MAP_ENTRY(nsITypeAheadFind) +NS_INTERFACE_MAP_BEGIN(nsTypeAheadFindSea) + NS_INTERFACE_MAP_ENTRY(nsITypeAheadFindSea) NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) NS_INTERFACE_MAP_ENTRY(nsITimerCallback) NS_INTERFACE_MAP_ENTRY(nsIScrollPositionListener) @@ -128,8 +128,8 @@ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMKeyListener) NS_INTERFACE_MAP_END -NS_IMPL_ADDREF(nsTypeAheadFind) -NS_IMPL_RELEASE(nsTypeAheadFind) +NS_IMPL_ADDREF(nsTypeAheadFindSea) +NS_IMPL_RELEASE(nsTypeAheadFindSea) static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID); static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID); @@ -138,11 +138,11 @@ #define NS_FIND_CONTRACTID "@mozilla.org/embedcomp/rangefind;1" -nsTypeAheadFind* nsTypeAheadFind::sInstance = nsnull; -PRInt32 nsTypeAheadFind::sAccelKey = -1; // magic value of -1 when unitialized +nsTypeAheadFindSea* nsTypeAheadFindSea::sInstance = nsnull; +PRInt32 nsTypeAheadFindSea::sAccelKey = -1; // magic value of -1 when unitialized -nsTypeAheadFind::nsTypeAheadFind(): +nsTypeAheadFindSea::nsTypeAheadFindSea(): mIsFindAllowedInWindow(PR_FALSE), mAutoStartPref(PR_FALSE), mLinksOnlyPref(PR_FALSE), mStartLinksOnlyPref(PR_FALSE), mLinksOnly(PR_FALSE), mIsTypeAheadOn(PR_FALSE), mCaretBrowsingOn(PR_FALSE), @@ -161,25 +161,25 @@ static PRInt32 gInstanceCount; ++gInstanceCount; NS_ASSERTION(gInstanceCount == 1, - "There should be only 1 instance of nsTypeAheadFind!"); + "There should be only 1 instance of nsTypeAheadFindSea!"); #endif } -nsTypeAheadFind::~nsTypeAheadFind() +nsTypeAheadFindSea::~nsTypeAheadFindSea() { RemoveDocListeners(); mTimer = nsnull; nsCOMPtr prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefInternal) { - prefInternal->RemoveObserver("accessibility.typeaheadfind", this); + prefInternal->RemoveObserver("accessibility.typeaheadfindsea", this); prefInternal->RemoveObserver("accessibility.browsewithcaret", this); } } nsresult -nsTypeAheadFind::Init() +nsTypeAheadFindSea::Init() { nsresult rv = NS_NewISupportsArray(getter_AddRefs(mManualFindWindows)); NS_ENSURE_SUCCESS(rv, rv); @@ -196,7 +196,7 @@ } // ----------- Listen to prefs ------------------ - rv = prefInternal->AddObserver("accessibility.typeaheadfind", this, PR_FALSE); + rv = prefInternal->AddObserver("accessibility.typeaheadfindsea", this, PR_FALSE); NS_ENSURE_SUCCESS(rv, rv); rv = prefInternal->AddObserver("accessibility.browsewithcaret", this, PR_FALSE); @@ -217,11 +217,11 @@ return rv; } -nsTypeAheadFind * -nsTypeAheadFind::GetInstance() +nsTypeAheadFindSea * +nsTypeAheadFindSea::GetInstance() { if (!sInstance) { - sInstance = new nsTypeAheadFind(); + sInstance = new nsTypeAheadFindSea(); if (!sInstance) return nsnull; @@ -241,14 +241,14 @@ void -nsTypeAheadFind::ReleaseInstance() +nsTypeAheadFindSea::ReleaseInstance() { NS_IF_RELEASE(sInstance); } void -nsTypeAheadFind::Shutdown() +nsTypeAheadFindSea::Shutdown() { // Application shutdown mTimer = nsnull; @@ -264,14 +264,14 @@ // ------- Pref Callbacks (2) --------------- nsresult -nsTypeAheadFind::PrefsReset() +nsTypeAheadFindSea::PrefsReset() { nsCOMPtr prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID)); NS_ENSURE_TRUE(prefBranch, NS_ERROR_FAILURE); PRBool wasTypeAheadOn = mIsTypeAheadOn; - prefBranch->GetBoolPref("accessibility.typeaheadfind", &mIsTypeAheadOn); + prefBranch->GetBoolPref("accessibility.typeaheadfindsea", &mIsTypeAheadOn); if (mIsTypeAheadOn != wasTypeAheadOn) { if (!mIsTypeAheadOn) { @@ -291,7 +291,7 @@ do_GetService(kStringBundleServiceCID); if (stringBundleService) - stringBundleService->CreateBundle(TYPEAHEADFIND_BUNDLE_URL, + stringBundleService->CreateBundle(TYPEAHEADFINDSEA_BUNDLE_URL, getter_AddRefs(mStringBundle)); // Observe find again commands. We'll handle them if we were the last find @@ -306,34 +306,34 @@ } PRBool oldAutoStartPref = mAutoStartPref; - prefBranch->GetBoolPref("accessibility.typeaheadfind.autostart", + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.autostart", &mAutoStartPref); if (mAutoStartPref != oldAutoStartPref) { ResetGlobalAutoStart(mAutoStartPref); } - prefBranch->GetBoolPref("accessibility.typeaheadfind.linksonly", + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.linksonly", &mLinksOnlyPref); - prefBranch->GetBoolPref("accessibility.typeaheadfind.startlinksonly", + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.startlinksonly", &mStartLinksOnlyPref); PRBool isSoundEnabled = PR_TRUE; - prefBranch->GetBoolPref("accessibility.typeaheadfind.enablesound", + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enablesound", &isSoundEnabled); nsXPIDLCString soundStr; if (isSoundEnabled) { - prefBranch->GetCharPref("accessibility.typeaheadfind.soundURL", + prefBranch->GetCharPref("accessibility.typeaheadfindsea.soundURL", getter_Copies(soundStr)); } mNotFoundSoundURL = soundStr; PRBool isTimeoutEnabled = PR_FALSE; - prefBranch->GetBoolPref("accessibility.typeaheadfind.enabletimeout", + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enabletimeout", &isTimeoutEnabled); PRInt32 timeoutLength = 0; if (isTimeoutEnabled) { - prefBranch->GetIntPref("accessibility.typeaheadfind.timeout", + prefBranch->GetIntPref("accessibility.typeaheadfindsea.timeout", &timeoutLength); } mTimeoutLength = timeoutLength; @@ -349,7 +349,7 @@ // ------- nsITimer Methods (1) --------------- NS_IMETHODIMP -nsTypeAheadFind::Notify(nsITimer *timer) +nsTypeAheadFindSea::Notify(nsITimer *timer) { CancelFind(); return NS_OK; @@ -358,7 +358,7 @@ // ----------- nsIObserver Methods (1) ------------------- NS_IMETHODIMP -nsTypeAheadFind::Observe(nsISupports *aSubject, const char *aTopic, +nsTypeAheadFindSea::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) { PRBool isOpening; @@ -476,7 +476,7 @@ nsresult -nsTypeAheadFind::UseInWindow(nsIDOMWindow *aDOMWin) +nsTypeAheadFindSea::UseInWindow(nsIDOMWindow *aDOMWin) { NS_ENSURE_ARG_POINTER(aDOMWin); @@ -529,7 +529,7 @@ // ------- nsIDOMEventListener Methods (1) --------------- NS_IMETHODIMP -nsTypeAheadFind::HandleEvent(nsIDOMEvent* aEvent) +nsTypeAheadFindSea::HandleEvent(nsIDOMEvent* aEvent) { nsAutoString eventType; aEvent->GetType(eventType); @@ -589,21 +589,21 @@ // ------- nsIDOMKeyListener Methods (3) --------------- NS_IMETHODIMP -nsTypeAheadFind::KeyDown(nsIDOMEvent* aEvent) +nsTypeAheadFindSea::KeyDown(nsIDOMEvent* aEvent) { return NS_OK; } NS_IMETHODIMP -nsTypeAheadFind::KeyUp(nsIDOMEvent* aEvent) +nsTypeAheadFindSea::KeyUp(nsIDOMEvent* aEvent) { return NS_OK; } NS_IMETHODIMP -nsTypeAheadFind::KeyPress(nsIDOMEvent* aEvent) +nsTypeAheadFindSea::KeyPress(nsIDOMEvent* aEvent) { if (!mIsTypeAheadOn || mIsMenuBarActive || mIsMenuPopupActive) { return NS_OK; @@ -733,7 +733,7 @@ NS_IMETHODIMP -nsTypeAheadFind::BackOneChar(PRBool *aIsBackspaceUsed) +nsTypeAheadFindSea::BackOneChar(PRBool *aIsBackspaceUsed) { if (!mFocusedDocSelection) { *aIsBackspaceUsed = PR_FALSE; @@ -863,7 +863,7 @@ nsresult -nsTypeAheadFind::HandleChar(PRUnichar aChar) +nsTypeAheadFindSea::HandleChar(PRUnichar aChar) { // Add a printable char to mTypeAheadBuffer, then search for buffer contents @@ -1039,7 +1039,7 @@ void -nsTypeAheadFind::SaveFind() +nsTypeAheadFindSea::SaveFind() { // Store find string for find-next mFindNextBuffer = mTypeAheadBuffer; @@ -1060,14 +1060,14 @@ mFindService->SetSearchString(mFindNextBuffer); } - // --- If accessibility.typeaheadfind.timeout is set, + // --- If accessibility.typeaheadfindsea.timeout is set, // cancel find after specified # milliseconds --- StartTimeout(); } void -nsTypeAheadFind::PlayNotFoundSound() +nsTypeAheadFindSea::PlayNotFoundSound() { if (mNotFoundSoundURL.IsEmpty()) // no sound return; @@ -1097,7 +1097,7 @@ NS_IMETHODIMP -nsTypeAheadFind::HandleText(nsIDOMEvent* aTextEvent) +nsTypeAheadFindSea::HandleText(nsIDOMEvent* aTextEvent) { // This is called multiple times in the middle of an // IME composition @@ -1145,7 +1145,7 @@ NS_IMETHODIMP -nsTypeAheadFind::HandleStartComposition(nsIDOMEvent* aCompositionEvent) +nsTypeAheadFindSea::HandleStartComposition(nsIDOMEvent* aCompositionEvent) { // This is called once at the start of an IME composition @@ -1167,7 +1167,7 @@ NS_IMETHODIMP -nsTypeAheadFind::HandleEndComposition(nsIDOMEvent* aCompositionEvent) +nsTypeAheadFindSea::HandleEndComposition(nsIDOMEvent* aCompositionEvent) { // This is called once at the end of an IME composition @@ -1198,28 +1198,28 @@ NS_IMETHODIMP -nsTypeAheadFind::HandleQueryComposition(nsIDOMEvent* aCompositionEvent) +nsTypeAheadFindSea::HandleQueryComposition(nsIDOMEvent* aCompositionEvent) { return NS_OK; } NS_IMETHODIMP -nsTypeAheadFind::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent) +nsTypeAheadFindSea::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent) { return NS_OK; } NS_IMETHODIMP -nsTypeAheadFind::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent) +nsTypeAheadFindSea::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent) { return NS_OK; } nsresult -nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell, +nsTypeAheadFindSea::FindItNow(nsIPresShell *aPresShell, PRBool aIsRepeatingSameChar, PRBool aIsLinksOnly, PRBool aIsFirstVisiblePreferred) { @@ -1241,7 +1241,7 @@ nsCOMPtr startingContainer = presContext->GetContainer(); nsCOMPtr treeItem(do_QueryInterface(startingContainer)); - NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFind::FindItNow]"); + NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFindSea::FindItNow]"); if (!treeItem) { return NS_ERROR_FAILURE; } @@ -1465,7 +1465,7 @@ nsresult -nsTypeAheadFind::GetSearchContainers(nsISupports *aContainer, +nsTypeAheadFindSea::GetSearchContainers(nsISupports *aContainer, PRBool aIsRepeatingSameChar, PRBool aIsFirstVisiblePreferred, PRBool aCanUseDocSelection, @@ -1573,7 +1573,7 @@ void -nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange, +nsTypeAheadFindSea::RangeStartsInsideLink(nsIDOMRange *aRange, nsIPresShell *aPresShell, PRBool *aIsInsideLink, PRBool *aIsStartingLink) @@ -1680,7 +1680,7 @@ NS_IMETHODIMP -nsTypeAheadFind::ScrollPositionWillChange(nsIScrollableView *aView, +nsTypeAheadFindSea::ScrollPositionWillChange(nsIScrollableView *aView, nscoord aX, nscoord aY) { return NS_OK; @@ -1688,7 +1688,7 @@ NS_IMETHODIMP -nsTypeAheadFind::ScrollPositionDidChange(nsIScrollableView *aScrollableView, +nsTypeAheadFindSea::ScrollPositionDidChange(nsIScrollableView *aScrollableView, nscoord aX, nscoord aY) { if (!mIsFindingText) @@ -1699,7 +1699,7 @@ NS_IMETHODIMP -nsTypeAheadFind::NotifySelectionChanged(nsIDOMDocument *aDoc, +nsTypeAheadFindSea::NotifySelectionChanged(nsIDOMDocument *aDoc, nsISelection *aSel, PRInt16 aReason) { if (!mIsFindingText) { @@ -1716,10 +1716,10 @@ } -// ---------------- nsITypeAheadFind -------------------- +// ---------------- nsITypeAheadFindSea -------------------- NS_IMETHODIMP -nsTypeAheadFind::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports) +nsTypeAheadFindSea::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports) { NS_ENSURE_TRUE(aCallerWindowSupports, NS_ERROR_FAILURE); @@ -1731,7 +1731,7 @@ return NS_OK; } - // Compare the top level content pres shell of typeaheadfind + // Compare the top level content pres shell of typeaheadfindsea // with the top level content pres shell window where find next is happening // If they're different, exit so that webbrowswerfind can handle FindNext() @@ -1764,7 +1764,7 @@ NS_ENSURE_TRUE(callerPresShell, NS_OK); if (callerPresShell != typeAheadPresShell) { - // This means typeaheadfind is active in a different window or doc + // This means typeaheadfindsea is active in a different window or doc // So it's not appropriate to find next for the current window mFindNextBuffer.Truncate(); return NS_OK; @@ -1782,7 +1782,7 @@ webBrowserFind->GetSearchString(getter_Copies(webBrowserFindString)); if (!webBrowserFindString.Equals(mFindNextBuffer)) { // If they're not equal, then the find dialog was used last, - // not typeaheadfind. Typeaheadfind applies to the last find, + // not typeaheadfindsea. Typeaheadfind applies to the last find, // so we should let nsIWebBrowserFind::FindNext() do it. mFindNextBuffer.Truncate(); return NS_OK; @@ -1832,7 +1832,7 @@ NS_IMETHODIMP -nsTypeAheadFind::GetIsActive(PRBool *aIsActive) +nsTypeAheadFindSea::GetIsActive(PRBool *aIsActive) { *aIsActive = mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty(); @@ -1845,7 +1845,7 @@ */ NS_IMETHODIMP -nsTypeAheadFind::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly) +nsTypeAheadFindSea::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly) { if (!mFind || !mIsTypeAheadOn || !aWindow) return NS_ERROR_FAILURE; // Type Ahead Find not correctly initialized @@ -1878,7 +1878,7 @@ } void -nsTypeAheadFind::ResetGlobalAutoStart(PRBool aAutoStart) +nsTypeAheadFindSea::ResetGlobalAutoStart(PRBool aAutoStart) { // Enumerate through the current top level windows // and either attach or remove window listeners @@ -1916,7 +1916,7 @@ NS_IMETHODIMP -nsTypeAheadFind::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn) +nsTypeAheadFindSea::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn) { if (!aDOMWin) { return NS_ERROR_FAILURE; @@ -1946,7 +1946,7 @@ NS_IMETHODIMP -nsTypeAheadFind::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn) +nsTypeAheadFindSea::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn) { *aIsAutoStartOn = PR_FALSE; @@ -2014,7 +2014,7 @@ NS_IMETHODIMP -nsTypeAheadFind::CancelFind() +nsTypeAheadFindSea::CancelFind() { // Stop current find if: // 1. Escape pressed @@ -2070,7 +2070,7 @@ // ------- Helper Methods --------------- void -nsTypeAheadFind::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem, +nsTypeAheadFindSea::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem, nsIPresShell **aPresShell) { *aPresShell = nsnull; @@ -2086,7 +2086,7 @@ } void -nsTypeAheadFind::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow) +nsTypeAheadFindSea::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow) { // Return the root ancestor content window of aWindow @@ -2118,7 +2118,7 @@ } nsresult -nsTypeAheadFind::GetWebBrowserFind(nsIDOMWindow *aWin, +nsTypeAheadFindSea::GetWebBrowserFind(nsIDOMWindow *aWin, nsIWebBrowserFind **aWebBrowserFind) { NS_ENSURE_ARG_POINTER(aWin); @@ -2143,7 +2143,7 @@ void -nsTypeAheadFind::StartTimeout() +nsTypeAheadFindSea::StartTimeout() { if (mTimeoutLength) { if (!mTimer) { @@ -2159,7 +2159,7 @@ } void -nsTypeAheadFind::SetSelectionLook(nsIPresShell *aPresShell, +nsTypeAheadFindSea::SetSelectionLook(nsIPresShell *aPresShell, PRBool aChangeColor, PRBool aEnabled) { @@ -2167,8 +2167,8 @@ return; // Show caret when type ahead find is on - // Also paint selection bright (typeaheadfind on) or normal - // (typeaheadfind off) + // Also paint selection bright (typeaheadfindsea on) or normal + // (typeaheadfindsea off) if (aChangeColor) { mFocusedDocSelCon->SetDisplaySelection(nsISelectionController::SELECTION_ATTENTION); @@ -2211,7 +2211,7 @@ void -nsTypeAheadFind::RemoveDocListeners() +nsTypeAheadFindSea::RemoveDocListeners() { nsCOMPtr presShell(GetPresShell()); nsIViewManager* vm = nsnull; @@ -2245,7 +2245,7 @@ void -nsTypeAheadFind::AttachDocListeners(nsIPresShell *aPresShell) +nsTypeAheadFindSea::AttachDocListeners(nsIPresShell *aPresShell) { if (!aPresShell) { return; @@ -2275,7 +2275,7 @@ void -nsTypeAheadFind::RemoveWindowListeners(nsIDOMWindow *aDOMWin) +nsTypeAheadFindSea::RemoveWindowListeners(nsIDOMWindow *aDOMWin) { nsCOMPtr chromeEventHandler; GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler)); @@ -2332,7 +2332,7 @@ void -nsTypeAheadFind::AttachWindowListeners(nsIDOMWindow *aDOMWin) +nsTypeAheadFindSea::AttachWindowListeners(nsIDOMWindow *aDOMWin) { nsCOMPtr chromeEventHandler; GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler)); @@ -2385,7 +2385,7 @@ void -nsTypeAheadFind::GetChromeEventHandler(nsIDOMWindow *aDOMWin, +nsTypeAheadFindSea::GetChromeEventHandler(nsIDOMWindow *aDOMWin, nsIDOMEventTarget **aChromeTarget) { nsCOMPtr privateDOMWindow(do_QueryInterface(aDOMWin)); @@ -2401,7 +2401,7 @@ } PRBool -nsTypeAheadFind::IsTargetContentOkay(nsIContent *aContent) +nsTypeAheadFindSea::IsTargetContentOkay(nsIContent *aContent) { if (!aContent) { return PR_FALSE; @@ -2439,7 +2439,7 @@ nsresult -nsTypeAheadFind::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent, +nsTypeAheadFindSea::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent, nsIContent **aTargetContent, nsIPresShell **aTargetPresShell) { @@ -2522,7 +2522,7 @@ void -nsTypeAheadFind::GetSelection(nsIPresShell *aPresShell, +nsTypeAheadFindSea::GetSelection(nsIPresShell *aPresShell, nsISelectionController **aSelCon, nsISelection **aDOMSel) { @@ -2544,7 +2544,7 @@ PRBool -nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell, +nsTypeAheadFindSea::IsRangeVisible(nsIPresShell *aPresShell, nsPresContext *aPresContext, nsIDOMRange *aRange, PRBool aMustBeInViewPort, PRBool aGetTopVisibleLeaf, @@ -2698,7 +2698,7 @@ nsresult -nsTypeAheadFind::GetTranslatedString(const nsAString& aKey, +nsTypeAheadFindSea::GetTranslatedString(const nsAString& aKey, nsAString& aStringOut) { nsXPIDLString xsValue; @@ -2716,7 +2716,7 @@ void -nsTypeAheadFind::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent, +nsTypeAheadFindSea::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent, PRBool aClearStatus, const PRUnichar *aText) { // pres shell -> pres context -> container -> tree item -> @@ -2863,7 +2863,7 @@ // Make sure we're not focused on a text field, listbox // or other form control that needs typeahead keystrokes if (focusedContent) { - *aResult = nsTypeAheadFind::IsTargetContentOkay(focusedContent); + *aResult = nsTypeAheadFindSea::IsTargetContentOkay(focusedContent); return NS_OK; } @@ -2928,8 +2928,8 @@ EnsureContentWindow(domWinInternal, getter_AddRefs(startContentWin)); NS_ENSURE_TRUE(startContentWin, NS_ERROR_FAILURE); - nsCOMPtr typeAhead = - do_GetService(NS_TYPEAHEADFIND_CONTRACTID); + nsCOMPtr typeAhead = + do_GetService(NS_TYPEAHEADFINDSEA_CONTRACTID); NS_ENSURE_TRUE(typeAhead, NS_ERROR_FAILURE); return typeAhead->StartNewFind(startContentWin, isLinkSearch); @@ -3013,7 +3013,7 @@ } already_AddRefed -nsTypeAheadFind::GetPresShell() +nsTypeAheadFindSea::GetPresShell() { if (!mFocusedWeakShell) return nsnull; diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 11:39:29.000000000 -0500 @@ -62,13 +62,13 @@ #include "nsIDOMRange.h" #include "nsIDOMWindow.h" #include "nsIDocShellTreeItem.h" -#include "nsITypeAheadFind.h" +#include "nsITypeAheadFindSea.h" #include "nsIStringBundle.h" #include "nsISupportsArray.h" #include "nsISound.h" -#define TYPEAHEADFIND_BUNDLE_URL \ - "chrome://global/locale/typeaheadfind.properties" +#define TYPEAHEADFINDSEA_BUNDLE_URL \ + "chrome://global/locale/typeaheadfindsea.properties" #define TYPEAHEADFIND_NOTFOUND_WAV_URL \ "chrome://global/content/notfound.wav" @@ -82,7 +82,7 @@ const int kMaxBadCharsBeforeCancel = 3; -class nsTypeAheadFind : public nsITypeAheadFind, +class nsTypeAheadFindSea : public nsITypeAheadFindSea, public nsIDOMKeyListener, public nsIDOMTextListener, public nsIDOMCompositionListener, @@ -93,13 +93,13 @@ public nsSupportsWeakReference { public: - nsTypeAheadFind(); - virtual ~nsTypeAheadFind(); + nsTypeAheadFindSea(); + virtual ~nsTypeAheadFindSea(); - NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFIND_CID); + NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFINDSEA_CID); NS_DECL_ISUPPORTS - NS_DECL_NSITYPEAHEADFIND + NS_DECL_NSITYPEAHEADFINDSEA NS_DECL_NSIOBSERVER NS_DECL_NSIDOMEVENTLISTENER NS_DECL_NSISELECTIONLISTENER @@ -127,7 +127,7 @@ // ----- nsITimerCallback ----------------------------- NS_DECL_NSITIMERCALLBACK - static nsTypeAheadFind *GetInstance(); + static nsTypeAheadFindSea *GetInstance(); static void ReleaseInstance(void); static PRBool IsTargetContentOkay(nsIContent *aContent); @@ -185,7 +185,7 @@ nsresult GetTranslatedString(const nsAString& aKey, nsAString& aStringOut); // Used by GetInstance and ReleaseInstance - static nsTypeAheadFind *sInstance; + static nsTypeAheadFindSea *sInstance; // Current find state nsString mTypeAheadBuffer; @@ -196,7 +196,7 @@ // PRBool's are used instead of PRPackedBool's where the address of the // boolean variable is getting passed into a method. For example: - // GetBoolPref("accessibility.typeaheadfind.linksonly", &mLinksOnlyPref); + // GetBoolPref("accessibility.typeaheadfindsea.linksonly", &mLinksOnlyPref); PRBool mIsFindAllowedInWindow; PRBool mAutoStartPref; PRBool mLinksOnlyPref; @@ -251,7 +251,7 @@ nsCOMPtr mFocusedWindow; nsCOMPtr mFocusedWeakShell; - // Windows where typeaheadfind doesn't auto start as the user types + // Windows where typeaheadfindsea doesn't auto start as the user types nsCOMPtr mManualFindWindows; }; diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 11:39:40.000000000 -0500 @@ -55,7 +55,7 @@ // This function is called at component registration time static NS_METHOD -nsTypeAheadFindRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath, +nsTypeAheadFindSeaRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath, const char *registryLocation, const char *componentType, const nsModuleComponentInfo *info) @@ -64,7 +64,7 @@ // an application component. This makes sure that we're // initialized on application startup. - // Register nsTypeAheadFind to be instantiated on startup. + // Register nsTypeAheadFindSea to be instantiated on startup. // XXX This is needed on linux, but for some reason not needed on win32. nsresult rv; nsCOMPtr categoryManager = @@ -74,7 +74,7 @@ rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY, - "Type Ahead Find", + "Type Ahead Find Sea", "service," - NS_TYPEAHEADFIND_CONTRACTID, + NS_TYPEAHEADFINDSEA_CONTRACTID, PR_TRUE, PR_TRUE, nsnull); } @@ -82,22 +82,22 @@ } -NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFind, - nsTypeAheadFind::GetInstance) +NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFindSea, + nsTypeAheadFindSea::GetInstance) static void PR_CALLBACK -TypeAheadFindModuleDtor(nsIModule* self) +TypeAheadFindSeaModuleDtor(nsIModule* self) { - nsTypeAheadFind::ReleaseInstance(); + nsTypeAheadFindSea::ReleaseInstance(); } static const nsModuleComponentInfo components[] = { - { "TypeAheadFind Component", NS_TYPEAHEADFIND_CID, - NS_TYPEAHEADFIND_CONTRACTID, nsTypeAheadFindConstructor, - nsTypeAheadFindRegistrationProc, nsnull // Unregistration proc + { "TypeAheadFindSea Component", NS_TYPEAHEADFINDSEA_CID, + NS_TYPEAHEADFINDSEA_CONTRACTID, nsTypeAheadFindSeaConstructor, + nsTypeAheadFindSeaRegistrationProc, nsnull // Unregistration proc } }; -NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFind, components, - TypeAheadFindModuleDtor) +NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFindSea, components, + TypeAheadFindSeaModuleDtor) diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg 2005-03-26 00:12:02.000000000 -0500 +++ mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg 1969-12-31 19:00:00.000000000 -0500 @@ -1,9 +0,0 @@ -# why not ship this with GRE/embedding, if we're building it? - -[xpfe-browser browser] -#if SHARED_LIBRARY -dist/bin/components/@SHARED_LIBRARY@ -#else -!staticcomp @LIBRARY@ @MODULE_NAME@ -#endif -!xpt dist/bin/components/typeaheadfind.xpt diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg 1969-12-31 19:00:00.000000000 -0500 +++ mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg 2005-03-26 11:39:29.000000000 -0500 @@ -0,0 +1,9 @@ +# why not ship this with GRE/embedding, if we're building it? + +[xpfe-browser browser] +#if SHARED_LIBRARY +dist/bin/components/@SHARED_LIBRARY@ +#else +!staticcomp @LIBRARY@ @MODULE_NAME@ +#endif +!xpt dist/bin/components/typeaheadfindsea.xpt