--- /dev/null
+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<nsIPrefBranch2> 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<nsIPrefBranch> 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<nsISupports> startingContainer = presContext->GetContainer();
+ nsCOMPtr<nsIDocShellTreeItem> 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<nsIPresShell> 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<nsIDOMEventTarget> chromeEventHandler;
+ GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
+@@ -2332,7 +2332,7 @@
+
+
+ void
+-nsTypeAheadFind::AttachWindowListeners(nsIDOMWindow *aDOMWin)
++nsTypeAheadFindSea::AttachWindowListeners(nsIDOMWindow *aDOMWin)
+ {
+ nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
+ GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
+@@ -2385,7 +2385,7 @@
+
+
+ void
+-nsTypeAheadFind::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
++nsTypeAheadFindSea::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
+ nsIDOMEventTarget **aChromeTarget)
+ {
+ nsCOMPtr<nsPIDOMWindow> 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<nsITypeAheadFind> typeAhead =
+- do_GetService(NS_TYPEAHEADFIND_CONTRACTID);
++ nsCOMPtr<nsITypeAheadFindSea> typeAhead =
++ do_GetService(NS_TYPEAHEADFINDSEA_CONTRACTID);
+ NS_ENSURE_TRUE(typeAhead, NS_ERROR_FAILURE);
+
+ return typeAhead->StartNewFind(startContentWin, isLinkSearch);
+@@ -3013,7 +3013,7 @@
+ }
+
+ already_AddRefed<nsIPresShell>
+-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<nsIDOMWindow> mFocusedWindow;
+ nsCOMPtr<nsIWeakReference> mFocusedWeakShell;
+
+- // Windows where typeaheadfind doesn't auto start as the user types
++ // Windows where typeaheadfindsea doesn't auto start as the user types
+ nsCOMPtr<nsISupportsArray> 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<nsICategoryManager> 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
--- /dev/null
+diff -uNr mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
+--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2004-12-21 13:37:00.503842544 +0000
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2004-12-21 13:41:49.439917584 +0000
+@@ -167,6 +167,19 @@
+ endif
+ endif
+
++#
++# Linux/HPPA/gcc
++#
++ifeq ($(OS_ARCH),Linux)
++ifneq (,$(filter parisc parisc64,$(OS_TEST)))
++#ifeq ($(CC),gcc) # Do not check for gcc since there is only this compiler on linux for hppa
++CPPSRCS := xptcinvoke_pa32.cpp xptcstubs_pa32.cpp
++ASFILES := xptcstubs_asm_parisc_linux.s xptcinvoke_asm_parisc_linux.s
++#endif
++endif
++endif
++
++
+ ######################################################################
+ # M68k
+ ######################################################################
+diff -uNr mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
+--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s 1970-01-01 00:00:00.000000000 +0000
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s 2004-12-21 13:39:03.390160984 +0000
+@@ -0,0 +1,128 @@
++
++ .LEVEL 1.1
++ .text
++ .align 4
++
++framesz:
++ .equ 128
++
++; XPTC_InvokeByIndex(nsISuppots* that, PRUint32 methodIndex,
++; PRUint32 paramCount, nsXPTCVariant* params);
++
++.globl XPTC_InvokeByIndex
++ .type XPTC_InvokeByIndex, @function
++
++
++XPTC_InvokeByIndex:
++ .PROC
++ .CALLINFO FRAME=72, CALLER,SAVE_RP, SAVE_SP, ENTRY_GR=3
++ .ENTRY
++
++ ; frame marker takes 48 bytes,
++ ; register spill area takes 8 bytes,
++ ; local stack area takes 72 bytes result in 128 bytes total
++
++ STW %rp,-20(%sp)
++ STW,MA %r3,128(%sp)
++
++ LDO -framesz(%r30),%r28
++ STW %r28,-4(%r30) ; save previous sp
++ STW %r19,-32(%r30)
++
++ STW %r26,-36-framesz(%r30) ; save argument registers in
++ STW %r25,-40-framesz(%r30) ; in PREVIOUS frame
++ STW %r24,-44-framesz(%r30) ;
++ STW %r23,-48-framesz(%r30) ;
++
++; B,L .+8,%r2
++; ADDIL L'invoke_count_bytes-$PIC_pcrel$1+4,%r2,%r1
++; ; LDO R'invoke_count_bytes-$PIC_pcrel$2+8(%r1),%r1
++;$PIC_pcrel$1
++; LDSID (%r1),%r31
++;$PIC_pcrel$2
++; MTSP %r31,%sr0
++
++ .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
++ BL invoke_count_bytes,%r31
++ COPY %r31,%r2
++
++ CMPIB,>= 0,%r28, .+76
++ COPY %r30,%r3 ; copy stack ptr to saved stack ptr
++ ADD %r30,%r28,%r30 ; extend stack frame
++ LDW -4(%r3),%r28 ; move frame
++ STW %r28,-4(%r30)
++ LDW -8(%r3),%r28
++ STW %r28,-8(%r30)
++ LDW -12(%r3),%r28
++ STW %r28,-12(%r30)
++ LDW -16(%r3),%r28
++ STW %r28,-16(%r30)
++ LDW -20(%r3),%r28
++ STW %r28,-20(%r30)
++ LDW -24(%r3),%r28
++ STW %r28,-24(%r30)
++ LDW -28(%r3),%r28
++ STW %r28,-28(%r30)
++ LDW -32(%r3),%r28
++ STW %r28,-32(%r30)
++
++ LDO -40(%r30),%r26 ; load copy address
++ LDW -44-framesz(%r3),%r25 ; load rest of 2 arguments
++ LDW -48-framesz(%r3),%r24 ;
++
++ LDW -32(%r30),%r19 ; shared lib call destroys r19; reload
++; B,L .+8,%r2
++; ADDIL L'invoke_copy_to_stack-$PIC_pcrel$3+4,%r2,%r1
++; LDO R'invoke_copy_to_stack-$PIC_pcrel$4+8(%r1),%r1
++;$PIC_pcrel$3
++; LDSID (%r1),%r31
++;$PIC_pcrel$4
++; MTSP %r31,%sr0
++ .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
++ BL invoke_copy_to_stack,%r31
++ COPY %r31,%r2
++
++ LDO -48(%r30),%r20
++ EXTRW,U,= %r28,31,1,%r22
++ FLDD 0(%r20),%fr7 ; load double arg 1
++ EXTRW,U,= %r28,30,1,%r22
++ FLDW 8(%r20),%fr5L ; load float arg 1
++ EXTRW,U,= %r28,29,1,%r22
++ FLDW 4(%r20),%fr6L ; load float arg 2
++ EXTRW,U,= %r28,28,1,%r22
++ FLDW 0(%r20),%fr7L ; load float arg 3
++
++ LDW -36-framesz(%r3),%r26 ; load ptr to 'that'
++ LDW -40(%r30),%r25 ; load the rest of dispatch argument registers
++ LDW -44(%r30),%r24
++ LDW -48(%r30),%r23
++
++ LDW -36-framesz(%r3),%r20 ; load vtable addr
++ LDW -40-framesz(%r3),%r28 ; load index
++ LDW 0(%r20),%r20 ; follow vtable
++; LDO 0(%r20),%r20 ; offset vtable by 16 bytes (g++: 8, aCC: 16)
++ SH2ADDL %r28,%r20,%r28 ; add 4*index to vtable entry
++ LDW 0(%r28),%r22 ; load vtable entry
++
++; B,L .+8,%r2
++; ADDIL L'$$dyncall_external-$PIC_pcrel$5+4,%r2,%r1
++; LDO R'$$dyncall_external-$PIC_pcrel$6+8(%r1),%r1
++;$PIC_pcrel$5
++; LDSID (%r1),%r31
++;$PIC_pcrel$6
++; MTSP %r31,%sr0
++ .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=22-26;out=28;
++ BL $$dyncall,%r31
++ COPY %r31,%r2
++
++ LDW -32(%r30),%r19
++ COPY %r3,%r30 ; restore saved stack ptr
++
++ LDW -148(%sp),%rp
++ LDWM -128(%sp),%r3
++ BV,N (%rp)
++ NOP
++ .EXIT
++ .PROCEND ;in=23,24,25,26;
++ .SIZE XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
++
+diff -uNr mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
+--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s 1970-01-01 00:00:00.000000000 +0000
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s 2004-12-21 13:39:03.392160680 +0000
+@@ -0,0 +1,73 @@
++ .LEVEL 1.1
++ .TEXT
++ .ALIGN 4
++
++curframesz:
++ .EQU 128
++
++
++; SharedStub has stack size of 128 bytes
++
++lastframesz:
++ .EQU 64
++
++; the StubN C++ function has a small stack size of 64 bytes
++
++
++.globl SharedStub
++ .type SharedStub, @function
++
++SharedStub:
++ .PROC
++ .CALLINFO CALLER,FRAME=80,SAVE_RP
++
++ .ENTRY
++ STW %rp,-20(%sp)
++ LDO 128(%sp),%sp
++
++ STW %r19,-32(%r30)
++ STW %r26,-36-curframesz(%r30) ; save arg0 in previous frame
++
++ LDO -80(%r30),%r28
++ FSTD,MA %fr5,8(%r28) ; save darg0
++ FSTD,MA %fr7,8(%r28) ; save darg1
++ FSTW,MA %fr4L,4(%r28) ; save farg0
++ FSTW,MA %fr5L,4(%r28) ; save farg1
++ FSTW,MA %fr6L,4(%r28) ; save farg2
++ FSTW,MA %fr7L,4(%r28) ; save farg3
++
++ ; Former value of register 26 is already properly saved by StubN,
++ ; but register 25-23 are not because of the arguments mismatch
++ STW %r25,-40-curframesz-lastframesz(%r30) ; save r25
++ STW %r24,-44-curframesz-lastframesz(%r30) ; save r24
++ STW %r23,-48-curframesz-lastframesz(%r30) ; save r23
++ COPY %r26,%r25 ; method index is arg1
++ LDW -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
++ LDO -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
++ LDO -80(%r30),%r23 ; floating args is arg3
++
++; BL .+8,%r2
++; ADDIL L'PrepareAndDispatch-$PIC_pcrel$0+4,%r2
++; LDO R'PrepareAndDispatch-$PIC_pcrel$1+8(%r1),%r1
++;$PIC_pcrel$0
++; LDSID (%r1),%r31
++;$PIC_pcrel$1
++; MTSP %r31,%sr0
++ .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28;
++ BL PrepareAndDispatch, %r31
++ COPY %r31,%r2
++
++ LDW -32(%r30),%r19
++
++ LDW -148(%sp),%rp
++ LDO -128(%sp),%sp
++
++
++ BV,N (%rp)
++ NOP
++ NOP
++
++ .EXIT
++ .PROCEND ;in=26;out=28;
++
++ .SIZE SharedStub, .-SharedStub
--- /dev/null
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-1.5_beta2-r1.ebuild,v 1.1 2005/10/13 19:21:46 anarchy Exp $
+
+unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179
+MOZ_FREETYPE2="no" # Need to disable for newer .. remove here and in mozconfig
+ # when older is removed from tree.
+MOZ_PANGO="yes" # Need to enable for newer .. remove here and in mozconfig
+ # when older is removed from tree.
+
+inherit flag-o-matic toolchain-funcs eutils mozconfig mozilla-launcher makeedit multilib fdo-mime versionator
+
+MY_P="$(replace_version_separator 2 '')"
+FV=${MY_P/beta/b}
+
+DESCRIPTION="Firefox Web Browser"
+HOMEPAGE="http://www.mozilla.org/projects/firefox/"
+SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FV}/source/firefox-${FV}-source.tar.bz2
+ mirror://gentoo/mozilla-jslibmath-alpha.patch"
+
+KEYWORDS="-*"
+SLOT="0"
+LICENSE="MPL-1.1 NPL-1.1"
+IUSE="java mozdevelop"
+
+RDEPEND="java? ( virtual/jre )
+ >=www-client/mozilla-launcher-1.39"
+
+DEPEND="${RDEPEND}
+ java? ( >=dev-java/java-config-0.2.0 )"
+
+S=${WORKDIR}/mozilla
+
+# Needed by src_compile() and src_install().
+# Would do in pkg_setup but that loses the export attribute, they
+# become pure shell variables.
+export MOZ_CO_PROJECT=browser
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+
+src_unpack() {
+ unpack firefox-${FV}-source.tar.bz2
+ cd ${S} || die "cd failed"
+
+ ####################################
+ #
+ # architecture patches
+ #
+ ####################################
+
+ # alpha stubs patch from lfs project.
+ # <taviso@gentoo.org> (26 Jun 2003)
+ use alpha && epatch ${FILESDIR}/1.5/mozilla-1.3-alpha-stubs.patch
+
+ # amd64 visibility patch
+ if [[ ${ARCH} == amd64 ]] && [[ $(gcc-major-version) -eq 3 ]]; then
+ epatch ${FILESDIR}/1.5/firefox-visibility.patch
+ fi
+
+ # hppa patches from Ivar <orskaug@stud.ntnu.no>
+ # <gmsoft@gentoo.org> (22 Dec 2004)
+ epatch ${FILESDIR}/1.5/mozilla-hppa.patch
+
+ # patch to solve segfaults on ia64, from Debian, originally from David
+ # Mosberger
+ epatch ${FILESDIR}/1.5/mozilla-firefox-1.1a2-ia64.patch
+
+ # patch to fix math operations on alpha, makes maps.google.com work!
+ epatch ${DISTDIR}/mozilla-jslibmath-alpha.patch
+
+ ####################################
+ #
+ # general compilation and run-time fixes
+ #
+ ####################################
+
+ # patch from fedora to remove the pangoxft things
+ epatch ${FILESDIR}/1.5/firefox-nopangoxft.patch
+ #cairo-canvas patch
+ epatch ${FILESDIR}/1.5/firefox-cairo-canvas.patch
+
+ ####################################
+ #
+ # behavioral fixes
+ #
+ ####################################
+
+ # patch to fix typeahead find for browsers which embed Firefox
+ # http://bugzilla.gnome.org/show_bug.cgi?id=157435
+ epatch ${FILESDIR}/1.5/embed-typeaheadfind.patch
+
+ # Fix scripts that call for /usr/local/bin/perl #51916
+ ebegin "Patching smime to call perl from /usr/bin"
+ sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime
+ eend $? || die "sed failed"
+}
+
+src_compile() {
+ declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
+
+ ####################################
+ #
+ # mozconfig, CFLAGS and CXXFLAGS setup
+ #
+ ####################################
+
+ mozconfig_init
+
+ mozconfig_annotate '' --enable-extensions=default,typeaheadfind
+ mozconfig_annotate '' --disable-mailnews
+ #mozconfig_annotate '' --enable-native-uconv
+ mozconfig_annotate '' --enable-image-encoder=all
+
+ # Bug 60668: Galeon doesn't build without oji enabled, so enable it
+ # regardless of java setting.
+ mozconfig_annotate '' --enable-oji --enable-mathml
+
+ # Other ff-specific settings
+ mozconfig_use_enable mozdevelop jsd
+ mozconfig_use_enable mozdevelop xpctools
+ mozconfig_use_extension mozdevelop venkman
+ mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
+
+ # Finalize and report settings
+ mozconfig_final
+
+ # hardened GCC uses -fstack-protector-all by default, which breaks us
+ has_hardened && append-flags -fno-stack-protector-all
+ # remove -fstack-protector because now it borks firefox
+ CFLAGS=${CFLAGS/-fstack-protector-all/}
+ CFLAGS=${CFLAGS/-fstack-protector/}
+ CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
+ CXXFLAGS=${CXXFLAGS/-fstack-protector/}
+
+ ####################################
+ #
+ # Configure and build
+ #
+ ####################################
+
+ CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
+ econf || die
+
+ # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
+ # to econf, but the quotes cause configure to fail.
+ sed -i -e \
+ 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
+ ${S}/config/autoconf.mk \
+ ${S}/nsprpub/config/autoconf.mk \
+ ${S}/xpfe/global/buildconfig.html
+
+ # Fixup the RPATH
+ sed -i -e \
+ 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
+ ${S}/config/rules.mk \
+ ${S}/nsprpub/config/rules.mk \
+ ${S}/security/coreconf/rules.mk \
+ ${S}/security/coreconf/rules.mk
+
+ # This removes extraneous CFLAGS from the Makefiles to reduce RAM
+ # requirements while compiling
+ edit_makefiles
+
+ emake || die
+}
+
+src_install() {
+ declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
+
+ # Most of the installation happens here
+ dodir ${MOZILLA_FIVE_HOME}
+ cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
+
+ # Create directory structure to support portage-installed extensions.
+ # See update_chrome() in mozilla-launcher
+ keepdir ${MOZILLA_FIVE_HOME}/chrome.d
+ keepdir ${MOZILLA_FIVE_HOME}/extensions.d
+ cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
+ ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
+
+ # Create /usr/bin/firefox
+ install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
+
+ # Install icon and .desktop for menu entry
+ insinto /usr/share/pixmaps
+ doins ${FILESDIR}/icon/deerpark-icon.png
+
+ # Fix bug 54179: Install .desktop file into /usr/share/applications
+ # instead of /usr/share/gnome/apps/Internet (18 Jun 2004 agriffis)
+ insinto /usr/share/applications
+ doins ${FILESDIR}/icon/mozillafirefox.desktop
+
+ ####################################
+ #
+ # Install files necessary for applications to build against firefox
+ #
+ ####################################
+
+ einfo "Installing includes and idl files..."
+ dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include
+ cd ${S}/dist
+ cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
+ cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy"
+
+ # Dirty hack to get some applications using this header running
+ dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
+ /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
+
+ # Fix firefox-config and install it
+ sed -i -e "s|/usr/lib/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}|g
+ s|/usr/include/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/include|g
+ s|/usr/share/idl/firefox-${MY_PV}|${MOZILLA_FIVE_HOME}/idl|g
+ s|\(echo -L.*\)\($\)|\1 -Wl,-R${MOZILLA_FIVE_HOME}\2|" \
+ ${S}/build/unix/firefox-config
+ exeinto ${MOZILLA_FIVE_HOME}
+ doexe ${S}/build/unix/firefox-config
+
+ # Fix pkgconfig files and install them
+ sed -i -e "s|-L/usr/lib/firefox-${MY_PV}|-L\$\{libdir\}|
+ s|-I/usr/include/firefox-${MY_PV}|-I\$\{includedir\}|" \
+ ${S}/build/unix/firefox-nspr.pc
+ insinto /usr/$(get_libdir)/pkgconfig
+ for x in ${S}/build/unix/*.pc; do
+ sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}|
+ s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|
+ s|^idldir=.*|idldir=${MOZILLA_FIVE_HOME}/idl|
+ s|\(^Libs: -L.*\)\($\)|\1 -Wl,-R\$\{libdir\}\2|" ${x}
+ doins ${x}
+ done
+
+ ####################################
+ #
+ # Some preferences, probably gentoo.org as start-page also
+ #
+ ####################################
+
+ dodir ${D}/${MOZILLA_FIVE_HOME}/greprefs
+ cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js
+ dodir ${D}/${MOZILLA_FIVE_HOME}/defaults/pref
+ cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
+
+ # Install docs
+ dodoc LEGAL LICENSE
+}
+
+pkg_postinst() {
+ declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
+
+ ####################################
+ #
+ # The registration is done here,
+ # mozilla-launcher do not do it correctly for now
+ #
+ ####################################
+
+ touch ${MOZILLA_FIVE_HOME}/components/compreg.dat
+ touch ${MOZILLA_FIVE_HOME}/components/xpti.dat
+ [ -x ${MOZILLA_FIVE_HOME}/firefox ] && ${MOZILLA_FIVE_HOME}/firefox -register
+ [ -x ${MOZILLA_FIVE_HOME}/regxpcom ] && ${MOZILLA_FIVE_HOME}/regxpcom
+
+ # This should be called in the postinst and postrm of all the
+ # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
+ # thunderbird-bin ebuilds.
+ update_mozilla_launcher_symlinks
+}
+
+pkg_postrm() {
+ declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
+
+ ####################################
+ #
+ # The registration is done here,
+ # mozilla-launcher do not do it correctly for now
+ #
+ ####################################
+
+ [ -x ${MOZILLA_FIVE_HOME}/firefox ] && ${MOZILLA_FIVE_HOME}/firefox -register
+ [ -x ${MOZILLA_FIVE_HOME}/regxpcom ] && ${MOZILLA_FIVE_HOME}/regxpcom
+ update_mozilla_launcher_symlinks
+}