Bug 627277 - Remove (broken) BeOS support. r=biesi,dwitte,gavin,joe,jorendorff,josh,khuey,mfinkle,neil,Pike,roc,shaver,smontagu,taras
authorMitchell Field <mitchell.field@live.com.au>
Sun, 20 Feb 2011 06:10:24 +1100
changeset 63458 1feb4a7c7ca6fe81b32ddbef7dafae744c81d500
parent 63457 1c0d8cade5a8a9d79d3abf65ab0c357219747d75
child 63459 347d38aeaaccd8268c2d80463665cd4ff7c7d383
push id19231
push userkhuey@kylehuey.com
push dateWed, 23 Mar 2011 00:22:04 +0000
treeherdermozilla-central@57a0f8967cce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbiesi, dwitte, gavin, joe, jorendorff, josh, khuey, mfinkle, neil, Pike, roc, shaver, smontagu, taras
bugs627277
milestone2.0b12pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 627277 - Remove (broken) BeOS support. r=biesi,dwitte,gavin,joe,jorendorff,josh,khuey,mfinkle,neil,Pike,roc,shaver,smontagu,taras
Makefile.in
browser/app/Makefile.in
browser/app/apprunner-beos.rsrc
browser/components/build/nsModule.cpp
browser/components/migration/src/Makefile.in
browser/components/migration/src/nsOperaProfileMigrator.cpp
browser/components/migration/src/nsPhoenixProfileMigrator.cpp
browser/components/migration/src/nsProfileMigrator.cpp
browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp
build/unix/run-mozilla.sh
config/config.mk
config/rules.mk
configure.in
db/mork/src/morkConfig.h
db/mork/src/morkFile.cpp
db/mork/src/morkStream.cpp
docshell/base/nsDefaultURIFixup.cpp
gfx/src/nsIRenderingContext.h
gfx/src/thebes/Makefile.in
gfx/src/thebes/nsSystemFontsBeOS.cpp
gfx/src/thebes/nsSystemFontsBeOS.h
gfx/src/thebes/nsThebesDeviceContext.cpp
gfx/src/thebes/nsThebesRenderingContext.cpp
gfx/src/thebes/nsThebesRenderingContext.h
gfx/thebes/Makefile.in
gfx/thebes/gfxBeOSPlatform.cpp
gfx/thebes/gfxBeOSPlatform.h
gfx/thebes/gfxBeOSSurface.cpp
gfx/thebes/gfxBeOSSurface.h
gfx/thebes/gfxPlatform.cpp
intl/locale/src/nsLocaleConstructors.h
intl/locale/src/nsLocaleService.cpp
intl/uconv/src/Makefile.in
intl/uconv/src/nsBeOSCharset.cpp
js/src/Makefile.in
js/src/config/config.mk
js/src/config/rules.mk
js/src/configure.in
js/src/jscpucfg.h
js/src/jsgcchunk.cpp
js/src/jsotypes.h
js/src/prmjtime.cpp
js/src/shell/js.cpp
js/src/xpconnect/loader/mozJSComponentLoader.cpp
js/src/xpconnect/shell/xpcshell.cpp
layout/base/nsPresContext.cpp
modules/libjar/nsZipArchive.cpp
modules/libjar/nsZipArchive.h
modules/libpr0n/decoders/Makefile.in
modules/libpr0n/decoders/icon/Makefile.in
modules/libpr0n/decoders/icon/beos/Makefile.in
modules/libpr0n/decoders/icon/beos/nsIconChannel.cpp
modules/libpr0n/decoders/icon/beos/nsIconChannel.h
modules/libpref/src/Makefile.in
modules/libpref/src/init/all.js
modules/libpref/src/prefapi.cpp
modules/plugin/base/src/Makefile.in
modules/plugin/base/src/nsPluginsDirBeOS.cpp
netwerk/cache/nsDiskCacheDevice.cpp
netwerk/protocol/http/nsHttpHandler.cpp
rdf/datasource/src/nsFileSystemDataSource.cpp
rdf/datasource/src/nsFileSystemDataSource.h
toolkit/components/commandlines/src/nsCommandLine.cpp
toolkit/components/filepicker/Makefile.in
toolkit/library/Makefile.in
toolkit/library/libxul-config.mk
toolkit/library/nsStaticXULComponents.cpp
toolkit/mozapps/installer/package-name.mk
toolkit/mozapps/installer/packager.mk
toolkit/profile/src/nsToolkitProfileService.cpp
toolkit/toolkit-makefiles.sh
toolkit/xre/Makefile.in
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsNativeAppSupportBeOS.cpp
toolkit/xre/nsSigHandlers.cpp
toolkit/xre/nsUpdateDriver.cpp
toolkit/xre/nsXREDirProvider.cpp
uriloader/exthandler/Makefile.in
uriloader/exthandler/beos/nsMIMEInfoBeOS.cpp
uriloader/exthandler/beos/nsMIMEInfoBeOS.h
uriloader/exthandler/beos/nsOSHelperAppService.cpp
uriloader/exthandler/beos/nsOSHelperAppService.h
widget/public/Makefile.in
widget/public/nsIDragSessionBeOS.h
widget/src/Makefile.in
widget/src/beos/Makefile.in
widget/src/beos/nsAppShell.cpp
widget/src/beos/nsAppShell.h
widget/src/beos/nsBeOSCursors.h
widget/src/beos/nsBidiKeyboard.cpp
widget/src/beos/nsBidiKeyboard.h
widget/src/beos/nsCList.h
widget/src/beos/nsChildView.cpp
widget/src/beos/nsChildView.h
widget/src/beos/nsClipboard.cpp
widget/src/beos/nsClipboard.h
widget/src/beos/nsDeviceContextSpecB.cpp
widget/src/beos/nsDeviceContextSpecB.h
widget/src/beos/nsDragService.cpp
widget/src/beos/nsDragService.h
widget/src/beos/nsFilePicker.cpp
widget/src/beos/nsFilePicker.h
widget/src/beos/nsLookAndFeel.cpp
widget/src/beos/nsLookAndFeel.h
widget/src/beos/nsPopupWindow.cpp
widget/src/beos/nsPopupWindow.h
widget/src/beos/nsPrintOptionsBeOS.cpp
widget/src/beos/nsPrintOptionsBeOS.h
widget/src/beos/nsPrintdBeOS.h
widget/src/beos/nsScreenBeOS.cpp
widget/src/beos/nsScreenBeOS.h
widget/src/beos/nsScreenManagerBeOS.cpp
widget/src/beos/nsScreenManagerBeOS.h
widget/src/beos/nsSound.cpp
widget/src/beos/nsSound.h
widget/src/beos/nsSwitchToUIThread.h
widget/src/beos/nsToolkit.cpp
widget/src/beos/nsToolkit.h
widget/src/beos/nsWidgetFactory.cpp
widget/src/beos/nsWindow.cpp
widget/src/beos/nsWindow.h
widget/src/beos/nsdefs.h
widget/src/beos/resource.h
widget/src/xpwidgets/Makefile.in
xpcom/base/nsDebugImpl.cpp
xpcom/build/Makefile.in
xpcom/build/nsXPCOMPrivate.h
xpcom/components/nsComponentManager.cpp
xpcom/components/nsNativeComponentLoader.cpp
xpcom/ds/nsCRT.h
xpcom/glue/nsCRTGlue.h
xpcom/glue/nsGREGlue.cpp
xpcom/glue/standalone/Makefile.in
xpcom/glue/standalone/nsGlueLinkingBeOS.cpp
xpcom/io/SpecialSystemDirectory.cpp
xpcom/io/SpecialSystemDirectory.h
xpcom/io/nsAppFileLocationProvider.cpp
xpcom/io/nsDirectoryService.cpp
xpcom/io/nsDirectoryServiceAtomList.h
xpcom/io/nsDirectoryServiceDefs.h
xpcom/io/nsLocalFile.h
xpcom/io/nsLocalFileCommon.cpp
xpcom/io/nsLocalFileUnix.cpp
xpcom/io/nsNativeCharsetUtils.cpp
xpcom/io/nsNativeCharsetUtils.h
xpcom/reflect/xptcall/src/md/unix/Makefile.in
xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h
xulrunner/app/Makefile.in
xulrunner/stub/nsXULStub.cpp
--- a/Makefile.in
+++ b/Makefile.in
@@ -78,17 +78,17 @@ ifdef COMPILE_ENVIRONMENT
 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
 endif
 
 
 include $(topsrcdir)/config/config.mk
 
 GARBAGE_DIRS += dist _javagen _profile _tests staticlib
 DIST_GARBAGE = config.cache config.log config.status config-defs.h \
-   dependencies.beos config/autoconf.mk \
+   config/autoconf.mk \
    unallmakefiles mozilla-config.h \
    netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
    $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
 
 ifdef WINCE
 check::
 	$(PYTHON) $(topsrcdir)/build/mobile/devicemanager-utils.py copy $(DIST)/bin
 endif
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -194,23 +194,16 @@ endif
 ifdef BUILD_STATIC_LIBS
 RCFLAGS += -DMOZ_STATIC_BUILD
 endif
 ifdef DEBUG
 RCFLAGS += -DDEBUG
 endif
 endif
 
-ifeq ($(OS_ARCH),BeOS)
-BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc
-ifdef BUILD_STATIC_LIBS
-OS_LIBS += -ltracker -lgame
-endif
-endif
-
 ifeq ($(OS_ARCH),OS2)
 RESFILE=splashos2.res
 RCFLAGS += -DMOZ_PHOENIX
 ifdef BUILD_STATIC_LIBS
 RCFLAGS += -DMOZ_STATIC_BUILD -i $(DIST)/include
 endif
 ifdef DEBUG
 RCFLAGS += -DDEBUG
deleted file mode 100644
index 145e9ca36dfca8072be0b28e2c1c6c93b6dff813..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -47,19 +47,17 @@
 #include "nsMacShellService.h"
 #elif defined(MOZ_WIDGET_GTK2)
 #include "nsGNOMEShellService.h"
 #endif
 
 #ifndef WINCE
 
 #include "nsProfileMigrator.h"
-#if !defined(XP_BEOS)
 #include "nsDogbertProfileMigrator.h"
-#endif
 #if !defined(XP_OS2)
 #include "nsOperaProfileMigrator.h"
 #endif
 #include "nsPhoenixProfileMigrator.h"
 #include "nsSeamonkeyProfileMigrator.h"
 #if defined(XP_WIN) && !defined(__MINGW32__)
 #include "nsIEProfileMigrator.h"
 #elif defined(XP_MACOSX)
@@ -90,19 +88,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindows
 #elif defined(XP_MACOSX)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
 #elif defined(MOZ_WIDGET_GTK2)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
 #endif
 
 #ifndef WINCE
 
-#if !defined(XP_BEOS)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDogbertProfileMigrator)
-#endif
 #if !defined(XP_OS2)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
 #endif
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPhoenixProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSeamonkeyProfileMigrator)
 #if defined(XP_WIN) && !defined(__MINGW32__)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEProfileMigrator)
@@ -138,19 +134,17 @@ NS_DEFINE_NAMED_CID(NS_SAFARIPROFILEMIGR
 NS_DEFINE_NAMED_CID(NS_MACIEPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_OMNIWEBPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_CAMINOPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_ICABPROFILEMIGRATOR_CID);
 #endif
 #if !defined(XP_OS2)
 NS_DEFINE_NAMED_CID(NS_OPERAPROFILEMIGRATOR_CID);
 #endif
-#if !defined(XP_BEOS)
 NS_DEFINE_NAMED_CID(NS_DOGBERTPROFILEMIGRATOR_CID);
-#endif
 NS_DEFINE_NAMED_CID(NS_PHOENIXPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_SEAMONKEYPROFILEMIGRATOR_CID);
 #endif /* WINCE */
 NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
 
 static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
     { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, NULL, DirectoryProviderConstructor },
 #if defined(XP_WIN)
@@ -170,19 +164,17 @@ static const mozilla::Module::CIDEntry k
     { &kNS_MACIEPROFILEMIGRATOR_CID, false, NULL, nsMacIEProfileMigratorConstructor },
     { &kNS_OMNIWEBPROFILEMIGRATOR_CID, false, NULL, nsOmniWebProfileMigratorConstructor },
     { &kNS_CAMINOPROFILEMIGRATOR_CID, false, NULL, nsCaminoProfileMigratorConstructor },
     { &kNS_ICABPROFILEMIGRATOR_CID, false, NULL, nsICabProfileMigratorConstructor },
 #endif
 #if !defined(XP_OS2)
     { &kNS_OPERAPROFILEMIGRATOR_CID, false, NULL, nsOperaProfileMigratorConstructor },
 #endif
-#if !defined(XP_BEOS)
     { &kNS_DOGBERTPROFILEMIGRATOR_CID, false, NULL, nsDogbertProfileMigratorConstructor },
-#endif
     { &kNS_PHOENIXPROFILEMIGRATOR_CID, false, NULL, nsPhoenixProfileMigratorConstructor },
     { &kNS_SEAMONKEYPROFILEMIGRATOR_CID, false, NULL, nsSeamonkeyProfileMigratorConstructor },
 #endif /* WINCE */
     { &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID, false, NULL, nsPrivateBrowsingServiceWrapperConstructor },
     { NULL }
 };
 
 static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
@@ -216,19 +208,17 @@ static const mozilla::Module::ContractID
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "macie", &kNS_MACIEPROFILEMIGRATOR_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "omniweb", &kNS_OMNIWEBPROFILEMIGRATOR_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "camino", &kNS_CAMINOPROFILEMIGRATOR_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "icab", &kNS_ICABPROFILEMIGRATOR_CID },
 #endif
 #if !defined(XP_OS2)
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "opera", &kNS_OPERAPROFILEMIGRATOR_CID },
 #endif
-#if !defined(XP_BEOS)
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "dogbert", &kNS_DOGBERTPROFILEMIGRATOR_CID },
-#endif
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "phoenix", &kNS_PHOENIXPROFILEMIGRATOR_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey", &kNS_SEAMONKEYPROFILEMIGRATOR_CID },
 #endif /* WINCE */
     { NS_PRIVATE_BROWSING_SERVICE_CONTRACTID, &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID },
     { NULL }
 };
 
 static const mozilla::Module::CategoryEntry kBrowserCategories[] = {
--- a/browser/components/migration/src/Makefile.in
+++ b/browser/components/migration/src/Makefile.in
@@ -50,22 +50,19 @@ USE_STATIC_LIBS = 1
 endif
 
 
 CPPSRCS  = nsProfileMigrator.cpp \
            nsBrowserProfileMigratorUtils.cpp \
            nsNetscapeProfileMigratorBase.cpp \
            nsSeamonkeyProfileMigrator.cpp \
            nsPhoenixProfileMigrator.cpp \
+           nsDogbertProfileMigrator.cpp \
            $(NULL)
 
-ifneq ($(OS_ARCH),BeOS)
-CPPSRCS += nsDogbertProfileMigrator.cpp
-endif
-
 ifneq ($(OS_ARCH),OS2)
 CPPSRCS += nsOperaProfileMigrator.cpp
 endif
 
 ifeq ($(OS_ARCH)_$(GNU_CXX),WINNT_)
 CPPSRCS += nsIEProfileMigrator.cpp \
            $(NULL)
 endif
--- a/browser/components/migration/src/nsOperaProfileMigrator.cpp
+++ b/browser/components/migration/src/nsOperaProfileMigrator.cpp
@@ -80,29 +80,21 @@
 #define OPERA_PREFERENCES_FILE_NAME NS_LITERAL_STRING("Opera 6 Preferences")
 #define OPERA_HISTORY_FILE_NAME NS_LITERAL_STRING("Opera Global History")
 #define OPERA_BOOKMARKS_FILE_NAME NS_LITERAL_STRING("Bookmarks")
 #elif defined (XP_UNIX)
 #define OPERA_PREFERENCES_FOLDER_NAME NS_LITERAL_STRING(".opera")
 #define OPERA_PREFERENCES_FILE_NAME NS_LITERAL_STRING("opera6.ini")
 #define OPERA_HISTORY_FILE_NAME NS_LITERAL_STRING("global.dat")
 #define OPERA_BOOKMARKS_FILE_NAME NS_LITERAL_STRING("opera6.adr")
-#elif defined (XP_BEOS)
-#define OPERA_PREFERENCES_FOLDER_NAME NS_LITERAL_STRING("Opera")
-#define OPERA_PREFERENCES_FILE_NAME NS_LITERAL_STRING("opera.ini")
-#define OPERA_HISTORY_FILE_NAME NS_LITERAL_STRING("global.dat")
-#define OPERA_BOOKMARKS_FILE_NAME NS_LITERAL_STRING("opera.adr")
 #else
 #error Need to define location of Opera Profile data.
 #endif
 
 #define OPERA_COOKIES_FILE_NAME NS_LITERAL_STRING("cookies4.dat")
-#ifdef XP_BEOS
-#define OPERA_COOKIES_FILE_NAME NS_LITERAL_STRING("cookies.dat")
-#endif
 
 ///////////////////////////////////////////////////////////////////////////////
 // nsBrowserProfileMigrator
 
 NS_IMPL_ISUPPORTS1(nsOperaProfileMigrator, nsIBrowserProfileMigrator)
 
 nsOperaProfileMigrator::nsOperaProfileMigrator()
 {
--- a/browser/components/migration/src/nsPhoenixProfileMigrator.cpp
+++ b/browser/components/migration/src/nsPhoenixProfileMigrator.cpp
@@ -284,21 +284,16 @@ nsPhoenixProfileMigrator::FillProfileDat
   
   phoenixRegistry->Append(NS_LITERAL_STRING("Phoenix"));
   phoenixRegistry->Append(NS_LITERAL_STRING("Application Registry"));
 #elif defined(XP_UNIX)
   fileLocator->Get(NS_UNIX_HOME_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(phoenixRegistry));
   
   phoenixRegistry->Append(NS_LITERAL_STRING(".phoenix"));
   phoenixRegistry->Append(NS_LITERAL_STRING("appreg"));
-#elif defined(XP_BEOS)
-   fileLocator->Get(NS_BEOS_SETTINGS_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(phoenixRegistry));
-
-   phoenixRegistry->Append(NS_LITERAL_STRING("Phoenix"));
-   phoenixRegistry->Append(NS_LITERAL_STRING("appreg"));
 #elif defined(XP_OS2)
   fileLocator->Get(NS_OS2_HOME_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(phoenixRegistry));
   
   phoenixRegistry->Append(NS_LITERAL_STRING("Phoenix"));
   phoenixRegistry->Append(NS_LITERAL_STRING("registry.dat"));
 #endif
 
 
--- a/browser/components/migration/src/nsProfileMigrator.cpp
+++ b/browser/components/migration/src/nsProfileMigrator.cpp
@@ -319,22 +319,16 @@ nsProfileMigrator::ImportRegistryProfile
   regFile->AppendNative(aAppName);
   regFile->AppendNative(NS_LITERAL_CSTRING("Application Registry"));
 #elif defined(XP_OS2)
   rv = dirService->Get(NS_OS2_HOME_DIR, NS_GET_IID(nsILocalFile),
                        getter_AddRefs(regFile));
   NS_ENSURE_SUCCESS(rv, PR_FALSE);
   regFile->AppendNative(aAppName);
   regFile->AppendNative(NS_LITERAL_CSTRING("registry.dat"));
-#elif defined(XP_BEOS)
-  rv = dirService->Get(NS_BEOS_SETTINGS_DIR, NS_GET_IID(nsILocalFile),
-                       getter_AddRefs(regFile));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
-  regFile->AppendNative(aAppName);
-  regFile->AppendNative(NS_LITERAL_CSTRING("appreg"));
 #else
   rv = dirService->Get(NS_UNIX_HOME_DIR, NS_GET_IID(nsILocalFile),
                        getter_AddRefs(regFile));
   NS_ENSURE_SUCCESS(rv, PR_FALSE);
   nsCAutoString dotAppName;
   ToLowerCase(aAppName, dotAppName);
   dotAppName.Insert('.', 0);
   
--- a/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp
+++ b/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp
@@ -317,21 +317,16 @@ nsSeamonkeyProfileMigrator::FillProfileD
   
   seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
   seamonkeyRegistry->Append(NS_LITERAL_STRING("Application Registry"));
 #elif defined(XP_UNIX)
   fileLocator->Get(NS_UNIX_HOME_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(seamonkeyRegistry));
   
   seamonkeyRegistry->Append(NS_LITERAL_STRING(".mozilla"));
   seamonkeyRegistry->Append(NS_LITERAL_STRING("appreg"));
-#elif defined(XP_BEOS)
-   fileLocator->Get(NS_BEOS_SETTINGS_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(seamonkeyRegistry));
-
-   seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
-   seamonkeyRegistry->Append(NS_LITERAL_STRING("appreg"));
 #elif defined(XP_OS2)
   fileLocator->Get(NS_OS2_HOME_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(seamonkeyRegistry));
   
   seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
   seamonkeyRegistry->Append(NS_LITERAL_STRING("registry.dat"));
 #endif
 
   return GetProfileDataFromRegistry(seamonkeyRegistry, mProfileNames, mProfileLocations);
--- a/build/unix/run-mozilla.sh
+++ b/build/unix/run-mozilla.sh
@@ -328,22 +328,16 @@ fi
 SHLIB_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${SHLIB_PATH:+":$SHLIB_PATH"}
 #
 ## Set LIBPATH for AIX
 LIBPATH=${MOZ_DIST_BIN}:${MRE_HOME}${LIBPATH:+":$LIBPATH"}
 #
 ## Set DYLD_LIBRARY_PATH for Mac OS X (Darwin)
 DYLD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${DYLD_LIBRARY_PATH:+":$DYLD_LIBRARY_PATH"}
 #
-## Set LIBRARY_PATH for BeOS
-LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/components:${MRE_HOME}${LIBRARY_PATH:+":$LIBRARY_PATH"}
-#
-## Set ADDON_PATH for BeOS
-ADDON_PATH=${MOZ_DIST_BIN}${ADDON_PATH:+":$ADDON_PATH"}
-#
 ## Solaris Xserver(Xsun) tuning - use shared memory transport if available
 if [ "$XSUNTRANSPORT" = "" ]
 then 
         XSUNTRANSPORT="shmem" 
         XSUNSMESIZE="512"
         export XSUNTRANSPORT XSUNSMESIZE
 fi
 
--- a/config/config.mk
+++ b/config/config.mk
@@ -125,19 +125,16 @@ AUTOCONF_TOOLS	= $(topsrcdir)/build/auto
 
 ifeq ($(OS_ARCH),QNX)
 ifeq ($(OS_TARGET),NTO)
 LD		:= qcc -Vgcc_ntox86 -nostdlib
 else
 LD		:= $(CC)
 endif
 endif
-ifeq ($(OS_ARCH),BeOS)
-BEOS_ADDON_WORKAROUND	= 1
-endif
 
 #
 # Strip off the excessively long version numbers on these platforms,
 # but save the version to allow multiple versions of the same base
 # platform to be built in the same tree.
 #
 ifneq (,$(filter FreeBSD HP-UX IRIX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
 OS_RELEASE	:= $(basename $(OS_RELEASE))
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -909,29 +909,23 @@ endif # LIBRARY
 ifdef SHARED_LIBRARY
 ifdef IS_COMPONENT
 	$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
 	$(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)
 ifndef NO_COMPONENTS_MANIFEST
 	@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/chrome.manifest "manifest components/components.manifest"
 	@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.manifest "binary-component $(SHARED_LIBRARY)"
 endif
-ifdef BEOS_ADDON_WORKAROUND
-	( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
-endif
 else # ! IS_COMPONENT
 ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
 	$(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib
 else
 	$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib
 endif
 	$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)
-ifdef BEOS_ADDON_WORKAROUND
-	( cd $(FINAL_TARGET) && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
-endif
 endif # IS_COMPONENT
 endif # SHARED_LIBRARY
 ifdef PROGRAM
 	$(INSTALL) $(IFLAGS2) $(PROGRAM) $(FINAL_TARGET)
 endif
 ifdef SIMPLE_PROGRAMS
 	$(INSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(FINAL_TARGET)
 endif
@@ -1055,22 +1049,16 @@ endif # WINNT && !GNU_CC
 endif # WINCE
 
 ifdef ENABLE_STRIP
 	$(STRIP) $@
 endif
 ifdef MOZ_POST_PROGRAM_COMMAND
 	$(MOZ_POST_PROGRAM_COMMAND) $@
 endif
-ifeq ($(OS_ARCH),BeOS)
-ifdef BEOS_PROGRAM_RESOURCE
-	xres -o $@ $(BEOS_PROGRAM_RESOURCE)
-	mimeset $@
-endif
-endif # BeOS
 
 $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
 ifeq (WINCE,$(OS_ARCH))
 	$(HOST_LD) -NOLOGO -OUT:$@ $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
 else
 ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
 	$(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
 ifdef MSMANIFEST_TOOL
--- a/configure.in
+++ b/configure.in
@@ -1836,22 +1836,16 @@ MOZ_ARG_ENABLE_BOOL(profiling,
 [  --enable-profiling      Set compile flags necessary for using sampling profilers (e.g. shark, perf)],
     MOZ_PROFILING=1,
     MOZ_PROFILING= )
 
 dnl ========================================================
 dnl System overrides of the defaults for host
 dnl ========================================================
 case "$host" in
-*-beos*)
-    HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE -DNO_X11"
-    HOST_NSPR_MDCPUCFG='\"md/_beos.cfg\"'
-    HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
-    ;;
-
 *mingw*|*wince|*winmo)
     if test -n "$_WIN32_MSVC"; then
         HOST_AR=lib
         HOST_AR_FLAGS='-NOLOGO -OUT:"$@"'
         HOST_CFLAGS="$HOST_CFLAGS -TC -nologo -Fd\$(HOST_PDBFILE)"
         HOST_RANLIB='echo ranlib'
     else
         HOST_CFLAGS="$HOST_CFLAGS -mno-cygwin"
@@ -1984,34 +1978,16 @@ case "$target" in
         ;;
     esac
     if test "$COMPILE_ENVIRONMENT"; then
         AC_CHECK_HEADERS(sys/inttypes.h)
     fi
     AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
     ;;
 
-*-beos*)
-    no_x=yes
-    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
-    _PLATFORM_DEFAULT_TOOLKIT="cairo-beos"
-    DSO_LDOPTS='-nostart'
-    TK_LIBS='-lbe -lroot'
-    LIBS="$LIBS -lbe"
-    if test "$COMPILE_ENVIRONMENT"; then
-        AC_CHECK_LIB(bind,main,LIBS="$LIBS -lbind")
-        AC_CHECK_LIB(zeta,main,LIBS="$LIBS -lzeta")
-    fi
-    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-multichar"
-    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-multichar"
-    _MOZ_USE_RTTI=1
-    USE_DEPENDENT_LIBS=
-    MOZ_USER_DIR="Mozilla"
-    ;;
-
 *-bsdi*)
     dnl -pedantic doesn't play well with BSDI's _very_ modified gcc (shlicc2)
     _PEDANTIC=
     case $OS_RELEASE in
 	4.*|5.*)
             STRIP="$STRIP -d"
             ;;
 	*)
@@ -3369,26 +3345,24 @@ case $target in
 *-hpux11.*)
 	;;
 *)
 	AC_CHECK_LIB(c_r, gethostbyname_r)
 	;;
 esac
 
 dnl We don't want to link with libdl even if it's present on OS X, since
-dnl it's not used and not part of the default installation.
-dnl The same goes for BeOS. OS/2 has dlfcn in libc.
+dnl it's not used and not part of the default installation. OS/2 has dlfcn
+dnl in libc.
 dnl We don't want to link against libm or libpthread on Darwin since
 dnl they both are just symlinks to libSystem and explicitly linking
 dnl against libSystem causes issues when debugging (see bug 299601).
 case $target in
 *-darwin*)
     ;;
-*-beos*)
-    ;;
 *-os2*)
     ;;
 *)
     AC_SEARCH_LIBS(dlopen, dl, 
         AC_CHECK_HEADER(dlfcn.h, 
         AC_DEFINE(HAVE_DLOPEN)))
     ;;
 esac
@@ -5118,34 +5092,32 @@ MOZ_ARG_HEADER(Toolkit Options)
 
     dnl ========================================================
     dnl = Select the default toolkit
     dnl ========================================================
 	MOZ_ARG_ENABLE_STRING(default-toolkit,
 	[  --enable-default-toolkit=TK
                           Select default toolkit
                           Platform specific defaults:
-                            BeOS - cairo-beos
                             Mac OS X - cairo-cocoa
                             Neutrino/QNX - photon
                             OS/2 - cairo-os2
                             Win32/WinCE - cairo-windows
                             Gtk2 with DirectFB - cairo-gtk2-dfb
                             * - cairo-gtk2
                             * - cairo-qt],
     [ _DEFAULT_TOOLKIT=$enableval ],
     [ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT])
 
     if test "$_DEFAULT_TOOLKIT" = "photon" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-windows" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2-dfb" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2-x11" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-qt" \
-        -o "$_DEFAULT_TOOLKIT" = "cairo-beos" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-os2" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-cocoa" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-android"
     then
         dnl nglayout only supports building with one toolkit,
         dnl so ignore everything after the first comma (",").
         MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"`
     else
@@ -5221,23 +5193,16 @@ cairo-qt)
     USE_FC_FREETYPE=1
 
     TK_CFLAGS='$(MOZ_QT_CFLAGS)'
     TK_LIBS='$(MOZ_QT_LIBS)'
     AC_DEFINE(MOZ_WIDGET_QT)
     MOZ_PDF_PRINTING=1
     ;;
 
-cairo-beos)
-    MOZ_WIDGET_TOOLKIT=beos
-    USE_FC_FREETYPE=1
-    TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)'
-    TK_LIBS='$(MOZ_CAIRO_LIBS)'
-    ;;
-
 cairo-os2)
     MOZ_WIDGET_TOOLKIT=os2
     USE_FC_FREETYPE=1
     TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)'
     TK_LIBS='$(MOZ_CAIRO_LIBS)'
     MOZ_PDF_PRINTING=1
     ;;
 
@@ -8674,22 +8639,16 @@ if test "$MOZ_TREE_CAIRO"; then
     fi
     if test "$MOZ_WIDGET_TOOLKIT" = "os2"; then
         OS2_SURFACE_FEATURE="#define CAIRO_HAS_OS2_SURFACE 1"
         FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
         MOZ_ENABLE_CAIRO_FT=1
         CAIRO_FT_CFLAGS="-I${MZFTCFGFT2}/include"
         CAIRO_FT_LIBS="-L${MZFTCFGFT2}/lib -lmozft -lmzfntcfg"
     fi
-    if test "$MOZ_WIDGET_TOOLKIT" = "beos"; then
-        PKG_CHECK_MODULES(CAIRO_FT, fontconfig freetype2)
-        BEOS_SURFACE_FEATURE="#define CAIRO_HAS_BEOS_SURFACE 1"
-        FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
-        MOZ_ENABLE_CAIRO_FT=1
-    fi
     if test "$USE_FC_FREETYPE"; then
         FC_FONT_FEATURE="#define CAIRO_HAS_FC_FONT 1"
     fi
     AC_SUBST(MOZ_ENABLE_CAIRO_FT)
     AC_SUBST(MOZ_ENABLE_DWRITE_FONT)
     AC_SUBST(MOZ_ENABLE_D2D_SURFACE)
     AC_SUBST(MOZ_ENABLE_D3D9_LAYER)
     AC_SUBST(MOZ_ENABLE_D3D10_LAYER)
@@ -8709,17 +8668,16 @@ if test "$MOZ_TREE_CAIRO"; then
     AC_SUBST(SVG_SURFACE_FEATURE)
     AC_SUBST(XLIB_SURFACE_FEATURE)
     AC_SUBST(XLIB_XRENDER_SURFACE_FEATURE)
     AC_SUBST(QUARTZ_SURFACE_FEATURE)
     AC_SUBST(QUARTZ_IMAGE_SURFACE_FEATURE)
     AC_SUBST(XCB_SURFACE_FEATURE)
     AC_SUBST(WIN32_SURFACE_FEATURE)
     AC_SUBST(OS2_SURFACE_FEATURE)
-    AC_SUBST(BEOS_SURFACE_FEATURE)
     AC_SUBST(DIRECTFB_SURFACE_FEATURE)
     AC_SUBST(FT_FONT_FEATURE)
     AC_SUBST(FC_FONT_FEATURE)
     AC_SUBST(WIN32_FONT_FEATURE)
     AC_SUBST(WIN32_DWRITE_FONT_FEATURE)
     AC_SUBST(WIN32_D2D_SURFACE_FEATURE)
     AC_SUBST(QUARTZ_FONT_FEATURE)
     AC_SUBST(PNG_FUNCTIONS_FEATURE)
@@ -9324,19 +9282,17 @@ if test "$USE_FC_FREETYPE"; then
     else
         AC_DEFINE(HAVE_FONTCONFIG_FCFREETYPE_H)
     fi
 fi
 
 dnl Set various defines and substitutions
 dnl ========================================================
 
-if test "$OS_ARCH" = "BeOS"; then
-  AC_DEFINE(XP_BEOS)
-elif test "$OS_ARCH" = "Darwin"; then
+if test "$OS_ARCH" = "Darwin"; then
   AC_DEFINE(XP_UNIX)
   AC_DEFINE(UNIX_ASYNC_DNS)
 elif test "$OS_ARCH" = "OpenVMS"; then
   AC_DEFINE(XP_UNIX)
 elif test "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "OS2" -a "$OS_ARCH" != "WINCE"; then
   AC_DEFINE(XP_UNIX)
   AC_DEFINE(UNIX_ASYNC_DNS)
 fi
--- a/db/mork/src/morkConfig.h
+++ b/db/mork/src/morkConfig.h
@@ -63,23 +63,19 @@
 #ifdef XP_WIN
 #define MORK_WIN 1
 #endif
 
 #ifdef XP_UNIX
 #define MORK_UNIX 1
 #endif
 
-#ifdef XP_BEOS
-#define MORK_BEOS 1
-#endif
-
 // } %%%%% end platform defs peculiar to Mork %%%%%
 
-#if defined(MORK_WIN) || defined(MORK_UNIX) || defined(MORK_MAC) || defined(MORK_BEOS) || defined(MORK_OS2)
+#if defined(MORK_WIN) || defined(MORK_UNIX) || defined(MORK_MAC) || defined(MORK_OS2)
 #include <stdio.h> 
 #include <ctype.h> 
 #include <errno.h> 
 #include <string.h> 
 #ifdef HAVE_MEMORY_H
 #include <memory.h> 
 #endif
 #ifdef HAVE_UNISTD_H
@@ -138,35 +134,35 @@ FILE* mork_fileopen(const char* name, co
 #if defined(MORK_MAC)
 #  define mork_kNewline             "\015"
 #  define mork_kNewlineSize 1
 #else
 #  if defined(MORK_WIN) || defined(MORK_OS2)
 #    define mork_kNewline           "\015\012"
 #    define mork_kNewlineSize       2
 #  else
-#    if defined(MORK_UNIX) || defined(MORK_BEOS)
+#    if defined(MORK_UNIX)
 #      define mork_kNewline         "\012"
 #      define mork_kNewlineSize     1
-#    endif /* MORK_UNIX || MORK_BEOS */
+#    endif /* MORK_UNIX */
 #  endif /* MORK_WIN */
 #endif /* MORK_MAC */
 
 // { %%%%% begin assertion macro %%%%%
 extern void mork_assertion_signal(const char* inMessage);
 #define MORK_ASSERTION_SIGNAL(Y) mork_assertion_signal(Y)
 #define MORK_ASSERT(X) if (!(X)) MORK_ASSERTION_SIGNAL(#X)
 // } %%%%% end assertion macro %%%%%
 
 #define MORK_LIB(return) return /*API return declaration*/
 #define MORK_LIB_IMPL(return) return /*implementation return declaration*/
 
 // { %%%%% begin standard c utility methods %%%%%
 
-#if defined(MORK_WIN) || defined(MORK_UNIX) || defined(MORK_MAC) || defined(MORK_BEOS) || defined(MORK_OS2)
+#if defined(MORK_WIN) || defined(MORK_UNIX) || defined(MORK_MAC) || defined(MORK_OS2)
 #define MORK_USE_C_STDLIB 1
 #endif /*MORK_WIN*/
 
 #ifdef MORK_USE_C_STDLIB
 #define MORK_MEMCMP(src1,src2,size)  memcmp(src1,src2,size)
 #define MORK_MEMCPY(dest,src,size)   memcpy(dest,src,size)
 #define MORK_MEMMOVE(dest,src,size)  memmove(dest,src,size)
 #define MORK_MEMSET(dest,byte,size)  memset(dest,byte,size)
--- a/db/mork/src/morkFile.cpp
+++ b/db/mork/src/morkFile.cpp
@@ -256,21 +256,21 @@ morkFile::NewFileErrnoError(morkEnv* ev)
        "\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015";
 #      define morkFile_kNewlinesCount 16
 #else
 #  if defined(MORK_WIN) || defined(MORK_OS2)
        static const char morkFile_kNewlines[] = 
        "\015\012\015\012\015\012\015\012\015\012\015\012\015\012\015\012";
 #    define morkFile_kNewlinesCount 8
 #  else
-#    if defined(MORK_UNIX) || defined(MORK_BEOS)
+#    ifdef MORK_UNIX
        static const char morkFile_kNewlines[] = 
        "\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012\012";
 #      define morkFile_kNewlinesCount 16
-#    endif /* MORK_UNIX || MORK_BEOS */
+#    endif /* MORK_UNIX */
 #  endif /* MORK_WIN */
 #endif /* MORK_MAC */
 
 mork_size
 morkFile::WriteNewlines(morkEnv* ev, mork_count inNewlines)
   // WriteNewlines() returns the number of bytes written.
 {
   mork_size outSize = 0;
--- a/db/mork/src/morkStream.cpp
+++ b/db/mork/src/morkStream.cpp
@@ -322,22 +322,22 @@ morkStream::PutLineBreak(morkEnv* ev)
 #else
 #  if defined(MORK_WIN) || defined(MORK_OS2)
   
   this->Putc(ev, mork_kCR);
   this->Putc(ev, mork_kLF);
   return 2;
   
 #  else
-#    if defined(MORK_UNIX) || defined(MORK_BEOS)
+#    ifdef MORK_UNIX
   
   this->Putc(ev, mork_kLF);
   return 1;
   
-#    endif /* MORK_UNIX || MORK_BEOS */
+#    endif /* MORK_UNIX */
 #  endif /* MORK_WIN */
 #endif /* MORK_MAC */
 }
 // ````` ````` ````` `````   ````` ````` ````` `````  
 // public: // virtual morkFile methods
 
 
 NS_IMETHODIMP
--- a/docshell/base/nsDefaultURIFixup.cpp
+++ b/docshell/base/nsDefaultURIFixup.cpp
@@ -602,17 +602,17 @@ nsresult nsDefaultURIFixup::ConvertFileT
 
 #if defined(XP_WIN) || defined(XP_OS2)
     // Check for \ in the url-string or just a drive (PC)
     if(kNotFound != aIn.FindChar('\\') ||
        (aIn.Length() == 2 && (aIn.Last() == ':' || aIn.Last() == '|')))
     {
         attemptFixup = PR_TRUE;
     }
-#elif defined(XP_UNIX) || defined(XP_BEOS)
+#elif defined(XP_UNIX)
     // Check if it starts with / (UNIX)
     if(aIn.First() == '/')
     {
         attemptFixup = PR_TRUE;
     }
 #else
     // Do nothing (All others for now) 
 #endif
--- a/gfx/src/nsIRenderingContext.h
+++ b/gfx/src/nsIRenderingContext.h
@@ -445,17 +445,17 @@ public:
    *        methods to speed measurements
    * @return aDimensions struct that contains the extent of the string (see below)
    */
   NS_IMETHOD GetTextDimensions(const char* aString, PRUint32 aLength,
                                nsTextDimensions& aDimensions) = 0;
   NS_IMETHOD GetTextDimensions(const PRUnichar* aString, PRUint32 aLength,
                                nsTextDimensions& aDimensions, PRInt32* aFontID = nsnull) = 0;
 
-#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11) || defined(XP_BEOS)
+#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11)
   /**
    * Given an available width and an array of break points,
    * returns the dimensions (in app units) of the text that fit and
    * the number of characters that fit. The number of characters
    * corresponds to an entry in the break array.
    * If no font has been set, the results are undefined.
    * @param aString, string to measure
    * @param aLength, number of characters in string
--- a/gfx/src/thebes/Makefile.in
+++ b/gfx/src/thebes/Makefile.in
@@ -84,20 +84,16 @@ OS_LIBS		+= $(call EXPAND_LIBNAME,$(_OS_
 
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 CPPSRCS		+= nsSystemFontsOS2.cpp \
 		   $(NULL)
 endif
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-CPPSRCS		+= nsSystemFontsBeOS.cpp
-endif
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 CMMSRCS		= nsSystemFontsMac.mm
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 CPPSRCS		+= nsSystemFontsAndroid.cpp
 endif
 
deleted file mode 100644
--- a/gfx/src/thebes/nsSystemFontsBeOS.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/* vim: set sw=2 sts=2 et cin: */
-/* ***** 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 BeOS system font code in Thebes.
- *
- * The Initial Developer of the Original Code is
- * Christian Biesinger <cbiesinger@web.de>.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Parts of this file used to live in nsDeviceContextBeos.cpp. The Original
- *   Author of that code is Netscape Communications Corporation.
- *
- *   Pierre Phaneuf <pp@ludusdesign.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 <Font.h>
-#include <Menu.h>
-
-#include "nsIDeviceContext.h"
-#include "nsSystemFontsBeOS.h"
-
-nsSystemFontsBeOS::nsSystemFontsBeOS()
-  : mDefaultFontName(NS_LITERAL_STRING("sans-serif"))
-  , mMenuFontName(NS_LITERAL_STRING("sans-serif"))
-  , mCaptionFontName(NS_LITERAL_STRING("sans-serif"))
-{
-  menu_info info;
-  get_menu_info(&info);
-  BFont menuFont;
-  menuFont.SetFamilyAndStyle(info.f_family, info.f_style);
-  menuFont.SetSize(info.font_size);
-
-  GetSystemFontInfo(be_plain_font, &mDefaultFontName, &mDefaultFontStyle);
-  GetSystemFontInfo(be_bold_font, &mCaptionFontName, &mCaptionFontStyle);
-  GetSystemFontInfo(&menuFont, &mMenuFontName, &mMenuFontStyle);
-}
-
-nsresult nsSystemFontsBeOS::GetSystemFont(nsSystemFontID aID,
-                                          nsString *aFontName,
-                                          gfxFontStyle *aFontStyle) const
-{
-  switch (aID) {
-    case eSystemFont_PullDownMenu: 
-    case eSystemFont_Menu:
-      *aFontName = mMenuFontName;
-      *aFontStyle = mMenuFontStyle;
-      return NS_OK;
-    case eSystemFont_Caption:             // css2 bold  
-      *aFontName = mCaptionFontName;
-      *aFontStyle = mCaptionFontStyle;
-      return NS_OK;
-    case eSystemFont_List:   
-    case eSystemFont_Field:
-    case eSystemFont_Icon : 
-    case eSystemFont_MessageBox : 
-    case eSystemFont_SmallCaption : 
-    case eSystemFont_StatusBar : 
-    case eSystemFont_Window:              // css3 
-    case eSystemFont_Document: 
-    case eSystemFont_Workspace: 
-    case eSystemFont_Desktop: 
-    case eSystemFont_Info: 
-    case eSystemFont_Dialog: 
-    case eSystemFont_Button: 
-    case eSystemFont_Tooltips:            // moz 
-    case eSystemFont_Widget: 
-    default:
-      *aFontName = mDefaultFontName;
-      *aFontStyle = mDefaultFontStyle;
-      return NS_OK;
-  }
-  NS_NOTREACHED("huh?");
-}
-
-nsresult 
-nsSystemFontsBeOS::GetSystemFontInfo(const BFont *theFont, nsString *aFontName,
-                                     gfxFontStyle *aFontStyle) const 
-{ 
- 
-  aFontStyle->style       = FONT_STYLE_NORMAL; 
-  aFontStyle->weight      = FONT_WEIGHT_NORMAL; 
-  aFontStyle->decorations = FONT_DECORATION_NONE; 
-  aFontStyle->stretch     = NS_FONT_STRETCH_NORMAL;
-  
-  font_family family; 
-  theFont->GetFamilyAndStyle(&family, NULL);
-
-  uint16 face = theFont->Face();
-  CopyUTF8toUTF16(family, *aFontName);
-  aFontStyle->size = theFont->Size();
-
-  if (face & B_ITALIC_FACE)
-    aFontStyle->style = FONT_STYLE_ITALIC;
-
-  if (face & B_BOLD_FACE)
-    aFontStyle->weight = FONT_WEIGHT_BOLD;
-
-  // FIXME: Set aFontStyle->stretch correctly!
-
-  if (face & B_UNDERSCORE_FACE)
-    aFontStyle->decorations |= FONT_DECORATION_UNDERLINE;
-
-  if (face & B_STRIKEOUT_FACE)
-    aFontStyle->decorations |= FONT_DECORATION_STRIKEOUT;
-
-  aFontStyle->systemFont = PR_TRUE;
-
-  return NS_OK;
-}
-
deleted file mode 100644
--- a/gfx/src/thebes/nsSystemFontsBeOS.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* ***** 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 BeOS system font code in Thebes.
- *
- * The Initial Developer of the Original Code is
- * Christian Biesinger <cbiesinger@web.de>.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 ***** */
-
-#ifndef _NS_SYSTEMFONTSBEOS_H_
-#define _NS_SYSTEMFONTSBEOS_H_
-
-#include <gfxFont.h>
-
-class BFont;
-
-class nsSystemFontsBeOS
-{
-public:
-    nsSystemFontsBeOS();
-
-    nsresult GetSystemFont(nsSystemFontID anID, nsString *aFontName,
-                           gfxFontStyle *aFontStyle) const;
-
-private:
-    nsresult GetSystemFontInfo(const BFont *theFont, nsString *aFontName,
-                               gfxFontStyle *aFontStyle) const;
-
-    /*
-     * The following system font constants exist:
-     *
-     * css2: http://www.w3.org/TR/REC-CSS2/fonts.html#x27
-     * eSystemFont_Caption, eSystemFont_Icon, eSystemFont_Menu,
-     * eSystemFont_MessageBox, eSystemFont_SmallCaption,
-     * eSystemFont_StatusBar,
-     * // css3
-     * eSystemFont_Window, eSystemFont_Document,
-     * eSystemFont_Workspace, eSystemFont_Desktop,
-     * eSystemFont_Info, eSystemFont_Dialog,
-     * eSystemFont_Button, eSystemFont_PullDownMenu,
-     * eSystemFont_List, eSystemFont_Field,
-     * // moz
-     * eSystemFont_Tooltips, eSystemFont_Widget
-     */
-    nsString mDefaultFontName, mMenuFontName, mCaptionFontName;
-    gfxFontStyle mDefaultFontStyle, mMenuFontStyle, mCaptionFontStyle;
-};
-
-#endif /* _NS_SYSTEMFONTSBEOS_H_ */
--- a/gfx/src/thebes/nsThebesDeviceContext.cpp
+++ b/gfx/src/thebes/nsThebesDeviceContext.cpp
@@ -72,19 +72,16 @@ static nsSystemFontsGTK2 *gSystemFonts =
 static nsSystemFontsWin *gSystemFonts = nsnull;
 #ifndef WINCE
 #include <usp10.h>
 #endif
 #elif defined(XP_OS2)
 #include "nsSystemFontsOS2.h"
 #include "gfxPDFSurface.h"
 static nsSystemFontsOS2 *gSystemFonts = nsnull;
-#elif defined(XP_BEOS)
-#include "nsSystemFontsBeOS.h"
-static nsSystemFontsBeOS *gSystemFonts = nsnull;
 #elif XP_MACOSX
 #include "nsSystemFontsMac.h"
 #include "gfxQuartzSurface.h"
 #include "gfxImageSurface.h"
 static nsSystemFontsMac *gSystemFonts = nsnull;
 #elif defined(MOZ_WIDGET_QT)
 #include "nsSystemFontsQt.h"
 #include "gfxPDFSurface.h"
@@ -804,18 +801,16 @@ nsThebesDeviceContext::GetSystemFont(nsS
 {
     if (!gSystemFonts) {
 #ifdef MOZ_ENABLE_GTK2
         gSystemFonts = new nsSystemFontsGTK2();
 #elif XP_WIN
         gSystemFonts = new nsSystemFontsWin();
 #elif XP_OS2
         gSystemFonts = new nsSystemFontsOS2();
-#elif defined(XP_BEOS)
-        gSystemFonts = new nsSystemFontsBeOS();
 #elif XP_MACOSX
         gSystemFonts = new nsSystemFontsMac();
 #elif defined(MOZ_WIDGET_QT)
         gSystemFonts = new nsSystemFontsQt();
 #elif defined(ANDROID)
         gSystemFonts = new nsSystemFontsAndroid();
 #else
 #error Need to know how to create gSystemFonts, fix me!
--- a/gfx/src/thebes/nsThebesRenderingContext.cpp
+++ b/gfx/src/thebes/nsThebesRenderingContext.cpp
@@ -985,17 +985,17 @@ nsThebesRenderingContext::GetTextDimensi
         }
         aLength -= len;
         aString += len;
         firstIteration = PR_FALSE;
     }
     return NS_OK;
 }
 
-#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11) || defined(XP_BEOS)
+#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11)
 NS_IMETHODIMP
 nsThebesRenderingContext::GetTextDimensions(const char*       aString,
                                             PRInt32           aLength,
                                             PRInt32           aAvailWidth,
                                             PRInt32*          aBreaks,
                                             PRInt32           aNumBreaks,
                                             nsTextDimensions& aDimensions,
                                             PRInt32&          aNumCharsFit,
@@ -1306,17 +1306,17 @@ nsThebesRenderingContext::GetTextDimensi
                                                     nsTextDimensions& aDimensions,
                                                     PRInt32* aFontID)
 {
     mFontMetrics->GetMaxAscent(aDimensions.ascent);
     mFontMetrics->GetMaxDescent(aDimensions.descent);
     return GetWidth(aString, aLength, aDimensions.width, aFontID);
 }
 
-#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11) || defined(XP_BEOS) || defined(XP_MACOSX) || defined (MOZ_DFB)
+#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11) || defined(XP_MACOSX) || defined (MOZ_DFB)
 nsresult
 nsThebesRenderingContext::GetTextDimensionsInternal(const char*       aString,
                                                     PRInt32           aLength,
                                                     PRInt32           aAvailWidth,
                                                     PRInt32*          aBreaks,
                                                     PRInt32           aNumBreaks,
                                                     nsTextDimensions& aDimensions,
                                                     PRInt32&          aNumCharsFit,
--- a/gfx/src/thebes/nsThebesRenderingContext.h
+++ b/gfx/src/thebes/nsThebesRenderingContext.h
@@ -87,17 +87,17 @@ public:
     NS_IMETHOD GetWidth(PRUnichar aC, nscoord &aWidth,
                         PRInt32 *aFontID);
 
     NS_IMETHOD GetTextDimensions(const char* aString, PRUint32 aLength,
                                  nsTextDimensions& aDimensions);
     NS_IMETHOD GetTextDimensions(const PRUnichar* aString, PRUint32 aLength,
                                  nsTextDimensions& aDimensions, PRInt32* aFontID = nsnull);
 
-#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11) || defined(XP_BEOS)
+#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11)
     NS_IMETHOD GetTextDimensions(const char*       aString,
                                  PRInt32           aLength,
                                  PRInt32           aAvailWidth,
                                  PRInt32*          aBreaks,
                                  PRInt32           aNumBreaks,
                                  nsTextDimensions& aDimensions,
                                  PRInt32&          aNumCharsFit,
                                  nsTextDimensions& aLastWordDimensions,
--- a/gfx/thebes/Makefile.in
+++ b/gfx/thebes/Makefile.in
@@ -58,26 +58,16 @@ endif
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 EXPORTS += \
 	gfxAndroidPlatform.h \
 	gfxFT2Fonts.h \
 	gfxFT2FontBase.h \
 	$(NULL)
 endif
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-EXPORTS	+= \
-	gfxBeOSPlatform.h \
-	gfxBeOSSurface.h \
-	gfxFT2FontBase.h \
-	gfxPDFSurface.h \
-	gfxPangoFonts.h \
-	$(NULL)
-endif
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 EXPORTS += \
 	gfxPlatformMac.h \
 	gfxQuartzSurface.h \
 	gfxQuartzImageSurface.h \
 	gfxQuartzPDFSurface.h \
 	gfxQuartzNativeDrawing.h \
 	$(NULL)
@@ -363,27 +353,16 @@ endif
 CPPSRCS +=	gfxFT2FontBase.cpp
 CPPSRCS +=	gfxFT2Utils.cpp
 CPPSRCS +=	gfxFontconfigUtils.cpp
 CPPSRCS +=	nsUnicodeRange.cpp
 CPPSRCS +=	gfxPDFSurface.cpp
 EXTRA_DSO_LDOPTS += $(MOZ_PANGO_LIBS) $(ZLIB_LIBS) $(XLDFLAGS) $(XLIBS) $(CAIRO_FT_LIBS) $(XEXT_LIBS)
 endif
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-CPPSRCS	+= 	gfxBeOSSurface.cpp gfxBeOSPlatform.cpp
-CPPSRCS +=	gfxPangoFonts.cpp 
-CPPSRCS +=	gfxFT2FontBase.cpp
-CPPSRCS +=	gfxFT2Utils.cpp
-#CPPSRCS +=	gfxPDFSurface.cpp
-CPPSRCS +=	gfxFontconfigUtils.cpp
-CPPSRCS +=	nsUnicodeRange.cpp
-EXTRA_DSO_LDOPTS += $(MOZ_PANGO_LIBS) $(CAIRO_FT_LIBS) -lfontconfig
-endif
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 CPPSRCS	+= \
 	gfxQuartzSurface.cpp \
 	gfxQuartzImageSurface.cpp \
 	gfxQuartzPDFSurface.cpp \
 	gfxPlatformMac.cpp \
 	gfxMacFont.cpp \
 	gfxCoreTextShaper.cpp \
@@ -469,19 +448,15 @@ endif
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 CXXFLAGS += $(CAIRO_FT_CFLAGS)
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
 CXXFLAGS += $(MOZ_PANGO_CFLAGS)
 endif
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-CXXFLAGS += $(CAIRO_FT_CFLAGS)
-endif
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 CXXFLAGS += $(CAIRO_FT_CFLAGS)
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
 CXXFLAGS += $(CAIRO_FT_CFLAGS) $(MOZ_PANGO_CFLAGS)
 endif
deleted file mode 100644
--- a/gfx/thebes/gfxBeOSPlatform.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/* ***** 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 BeOS code in Thebes.
- *
- * The Initial Developer of the Original Code is
- * Christian Biesinger <cbiesinger@web.de>.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Masayuki Nakano <masayuki@d-toybox.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 "gfxBeOSPlatform.h"
-#include "gfxFontconfigUtils.h"
-#include "gfxPangoFonts.h"
-
-#include "gfxImageSurface.h"
-#include "gfxBeOSSurface.h"
-
-#include "nsTArray.h"
-
-gfxFontconfigUtils *gfxPlatformGtk::sFontconfigUtils = nsnull;
-
-gfxBeOSPlatform::gfxBeOSPlatform()
-{
-    if (!sFontconfigUtils)
-        sFontconfigUtils = gfxFontconfigUtils::GetFontconfigUtils();
-}
-
-gfxBeOSPlatform::~gfxBeOSPlatform()
-{
-    gfxFontconfigUtils::Shutdown();
-    sFontconfigUtils = nsnull;
-
-    gfxPangoFontGroup::Shutdown();
-
-#if 0
-    // It would be nice to do this (although it might need to be after
-    // the cairo shutdown that happens in ~gfxPlatform).  It even looks
-    // idempotent.  But it has fatal assertions that fire if stuff is
-    // leaked, and we hit them.
-    FcFini();
-#endif
-}
-
-already_AddRefed<gfxASurface>
-gfxBeOSPlatform::CreateOffscreenSurface (PRUint32 width,
-                                         PRUint32 height,
-                                         gfxASurface::gfxContentType contentType)
-{
-    gfxASurface *newSurface = nsnull;
-
-    if (contentType == gfxASurface::CONTENT_ALPHA) {
-        newSurface = new gfxImageSurface(imageFormat, width, height);
-    } else {
-        newSurface = new gfxBeOSSurface(width, height,
-                                        contentType == gfxASurface::CONTENT_COLOR_ALPHA ? B_RGBA32 : B_RGB32);
-    }
-
-    NS_ADDREF(newSurface);
-    return newSurface;
-}
-
-nsresult
-gfxBeOSPlatform::GetFontList(nsIAtom *aLangGroup,
-                             const nsACString& aGenericFamily,
-                             nsTArray<nsString>& aListOfFonts)
-{
-    return sFontconfigUtils->GetFontList(aLangGroup, aGenericFamily,
-                                         aListOfFonts);
-}
-
-nsresult
-gfxBeOSPlatform::UpdateFontList()
-{
-    return sFontconfigUtils->UpdateFontList();
-}
-
-nsresult
-gfxBeOSPlatform::ResolveFontName(const nsAString& aFontName,
-                                FontResolverCallback aCallback,
-                                void *aClosure,
-                                PRBool& aAborted)
-{
-    return sFontconfigUtils->ResolveFontName(aFontName, aCallback,
-                                             aClosure, aAborted);
-}
-
-nsresult
-gfxBeOSPlatform::GetStandardFamilyName(const nsAString& aFontName, nsAString& aFamilyName)
-{
-    return sFontconfigUtils->GetStandardFamilyName(aFontName, aFamilyName);
-}
deleted file mode 100644
--- a/gfx/thebes/gfxBeOSPlatform.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* vim:set sw=4 sts=4 et cin: */
-/* ***** 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 BeOS code in Thebes.
- *
- * The Initial Developer of the Original Code is
- * Christian Biesinger <cbiesinger@web.de>.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 ***** */
-
-
-#ifndef GFX_PLATFORM_BEOS_H
-#define GFX_PLATFORM_BEOS_H
-
-#include "gfxPlatform.h"
-#include "gfxTArray.h"
-
-class gfxFontconfigUtils;
-
-class NS_EXPORT gfxBeOSPlatform : public gfxPlatform {
-public:
-    gfxBeOSPlatform();
-    virtual ~gfxBeOSPlatform();
-
-    static gfxBeOSPlatform *GetPlatform() {
-        return (gfxBeOSPlatform*) gfxPlatform::GetPlatform();
-    }
-
-    already_AddRefed<gfxASurface>
-        CreateOffscreenSurface(PRUint32 width,
-                               PRUint32 height,
-                               gfxASurface::gfxContentType contentType);
-
-    nsresult GetFontList(nsIAtom *aLangGroup,
-                         const nsACString& aGenericFamily,
-                         nsTArray<nsString>& aListOfFonts);
-
-    nsresult UpdateFontList();
-
-    nsresult ResolveFontName(const nsAString& aFontName,
-                             FontResolverCallback aCallback,
-                             void *aClosure, PRBool& aAborted);
-
-    nsresult GetStandardFamilyName(const nsAString& aFontName, nsAString& aFamilyName);
-protected:
-    static gfxFontconfigUtils *sFontconfigUtils;
-};
-
-#endif /* GFX_PLATFORM_BEOS_H */
deleted file mode 100644
--- a/gfx/thebes/gfxBeOSSurface.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/* vim:set sw=4 sts=4 et cin: */
-/* ***** 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 BeOS code in Thebes.
- *
- * The Initial Developer of the Original Code is
- * Christian Biesinger <cbiesinger@web.de>.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 <Bitmap.h>
-
-#include "gfxBeOSSurface.h"
-
-gfxBeOSSurface::gfxBeOSSurface(BView* aView) :
-    mOwnsView(PR_FALSE), mView(aView), mBitmap(nsnull)
-{
-    Init(cairo_beos_surface_create(aView));
-}
-
-gfxBeOSSurface::gfxBeOSSurface(BView* aView, BBitmap* aBitmap) :
-   mOwnsView(PR_FALSE), mView(aView), mBitmap(nsnull)
-{
-    Init(cairo_beos_surface_create_for_bitmap(aView, aBitmap));
-}
-
-gfxBeOSSurface::gfxBeOSSurface(unsigned long width, unsigned long height, color_space space)
-{
-    BRect bounds(0.0, 0.0, width - 1, height - 1);
-    mBitmap = new BBitmap(bounds, space, true);
-    mView = new BView(bounds, "Mozilla Bitmap view", B_FOLLOW_ALL_SIDES, 0);
-    mBitmap->AddChild(mView);
-
-    mOwnsView = PR_TRUE;
-    Init(cairo_beos_surface_create_for_bitmap(mView, mBitmap));
-}
-
-gfxBeOSSurface::~gfxBeOSSurface()
-{
-    if (mOwnsView) {
-        mBitmap->RemoveChild(mView);
-
-        delete mView;
-        delete mBitmap;
-    }
-}
deleted file mode 100644
--- a/gfx/thebes/gfxBeOSSurface.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* vim:set sw=4 sts=4 et cin: */
-/* ***** 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 BeOS code in Thebes.
- *
- * The Initial Developer of the Original Code is
- * Christian Biesinger <cbiesinger@web.de>.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 ***** */
-
-
-#ifndef GFX_BEOSSURFACE_H
-#define GFX_BEOSSURFACE_H
-
-#include "gfxASurface.h"
-
-#include <cairo-beos.h>
-
-class gfxBeOSSurface : public gfxASurface {
-public:
-    gfxBeOSSurface(BView* aView);
-    gfxBeOSSurface(BView* aView, BBitmap* aBitmap);
-    gfxBeOSSurface(unsigned long width, unsigned long height, color_space space = B_RGBA32);
-    virtual ~gfxBeOSSurface();
-
-private:
-    PRBool mOwnsView;
-    BView* mView;
-    BBitmap* mBitmap;
-};
-
-#endif /* GFX_BEOSSURFACE_H */
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -45,18 +45,16 @@
 #if defined(XP_WIN)
 #include "gfxWindowsPlatform.h"
 #elif defined(XP_MACOSX)
 #include "gfxPlatformMac.h"
 #elif defined(MOZ_WIDGET_GTK2)
 #include "gfxPlatformGtk.h"
 #elif defined(MOZ_WIDGET_QT)
 #include "gfxQtPlatform.h"
-#elif defined(XP_BEOS)
-#include "gfxBeOSPlatform.h"
 #elif defined(XP_OS2)
 #include "gfxOS2Platform.h"
 #elif defined(ANDROID)
 #include "gfxAndroidPlatform.h"
 #endif
 
 #include "gfxAtoms.h"
 #include "gfxPlatformFontList.h"
@@ -265,18 +263,16 @@ gfxPlatform::Init()
 #if defined(XP_WIN)
     gPlatform = new gfxWindowsPlatform;
 #elif defined(XP_MACOSX)
     gPlatform = new gfxPlatformMac;
 #elif defined(MOZ_WIDGET_GTK2)
     gPlatform = new gfxPlatformGtk;
 #elif defined(MOZ_WIDGET_QT)
     gPlatform = new gfxQtPlatform;
-#elif defined(XP_BEOS)
-    gPlatform = new gfxBeOSPlatform;
 #elif defined(XP_OS2)
     gPlatform = new gfxOS2Platform;
 #elif defined(ANDROID)
     gPlatform = new gfxAndroidPlatform;
 #endif
     if (!gPlatform)
         return NS_ERROR_OUT_OF_MEMORY;
 
--- a/intl/locale/src/nsLocaleConstructors.h
+++ b/intl/locale/src/nsLocaleConstructors.h
@@ -47,17 +47,17 @@
 #include "nsIServiceManager.h"
 #include "nsLanguageAtomService.h"
 #include "nsLocaleCID.h"
 
 #if defined(XP_MACOSX)
 #define USE_MAC_LOCALE
 #endif
 
-#if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_BEOS)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
 #define USE_UNIX_LOCALE
 #endif
 
 #ifdef XP_WIN
 #include "nsIwin32LocaleImpl.h"
 #include "nsCollationWin.h"
 #include "nsDateTimeFormatWin.h"
 #endif
--- a/intl/locale/src/nsLocaleService.cpp
+++ b/intl/locale/src/nsLocaleService.cpp
@@ -57,17 +57,17 @@
 #if defined(XP_WIN)
 #  include "nsIWin32Locale.h"
 #elif defined(XP_OS2)
 #  include "unidef.h"
 #  include "nsIOS2Locale.h"
 #elif defined(XP_MACOSX)
 #  include <Carbon/Carbon.h>
 #  include "nsIMacLocale.h"
-#elif defined(XP_UNIX) || defined(XP_BEOS)
+#elif defined(XP_UNIX)
 #  include <locale.h>
 #  include <stdlib.h>
 #  include "nsIPosixLocale.h"
 #endif
 
 //
 // implementation constants
 const int LocaleListLength = 6;
@@ -79,17 +79,17 @@ const char* LocaleList[LocaleListLength]
 	NSILOCALE_NUMERIC,
 	NSILOCALE_TIME,
 	NSILOCALE_MESSAGE
 };
 
 #define NSILOCALE_MAX_ACCEPT_LANGUAGE	16
 #define NSILOCALE_MAX_ACCEPT_LENGTH		18
 
-#if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_BEOS) || defined(XP_OS2)
+#if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_OS2)
 static int posix_locale_category[LocaleListLength] =
 {
   LC_COLLATE,
   LC_CTYPE,
   LC_MONETARY,
   LC_NUMERIC,
   LC_TIME,
 #ifdef HAVE_I18N_LC_MESSAGES
@@ -162,17 +162,17 @@ nsLocaleService::nsLocaleService(void)
         win_lcid = GetUserDefaultLCID();
         if (win_lcid==0) { return;}
             result = win32Converter->GetXPLocale(win_lcid, xpLocale);
         if (NS_FAILED(result)) { return;}
             result = NewLocale(xpLocale, getter_AddRefs(mApplicationLocale));
         if (NS_FAILED(result)) { return;}
     }
 #endif
-#if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_BEOS)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
     nsCOMPtr<nsIPosixLocale> posixConverter = do_GetService(NS_POSIXLOCALE_CONTRACTID);
 
     nsAutoString xpLocale, platformLocale;
     if (posixConverter) {
         nsAutoString category, category_platform;
         int i;
 
         nsRefPtr<nsLocale> resultLocale(new nsLocale());
@@ -213,17 +213,17 @@ nsLocaleService::nsLocaleService(void)
             }
             resultLocale->AddCategory(category, xpLocale);
             resultLocale->AddCategory(category_platform, platformLocale);
         }
         mSystemLocale = do_QueryInterface(resultLocale);
         mApplicationLocale = do_QueryInterface(resultLocale);
     }  // if ( NS_SUCCEEDED )...
        
-#endif // XP_UNIX || XP_BEOS
+#endif // XP_UNIX
 #ifdef XP_OS2
     nsCOMPtr<nsIOS2Locale> os2Converter = do_GetService(NS_OS2LOCALE_CONTRACTID);
     nsAutoString xpLocale;
     if (os2Converter) {
         nsAutoString category;
         int i;
 
         nsRefPtr<nsLocale> resultLocale(new nsLocale());
@@ -317,17 +317,17 @@ nsLocaleService::NewLocale(const nsAStri
 
     nsRefPtr<nsLocale> resultLocale(new nsLocale());
     if (!resultLocale) return NS_ERROR_OUT_OF_MEMORY;
 
     for (PRInt32 i = 0; i < LocaleListLength; i++) {
       nsString category; category.AssignWithConversion(LocaleList[i]);
       result = resultLocale->AddCategory(category, aLocale);
       if (NS_FAILED(result)) return result;
-#if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_BEOS)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
       category.AppendLiteral("##PLATFORM");
       result = resultLocale->AddCategory(category, aLocale);
       if (NS_FAILED(result)) return result;
 #endif
     }
 
     NS_ADDREF(*_retval = resultLocale);
     return NS_OK;
--- a/intl/uconv/src/Makefile.in
+++ b/intl/uconv/src/Makefile.in
@@ -97,19 +97,16 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 CPPSRCS			+= nsOS2Charset.cpp
 else
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 CPPSRCS			+= nsWinCharset.cpp
 else
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 CPPSRCS			+= nsMacCharset.cpp
 else
-ifeq ($(OS_ARCH),BeOS)
-CPPSRCS			+= nsBeOSCharset.cpp
-else
 CPPSRCS			+= nsUNIXCharset.cpp
 endif
 endif
 endif
 endif
 
 EXTRA_DSO_LDOPTS = \
 		../util/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX) \
deleted file mode 100644
--- a/intl/uconv/src/nsBeOSCharset.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/* ***** 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
- * Sergei Dolgov (sergei_d@fi.tartu.ee); Tartu University
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 "nsIPlatformCharset.h"
-#include "nsReadableUtils.h"
-#include "nsPlatformCharset.h"
-
-// In BeOS, each window runs in its own thread.  Because of this,
-// we have a proxy layer between the mozilla UI thread, and calls made
-// within the window's thread via CallMethod().  However, since the windows
-// are still running in their own thread, and reference counting takes place within
-// that thread, we need to reference and de-reference outselves atomically.
-// See BugZilla Bug# 92793
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset)
-
-nsPlatformCharset::nsPlatformCharset()
-{
-  mCharset.AssignLiteral("UTF-8");
-}
-
-nsPlatformCharset::~nsPlatformCharset()
-{
-}
-
-NS_IMETHODIMP
-nsPlatformCharset::GetCharset(nsPlatformCharsetSel selector, nsACString& aResult)
-{
-  aResult = mCharset;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACString& aResult)
-{
-  aResult = mCharset;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPlatformCharset::Init()
-{
-  return NS_OK;
-}
-nsresult
-nsPlatformCharset::MapToCharset(short script, short region, nsACString& aCharset)
-{
-  return NS_OK;
-}
-
-nsresult
-nsPlatformCharset::MapToCharset(nsAString& inANSICodePage, nsACString& aCharset)
-{
-  return NS_OK;
-}
-
-nsresult
-nsPlatformCharset::InitGetCharset(nsACString &aString)
-{
-  aString = mCharset;
-  return NS_OK;
-}
-
-nsresult
-nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale, nsACString& aResult)
-{
-  aResult = mCharset;
-  return NS_OK;
-}
-
-nsresult
-nsPlatformCharset::VerifyCharset(nsCString &aCharset)
-{
-  aCharset = mCharset;
-  return NS_OK;
-}
-
-nsresult
-nsPlatformCharset::InitInfo()
-{
-  return NS_OK;
-}
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -645,18 +645,18 @@ NSPR_STATIC_PATH = $(DIST)/lib
 endif
 
 ifdef MOZ_VTUNE
 CXXFLAGS += -IC:/Program\ Files/Intel/VTune/Analyzer/Include
 EXTRA_DSO_LDOPTS += C:/Program\ Files/Intel/VTune/Analyzer/Lib/VtuneApi.lib
 LIBS +=  C:/Program\ Files/Intel/VTune/Analyzer/Lib/VtuneApi.lib
 endif
 
-# BeOS and HP-UX do not require the extra linking of "-lm"
-ifeq (,$(filter BeOS HP-UX WINNT WINCE OpenVMS OS2,$(OS_ARCH)))
+# HP-UX does not require the extra linking of "-lm"
+ifeq (,$(filter HP-UX WINNT WINCE OpenVMS OS2,$(OS_ARCH)))
 EXTRA_LIBS	+= -lm
 endif
 
 # Prevent floating point errors caused by VC++ optimizations
 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
 ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
 CFLAGS += -Op
 else
--- a/js/src/config/config.mk
+++ b/js/src/config/config.mk
@@ -125,19 +125,16 @@ AUTOCONF_TOOLS	= $(topsrcdir)/build/auto
 
 ifeq ($(OS_ARCH),QNX)
 ifeq ($(OS_TARGET),NTO)
 LD		:= qcc -Vgcc_ntox86 -nostdlib
 else
 LD		:= $(CC)
 endif
 endif
-ifeq ($(OS_ARCH),BeOS)
-BEOS_ADDON_WORKAROUND	= 1
-endif
 
 #
 # Strip off the excessively long version numbers on these platforms,
 # but save the version to allow multiple versions of the same base
 # platform to be built in the same tree.
 #
 ifneq (,$(filter FreeBSD HP-UX IRIX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
 OS_RELEASE	:= $(basename $(OS_RELEASE))
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -909,29 +909,23 @@ endif # LIBRARY
 ifdef SHARED_LIBRARY
 ifdef IS_COMPONENT
 	$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
 	$(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)
 ifndef NO_COMPONENTS_MANIFEST
 	@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/chrome.manifest "manifest components/components.manifest"
 	@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.manifest "binary-component $(SHARED_LIBRARY)"
 endif
-ifdef BEOS_ADDON_WORKAROUND
-	( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
-endif
 else # ! IS_COMPONENT
 ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
 	$(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib
 else
 	$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib
 endif
 	$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)
-ifdef BEOS_ADDON_WORKAROUND
-	( cd $(FINAL_TARGET) && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
-endif
 endif # IS_COMPONENT
 endif # SHARED_LIBRARY
 ifdef PROGRAM
 	$(INSTALL) $(IFLAGS2) $(PROGRAM) $(FINAL_TARGET)
 endif
 ifdef SIMPLE_PROGRAMS
 	$(INSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(FINAL_TARGET)
 endif
@@ -1055,22 +1049,16 @@ endif # WINNT && !GNU_CC
 endif # WINCE
 
 ifdef ENABLE_STRIP
 	$(STRIP) $@
 endif
 ifdef MOZ_POST_PROGRAM_COMMAND
 	$(MOZ_POST_PROGRAM_COMMAND) $@
 endif
-ifeq ($(OS_ARCH),BeOS)
-ifdef BEOS_PROGRAM_RESOURCE
-	xres -o $@ $(BEOS_PROGRAM_RESOURCE)
-	mimeset $@
-endif
-endif # BeOS
 
 $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
 ifeq (WINCE,$(OS_ARCH))
 	$(HOST_LD) -NOLOGO -OUT:$@ $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
 else
 ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
 	$(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
 ifdef MSMANIFEST_TOOL
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -1817,22 +1817,16 @@ MOZ_ARG_ENABLE_BOOL(profiling,
 [  --enable-profiling      Set compile flags necessary for using sampling profilers (e.g. shark, perf)],
     MOZ_PROFILING=1,
     MOZ_PROFILING= )
 
 dnl ========================================================
 dnl System overrides of the defaults for host
 dnl ========================================================
 case "$host" in
-*-beos*)
-    HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE -DNO_X11"
-    HOST_NSPR_MDCPUCFG='\"md/_beos.cfg\"'
-    HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
-    ;;
-
 *mingw*|*wince|*winmo)
     # we need Python 2.5 on Windows
     PYTHON_VERSION=2.5
     if test -n "$_WIN32_MSVC"; then
         HOST_AR=lib
         HOST_AR_FLAGS='-NOLOGO -OUT:"$@"'
         HOST_CFLAGS="$HOST_CFLAGS -TC -nologo -Fd\$(HOST_PDBFILE)"
         HOST_RANLIB='echo ranlib'
@@ -1956,34 +1950,16 @@ case "$target" in
     esac
     if test "$COMPILE_ENVIRONMENT"; then
         AC_CHECK_HEADERS(sys/inttypes.h)
     fi
     AC_DEFINE(JS_SYS_TYPES_H_DEFINES_EXACT_SIZE_TYPES)
     AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
     ;;
 
-*-beos*)
-    no_x=yes
-    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
-    _PLATFORM_DEFAULT_TOOLKIT="cairo-beos"
-    DSO_LDOPTS='-nostart'
-    TK_LIBS='-lbe -lroot'
-    LIBS="$LIBS -lbe"
-    if test "$COMPILE_ENVIRONMENT"; then
-        AC_CHECK_LIB(bind,main,LIBS="$LIBS -lbind")
-        AC_CHECK_LIB(zeta,main,LIBS="$LIBS -lzeta")
-    fi
-    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-multichar"
-    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-multichar"
-    _MOZ_USE_RTTI=1
-    USE_DEPENDENT_LIBS=
-    MOZ_USER_DIR="Mozilla"
-    ;;
-
 *-bsdi*)
     dnl -pedantic doesn't play well with BSDI's _very_ modified gcc (shlicc2)
     _PEDANTIC=
     case $OS_RELEASE in
 	4.*|5.*)
             STRIP="$STRIP -d"
             ;;
 	*)
@@ -3453,26 +3429,24 @@ case $target in
 *-hpux11.*)
 	;;
 *)
 	AC_CHECK_LIB(c_r, gethostbyname_r)
 	;;
 esac
 
 dnl We don't want to link with libdl even if it's present on OS X, since
-dnl it's not used and not part of the default installation.
-dnl The same goes for BeOS. OS/2 has dlfcn in libc.
+dnl it's not used and not part of the default installation. OS/2 has dlfcn
+dnl in libc.
 dnl We don't want to link against libm or libpthread on Darwin since
 dnl they both are just symlinks to libSystem and explicitly linking
 dnl against libSystem causes issues when debugging (see bug 299601).
 case $target in
 *-darwin*)
     ;;
-*-beos*)
-    ;;
 *-os2*)
     ;;
 *)
     AC_SEARCH_LIBS(dlopen, dl, 
         AC_CHECK_HEADER(dlfcn.h, 
         AC_DEFINE(HAVE_DLOPEN)))
     ;;
 esac
@@ -5855,19 +5829,17 @@ if test "$MOZ_X11"; then
     fi
 
 fi # MOZ_X11
 fi # COMPILE_ENVIRONMENT
 
 dnl Set various defines and substitutions
 dnl ========================================================
 
-if test "$OS_ARCH" = "BeOS"; then
-  AC_DEFINE(XP_BEOS)
-elif test "$OS_ARCH" = "Darwin"; then
+if test "$OS_ARCH" = "Darwin"; then
   AC_DEFINE(XP_MACOSX)
   AC_DEFINE(XP_UNIX)
   AC_DEFINE(UNIX_ASYNC_DNS)
 elif test "$OS_ARCH" = "OpenVMS"; then
   AC_DEFINE(XP_UNIX)
 elif test "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "OS2" -a "$OS_ARCH" != "WINCE"; then
   AC_DEFINE(XP_UNIX)
   AC_DEFINE(UNIX_ASYNC_DNS)
--- a/js/src/jscpucfg.h
+++ b/js/src/jscpucfg.h
@@ -67,25 +67,25 @@
 #undef  IS_BIG_ENDIAN
 #define JS_BYTES_PER_DOUBLE 8L
 #define JS_BYTES_PER_WORD   4L
 #define JS_BITS_PER_WORD_LOG2   5
 #define JS_ALIGN_OF_POINTER 4L
 
 #endif /* _WIN32 || XP_OS2 || WINCE*/
 
-#elif defined(XP_UNIX) || defined(XP_BEOS)
+#elif defined(XP_UNIX)
 
 #error "This file is supposed to be auto-generated on UNIX platforms, but the"
 #error "static version for Mac and Windows platforms is being used."
 #error "Something's probably wrong with paths/headers/dependencies/Makefiles."
 
 #else
 
-#error "Must define one of XP_BEOS, XP_OS2, XP_WIN, or XP_UNIX"
+#error "Must define one of XP_OS2, XP_WIN, or XP_UNIX"
 
 #endif
 
 #ifndef JS_STACK_GROWTH_DIRECTION
 #define JS_STACK_GROWTH_DIRECTION (-1)
 #endif
 
 #endif /* js_cpucfg___ */
--- a/js/src/jsgcchunk.cpp
+++ b/js/src/jsgcchunk.cpp
@@ -51,17 +51,17 @@
 #elif defined(XP_MACOSX) || defined(DARWIN)
 
 # include <libkern/OSAtomic.h>
 # include <mach/mach_error.h>
 # include <mach/mach_init.h>
 # include <mach/vm_map.h>
 # include <malloc/malloc.h>
 
-#elif defined(XP_UNIX) || defined(XP_BEOS)
+#elif defined(XP_UNIX)
 
 # include <unistd.h>
 # include <sys/mman.h>
 
 # ifndef MAP_NOSYNC
 #  define MAP_NOSYNC    0
 # endif
 
@@ -283,17 +283,17 @@ static void
 UnmapPages(void *addr, size_t size)
 {
     JS_ALWAYS_TRUE(vm_deallocate((vm_map_t) mach_task_self(),
                                  (vm_address_t) addr,
                                  (vm_size_t) size)
                    == KERN_SUCCESS);
 }
 
-#elif defined(XP_UNIX) || defined(XP_BEOS)
+#elif defined(XP_UNIX)
 
 /* Required on Solaris 10. Might improve performance elsewhere. */
 # if defined(SOLARIS) && defined(MAP_ALIGN)
 #  define JS_GC_HAS_MAP_ALIGN
 
 static void *
 MapAlignedPages(size_t size, size_t alignment)
 {
--- a/js/src/jsotypes.h
+++ b/js/src/jsotypes.h
@@ -46,31 +46,16 @@
 /*
  * Note that we test for PROTYPES_H, not JSOTYPES_H.  This is to avoid
  * double-definitions of scalar types such as uint32, if NSPR's
  * protypes.h is also included.
  */
 #ifndef PROTYPES_H
 #define PROTYPES_H
 
-#ifdef XP_BEOS
-/* BeOS defines most int types in SupportDefs.h (int8, uint8, int16,
- * uint16, int32, uint32, int64, uint64), so in the interest of
- * not conflicting with other definitions elsewhere we have to skip the
- * #ifdef jungle below, duplicate some definitions, and do our stuff.
- */
-#include <SupportDefs.h>
-
-typedef JSUintn uintn;
-#ifndef _XP_Core_
-typedef JSIntn intn;
-#endif
-
-#else
-
 /* SVR4 typedef of uint is commonly found on UNIX machines. */
 #ifdef XP_UNIX
 #include <sys/types.h>
 #else
 typedef JSUintn uint;
 #endif
 
 typedef JSUintn uintn;
@@ -103,18 +88,16 @@ typedef signed char int8;
 typedef JSInt64 int64;
 
 /* /usr/include/model.h on HP-UX defines int8, int16, and int32 */
 typedef JSInt32 int32;
 typedef JSInt16 int16;
 typedef JSInt8 int8;
 #endif /* AIX && HAVE_SYS_INTTYPES_H */
 
-#endif  /* XP_BEOS */
-
 typedef JSFloat64 float64;
 
 /* Re: jsbit.h */
 #define TEST_BIT        JS_TEST_BIT
 #define SET_BIT         JS_SET_BIT
 #define CLEAR_BIT       JS_CLEAR_BIT
 
 /* Re: prarena.h->plarena.h */
--- a/js/src/prmjtime.cpp
+++ b/js/src/prmjtime.cpp
@@ -74,17 +74,17 @@
 #endif
 
 #ifdef JS_THREADSAFE
 #include <prinit.h>
 #endif
 
 #endif
 
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#ifdef XP_UNIX
 
 #ifdef _SVID_GETTOD   /* Defined only on Solaris, see Solaris <sys/types.h> */
 extern int gettimeofday(struct timeval *tv);
 #endif
 
 #include <sys/time.h>
 
 #endif /* XP_UNIX */
@@ -321,17 +321,17 @@ PRMJ_Now(void)
     JSLL_UI2L(s, b.time);
     JSLL_UI2L(us, b.millitm);
     JSLL_MUL(us, us, ms2us);
     JSLL_MUL(s, s, s2us);
     JSLL_ADD(s, s, us);
     return s;
 }
 
-#elif defined(XP_UNIX) || defined(XP_BEOS)
+#elif defined(XP_UNIX)
 JSInt64
 PRMJ_Now(void)
 {
     struct timeval tv;
     JSInt64 s, us, s2us;
 
 #ifdef _SVID_GETTOD   /* Defined only on Solaris, see Solaris <sys/types.h> */
     gettimeofday(&tv);
@@ -570,17 +570,17 @@ PRMJ_InvalidParameterHandler(const wchar
 }
 #endif
 
 /* Format a time value into a buffer. Same semantics as strftime() */
 size_t
 PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *prtm)
 {
     size_t result = 0;
-#if defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2)
     struct tm a;
     int fake_tm_year = 0;
 #ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
     _invalid_parameter_handler oldHandler;
     int oldReportMode;
 #endif
 
     memset(&a, 0, sizeof(struct tm));
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -5254,17 +5254,17 @@ JSClass global_class = {
     JS_ConvertStub,   its_finalize,
     JSCLASS_NO_OPTIONAL_MEMBERS
 };
 
 static JSBool
 env_setProperty(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
 {
 /* XXX porting may be easy, but these don't seem to supply setenv by default */
-#if !defined XP_BEOS && !defined XP_OS2 && !defined SOLARIS
+#if !defined XP_OS2 && !defined SOLARIS
     int rv;
 
     IdToString idstr(cx, id, JS_TRUE);
     if (idstr.threw())
         return JS_FALSE;
     ToString valstr(cx, *vp, JS_TRUE);
     if (valstr.threw())
         return JS_FALSE;
@@ -5290,17 +5290,17 @@ env_setProperty(JSContext *cx, JSObject 
 #else
     rv = setenv(idstr.getBytes(), valstr.getBytes(), 1);
 #endif
     if (rv < 0) {
         JS_ReportError(cx, "can't set env variable %s to %s", idstr.getBytes(), valstr.getBytes());
         return JS_FALSE;
     }
     *vp = valstr.getJSVal();
-#endif /* !defined XP_BEOS && !defined XP_OS2 && !defined SOLARIS */
+#endif /* !defined XP_OS2 && !defined SOLARIS */
     return JS_TRUE;
 }
 
 static JSBool
 env_enumerate(JSContext *cx, JSObject *obj)
 {
     static JSBool reflected;
     char **evp, *name, *value;
--- a/js/src/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/src/xpconnect/loader/mozJSComponentLoader.cpp
@@ -97,17 +97,17 @@
 
 #include "mozilla/FunctionTimer.h"
 
 static const char kJSRuntimeServiceContractID[] = "@mozilla.org/js/xpc/RuntimeService;1";
 static const char kXPConnectServiceContractID[] = "@mozilla.org/js/xpc/XPConnect;1";
 static const char kObserverServiceContractID[] = "@mozilla.org/observer-service;1";
 
 /* Some platforms don't have an implementation of PR_MemMap(). */
-#if !defined(XP_BEOS) && !defined(XP_OS2)
+#ifndef XP_OS2
 #define HAVE_PR_MEMMAP
 #endif
 
 /**
  * Buffer sizes for serialization and deserialization of scripts.
  * FIXME: bug #411579 (tune this macro!) Last updated: Jan 2008
  */
 #define XPC_SERIALIZATION_BUFFER_SIZE   (64 * 1024)
--- a/js/src/xpconnect/shell/xpcshell.cpp
+++ b/js/src/xpconnect/shell/xpcshell.cpp
@@ -887,17 +887,17 @@ JSClass global_class = {
     JS_PropertyStub,  JS_PropertyStub,  JS_PropertyStub,  JS_StrictPropertyStub,
     JS_EnumerateStub, JS_ResolveStub,   JS_ConvertStub,   nsnull
 };
 
 static JSBool
 env_setProperty(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
 {
 /* XXX porting may be easy, but these don't seem to supply setenv by default */
-#if !defined XP_BEOS && !defined XP_OS2 && !defined SOLARIS
+#if !defined XP_OS2 && !defined SOLARIS
     JSString *idstr, *valstr;
     int rv;
 
     jsval idval;
     if (!JS_IdToValue(cx, id, &idval))
         return JS_FALSE;
     
     idstr = JS_ValueToString(cx, idval);
@@ -933,17 +933,17 @@ env_setProperty(JSContext *cx, JSObject 
 #else
     rv = setenv(name.ptr(), value.ptr(), 1);
 #endif
     if (rv < 0) {
         JS_ReportError(cx, "can't set envariable %s to %s", name.ptr(), value.ptr());
         return JS_FALSE;
     }
     *vp = STRING_TO_JSVAL(valstr);
-#endif /* !defined XP_BEOS && !defined XP_OS2 && !defined SOLARIS */
+#endif /* !defined XP_OS2 && !defined SOLARIS */
     return JS_TRUE;
 }
 
 static JSBool
 env_enumerate(JSContext *cx, JSObject *obj)
 {
     static JSBool reflected;
     char **evp, *name, *value;
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1066,22 +1066,20 @@ void
 nsPresContext::UpdateCharSet(const nsAFlatCString& aCharSet)
 {
   if (mLangService) {
     NS_IF_RELEASE(mLanguage);
     mLanguage = mLangService->LookupCharSet(aCharSet.get()).get();  // addrefs
     // this will be a language group (or script) code rather than a true language code
 
     // bug 39570: moved from nsLanguageAtomService::LookupCharSet()
-#if !defined(XP_BEOS) 
     if (mLanguage == nsGkAtoms::Unicode) {
       NS_RELEASE(mLanguage);
       NS_IF_ADDREF(mLanguage = mLangService->GetLocaleLanguage()); 
     }
-#endif
     GetFontPreferences();
   }
 #ifdef IBMBIDI
   //ahmed
 
   switch (GET_BIDI_OPTION_TEXTTYPE(GetBidi())) {
 
     case IBMBIDI_TEXTTYPE_LOGICAL:
--- a/modules/libjar/nsZipArchive.cpp
+++ b/modules/libjar/nsZipArchive.cpp
@@ -78,18 +78,16 @@ nsRecyclingAllocator *gZlibAllocator = N
 
 #ifdef XP_UNIX
     #include <sys/types.h>
     #include <sys/stat.h>
     #include <limits.h>
     #include <unistd.h>
 #elif defined(XP_WIN) || defined(XP_OS2)
     #include <io.h>
-#elif defined(XP_BEOS)
-    #include <unistd.h>
 #endif
 
 #ifdef __SYMBIAN32__
     #include <sys/syslimits.h>
 #endif /*__SYMBIAN32__*/
 
 
 #ifndef XP_UNIX /* we need some constants defined in limits.h and unistd.h */
@@ -110,17 +108,17 @@ using namespace mozilla;
 static const PRUint32 kMaxNameLength = PATH_MAX; /* Maximum name length */
 // For synthetic zip entries. Date/time corresponds to 1980-01-01 00:00.
 static const PRUint16 kSyntheticTime = 0;
 static const PRUint16 kSyntheticDate = (1 + (1 << 5) + (0 << 9));
 
 static PRUint16 xtoint(const PRUint8 *ii);
 static PRUint32 xtolong(const PRUint8 *ll);
 static PRUint32 HashName(const char* aName, PRUint16 nameLen);
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#ifdef XP_UNIX
 static nsresult ResolveSymlink(const char *path);
 #endif
 
 //***********************************************************
 // Allocators for use with zlib
 //
 // Use a recycling allocator, for re-use of of the zlib buffers.
 // For every inflation the following allocations are done:
@@ -435,17 +433,17 @@ nsresult nsZipArchive::ExtractFile(nsZip
     }
   }
 
   //-- delete the file on errors, or resolve symlink if needed
   if (aFd) {
     PR_Close(aFd);
     if (rv != NS_OK)
       PR_Delete(outname);
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#ifdef XP_UNIX
     else if (item->IsSymlink())
       rv = ResolveSymlink(outname);
 #endif
   }
 
   return rv;
 }
 
@@ -545,17 +543,17 @@ MOZ_WIN_MEM_TRY_BEGIN
       *aNameLen = mItem->nameLength;
       return NS_OK;
     }
   }
 MOZ_WIN_MEM_TRY_CATCH(return NS_ERROR_FAILURE)
   return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
 }
 
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#ifdef XP_UNIX
 //---------------------------------------------
 // ResolveSymlink
 //---------------------------------------------
 static nsresult ResolveSymlink(const char *path)
 {
   PRFileDesc * fIn = PR_Open(path, PR_RDONLY, 0000);
   if (!fIn)
     return NS_ERROR_FILE_DISK_FULL;
@@ -982,17 +980,17 @@ PRTime nsZipItem::LastModTime()
   const PRUint8 *tsField = GetExtraField(EXTENDED_TIMESTAMP_FIELD, &blocksize);
   if (tsField && blocksize >= 5 && tsField[4] & EXTENDED_TIMESTAMP_MODTIME) {
     return (PRTime)(xtolong(tsField + 5)) * PR_USEC_PER_SEC;
   }
 
   return GetModTime(Date(), Time());
 }
 
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#ifdef XP_UNIX
 bool nsZipItem::IsSymlink()
 {
   if (isSynthetic) return false;
   return (xtoint(central->external_attributes+2) & S_IFMT) == S_IFLNK;
 }
 #endif
 
 nsZipCursor::nsZipCursor(nsZipItem *item, nsZipArchive *aZip, PRUint8* aBuf, PRUint32 aBufSize, bool doCRC) :
--- a/modules/libjar/nsZipArchive.h
+++ b/modules/libjar/nsZipArchive.h
@@ -107,17 +107,17 @@ public:
   PRUint16 Date();
   PRUint16 Time();
   PRUint16 Compression();
   bool     IsDirectory();
   PRUint16 Mode();
   const PRUint8* GetExtraField(PRUint16 aTag, PRUint16 *aBlockSize);
   PRTime   LastModTime();
 
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#ifdef XP_UNIX
   bool     IsSymlink();
 #endif
 
   nsZipItem*         next;
   const ZipCentral*  central;
   PRUint16           nameLength;
   bool               isSynthetic;
 };
--- a/modules/libpr0n/decoders/Makefile.in
+++ b/modules/libpr0n/decoders/Makefile.in
@@ -74,17 +74,14 @@ ifneq (,$(filter qt,$(MOZ_WIDGET_TOOLKIT
 DIRS = icon/qt icon
 endif
 ifeq (,$(filter-out WINNT WINCE, $(OS_ARCH)))
 DIRS = icon/win icon
 endif
 ifeq ($(OS_ARCH),OS2)
 DIRS = icon/os2 icon
 endif
-ifeq ($(OS_ARCH),BeOS)
-DIRS = icon/beos icon
-endif
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 DIRS = icon/mac icon
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/modules/libpr0n/decoders/icon/Makefile.in
+++ b/modules/libpr0n/decoders/icon/Makefile.in
@@ -67,21 +67,16 @@ endif
 ifeq ($(OS_ARCH),OS2)
 PLATFORM = os2
 endif
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 PLATFORM = mac
 endif
 
-ifeq ($(OS_ARCH),BeOS)
-PLATFORM = beos
-endif
-
-
 CPPSRCS		= \
 		nsIconURI.cpp \
 		nsIconModule.cpp \
 		nsIconProtocolHandler.cpp \
 		$(NULL)
 
 XPIDLSRCS	= nsIIconURI.idl
 
deleted file mode 100644
--- a/modules/libpr0n/decoders/icon/beos/Makefile.in
+++ /dev/null
@@ -1,56 +0,0 @@
-# ***** 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 the Makefile for the Gnome icon decoder.
-#
-# The Initial Developer of the Original Code is
-# Christian Biesinger <cbiesinger@web.de>.
-# Portions created by the Initial Developer are Copyright (C) 2004
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# 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 *****
-
-
-DEPTH		= ../../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= imgicon
-LIBRARY_NAME	= imgiconbeos_s
-LIBXUL_LIBRARY = 1
-
-
-CPPSRCS		= nsIconChannel.cpp
-
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
-
deleted file mode 100644
--- a/modules/libpr0n/decoders/icon/beos/nsIconChannel.cpp
+++ /dev/null
@@ -1,486 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** 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
- * Brian Ryner.
- * Portions created by the Initial Developer are Copyright (C) 2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Scott MacGregor <mscott@netscape.com>
- *   Neil Rashbrook <neil@parkwaycc.co.uk>
- *   Ben Goodger <ben@mozilla.org>
- *   Simon Taylor <simontaylor2@gawab.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 "nsIconChannel.h"
-#include "nsIIconURI.h"
-#include "nsIServiceManager.h"
-#include "nsIInterfaceRequestor.h"
-#include "nsIInterfaceRequestorUtils.h"
-#include "nsXPIDLString.h"
-#include "nsReadableUtils.h"
-#include "nsMimeTypes.h"
-#include "nsMemory.h"
-#include "nsIStringStream.h"
-#include "nsIURL.h"
-#include "nsNetUtil.h"
-#include "nsInt64.h"
-#include "nsIFile.h"
-#include "nsIFileURL.h"
-#include "nsIMIMEService.h"
-#include "nsDirectoryServiceDefs.h"
-
-#include <Mime.h>
-#include <Bitmap.h>
-#include <Screen.h>
-#include <Node.h>
-#include <NodeInfo.h>
-
-// nsIconChannel methods
-nsIconChannel::nsIconChannel()
-{
-}
-
-nsIconChannel::~nsIconChannel() 
-{}
-
-NS_IMPL_THREADSAFE_ISUPPORTS4(nsIconChannel, 
-                              nsIChannel, 
-                              nsIRequest,
-                              nsIRequestObserver,
-                              nsIStreamListener)
-
-nsresult nsIconChannel::Init(nsIURI* uri)
-{
-  NS_ASSERTION(uri, "no uri");
-  mUrl = uri;
-  mOriginalURI = uri;
-  nsresult rv;
-  mPump = do_CreateInstance(NS_INPUTSTREAMPUMP_CONTRACTID, &rv);
-  return rv;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// nsIRequest methods:
-
-NS_IMETHODIMP nsIconChannel::GetName(nsACString &result)
-{
-  return mUrl->GetSpec(result);
-}
-
-NS_IMETHODIMP nsIconChannel::IsPending(PRBool *result)
-{
-  return mPump->IsPending(result);
-}
-
-NS_IMETHODIMP nsIconChannel::GetStatus(nsresult *status)
-{
-  return mPump->GetStatus(status);
-}
-
-NS_IMETHODIMP nsIconChannel::Cancel(nsresult status)
-{
-  return mPump->Cancel(status);
-}
-
-NS_IMETHODIMP nsIconChannel::Suspend(void)
-{
-  return mPump->Suspend();
-}
-
-NS_IMETHODIMP nsIconChannel::Resume(void)
-{
-  return mPump->Resume();
-}
-NS_IMETHODIMP nsIconChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
-{
-  *aLoadGroup = mLoadGroup;
-  NS_IF_ADDREF(*aLoadGroup);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
-{
-  mLoadGroup = aLoadGroup;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::GetLoadFlags(PRUint32 *aLoadAttributes)
-{
-  return mPump->GetLoadFlags(aLoadAttributes);
-}
-
-NS_IMETHODIMP nsIconChannel::SetLoadFlags(PRUint32 aLoadAttributes)
-{
-  return mPump->SetLoadFlags(aLoadAttributes);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// nsIChannel methods:
-
-NS_IMETHODIMP nsIconChannel::GetOriginalURI(nsIURI* *aURI)
-{
-  *aURI = mOriginalURI;
-  NS_ADDREF(*aURI);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::SetOriginalURI(nsIURI* aURI)
-{
-  NS_ENSURE_ARG_POINTER(aURI);
-  mOriginalURI = aURI;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::GetURI(nsIURI* *aURI)
-{
-  *aURI = mUrl;
-  NS_IF_ADDREF(*aURI);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsIconChannel::Open(nsIInputStream **_retval)
-{
-  return MakeInputStream(_retval, PR_FALSE);
-}
-
-nsresult nsIconChannel::ExtractIconInfoFromUrl(nsIFile ** aLocalFile, PRUint32 * aDesiredImageSize, nsACString &aContentType, nsACString &aFileExtension)
-{
-  nsresult rv = NS_OK;
-  nsCOMPtr<nsIMozIconURI> iconURI (do_QueryInterface(mUrl, &rv));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  iconURI->GetImageSize(aDesiredImageSize);
-  iconURI->GetContentType(aContentType);
-  iconURI->GetFileExtension(aFileExtension);
-
-  nsCOMPtr<nsIURI> fileURI;
-  rv = iconURI->GetIconFile(getter_AddRefs(fileURI));
-  if (NS_FAILED(rv) || !fileURI) return NS_OK;
-
-  nsCOMPtr<nsIFileURL>    fileURL = do_QueryInterface(fileURI, &rv);
-  if (NS_FAILED(rv) || !fileURL) return NS_OK;
-
-  nsCOMPtr<nsIFile> file;
-  rv = fileURL->GetFile(getter_AddRefs(file));
-  if (NS_FAILED(rv) || !file) return NS_OK;
-
-  *aLocalFile = file;
-  NS_IF_ADDREF(*aLocalFile);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
-{
-  nsCOMPtr<nsIInputStream> inStream;
-  nsresult rv = MakeInputStream(getter_AddRefs(inStream), PR_TRUE);
-  if (NS_FAILED(rv))
-    return rv;
-
-  // Init our streampump
-  rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE);
-  if (NS_FAILED(rv))
-    return rv;
-
-  rv = mPump->AsyncRead(this, ctxt);
-  if (NS_SUCCEEDED(rv)) {
-    // Store our real listener
-    mListener = aListener;
-    // Add ourself to the load group, if available
-    if (mLoadGroup)
-      mLoadGroup->AddRequest(this, nsnull);
-  }
-  return rv;
-}
-
-nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, PRBool nonBlocking)
-{
-  nsXPIDLCString contentType;
-  nsCAutoString filePath;
-  nsCAutoString fileExtension;
-  nsCOMPtr<nsIFile> localFile; // File we want an icon for
-  PRUint32 desiredImageSize;
-  nsresult rv = ExtractIconInfoFromUrl(getter_AddRefs(localFile), &desiredImageSize, contentType, fileExtension);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  PRUint32 iconSize = 16;
-  if (desiredImageSize > 16)
-    iconSize = 32;
-
-  PRUint32 alphaBytesPerRow = (iconSize / 8);
-  if (iconSize % 32 != 0)
-    alphaBytesPerRow = ((iconSize / 32) + 1) * 4;
-    
-  PRBool fileExists = PR_FALSE;
-  if (localFile)
-  {
-    localFile->GetNativePath(filePath);
-    localFile->Exists(&fileExists);
-  }
-  
-  // Get the native icon.
-  // 1) If it is for an actual local file, BNodeInfo::GetTrackerIcon.
-  // 2) If the local file does not exist, use the content type 
-  //    and BMimeType::GetIcon
-  BBitmap nativeIcon(BRect(0, 0, iconSize - 1, iconSize - 1), B_CMAP8);
-  if (!nativeIcon.IsValid())
-    return NS_ERROR_OUT_OF_MEMORY;
-
-  PRBool gotBitmap = PR_FALSE;
-  if (fileExists)
-  {
-    BNode localNode(filePath.get());
-    // BeOS doesn't MIME type foreign files immediately - 
-    // If there is no type attribute then we can force an identify
-    if (localNode.ReadAttr("BEOS:TYPE", B_STRING_TYPE, 0, NULL, 0) != B_OK)
-    	update_mime_info(filePath.get(), 0, 1, 1);
-
-    BNodeInfo localNodeInfo(&localNode);
-    if (iconSize == 16)
-    {
-      if (localNodeInfo.GetTrackerIcon(&nativeIcon, B_MINI_ICON) == B_OK)
-        gotBitmap = PR_TRUE;
-    }
-    else
-    {
-      if (localNodeInfo.GetTrackerIcon(&nativeIcon, B_LARGE_ICON) == B_OK)
-        gotBitmap = PR_TRUE;
-    }
-  }
-
-  // If we haven't got a bitmap yet, use the content type
-  if (!gotBitmap)    
-  {
-    // If no content type specified, use mozilla's mime service to guess a mime type
-    if (contentType.IsEmpty())
-    {
-      nsCOMPtr<nsIMIMEService> mimeService (do_GetService("@mozilla.org/mime;1", &rv));
-      if (NS_SUCCEEDED(rv))
-        mimeService->GetTypeFromExtension(fileExtension, contentType);
-      // If unrecognised extension - set to generic file
-      if (contentType.IsEmpty())
-        contentType = "application/octet-stream";
-    }
-    // Create BeOS-Native MIME type info - if unheard of, set to generic file
-    BMimeType mimeType(contentType.get());
-    if (!mimeType.IsInstalled())
-    	mimeType.SetTo("application/octet-stream");
-    if (iconSize == 16)
-    {
-      if (mimeType.GetIcon(&nativeIcon, B_MINI_ICON) == B_OK)
-        gotBitmap = PR_TRUE;
-    }
-    else
-    {
-      if (mimeType.GetIcon(&nativeIcon, B_LARGE_ICON) == B_OK)
-        gotBitmap = PR_TRUE;
-    }
-  }
-  
-  if (!gotBitmap)
-    return NS_ERROR_NOT_AVAILABLE;
-
-  BScreen mainScreen(B_MAIN_SCREEN_ID);
-  if (!mainScreen.IsValid())
-    return NS_ERROR_NOT_AVAILABLE;
-
-  // Got a bitmap and color space info - convert data to mozilla's icon format
-  PRUint32 iconLength = 2 + iconSize * iconSize * 4;
-  uint8 *buffer = new uint8[iconLength];
-  if (!buffer)
-    return NS_ERROR_OUT_OF_MEMORY;
-
-  uint8* destByte = buffer;
-  *(destByte++) = iconSize;
-  *(destByte++) = iconSize;
-
-  // RGB data
-  uint8* sourceByte = (uint8*)nativeIcon.Bits();
-  for(PRUint32 iconRow = 0; iconRow < iconSize; iconRow++)
-  {
-    sourceByte = (uint8*)nativeIcon.Bits() + nativeIcon.BytesPerRow() * iconRow;
-    for(PRUint32 iconCol = 0; iconCol < iconSize; iconCol++)
-    {
-      if (*sourceByte != B_TRANSPARENT_MAGIC_CMAP8)
-      {
-        rgb_color colorVal = mainScreen.ColorForIndex(*sourceByte);
-#ifdef IS_LITTLE_ENDIAN
-        *(destByte++) = colorVal.blue;
-        *(destByte++) = colorVal.green;
-        *(destByte++) = colorVal.red;
-        *(destByte++) = uint8(255);
-#else
-        *(destByte++) = uint8(255);
-        *(destByte++) = colorVal.red;
-        *(destByte++) = colorVal.green;
-        *(destByte++) = colorVal.blue;
-#endif
-      }
-      else
-      {
-        *destByte++ = 0;
-        *destByte++ = 0;
-        *destByte++ = 0;
-        *destByte++ = 0;
-      }
-      // original code had a conditional here:
-      // if (iconCol < iconSize - 1) 
-      // Leaving this comment in case complications arise later
-      sourceByte++;
-    }
-  }
-
-  NS_ASSERTION(buffer + iconLength == destByte, "size miscalculation");
-  
-  // Now, create a pipe and stuff our data into it
-  nsCOMPtr<nsIInputStream> inStream;
-  nsCOMPtr<nsIOutputStream> outStream;
-  rv = NS_NewPipe(getter_AddRefs(inStream), getter_AddRefs(outStream),
-                  iconLength, iconLength, nonBlocking);
-  if (NS_SUCCEEDED(rv))
-  {
-    PRUint32 written;
-    rv = outStream->Write((char*)buffer, iconLength, &written);
-    if (NS_SUCCEEDED(rv))
-      NS_ADDREF(*_retval = inStream);
-  }
-  delete [] buffer;
-  
-  return rv;
-}
-
-NS_IMETHODIMP nsIconChannel::GetContentType(nsACString &aContentType) 
-{
-  aContentType.AssignLiteral("image/icon");
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsIconChannel::SetContentType(const nsACString &aContentType)
-{
-  // It doesn't make sense to set the content-type on this type
-  // of channel...
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP nsIconChannel::GetContentCharset(nsACString &aContentCharset) 
-{
-  aContentCharset.Truncate();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsIconChannel::SetContentCharset(const nsACString &aContentCharset)
-{
-  // It doesn't make sense to set the content-charset on this type
-  // of channel...
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP nsIconChannel::GetContentLength(PRInt32 *aContentLength)
-{
-  *aContentLength = mContentLength;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::SetContentLength(PRInt32 aContentLength)
-{
-  NS_NOTREACHED("nsIconChannel::SetContentLength");
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsIconChannel::GetOwner(nsISupports* *aOwner)
-{
-  *aOwner = mOwner.get();
-  NS_IF_ADDREF(*aOwner);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::SetOwner(nsISupports* aOwner)
-{
-  mOwner = aOwner;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
-{
-  *aNotificationCallbacks = mCallbacks.get();
-  NS_IF_ADDREF(*aNotificationCallbacks);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
-{
-  mCallbacks = aNotificationCallbacks;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
-{
-  *aSecurityInfo = nsnull;
-  return NS_OK;
-}
-
-// nsIRequestObserver methods
-NS_IMETHODIMP nsIconChannel::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext)
-{
-  if (mListener)
-    return mListener->OnStartRequest(this, aContext);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsIconChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aContext, nsresult aStatus)
-{
-  if (mListener) {
-    mListener->OnStopRequest(this, aContext, aStatus);
-    mListener = nsnull;
-  }
-
-  // Remove from load group
-  if (mLoadGroup)
-    mLoadGroup->RemoveRequest(this, nsnull, aStatus);
-
-  return NS_OK;
-}
-
-// nsIStreamListener methods
-NS_IMETHODIMP nsIconChannel::OnDataAvailable(nsIRequest* aRequest,
-                                             nsISupports* aContext,
-                                             nsIInputStream* aStream,
-                                             PRUint32 aOffset,
-                                             PRUint32 aCount)
-{
-  if (mListener)
-    return mListener->OnDataAvailable(this, aContext, aStream, aOffset, aCount);
-  return NS_OK;
-}
deleted file mode 100644
--- a/modules/libpr0n/decoders/icon/beos/nsIconChannel.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** 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
- * Brian Ryner.
- * Portions created by the Initial Developer are Copyright (C) 2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Scott MacGregor <mscott@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 ***** */
-
-#ifndef nsIconChannel_h___
-#define nsIconChannel_h___
-
-#include "nsCOMPtr.h"
-#include "nsXPIDLString.h"
-#include "nsIChannel.h"
-#include "nsILoadGroup.h"
-#include "nsIInterfaceRequestor.h"
-#include "nsIInterfaceRequestorUtils.h"
-#include "nsIURI.h"
-#include "nsIInputStreamPump.h"
-#include "nsIStreamListener.h"
-
-class nsIFile;
-
-class nsIconChannel : public nsIChannel, public nsIStreamListener
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIREQUEST
-  NS_DECL_NSICHANNEL
-  NS_DECL_NSIREQUESTOBSERVER
-  NS_DECL_NSISTREAMLISTENER
-
-  nsIconChannel();
-  ~nsIconChannel();
-
-  nsresult Init(nsIURI* uri);
-
-protected:
-  nsCOMPtr<nsIURI> mUrl;
-  nsCOMPtr<nsIURI> mOriginalURI;
-  PRInt32          mContentLength;
-  nsCOMPtr<nsILoadGroup> mLoadGroup;
-  nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
-  nsCOMPtr<nsISupports>  mOwner; 
-
-  nsCOMPtr<nsIInputStreamPump> mPump;
-  nsCOMPtr<nsIStreamListener>  mListener;
-
-  nsresult ExtractIconInfoFromUrl(nsIFile ** aLocalFile, PRUint32 * aDesiredImageSize, nsACString &aContentType, nsACString &aFileExtension);
-  nsresult MakeInputStream(nsIInputStream** _retval, PRBool nonBlocking);
-};
-
-#endif /* nsIconChannel_h___ */
--- a/modules/libpref/src/Makefile.in
+++ b/modules/libpref/src/Makefile.in
@@ -76,17 +76,17 @@ EXTRA_DSO_LDOPTS = \
 		$(NULL)
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
 
 GARBAGE		+= $(addprefix $(DIST)/bin/defaults/pref/, \
 			mailnews.js editor.js \
-			aix.js beos.js unix.js winpref.js os2prefs.js openvms.js)
+			aix.js unix.js winpref.js os2prefs.js openvms.js)
 
 GARBAGE		+= greprefs.js
 
 GREPREF_FILES = $(topsrcdir)/netwerk/base/public/security-prefs.js $(srcdir)/init/all.js
 
 # Optimizer bug with GCC 3.2.2 on OS/2
 ifeq ($(OS_ARCH), OS2)
 nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -2447,112 +2447,16 @@ pref("network.dns.disableIPv6", true);
 // change this value.
 pref("ui.panel.default_level_parent", false);
 
 pref("mousewheel.system_scroll_override_on_root_content.enabled", false);
 
 # OS2
 #endif
 
-#ifdef XP_BEOS
-
-pref("intl.font_charset", "");
-pref("intl.font_spec_list", "");
-pref("mail.signature_date", 0);
-
-pref("font.alias-list", "sans,sans-serif,serif,monospace");
-
-pref("font.default.ar", "sans-serif");
-pref("font.size.variable.ar", 16);
-pref("font.size.fixed.ar", 13);
-
-pref("font.default.el", "serif");
-pref("font.size.variable.el", 16);
-pref("font.size.fixed.el", 13);
-
-pref("font.default.he", "sans-serif");
-pref("font.size.variable.he", 16);
-pref("font.size.fixed.he", 13);
-
-pref("font.default.ja", "sans-serif");
-pref("font.size.variable.ja", 16);
-pref("font.size.fixed.ja", 16);
-
-pref("font.default.ko", "sans-serif");
-pref("font.size.variable.ko", 16);
-pref("font.size.fixed.ko", 16);
-
-pref("font.default.th", "serif");
-pref("font.size.variable.th", 16);
-pref("font.size.fixed.th", 13);
-
-pref("font.default.tr", "serif");
-pref("font.size.variable.tr", 16);
-pref("font.size.fixed.tr", 13);
-
-pref("font.default.x-baltic", "serif");
-pref("font.size.variable.x-baltic", 16);
-pref("font.size.fixed.x-baltic", 13);
-
-pref("font.default.x-central-euro", "serif");
-pref("font.size.variable.x-central-euro", 16);
-pref("font.size.fixed.x-central-euro", 13);
-
-pref("font.default.x-cyrillic", "serif");
-pref("font.size.variable.x-cyrillic", 16);
-pref("font.size.fixed.x-cyrillic", 13);
-
-pref("font.default.x-unicode", "serif");
-pref("font.size.variable.x-unicode", 16);
-pref("font.size.fixed.x-unicode", 13);
-
-pref("font.default.x-western", "serif");
-pref("font.size.variable.x-western", 16);
-pref("font.size.fixed.x-western", 13);
-
-pref("font.default.zh-CN", "sans-serif");
-pref("font.size.variable.zh-CN", 16);
-pref("font.size.fixed.zh-CN", 16);
-
-pref("font.default.zh-TW", "sans-serif");
-pref("font.size.variable.zh-TW", 16);
-pref("font.size.fixed.zh-TW", 16);
-
-pref("font.default.zh-HK", "sans-serif");
-pref("font.size.variable.zh-HK", 16);
-pref("font.size.fixed.zh-HK", 16);
-
-/**
- * Set default accelKey to "Alt", which is the default under BeOS.
- * The generalAccessKey is used for shortcuts on web pages, set to
- * Ctrl+Shift. The menuAccessKey is now the "windows" key.
- */
-pref("ui.key.accelKey", 18);
-pref("ui.key.menuAccessKey", 17);
-pref("ui.key.generalAccessKey", -1);
-
-// If generalAccessKey is -1, use the following two prefs instead.
-// Use 0 for disabled, 1 for Shift, 2 for Ctrl, 4 for Alt, 8 for Meta
-// (values can be combined, e.g. 3 for Ctrl+Shift)
-pref("ui.key.chromeAccess", 2);
-pref("ui.key.contentAccess", 3);
-
-// xxx toolkit?
-pref("browser.download.dir", "/boot/home/Downloads");
-
-// IMEs of BeOS might use non-topmost windows for topmost <panel> element,
-// see bug 451015. If there are other problems by this value, we may need to
-// change this value.
-pref("ui.panel.default_level_parent", false);
-
-pref("mousewheel.system_scroll_override_on_root_content.enabled", false);
-
-# BeOS
-#endif
-
 #ifdef ANDROID
 // Handled differently under Mac/Windows
 pref("network.protocol-handler.warn-external.file", false);
 pref("browser.drag_out_of_frame_style", 1);
 
 // Middle-mouse handling
 pref("middlemouse.paste", true);
 pref("middlemouse.contentLoadURL", true);
--- a/modules/libpref/src/prefapi.cpp
+++ b/modules/libpref/src/prefapi.cpp
@@ -67,20 +67,16 @@
 #include "nsPrintfCString.h"
 #include "prlink.h"
 
 #ifdef XP_OS2
 #define INCL_DOS
 #include <os2.h>
 #endif
 
-#ifdef XP_BEOS
-#include "Alert.h"
-#endif
-
 #define BOGUS_DEFAULT_INT_PREF_VALUE (-5632)
 #define BOGUS_DEFAULT_BOOL_PREF_VALUE (-2)
 
 static void
 clearPrefEntry(PLDHashTable *table, PLDHashEntryHdr *entry)
 {
     PrefHashEntry *pref = static_cast<PrefHashEntry *>(entry);
     if (pref->flags & PREF_STRING)
--- a/modules/plugin/base/src/Makefile.in
+++ b/modules/plugin/base/src/Makefile.in
@@ -64,20 +64,16 @@ CPPSRCS		= \
 		nsPluginStreamListenerPeer.cpp \
 		nsPluginHost.cpp \
 		nsPluginModule.cpp \
 		nsJSNPRuntime.cpp \
 		nsPluginTags.cpp \
 		PluginPRLibrary.cpp \
 		$(NULL)
 
-ifeq ($(OS_ARCH), BeOS)
-	CPPSRCS += nsPluginsDirBeOS.cpp
-	CPPSRCS += nsPluginNativeWindow.cpp
-else
 ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
 	CPPSRCS += nsPluginsDirWin.cpp
 	CPPSRCS += nsPluginNativeWindowWin.cpp
 	CPPSRCS += nsPluginDirServiceProvider.cpp
 	LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
 else
 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 	CPPSRCS += nsPluginsDirOS2.cpp
@@ -95,17 +91,16 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
 	CPPSRCS += nsPluginNativeWindowQt.cpp
 else
 	CPPSRCS += nsPluginNativeWindow.cpp
 endif
 endif
 endif
 endif
 endif
-endif
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/xpcom/base/ \
   $(NULL)
 
 ifneq (,$(filter WINNT Darwin,$(OS_ARCH)))
 EXTRA_DSO_LIBS	+= gkgfx
 endif
deleted file mode 100644
--- a/modules/plugin/base/src/nsPluginsDirBeOS.cpp
+++ /dev/null
@@ -1,297 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** 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):
- *   Alex Musil
- *   Makoto Hamanaka <VYA04230@nifty.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 ***** */
-
-/*
-	nsPluginsDirBeOS.cpp
-	
-	BeOS implementation of the nsPluginsDir/nsPluginsFile classes.
-	
-	Based on nsPluginsDirUNIX.cpp r1.12 by Alex Musil
- */
-
-#include "nsPluginsDir.h"
-#include "prlink.h"
-#include "plstr.h"
-#include "prmem.h"
-#include "nsReadableUtils.h"
-#include "nsString.h"
-
-#include <File.h>
-#include <AppFileInfo.h>
-#include <Message.h>
-#include <String.h>
-
-//#define NS_PLUGIN_BEOS_DEBUG
-
-/* Local helper functions */
- 
-static char* GetFileName(const char* pathname)
-{
-        const char* filename = nsnull;
-                
-        // this is most likely a path, so skip to the filename
-        filename = PL_strrchr(pathname, '/');
-        if(filename)
-                ++filename;
-        else
-                filename = pathname;
-
-        return PL_strdup(filename);
-}
-
-static nsresult GetMimeExtensions(const char *mimeType, char *extensions, int extLen)
-{
-    // check variables
-    if (!mimeType || !extensions || extLen < 1) return NS_ERROR_FAILURE;
-    extensions[0] = '\0';
-    
-    // make mime object
-    BMimeType mime(mimeType) ;
-    if (mime.InitCheck() != B_OK)
-        return NS_ERROR_FAILURE;
-    
-    // get extensions : comma separated (if multiple extensions in a mime-type)
-    // ex) "jpg,jpeg"
-    BString extStr("");
-    BMessage extMsg;
-    mime.GetFileExtensions(&extMsg);
-    uint32 type;
-    int32 types_num;
-    if (extMsg.GetInfo("extensions", &type, &types_num) != B_OK
-        || type != B_STRING_TYPE || types_num == 0)
-        return NS_ERROR_FAILURE;
-    
-    for (int i = 0 ; i < types_num ; i ++) {
-        const char *ext;
-        if (extMsg.FindString("extensions", i, &ext) != B_OK) {
-            break;
-        }
-        if (i > 0)
-            extStr.Append(",");
-        extStr.Append(ext);
-    }
-    PL_strncpyz(extensions, extStr.String(), extLen) ;
-    
-    return NS_OK;
-}
-
-///////////////////////////////////////////////////////////////////////////
-
-/* nsPluginsDir implementation */
-
-PRBool nsPluginsDir::IsPluginFile(nsIFile* file)
-{
-	return PR_TRUE;
-}
-
-///////////////////////////////////////////////////////////////////////////
-
-/* nsPluginFile implementation */
-
-nsPluginFile::nsPluginFile(nsIFile* spec)
-:	mPlugin(spec)
-{
-	// nada
-}
-
-nsPluginFile::~nsPluginFile()
-{
-	// nada
-}
-
-/**
- * Loads the plugin into memory using NSPR's shared-library loading
- * mechanism. Handles platform differences in loading shared libraries.
- */
-nsresult nsPluginFile::LoadPlugin(PRLibrary **outLibrary)
-{
-        nsCAutoString path;
-        nsresult rv = mPlugin->GetNativePath(path);
-        if (NS_OK != rv) {
-            return rv;
-        }
-        pLibrary = *outLibrary = PR_LoadLibrary(path.get());
-
-#ifdef NS_DEBUG
-        printf("LoadPlugin() %s returned %lx\n",path,(unsigned long)pLibrary);
-#endif
-
-        return NS_OK;
-}
-
-typedef char* (*BeOS_Plugin_GetMIMEDescription)();
-
-
-/**
- * Obtains all of the information currently available for this plugin.
- */
-nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info, PRLibrary **outLibrary)
-{
-    *outLibrary = nsnull;
-
-    info.fVersion = nsnull;
-
-    nsCAutoString fullPath;
-    if (NS_FAILED(rv = mPlugin->GetNativePath(fullPath)))
-        return rv;
-
-    nsCAutoString fileName;
-    if (NS_FAILED(rv = mPlugin->GetNativeLeafName(fileName)))
-        return rv;
-
-    const char *path = fullPath.get();
-    int i;
-
-#ifdef NS_PLUGIN_BEOS_DEBUG
-    printf("nsPluginFile::GetPluginInfo() an attempt to load MIME String\n");
-    printf("path = <%s>\n", path);
-#endif
-
-    // get supported mime types
-    BFile file(path, B_READ_ONLY);
-    if (file.InitCheck() != B_OK)
-        return NS_ERROR_FAILURE;
-
-    BAppFileInfo appinfo(&file);
-    if (appinfo.InitCheck() != B_OK)
-        return NS_ERROR_FAILURE;
-
-    BMessage msg;
-    if (appinfo.GetSupportedTypes(&msg) != B_OK)
-        return NS_ERROR_FAILURE;
-
-    uint32 type;
-    int32 types_num;
-    if (msg.GetInfo("types", &type, &types_num) != B_OK
-        || type != B_STRING_TYPE)
-        return NS_ERROR_FAILURE;
-
-    // set mime types to plugin info
-    info.fMimeTypeArray =(char **)PR_Malloc(types_num * sizeof(char *));
-    info.fMimeDescriptionArray =(char **)PR_Malloc(types_num * sizeof(char *));
-    info.fExtensionArray =(char **)PR_Malloc(types_num * sizeof(char *));
-
-    for (i = 0 ; i < types_num ; i ++) {
-        // get mime string
-        const char *mtype;
-        if (msg.FindString("types", i, &mtype) != B_OK) {
-            types_num = i;
-            break;
-        }
-        
-        // get (short)description for the mime
-        char desc[B_MIME_TYPE_LENGTH+1] = "";
-        BMimeType mime(mtype) ;
-        if (mime.InitCheck() == B_OK)
-            mime.GetShortDescription(desc);
-        
-        // get file extensions for the mime
-        char extensions[B_MIME_TYPE_LENGTH+1] = "";
-        GetMimeExtensions(mtype, extensions, B_MIME_TYPE_LENGTH+1);
-
-        #ifdef NS_PLUGIN_BEOS_DEBUG
-            printf("  mime = %30s | %10s | %15s |\n", 
-                mtype, extensions, desc);
-        #endif
-        
-        info.fMimeTypeArray[i] = PL_strdup( mtype ? mtype : (char *)"" ) ;
-        info.fMimeDescriptionArray[i] = PL_strdup( desc ) ;
-        info.fExtensionArray[i] = PL_strdup( extensions );
-    }
-
-    // get name and description of this plugin
-    version_info vinfo;
-    if (appinfo.GetVersionInfo(&vinfo, B_APP_VERSION_KIND) == B_OK
-        && *vinfo.short_info) {
-        // XXX convert UTF-8 2byte chars to 1 byte chars, to avoid string corruption
-        info.fName = ToNewCString(NS_ConvertUTF8toUTF16(vinfo.short_info));
-        info.fDescription = ToNewCString(NS_ConvertUTF8toUTF16(vinfo.long_info));
-    } else {
-        // use filename as its name
-        info.fName = GetFileName(path);
-        info.fDescription = PL_strdup("");
-    }
-
-    info.fVariantCount = types_num;
-    info.fFullPath = PL_strdup(fullPath.get());
-    info.fFileName = PL_strdup(fileName.get());
-
-#ifdef NS_PLUGIN_BEOS_DEBUG
-    printf("info.fFileName = %s\n", info.fFileName);
-    printf("info.fName = %s\n", info.fName);
-    printf("info.fDescription = %s\n", info.fDescription);
-#endif
-
-    return NS_OK;
-}
-
-nsresult nsPluginFile::FreePluginInfo(nsPluginInfo& info)
-{
-    if (info.fName)
-        PL_strfree(info.fName);
-
-    if (info.fDescription)
-        PL_strfree(info.fDescription);
-
-    for (PRUint32 i = 0; i < info.fVariantCount; i++) {
-        if (info.fMimeTypeArray[i])
-            PL_strfree(info.fMimeTypeArray[i]);
-
-        if (info.fMimeDescriptionArray[i])
-            PL_strfree(info.fMimeDescriptionArray[i]);
-
-        if (info.fExtensionArray[i])
-            PL_strfree(info.fExtensionArray[i]);
-    }
-
-    PR_FREEIF(info.fMimeTypeArray);
-    PR_FREEIF(info.fMimeDescriptionArray);
-    PR_FREEIF(info.fExtensionArray);
-
-    if (info.fFullPath)
-        PL_strfree(info.fFullPath);
-
-    if (info.fFileName)
-        PL_strfree(info.fFileName);
-
-    if (info.fVersion)
-        PL_strfree(info.fVersion);
-
-    return NS_OK;
-}
--- a/netwerk/cache/nsDiskCacheDevice.cpp
+++ b/netwerk/cache/nsDiskCacheDevice.cpp
@@ -37,17 +37,17 @@
  * 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 <limits.h>
 
 // include files for ftruncate (or equivalent)
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
 #include <unistd.h>
 #elif defined(XP_WIN)
 #include <windows.h>
 #elif defined(XP_OS2)
 #define INCL_DOSERRORS
 #include <os2.h>
 #else
 // XXX add necessary include file for ftruncate (or equivalent)
@@ -311,17 +311,17 @@ nsDiskCache::Hash(const char * key, PLDH
   return c;
 }
 
 nsresult
 nsDiskCache::Truncate(PRFileDesc *  fd, PRUint32  newEOF)
 {
     // use modified SetEOF from nsFileStreams::SetEOF()
 
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
     if (ftruncate(PR_FileDesc2NativeHandle(fd), newEOF) != 0) {
         NS_ERROR("ftruncate failed");
         return NS_ERROR_FAILURE;
     }
 
 #elif defined(XP_WIN)
     PRInt32 cnt = PR_Seek(fd, newEOF, PR_SEEK_SET);
     if (cnt == -1)  return NS_ERROR_FAILURE;
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -79,17 +79,17 @@
 #include "nsSocketTransportService2.h"
 
 #include "nsIXULAppInfo.h"
 
 #ifdef MOZ_IPC
 #include "mozilla/net/NeckoChild.h"
 #endif 
 
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
 #include <sys/utsname.h>
 #endif
 
 #if defined(XP_WIN)
 #include <windows.h>
 #endif
 
 #if defined(XP_MACOSX)
@@ -680,18 +680,16 @@ nsHttpHandler::InitUserAgentComponents()
 #if defined(ANDROID)
     "Android"
 #elif defined(XP_OS2)
     "OS/2"
 #elif defined(XP_WIN)
     "Windows"
 #elif defined(XP_MACOSX)
     "Macintosh"
-#elif defined(XP_BEOS)
-    "BeOS"
 #elif defined(MOZ_PLATFORM_MAEMO)
     "Maemo"
 #elif defined(MOZ_X11)
     "X11"
 #else
     "?"
 #endif
     );
@@ -746,17 +744,17 @@ nsHttpHandler::InitUserAgentComponents()
 #elif defined(__i386__) || defined(__x86_64__)
     mOscpu.AssignLiteral("Intel Mac OS X");
 #endif
     SInt32 majorVersion, minorVersion;
     if ((::Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) &&
         (::Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) {
         mOscpu += nsPrintfCString(" %d.%d", majorVersion, minorVersion);
     }
-#elif defined (XP_UNIX) || defined (XP_BEOS)
+#elif defined (XP_UNIX)
     struct utsname name;
     
     int ret = uname(&name);
     if (ret >= 0) {
         nsCAutoString buf;
         buf =  (char*)name.sysname;
 
         if (strcmp(name.machine, "x86_64") == 0 &&
--- a/rdf/datasource/src/nsFileSystemDataSource.cpp
+++ b/rdf/datasource/src/nsFileSystemDataSource.cpp
@@ -64,28 +64,20 @@
 #include "nsIFileURL.h"
 #include "nsNetUtil.h"
 #include "nsIChannel.h"
 #include "nsIFile.h"
 #include "nsEscape.h"
 #include "nsCRTGlue.h"
 #include "nsAutoPtr.h"
 
-#ifdef  XP_WIN
+#ifdef XP_WIN
 #include "windef.h"
 #include "winbase.h"
 #include "nsILineInputStream.h"
-#endif
-
-#ifdef  XP_BEOS
-#include <File.h>
-#include <NodeInfo.h>
-#endif
-
-#if defined(XP_WIN) || defined(XP_BEOS)
 #include "nsDirectoryServiceDefs.h"
 #endif
 
 #ifdef XP_OS2
 #define INCL_DOSFILEMGR
 #include <os2.h>
 #endif
 
@@ -210,32 +202,16 @@ FileSystemDataSource::Init()
         nsCOMPtr<nsIURI> furi;
         NS_NewFileURI(getter_AddRefs(furi), file);
         NS_ENSURE_TRUE(furi, NS_ERROR_FAILURE);
 
         file->GetNativePath(ieFavoritesDir);
     }
 #endif
 
-#ifdef XP_BEOS
-    nsCOMPtr<nsIFile> file;
-    NS_GetSpecialDirectory(NS_BEOS_SETTINGS_DIR, getter_AddRefs(file));
-    if (file)
-    {
-        file->AppendNative(NS_LITERAL_CSTRING("NetPositive"));
-        file->AppendNative(NS_LITERAL_CSTRING("Bookmarks"));
-
-        nsCOMPtr<nsIURI> furi;
-        NS_NewFileURI(getter_AddRefs(furi), file);
-        NS_ENSURE_TRUE(furi, NS_ERROR_FAILURE);
-
-        file->GetNativePath(netPositiveDir);
-    }
-#endif
-
     return NS_OK;
 }
 
 //static
 nsresult
 FileSystemDataSource::Create(nsISupports* aOuter, const nsIID& aIID, void **aResult)
 {
     NS_ENSURE_NO_AGGREGATION(aOuter);
@@ -920,17 +896,17 @@ FileSystemDataSource::GetVolumeList(nsIS
 
                 if (NS_FAILED(rv)) return rv;
                 volumes->AppendElement(vol);
             }
         }
     }
 #endif
 
-#if defined(XP_UNIX) || defined(XP_BEOS) || defined(WINCE)
+#if defined(XP_UNIX) || defined(WINCE)
     mRDFService->GetResource(NS_LITERAL_CSTRING("file:///"), getter_AddRefs(vol));
     volumes->AppendElement(vol);
 #endif
 
 #ifdef XP_OS2
     ULONG ulDriveNo = 0;
     ULONG ulDriveMap = 0;
     char *url;
@@ -1315,58 +1291,16 @@ FileSystemDataSource::GetName(nsIRDFReso
         if (extension.LowerCaseEqualsLiteral(".url") ||
             extension.LowerCaseEqualsLiteral(".lnk"))
         {
             name.Truncate(nameLen - 4);
         }
     }
 #endif
 
-#ifdef  XP_BEOS
-    // under BEOS, try and get the "META:title" attribute (if its a file)
-    if (strstr(uri, netPositiveDir.get()) != 0)
-    {
-        PRBool value;
-        if ((NS_SUCCEEDED(aFileLocal->IsFile(&value) && value)) ||
-            (NS_SUCCEEDED(aFileLocal->IsDirectory(&value) && value)))
-        {
-            nsXPIDLCString nativePath;
-            aFileLocal->GetNativePath(nativePath);
-
-            rv = NS_ERROR_FAILURE;
-            if (nativePath) 
-            {
-                BFile   bf(nativePath.get(), B_READ_ONLY);
-                if (bf.InitCheck() == B_OK)
-                {
-                    char        beNameAttr[4096];
-                    ssize_t     len;
-
-                    if ((len = bf.ReadAttr("META:title", B_STRING_TYPE,
-                        0, beNameAttr, sizeof(beNameAttr)-1)) > 0)
-                    {
-                        beNameAttr[len] = '\0';
-                        CopyUTF8toUTF16(beNameAttr, name);
-                        rv = NS_OK;
-                    }
-                }
-            }
-            if (NS_OK != rv)
-            {
-                nsCAutoString leafName;
-                rv = aFileLocal->GetNativeLeafName(leafName);
-                if (NS_SUCCEEDED(rv)) {
-                    CopyUTF8toUTF16(leafName, name);
-                    rv = NS_OK;
-                }
-            }
-        }
-    }
-#endif
-
     mRDFService->GetLiteral(name.get(), aResult);
 
     return NS_OK;
 }
 
 
 
 #ifdef USE_NC_EXTENSION
@@ -1488,76 +1422,15 @@ FileSystemDataSource::GetURL(nsIRDFResou
         {
             if (isFavorite) *isFavorite = PR_TRUE;
             rv = getIEFavoriteURL(source, url, aResult);
             return(rv);
         }
     }
 #endif
 
-#ifdef  XP_BEOS
-    // under BEOS, try and get the "META:url" attribute
-    if (!netPositiveDir.IsEmpty())
-    {
-        if (strstr(uri.get(), netPositiveDir.get()) != 0)
-        {
-            if (isFavorite) *isFavorite = PR_TRUE;
-            rv = getNetPositiveURL(source, url, aResult);
-            return(rv);
-        }
-    }
-#endif
-
     // if we fall through to here, its not any type of bookmark
     // stored in the platform native file system, so just set the URL
 
     mRDFService->GetLiteral(url.get(), aResult);
 
     return(NS_OK);
 }
-
-
-
-#ifdef  XP_BEOS
-
-nsresult
-FileSystemDataSource::getNetPositiveURL(nsIRDFResource *source, nsString aFileURL, nsIRDFLiteral **urlLiteral)
-{
-    nsresult        rv = NS_RDF_NO_VALUE;
-
-    *urlLiteral = nsnull;
-
-
-    nsCOMPtr<nsIFile> f;
-    NS_GetFileFromURLSpec(NS_ConvertUTF16toUTF8(aFileURL), getter_AddRefs(f)); 
-
-
-
-    nsXPIDLCString nativePath;
-    f->GetNativePath(nativePath);
-
-    PRBool value;
-    if (NS_SUCCEEDED(f->IsFile(&value) && value))
-    {
-        if (nativePath)
-        {
-            BFile   bf(nativePath.get(), B_READ_ONLY);
-            if (bf.InitCheck() == B_OK)
-            {
-                char        beURLattr[4096];
-                ssize_t     len;
-
-                if ((len = bf.ReadAttr("META:url", B_STRING_TYPE,
-                    0, beURLattr, sizeof(beURLattr)-1)) > 0)
-                {
-                    beURLattr[len] = '\0';
-                    nsAutoString    bookmarkURL;
-                    CopyUTF8toUTF16(beURLattr, bookmarkURL);
-                    rv = mRDFService->GetLiteral(bookmarkURL.get(),
-                                                 urlLiteral);
-                }
-            }
-        }
-    }
-    return(rv);
-}
-
-#endif
--- a/rdf/datasource/src/nsFileSystemDataSource.h
+++ b/rdf/datasource/src/nsFileSystemDataSource.h
@@ -43,17 +43,17 @@
 #include "nsIRDFLiteral.h"
 #include "nsIRDFResource.h"
 #include "nsIRDFService.h"
 #include "nsISupportsArray.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsCycleCollectionParticipant.h"
 
-#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_WIN) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_WIN)
 #define USE_NC_EXTENSION
 #endif
 
 class FileSystemDataSource : public nsIRDFDataSource
 {
 public:
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_CLASS(FileSystemDataSource)
@@ -104,16 +104,11 @@ private:
 
 #ifdef  XP_WIN
     PRBool   isValidFolder(nsIRDFResource *source);
     nsresult getIEFavoriteURL(nsIRDFResource *source, nsString aFileURL, nsIRDFLiteral **urlLiteral);
     nsCOMPtr<nsIRDFResource>       mNC_IEFavoriteObject;
     nsCOMPtr<nsIRDFResource>       mNC_IEFavoriteFolder;
     nsCString                      ieFavoritesDir;
 #endif
-
-#ifdef  XP_BEOS
-    nsresult getNetPositiveURL(nsIRDFResource *source, nsString aFileURL, nsIRDFLiteral **urlLiteral);
-    nsCString netPositiveDir;
-#endif
 };
 
 #endif // nsFileSystemDataSource_h__
--- a/toolkit/components/commandlines/src/nsCommandLine.cpp
+++ b/toolkit/components/commandlines/src/nsCommandLine.cpp
@@ -59,19 +59,16 @@
 #include "plstr.h"
 
 #ifdef MOZ_WIDGET_COCOA
 #include <CoreFoundation/CoreFoundation.h>
 #include "nsILocalFileMac.h"
 #elif defined(XP_WIN)
 #include <windows.h>
 #include <shlobj.h>
-#elif defined(XP_BEOS)
-#include <Path.h>
-#include <Directory.h>
 #elif defined(XP_UNIX)
 #include <unistd.h>
 #elif defined(XP_OS2)
 #include <os2.h>
 #endif
 
 #ifdef DEBUG_bsmedberg
 #define DEBUG_COMMANDLINE
@@ -310,48 +307,16 @@ nsCommandLine::ResolveFile(const nsAStri
 
   rv = newfile->InitWithCFURL(newurl);
   CFRelease(newurl);
   if (NS_FAILED(rv)) return rv;
 
   NS_ADDREF(*aResult = newfile);
   return NS_OK;
 
-#elif defined(XP_BEOS)
-  nsCOMPtr<nsILocalFile> lf (do_CreateInstance(NS_LOCAL_FILE_CONTRACTID));
-  NS_ENSURE_TRUE(lf, NS_ERROR_OUT_OF_MEMORY);
-
-  if (aArgument.First() == '/') {
-    // absolute path
-    rv = lf->InitWithPath(aArgument);
-    if (NS_FAILED(rv)) return rv;
-
-    NS_ADDREF(*aResult = lf);
-    return NS_OK;
-  }
-
-  nsCAutoString carg;
-  NS_CopyUnicodeToNative(aArgument, carg);
-
-  nsCAutoString wd;
-  rv = mWorkingDir->GetNativePath(wd);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  BDirectory bwd(wd.get());
-
-  BPath resolved(&bwd, carg.get(), true);
-  if (resolved.InitCheck() != B_OK)
-    return NS_ERROR_FAILURE;
-
-  rv = lf->InitWithNativePath(nsDependentCString(resolved.Path()));
-  if (NS_FAILED(rv)) return rv;
-
-  NS_ADDREF(*aResult = lf);
-  return NS_OK;
-
 #elif defined(XP_UNIX)
   nsCOMPtr<nsILocalFile> lf (do_CreateInstance(NS_LOCAL_FILE_CONTRACTID));
   NS_ENSURE_TRUE(lf, NS_ERROR_OUT_OF_MEMORY);
 
   if (aArgument.First() == '/') {
     // absolute path
     rv = lf->InitWithPath(aArgument);
     if (NS_FAILED(rv)) return rv;
--- a/toolkit/components/filepicker/Makefile.in
+++ b/toolkit/components/filepicker/Makefile.in
@@ -39,14 +39,14 @@
 DEPTH     = ../../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef MOZ_XUL
-ifeq (,$(filter android qt beos os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
+ifeq (,$(filter android qt os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
 DIRS = public src
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -229,20 +229,16 @@ endif
 ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
 EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
 endif
 
 ifdef MOZ_ENABLE_LIBPROXY
 EXTRA_DSO_LDOPTS += $(MOZ_LIBPROXY_LIBS)
 endif
 
-ifeq ($(OS_ARCH),BeOS)
-EXTRA_DSO_LDOPTS += -lbe -ltracker
-endif
-
 ifeq ($(OS_ARCH),SunOS)
 ifdef GNU_CC
 EXTRA_DSO_LDOPTS += -lelf
 else
 EXTRA_DSO_LDOPTS += -lelf -ldemangle
 endif
 endif
 
--- a/toolkit/library/libxul-config.mk
+++ b/toolkit/library/libxul-config.mk
@@ -240,17 +240,17 @@ endif
 
 ifdef MOZ_RDF
 COMPONENT_LIBS += \
 	rdf \
 	windowds \
 	$(NULL)
 endif
 
-ifeq (,$(filter android qt beos os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
+ifeq (,$(filter android qt os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
 ifdef MOZ_XUL
 COMPONENT_LIBS += fileview
 DEFINES += -DMOZ_FILEVIEW
 endif
 endif
 
 ifdef MOZ_STORAGE
 COMPONENT_LIBS += storagecomps
@@ -290,17 +290,17 @@ endif
 
 ifdef MOZ_ENABLE_GTK2
 ifdef MOZ_X11
 STATIC_LIBS += gtkxtbin
 endif
 endif
 
 # Platform-specific icon channel stuff - supported mostly-everywhere
-ifneq (,$(filter beos windows os2 mac cocoa gtk2 qt,$(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter windows os2 mac cocoa gtk2 qt,$(MOZ_WIDGET_TOOLKIT)))
 DEFINES += -DICON_DECODER
 COMPONENT_LIBS += imgicon
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 COMPONENT_LIBS += widget_android
 endif
 
@@ -308,19 +308,16 @@ STATIC_LIBS += thebes ycbcr
 
 STATIC_LIBS += angle
 
 COMPONENT_LIBS += gkgfxthebes
 
 ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
 COMPONENT_LIBS += gkwidget
 endif
-ifeq (beos,$(MOZ_WIDGET_TOOLKIT))
-COMPONENT_LIBS += widget_beos
-endif
 ifeq (os2,$(MOZ_WIDGET_TOOLKIT))
 COMPONENT_LIBS += wdgtos2
 endif
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 COMPONENT_LIBS += widget_mac
 endif
 ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
 COMPONENT_LIBS += widget_qt
--- a/toolkit/library/nsStaticXULComponents.cpp
+++ b/toolkit/library/nsStaticXULComponents.cpp
@@ -66,18 +66,16 @@
 #endif
 
 #define GFX_MODULES MODULE(nsGfxModule)
 
 #ifdef XP_WIN
 #  define WIDGET_MODULES MODULE(nsWidgetModule)
 #elif defined(XP_MACOSX)
 #  define WIDGET_MODULES MODULE(nsWidgetMacModule)
-#elif defined(XP_BEOS)
-#  define WIDGET_MODULES MODULE(nsWidgetBeOSModule)
 #elif defined(XP_OS2)
 #  define WIDGET_MODULES MODULE(nsWidgetOS2Module)
 #elif defined(MOZ_WIDGET_GTK2)
 #  define WIDGET_MODULES MODULE(nsWidgetGtk2Module)
 #elif defined(MOZ_WIDGET_QT)
 #  define WIDGET_MODULES MODULE(nsWidgetQtModule)
 #elif defined(MOZ_WIDGET_ANDROID)
 #  define WIDGET_MODULES MODULE(nsWidgetAndroidModule)
--- a/toolkit/mozapps/installer/package-name.mk
+++ b/toolkit/mozapps/installer/package-name.mk
@@ -69,35 +69,16 @@ endif
 endif
 endif
 ifeq ($(TARGET_OS),linux-gnu)
 MOZ_PKG_PLATFORM := linux-$(TARGET_CPU)
 endif
 ifeq ($(OS_ARCH),OS2)
 MOZ_PKG_PLATFORM := os2
 endif
-ifeq ($(OS_ARCH),BeOS)
-ifeq (,$(filter-out 6.%, $(OS_RELEASE)))
-MOZ_PKG_PLATFORM := Zeta
-else
-ifeq (,$(filter-out 5.1, $(OS_RELEASE)))
-MOZ_PKG_PLATFORM := BeOS-bone
-else
-ifeq (,$(filter-out 5.0.4, $(OS_RELEASE)))
-MOZ_PKG_PLATFORM := BeOS-bone
-else
-ifeq (,$(filter-out 5.0, $(OS_RELEASE)))
-MOZ_PKG_PLATFORM := BeOS-net_server
-else
-MOZ_PKG_PLATFORM := BeOS-$(OS_RELEASE)
-endif # 5.0
-endif # 5.0.4
-endif # 5.1
-endif # 6.
-endif # OS_ARCH BeOS
 endif #MOZ_PKG_PLATFORM
 
 ifdef MOZ_PKG_SPECIAL
 MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-$(MOZ_PKG_SPECIAL)
 endif
 
 MOZ_PKG_DIR = $(MOZ_APP_NAME)
 
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -41,17 +41,17 @@
 include $(MOZILLA_DIR)/toolkit/mozapps/installer/package-name.mk
 
 # This is how we create the binary packages we release to the public.
 
 ifndef MOZ_PKG_FORMAT
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 MOZ_PKG_FORMAT  = DMG
 else
-ifeq (,$(filter-out OS2 WINNT WINCE BeOS, $(OS_ARCH)))
+ifeq (,$(filter-out OS2 WINNT WINCE, $(OS_ARCH)))
 MOZ_PKG_FORMAT  = ZIP
 else
 ifeq (,$(filter-out SunOS, $(OS_ARCH)))
    MOZ_PKG_FORMAT  = BZ2
 else
    ifeq (,$(filter-out gtk2 qt, $(MOZ_WIDGET_TOOLKIT)))
       MOZ_PKG_FORMAT  = BZ2
    else
@@ -439,20 +439,16 @@ MOZ_PKG_REMOVALS_GEN = removed-files
 GARBAGE += $(MOZ_PKG_REMOVALS_GEN)
 endif
 
 GARBAGE		+= $(DIST)/$(PACKAGE) $(PACKAGE)
 
 ifeq ($(OS_ARCH),IRIX)
 STRIP_FLAGS	= -f
 endif
-ifeq ($(OS_ARCH),BeOS)
-STRIP_FLAGS	= -g
-PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin"
-endif
 ifeq ($(OS_ARCH),OS2)
 STRIP		= $(MOZILLA_DIR)/toolkit/mozapps/installer/os2/strip.cmd
 STRIP_FLAGS	=
 PLATFORM_EXCLUDE_LIST = ! -name "*.ico" ! -name "$(MOZ_PKG_APPNAME).exe"
 endif
 
 ifneq (,$(filter WINNT WINCE OS2,$(OS_ARCH)))
 PKGCP_OS = dos
--- a/toolkit/profile/src/nsToolkitProfileService.cpp
+++ b/toolkit/profile/src/nsToolkitProfileService.cpp
@@ -38,19 +38,16 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "nsProfileLock.h"
 
 #ifdef XP_WIN
 #include <windows.h>
 #include <shlobj.h>
 #endif
-#ifdef XP_BEOS
-#include <Path.h>
-#endif
 #ifdef XP_UNIX
 #include <unistd.h>
 #endif
 
 #include "nsIToolkitProfileService.h"
 #include "nsIToolkitProfile.h"
 #include "nsIFactory.h"
 #include "nsILocalFile.h"
@@ -949,20 +946,12 @@ XRE_GetFileFromPath(const char *aPath, n
     WCHAR fullPath[MAXPATHLEN];
 
     if (!_wfullpath(fullPath, NS_ConvertUTF8toUTF16(aPath).get(), MAXPATHLEN))
         return NS_ERROR_FAILURE;
 
     return NS_NewLocalFile(nsDependentString(fullPath), PR_TRUE,
                            aResult);
 
-#elif defined(XP_BEOS)
-    BPath fullPath;
-    if (fullPath.SetTo(aPath, NULL, true))
-        return NS_ERROR_FAILURE;
-
-    return NS_NewNativeLocalFile(nsDependentCString(fullPath.Leaf()), PR_TRUE,
-                                 aResult);
-
 #else
 #error Platform-specific logic needed here.
 #endif
 }
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -468,17 +468,16 @@ MAKEFILES_webshell="
   webshell/Makefile
   webshell/public/Makefile
 "
 
 MAKEFILES_widget="
   widget/Makefile
   widget/public/Makefile
   widget/src/Makefile
-  widget/src/beos/Makefile
   widget/src/build/Makefile
   widget/src/gtk2/Makefile
   widget/src/gtkxtbin/Makefile
   widget/src/cocoa/Makefile
   widget/src/os2/Makefile
   widget/src/windows/Makefile
   widget/src/xpwidgets/Makefile
 "
@@ -728,17 +727,16 @@ MAKEFILES_libpr0n="
   modules/libpr0n/build/Makefile
   modules/libpr0n/public/Makefile
   modules/libpr0n/src/Makefile
   modules/libpr0n/decoders/Makefile
   modules/libpr0n/decoders/icon/Makefile
   modules/libpr0n/decoders/icon/mac/Makefile
   modules/libpr0n/decoders/icon/win/Makefile
   modules/libpr0n/decoders/icon/gtk/Makefile
-  modules/libpr0n/decoders/icon/beos/Makefile
   modules/libpr0n/encoders/Makefile
   modules/libpr0n/encoders/png/Makefile
   modules/libpr0n/encoders/jpeg/Makefile
 "
 
 MAKEFILES_accessible="
   accessible/Makefile
   accessible/public/Makefile
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -93,19 +93,16 @@ DEFINES += -DWIN32_LEAN_AND_MEAN -DUNICO
 EXPORTS = nsWindowsDllInterceptor.h
 else
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 CMMSRCS = nsNativeAppSupportCocoa.mm
 else
 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 CPPSRCS += nsNativeAppSupportOS2.cpp
 else
-ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-CPPSRCS += nsNativeAppSupportBeOS.cpp
-else
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
 CPPSRCS += nsNativeAppSupportUnix.cpp
 else
 ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
 CPPSRCS += nsNativeAppSupportQt.cpp
 CPPSRCS += nsQAppInstance.cpp
 EXPORTS += nsQAppInstance.h
 else
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -158,23 +158,16 @@ using mozilla::dom::ContentParent;
 #endif
 
 #ifdef XP_UNIX
 #include <sys/stat.h>
 #include <unistd.h>
 #include <pwd.h>
 #endif
 
-#ifdef XP_BEOS
-// execv() behaves bit differently in R5 and Zeta, looks unreliable in such situation
-//#include <unistd.h>
-#include <AppKit.h>
-#include <AppFileInfo.h>
-#endif //XP_BEOS
-
 #ifdef XP_WIN
 #ifndef WINCE
 #include <process.h>
 #include <shlobj.h>
 #endif
 #include "nsThreadUtils.h"
 #endif
 
@@ -1610,28 +1603,16 @@ XRE_GetBinaryPath(const char* argv0, nsI
 
   DosGetInfoBlocks( &ptib, &ppib);
   DosQueryModuleName( ppib->pib_hmte, MAXPATHLEN, exePath);
   rv = NS_NewNativeLocalFile(nsDependentCString(exePath), PR_TRUE,
                              getter_AddRefs(lf));
   if (NS_FAILED(rv))
     return rv;
 
-#elif defined(XP_BEOS)
-  int32 cookie = 0;
-  image_info info;
-
-  if(get_next_image_info(0, &cookie, &info) != B_OK)
-    return NS_ERROR_FAILURE;
-
-  rv = NS_NewNativeLocalFile(nsDependentCString(info.name), PR_TRUE,
-                             getter_AddRefs(lf));
-  if (NS_FAILED(rv))
-    return rv;
-
 #else
 #error Oops, you need platform-specific code here
 #endif
 
   NS_ADDREF(*aResult = lf);
   return NS_OK;
 }
 
@@ -1790,22 +1771,16 @@ static nsresult LaunchChild(nsINativeApp
   if (OS2LaunchChild(exePath.get(), gRestartArgc, gRestartArgv) == -1)
     return NS_ERROR_FAILURE;
 #elif defined(XP_OS2)
   if (_execv(exePath.get(), gRestartArgv) == -1)
     return NS_ERROR_FAILURE;
 #elif defined(XP_UNIX)
   if (execv(exePath.get(), gRestartArgv) == -1)
     return NS_ERROR_FAILURE;
-#elif defined(XP_BEOS)
-  extern char **environ;
-  status_t res;
-  res = resume_thread(load_image(gRestartArgc,(const char **)gRestartArgv,(const char **)environ));
-  if (res != B_OK)
-    return NS_ERROR_FAILURE;
 #else
   PRProcess* process = PR_CreateProcess(exePath.get(), gRestartArgv,
                                         nsnull, nsnull);
   if (!process) return NS_ERROR_FAILURE;
 
   PRInt32 exitCode;
   PRStatus failed = PR_WaitProcess(process, &exitCode);
   if (failed || exitCode)
deleted file mode 100644
--- a/toolkit/xre/nsNativeAppSupportBeOS.cpp
+++ /dev/null
@@ -1,382 +0,0 @@
-/* ***** 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 the Mozilla Browser.
- *
- * The Initial Developer of the Original Code is
- * Fredrik Holmqvist <thesuckiestemail@yahoo.se>.
- * Portions created by the Initial Developer are Copyright (C) 2005
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Sergei Dolgov <sergei_d@fi.tartu.ee>
- *
- * 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 ***** */
- 
-//This define requires DebugConsole (see BeBits.com) to be installed
-//#define DC_PROGRAMNAME "firefox-bin"
-# ifdef DC_PROGRAMNAME
-#include <DebugConsole.h>
-#endif
-
-#include "nsIServiceManager.h"
-#include "nsNativeAppSupportBase.h"
-#include "nsICommandLineRunner.h"
-#include "nsCOMPtr.h"
-#include "nsIProxyObjectManager.h"
-//#include "nsIBrowserDOMWindow.h"
-#include "nsPIDOMWindow.h"
-#include "nsIDOMChromeWindow.h"
-#include "nsIWindowMediator.h"
-#include "nsXPIDLString.h"
-#include "nsIBaseWindow.h"
-#include "nsIWidget.h"
-#include "nsIDocShell.h"
-
-#include <Application.h>
-#include <AppFileInfo.h>
-#include <Resources.h>
-#include <Path.h>
-#include <Window.h>
-#include <unistd.h>
-
-// Two static helpers for future - if we decide to use OpenBrowserWindow, like we do in SeaMonkey
-static nsresult
-GetMostRecentWindow(const PRUnichar* aType, nsIDOMWindowInternal** aWindow)
-{
-    nsresult rv;
-    nsCOMPtr<nsIWindowMediator> med(do_GetService( NS_WINDOWMEDIATOR_CONTRACTID, &rv));
-    if (NS_FAILED(rv))
-        return rv;
-
-    if (med)
-    {
-        nsCOMPtr<nsIWindowMediator> medProxy;
-        rv = NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD, NS_GET_IID(nsIWindowMediator), 
-                                  med, NS_PROXY_SYNC | NS_PROXY_ALWAYS,
-                                  getter_AddRefs(medProxy));
-        if (NS_FAILED(rv))
-            return rv;
-        return medProxy->GetMostRecentWindow( aType, aWindow );
-    }
-    return NS_ERROR_FAILURE;
-}
-
-static nsresult
-ActivateWindow(nsIDOMWindowInternal* aWindow)
-{
-    nsCOMPtr<nsPIDOMWindow> window(do_QueryInterface(aWindow));
-    NS_ENSURE_TRUE(window, NS_ERROR_FAILURE);
-    nsCOMPtr<nsIBaseWindow> baseWindow(do_QueryInterface(window->GetDocShell()));
-    NS_ENSURE_TRUE(baseWindow, NS_ERROR_FAILURE);
-    nsCOMPtr<nsIWidget> mainWidget;
-    baseWindow->GetMainWidget(getter_AddRefs(mainWidget));
-    NS_ENSURE_TRUE(mainWidget, NS_ERROR_FAILURE);
-    BWindow *bwindow = (BWindow *)(mainWidget->GetNativeData(NS_NATIVE_WINDOW));
-    if (bwindow)
-        bwindow->Activate(true);
-    return NS_OK;
-}
-//End static helpers
-
-class nsNativeAppSupportBeOS : public nsNativeAppSupportBase
-{
-public:
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSINATIVEAPPSUPPORT
-    static void HandleCommandLine( int32 argc, char **argv, PRUint32 aState);
-}; // nsNativeAppSupportBeOS
-
-
-class nsBeOSApp : public BApplication
-{
-public:
-    nsBeOSApp(sem_id sem) : BApplication( GetAppSig() ), init(sem), mMessage(NULL)
-    {}
-
-  	~nsBeOSApp()
-  	{
-        delete mMessage;
-  	}
-
-    void ReadyToRun() 
-    {
-        release_sem(init);
-    }
-
-    static int32 Main( void *args ) 
-    {
-        nsBeOSApp *app = new nsBeOSApp((sem_id)args);
-        if (app == NULL)
-            return B_ERROR;
-        return app->Run();
-    }
-    
-    void ArgvReceived(int32 argc, char **argv)
-    {
-        if (IsLaunching())
-        {
-#ifdef DC_PROGRAMNAME
-       		TRACE("ArgvReceived Launching\n");
-#endif
-       		return;
-        }
-        PRInt32 aState = /*IsLaunching() ?
-                         nsICommandLine::STATE_INITIAL_LAUNCH :*/
-                         nsICommandLine::STATE_REMOTE_AUTO;
-        nsNativeAppSupportBeOS::HandleCommandLine(argc, argv, aState);
-    }
-
-    void RefsReceived(BMessage* msg)
-    {
-#ifdef DC_PROGRAMNAME
-        TRACE("RefsReceived\n");
-#endif
-        if (IsLaunching())
-        {
-           mMessage = new BMessage(*msg);
-           return;
-        }
-        BPath path;
-        entry_ref er;
-        for (uint32 i = 0; msg->FindRef("refs", i, &er) == B_OK; i++)
-        {
-            int Argc = 2;
-            char **Argv = new char*[ 3 ];
-            BEntry entry(&er, true);
-            BEntry fentry(GetAppFile(), false);
-            entry.GetPath(&path);
-            
-            Argv[0] = strdup( GetAppFile() ? GetAppFile() : "" );
-            Argv[1] = strdup( path.Path() ? path.Path() : "" );
-            // Safety measure
-            Argv[2] = 0;
-            // Is started, call ArgReceived, delete mArgv, else store for future usage
-            // after ::Enable() was called
-            ArgvReceived(2, Argv);
-            Argc = 0;
-            delete [] Argv;
-            Argv = NULL;
-        } 
-    }
-    
-    void MessageReceived(BMessage* msg)
-    {
-        // BMessage from nsNativeAppBeOS::Enable() received.
-        // Services are ready, so we can supply stored refs
-        if (msg->what == 'enbl' && mMessage)
-        {
-#ifdef DC_PROGRAMNAME
-            TRACE("enbl received");
-#endif
-            be_app_messenger.SendMessage(mMessage);
-        }
-        // Processing here file drop events from BWindow
-        // - until we implement native DnD in widget.
-        else if (msg->what == B_SIMPLE_DATA)
-        {
-            RefsReceived(msg);
-        }
-        else
-            BApplication::MessageReceived(msg);
-    }
-private:
-    char *GetAppSig()
-    {
-        image_info info;
-        int32 cookie = 0;
-        BFile file;
-        BAppFileInfo appFileInfo;
-        static char sig[B_MIME_TYPE_LENGTH];
-
-        sig[0] = 0;
-        if (get_next_image_info(0, &cookie, &info) == B_OK &&
-            file.SetTo(info.name, B_READ_ONLY) == B_OK &&
-            appFileInfo.SetTo(&file) == B_OK &&
-            appFileInfo.GetSignature(sig) == B_OK)
-            return sig;
-
-        return "application/x-vnd.Mozilla";
-    }
-    
-    char *GetAppFile()
-    {
-        image_info info;
-        int32 cookie = 0;
-        if (get_next_image_info(0, &cookie, &info) == B_OK && strlen(info.name) > 0)
-            return info.name;
-        
-        return "";
-    }
-
-    sem_id init;
-    BMessage *mMessage;
-}; //class nsBeOSApp
-
-// Create and return an instance of class nsNativeAppSupportBeOS.
-nsresult
-NS_CreateNativeAppSupport(nsINativeAppSupport **aResult)
-{
-    if (!aResult)
-        return NS_ERROR_NULL_POINTER;
-
-    nsNativeAppSupportBeOS *pNative = new nsNativeAppSupportBeOS;
-    if (!pNative)
-        return NS_ERROR_OUT_OF_MEMORY;
-
-    *aResult = pNative;
-    NS_ADDREF(*aResult);
-    return NS_OK;
-}
-
-NS_IMPL_ISUPPORTS1(nsNativeAppSupportBeOS, nsINativeAppSupport)
-
-
-void
-nsNativeAppSupportBeOS::HandleCommandLine(int32 argc, char **argv, PRUint32 aState)
-{
-    nsresult rv;
-    // Here we get stuck when starting from file-click or "OpenWith".
-    // No cmdLine or any other service can be created
-    // To workaround the problem, we store arguments if IsLaunching()
-    // and using this after ::Enable() was called.
-    nsCOMPtr<nsICommandLineRunner> cmdLine(do_CreateInstance("@mozilla.org/toolkit/command-line;1"));
-    if (!cmdLine)
-    {
-#ifdef DC_PROGRAMNAME
-        TRACE("Couldn't create command line!");
-#endif
-        return;
-    }
-   
-    // nsICommandLineRunner::Init() should be called from main mozilla thread
-    // but we are at be_app thread. Using proxy to switch thread
-    nsCOMPtr<nsICommandLineRunner> cmdLineProxy;
-    rv = NS_GetProxyForObject(  NS_PROXY_TO_MAIN_THREAD, NS_GET_IID(nsICommandLineRunner), 
-        cmdLine, NS_PROXY_ASYNC | NS_PROXY_ALWAYS, getter_AddRefs(cmdLineProxy));
-    if (rv != NS_OK)
-    {
-#ifdef DC_PROGRAMNAME
-        TRACE("Couldn't get command line Proxy!");
-#endif
-        return;
-    }
-    
-    // nsICommandLineRunner::Init(,,workingdir,) requires some folder to be provided
-    // but that's unclear if we need it, so using 0 instead atm
-    rv = cmdLine->Init(argc, argv, 0 , aState);
-    if (rv != NS_OK)
-    {
-#ifdef DC_PROGRAMNAME
-        TRACE("Couldn't init command line!");
-#endif
-        return;
-    }
-
-    nsCOMPtr<nsIDOMWindowInternal> navWin;
-    GetMostRecentWindow( NS_LITERAL_STRING( "navigator:browser" ).get(),
-                         getter_AddRefs(navWin ));
-    if (navWin)
-    {
-# ifdef DC_PROGRAMNAME
-        TRACE("GotNavWin!");
-# endif
-        cmdLine->SetWindowContext(navWin);
-    }
-
-// TODO: try to use OpenURI here if there is navWin, maybe using special function
-// OpenBrowserWindow which calls OpenURI like we do  for SeaMonkey, 
-// else let CommandLineRunner to do its work.
-// Problem with current implementation is unsufficient tabbed browsing support
-    cmdLineProxy->Run();
-}
-
-NS_IMETHODIMP
-nsNativeAppSupportBeOS::Start(PRBool *aResult) 
-{
-    NS_ENSURE_ARG(aResult);
-    NS_ENSURE_TRUE(be_app == NULL, NS_ERROR_NOT_INITIALIZED);
-    sem_id initsem = create_sem(0, "Mozilla BApplication init");
-    if (initsem < B_OK)
-        return NS_ERROR_FAILURE;
-    thread_id tid = spawn_thread(nsBeOSApp::Main, "Mozilla XUL BApplication", B_NORMAL_PRIORITY, (void *)initsem);
-#ifdef DC_PROGRAMNAME
-    TRACE("BeApp created");
-#endif
-    *aResult = PR_TRUE;
-    if (tid < B_OK || B_OK != resume_thread(tid))
-        *aResult = PR_FALSE;
-
-    if (B_OK != acquire_sem(initsem))
-        *aResult = PR_FALSE;
-    
-    if (B_OK != delete_sem(initsem))
-        *aResult = PR_FALSE;
-    return *aResult == PR_TRUE ? NS_OK : NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsNativeAppSupportBeOS::Stop(PRBool *aResult) 
-{
-    NS_ENSURE_ARG(aResult);
-    NS_ENSURE_TRUE(be_app, NS_ERROR_NOT_INITIALIZED);
-
-    *aResult = PR_TRUE;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsNativeAppSupportBeOS::Quit() 
-{
-    if (be_app->Lock())
-    {
-        be_app->Quit();
-        return NS_OK;
-    }
-    return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsNativeAppSupportBeOS::ReOpen()
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-nsNativeAppSupportBeOS::Enable()
-{
-    // Informing be_app that UI and services are ready to use.
-    if (be_app)
-    {
-        be_app_messenger.SendMessage('enbl');
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-nsNativeAppSupportBeOS::OnLastWindowClosing()
-{
-    return NS_OK;
-}
--- a/toolkit/xre/nsSigHandlers.cpp
+++ b/toolkit/xre/nsSigHandlers.cpp
@@ -65,25 +65,16 @@
 #include <ucontext.h>
 #endif
 
 #if defined(SOLARIS)
 #include <sys/resource.h>
 #include <ucontext.h>
 #endif
 
-#ifdef XP_BEOS
-#include <be/app/Application.h>
-#include <string.h>
-#include "nsCOMPtr.h"
-#include "nsIServiceManager.h"
-#include "nsIAppStartup.h"
-#include "nsToolkitCompsCID.h"
-#endif
-
 static char _progname[1024] = "huh?";
 static unsigned int _gdb_sleep_duration = 300;
 
 #ifdef MOZ_IPC
 // NB: keep me up to date with the same variable in
 // ipc/chromium/chrome/common/ipc_channel_posix.cc
 static const int kClientChannelFd = 3;
 #endif
@@ -143,36 +134,16 @@ child_ah_crap_handler(int signum)
   if (!getenv("MOZ_DONT_UNBLOCK_PARENT_ON_CHILD_CRASH"))
     close(kClientChannelFd);
   ah_crap_handler(signum);
 }
 #endif
 
 #endif // CRAWL_STACK_ON_SIGSEGV
 
-#ifdef XP_BEOS
-void beos_signal_handler(int signum) {
-#ifdef DEBUG
-	fprintf(stderr, "beos_signal_handler: %d\n", signum);
-#endif
-	nsresult rv;
-	nsCOMPtr<nsIAppStartup> appStartup(do_GetService(NS_APPSTARTUP_CONTRACTID, &rv));
-	if (NS_FAILED(rv)) {
-		// Failed to get the appstartup service so shutdown the hard way
-#ifdef DEBUG
-		fprintf(stderr, "beos_signal_handler: appShell->do_GetService() failed\n");
-#endif
-		exit(13);
-	}
-
-	// Exit the appshell so that the app can shutdown normally
-	appStartup->Quit(nsIAppStartup::eAttemptQuit);
-}
-#endif
-
 #ifdef MOZ_WIDGET_GTK2
 // Need this include for version test below.
 #include <glib.h>
 #endif
 
 #if defined(MOZ_WIDGET_GTK2) && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6))
 
 static GLogFunc orig_log_func = NULL;
@@ -346,20 +317,16 @@ void InstallSignalHandlers(const char *P
 #if defined(DEBUG)
 	    	if (getrlimit(RLIMIT_NOFILE, &rl) == 0)
 		    printf("File descriptors set to %d\n", rl.rlim_cur);
 #endif //DEBUG
 	    }
     }
 #endif //SOLARIS
 
-#ifdef XP_BEOS
-	signal(SIGTERM, beos_signal_handler);
-#endif
-
 #if defined(MOZ_WIDGET_GTK2) && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6))
   const char *assertString = PR_GetEnv("XPCOM_DEBUG_BREAK");
   if (assertString &&
       (!strcmp(assertString, "suspend") ||
        !strcmp(assertString, "stack") ||
        !strcmp(assertString, "abort") ||
        !strcmp(assertString, "trap") ||
        !strcmp(assertString, "break"))) {
--- a/toolkit/xre/nsUpdateDriver.cpp
+++ b/toolkit/xre/nsUpdateDriver.cpp
@@ -64,17 +64,17 @@
 # include <process.h>
 # include <windows.h>
 # define getcwd(path, size) _getcwd(path, size)
 # define getpid() GetCurrentProcessId()
 #elif defined(XP_OS2)
 # include <unistd.h>
 # define INCL_DOSFILEMGR
 # include <os2.h>
-#elif defined(XP_UNIX) || defined(XP_BEOS)
+#elif defined(XP_UNIX)
 # include <unistd.h>
 #endif
 
 //
 // We use execv to spawn the updater process on all UNIX systems except Mac OSX
 // since it is known to cause problems on the Mac.  Windows has execv, but it
 // is a faked implementation that doesn't really replace the current process.
 // Instead it spawns a new process, so we gain nothing from using execv on
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -73,20 +73,16 @@
 
 #ifdef XP_WIN
 #include <windows.h>
 #include <shlobj.h>
 #endif
 #ifdef XP_MACOSX
 #include "nsILocalFileMac.h"
 #endif
-#ifdef XP_BEOS
-#include <be/kernel/image.h>
-#include <FindDirectory.h>
-#endif
 #ifdef XP_UNIX
 #include <ctype.h>
 #endif
 #ifdef XP_OS2
 #define INCL_DOS
 #include <os2.h>
 #endif
 
@@ -1090,27 +1086,16 @@ nsXREDirProvider::GetUserDataDirectoryHo
     PTIB ptib;
     char appDir[CCHMAXPATH];
 
     DosGetInfoBlocks(&ptib, &ppib);
     DosQueryModuleName(ppib->pib_hmte, CCHMAXPATH, appDir);
     *strrchr(appDir, '\\') = '\0';
     rv = NS_NewNativeLocalFile(nsDependentCString(appDir), PR_TRUE, getter_AddRefs(localDir));
   }
-#elif defined(XP_BEOS)
-  char appDir[MAXPATHLEN];
-  if (find_directory(B_USER_SETTINGS_DIRECTORY, NULL, true, appDir, MAXPATHLEN))
-    return NS_ERROR_FAILURE;
-
-  int len = strlen(appDir);
-  appDir[len]   = '/';
-  appDir[len+1] = '\0';
-
-  rv = NS_NewNativeLocalFile(nsDependentCString(appDir), PR_TRUE,
-                             getter_AddRefs(localDir));
 #elif defined(XP_UNIX)
   const char* homeDir = getenv("HOME");
   if (!homeDir || !*homeDir)
     return NS_ERROR_FAILURE;
 
   rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), PR_TRUE,
                              getter_AddRefs(localDir));
 #else
@@ -1277,17 +1262,17 @@ nsXREDirProvider::GetProfileDefaultsDir(
 
 nsresult
 nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile)
 {
   NS_ASSERTION(aFile, "Null pointer!");
 
   nsresult rv;
 
-#if defined (XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined (XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2)
 
   static const char* const sXR = "Mozilla";
   rv = aFile->AppendNative(nsDependentCString(sXR));
   NS_ENSURE_SUCCESS(rv, rv);
 
   static const char* const sExtensions = "Extensions";
   rv = aFile->AppendNative(nsDependentCString(sExtensions));
   NS_ENSURE_SUCCESS(rv, rv);
@@ -1326,17 +1311,17 @@ nsXREDirProvider::AppendProfilePath(nsIF
   else {
     // Note that MacOS ignores the vendor when creating the profile hierarchy -
     // all application preferences directories live alongside one another in
     // ~/Library/Application Support/
     rv = aFile->AppendNative(nsDependentCString(gAppData->name));
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
-#elif defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS)
+#elif defined(XP_WIN) || defined(XP_OS2)
   if (gAppData->profile) {
     rv = AppendProfileString(aFile, gAppData->profile);
   }
   else {
     if (gAppData->vendor) {
       rv = aFile->AppendNative(nsDependentCString(gAppData->vendor));
       NS_ENSURE_SUCCESS(rv, rv);
     }
--- a/uriloader/exthandler/Makefile.in
+++ b/uriloader/exthandler/Makefile.in
@@ -52,19 +52,16 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 OSDIR		= os2
 else
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 OSDIR		= win
 else
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 OSDIR		= mac
 else
-ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-OSDIR		= beos
-else
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 OSDIR		= android
 else
 OSDIR		= unix
 endif
 endif
 endif
 endif
@@ -112,20 +109,16 @@ OSHELPER += nsExternalURLHandlerService.
 EXPORTS += nsExternalURLHandlerService.h
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
 OSHELPER += nsGNOMERegistry.cpp
 OSHELPER += nsMIMEInfoUnix.cpp
 endif
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-OSHELPER  += nsMIMEInfoBeOS.cpp
-endif
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 OSHELPER  += nsMIMEInfoWin.cpp
 LOCAL_INCLUDES += -I$(srcdir)/win
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 OSHELPER  += nsMIMEInfoOS2.cpp
 endif
deleted file mode 100644
--- a/uriloader/exthandler/beos/nsMIMEInfoBeOS.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* ***** 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 nsOSHelperAppService.cpp. 
- * 
- * The Initial Developer of the Original Code is 
- * Paul Ashford. 
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved. 
- * 
- * Contributor(s): 
- *    Christian Biesinger <cbiesinger@web.de>
- * 
- * 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 "nsMIMEInfoBeOS.h"
-#include "nsILocalFile.h"
-
-nsMIMEInfoBeOS::~nsMIMEInfoBeOS()
-{
-}
-
-nsresult
-nsMIMEInfoBeOS::LaunchDefaultWithFile(nsIFile* aFile)
-{
-  // Launch the file, unless it is an executable.
-  nsCOMPtr<nsILocalFile> local(do_QueryInterface(aFile));
-  if (!local)
-    return NS_ERROR_FAILURE;
-
-  PRBool executable = PR_TRUE;
-  local->IsExecutable(&executable);
-  if (executable)
-    return NS_ERROR_FAILURE;
-
-  return local->Launch();
-}
-
-nsresult
-nsMIMEInfoBeOS::LoadUriInternal(nsIURI * aURL)
-{
-	nsresult rv = NS_OK;
-
-	if (aURL) {
-		// Get the Protocol
-		nsCAutoString scheme;
-		aURL->GetScheme(scheme);
-		BString protoStr(scheme.get());
-		protoStr.Prepend("application/x-vnd.Be.URL.");
-		// Get the Spec
-		nsCAutoString spec;
-		aURL->GetAsciiSpec(spec);
-		const char* args[] = { spec.get() };
-		
-		//Launch the app		
-		BMimeType protocol;
-		bool isInstalled = false;
-		if (protocol.SetTo(protoStr.String()) == B_OK)
-		{
-			if(protocol.IsInstalled())
-			{
-				isInstalled = true;	
-				be_roster->Launch(protoStr.String(), NS_ARRAY_LENGTH(args), (char **)args);
-			}
-		}
-		if ((!isInstalled) && (!strcmp("mailto", scheme.get())))
-			be_roster->Launch("text/x-email", NS_ARRAY_LENGTH(args), (char **)args);
-	}
-	return rv;
-}
deleted file mode 100644
--- a/uriloader/exthandler/beos/nsMIMEInfoBeOS.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ***** 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 the BeOS MIME Info Implementation.
- *
- * The Initial Developer of the Original Code is
- * Christian Biesinger <cbiesinger@web.de>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 ***** */
-
-#ifndef nsMIMEInfoBeOS_h_
-#define nsMIMEInfoBeOS_h_
-
-#include "nsMIMEInfoImpl.h"
-
-class nsMIMEInfoBeOS : public nsMIMEInfoImpl {
-  public:
-    nsMIMEInfoBeOS(const char* aType = "") : nsMIMEInfoImpl(aType) {}
-    nsMIMEInfoBeOS(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {}
-    nsMIMEInfoBeOS(const nsACString& aType, HandlerClass aClass) :
-      nsMIMEInfoImpl(aType, aClass) {}
-    virtual ~nsMIMEInfoBeOS();
-
-  protected:
-    virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile);
-    virtual NS_HIDDEN_(nsresult) LoadUriInternal(nsIURI *aURI);
-};
-
-#endif
deleted file mode 100644
--- a/uriloader/exthandler/beos/nsOSHelperAppService.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-/* ***** 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 nsOSHelperAppService.cpp. 
- * 
- * The Initial Developer of the Original Code is 
- * Paul Ashford. 
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved. 
- * 
- * Contributor(s): 
- * 
- * 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 "nsOSHelperAppService.h"
-#include "nsMIMEInfoBeOS.h"
-#include "nsISupports.h"
-#include "nsString.h"
-#include "nsXPIDLString.h"
-#include "nsIURL.h"
-#include "nsILocalFile.h"
-#include "nsIProcess.h"
-#include "prenv.h"      // for PR_GetEnv()
-#include <stdlib.h>		// for system()
-
-#include <Message.h>
-#include <Mime.h>
-#include <String.h>
-#include <Path.h>
-#include <Entry.h>
-#include <Roster.h>
-
-#define LOG(args) PR_LOG(mLog, PR_LOG_DEBUG, args)
-#define LOG_ENABLED() PR_LOG_TEST(mLog, PR_LOG_DEBUG)
-
-nsOSHelperAppService::nsOSHelperAppService() : nsExternalHelperAppService()
-{
-}
-
-nsOSHelperAppService::~nsOSHelperAppService()
-{}
-
-nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolScheme, PRBool * aHandlerExists)
-{
-	LOG(("-- nsOSHelperAppService::OSProtocolHandlerExists for '%s'\n",
-	     aProtocolScheme));
-	// look up the protocol scheme in the MIME database
-	*aHandlerExists = PR_FALSE;
-	if (aProtocolScheme && *aProtocolScheme)
-	{
-		BString protoStr(aProtocolScheme);
-		protoStr.Prepend("application/x-vnd.Be.URL.");
-		BMimeType protocol;
-		if (protocol.SetTo(protoStr.String()) == B_OK)
-		{
-			if (protocol.IsInstalled())
-				*aHandlerExists = PR_TRUE;
-		}
-		if ((!*aHandlerExists) && (!strcmp("mailto", aProtocolScheme)))
-		{
-			// mailto link, no x-vnd.Be.URL.mailto entry
-			if (protocol.SetTo("text/x-email") == B_OK)
-			{
-				if (protocol.IsInstalled())
-					*aHandlerExists = PR_TRUE;
-			}
-		}
-	}
-
-	return NS_OK;
-}
-
-
-nsresult nsOSHelperAppService::SetMIMEInfoForType(const char *aMIMEType, nsMIMEInfoBeOS**_retval) {
-
-	LOG(("-- nsOSHelperAppService::SetMIMEInfoForType: %s\n",aMIMEType));
-
-	nsresult rv = NS_ERROR_FAILURE;
-
-	nsMIMEInfoBeOS* mimeInfo = new nsMIMEInfoBeOS(aMIMEType);
-	if (mimeInfo) {
-		NS_ADDREF(mimeInfo);
-		BMimeType mimeType(aMIMEType);
-		BMessage data;
-		int32 index = 0;
-		BString strData;
-		LOG(("   Adding extensions:\n"));
-		if (mimeType.GetFileExtensions(&data) == B_OK) {
-			while (data.FindString("extensions",index,&strData) == B_OK) {
-				// if the file extension includes the '.' then we don't want to include that when we append
-				// it to the mime info object.
-				if (strData.ByteAt(0) == '.')
-					strData.RemoveFirst(".");
-				mimeInfo->AppendExtension(nsDependentCString(strData.String()));
-				LOG(("      %s\n",strData.String()));
-				index++;
-			}
-		}
-
-		char desc[B_MIME_TYPE_LENGTH + 1];
-		if (mimeType.GetShortDescription(desc) == B_OK) {
-			mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(desc));
-		} else {
-			if (mimeType.GetLongDescription(desc) == B_OK) {
-				mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(desc));
-			} else {
-				mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(aMIMEType));
-			}
-		}
-		
-		LOG(("    Description: %s\n",desc));
-
-		//set preferred app and app description
-		char appSig[B_MIME_TYPE_LENGTH + 1];
-		bool doSave = true;
-		if (mimeType.GetPreferredApp(appSig) == B_OK) {
-			LOG(("    Got preferred ap\n"));
-			BMimeType app(appSig);
-			entry_ref ref;
-			BEntry entry;
-			BPath path;
-			if ((app.GetAppHint(&ref) == B_OK) &&
-			        (entry.SetTo(&ref, false) == B_OK) &&
-			        (entry.GetPath(&path) == B_OK)) {
-
-				LOG(("    Got our path!\n"));
-				nsCOMPtr<nsIFile> handlerFile;
-				rv = GetFileTokenForPath(NS_ConvertUTF8toUTF16(path.Path()).get(), getter_AddRefs(handlerFile));
-
-				if (NS_SUCCEEDED(rv)) {
-					mimeInfo->SetDefaultApplication(handlerFile);
-					mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault);
-					mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(path.Leaf()));
-					LOG(("    Preferred App: %s\n",path.Leaf()));
-					doSave = false;
-				}
-			}
-		}
-		if (doSave) {
-			mimeInfo->SetPreferredAction(nsIMIMEInfo::saveToDisk);
-			LOG(("    No Preferred App\n"));
-		}
-
-		*_retval = mimeInfo;
-		rv = NS_OK;
-	}
-	else
-		rv = NS_ERROR_FAILURE;
-
-	return rv;
-}
-
-nsresult nsOSHelperAppService::GetMimeInfoFromExtension(const char *aFileExt,
-        nsMIMEInfoBeOS ** _retval) {
-	// if the extension is null, return immediately
-	if (!aFileExt || !*aFileExt)
-		return NS_ERROR_INVALID_ARG;
-
-	LOG(("Here we do an extension lookup for '%s'\n", aFileExt));
-
-	BMimeType mimeType;
-
-	if (BMimeType::GuessMimeType(aFileExt, &mimeType)  == B_OK)
-		return SetMIMEInfoForType(mimeType.Type(), _retval);
-
-	// Extension not found
-	return NS_ERROR_FAILURE;
-}
-
-nsresult nsOSHelperAppService::GetMimeInfoFromMIMEType(const char *aMIMEType,
-        nsMIMEInfoBeOS ** _retval) {
-	// if the mime type is null, return immediately
-	if (!aMIMEType || !*aMIMEType)
-		return NS_ERROR_INVALID_ARG;
-
-	LOG(("Here we do a mimetype lookup for '%s'\n", aMIMEType));
-	
-	BMimeType mimeType(aMIMEType);
-	if (mimeType.IsInstalled())
-		return SetMIMEInfoForType(aMIMEType, _retval);
-	
-	return NS_ERROR_FAILURE;
-}
-
-already_AddRefed<nsIMIMEInfo>
-nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aMIMEType, const nsACString& aFileExt, PRBool* aFound)
-{
-  *aFound = PR_TRUE;
-  nsMIMEInfoBeOS* mi = nsnull;
-  const nsCString& flatType = PromiseFlatCString(aMIMEType);
-  const nsCString& flatExt = PromiseFlatCString(aFileExt);
-  GetMimeInfoFromMIMEType(flatType.get(), &mi);
-  if (mi)
-    return mi;
-
-  GetMimeInfoFromExtension(flatExt.get(), &mi);
-  if (mi && !aMIMEType.IsEmpty())
-    mi->SetMIMEType(aMIMEType);
-  if (mi)
-    return mi;
-
-  *aFound = PR_FALSE;
-  mi = new nsMIMEInfoBeOS(flatType);
-  if (!mi)
-    return nsnull;
-  NS_ADDREF(mi);
-  if (!aFileExt.IsEmpty())
-    mi->AppendExtension(aFileExt);
-
-  return mi;
-}
-
-NS_IMETHODIMP
-nsOSHelperAppService::GetProtocolHandlerInfoFromOS(const nsACString &aScheme,
-                                                   PRBool *found,
-                                                   nsIHandlerInfo **_retval)
-{
-  NS_ASSERTION(!aScheme.IsEmpty(), "No scheme was specified!");
-
-  nsresult rv = OSProtocolHandlerExists(nsPromiseFlatCString(aScheme).get(),
-                                        found);
-  if (NS_FAILED(rv))
-    return rv;
-
-  nsMIMEInfoBeOS *handlerInfo =
-	new nsMIMEInfoBeOS(aScheme, nsMIMEInfoBase::eProtocolInfo);
-  NS_ENSURE_TRUE(handlerInfo, NS_ERROR_OUT_OF_MEMORY);
-  NS_ADDREF(*_retval = handlerInfo);
-
-  if (!*found) {
-    // Code that calls this requires an object regardless if the OS has
-    // something for us, so we return the empty object.
-    return rv;
-  }
-
-  nsAutoString desc;
-  GetApplicationDescription(aScheme, desc);
-  handlerInfo->SetDefaultDescription(desc);
-
-  return rv;
-}
-
deleted file mode 100644
--- a/uriloader/exthandler/beos/nsOSHelperAppService.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ***** 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 nsOSHelperAppService.h. 
- * 
- * The Initial Developer of the Original Code is 
- * Paul Ashford. 
- * Portions created by the Initial Developer are Copyright (C) 2002 
- * the Initial Developer. All Rights Reserved. 
- * 
- * Contributor(s): 
- * 
- * 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 ***** */ 
-
-#ifndef nsOSHelperAppService_h__
-#define nsOSHelperAppService_h__
-
-// The OS helper app service is a subclass of nsExternalHelperAppService and is implemented on each
-// platform. It contains platform specific code for finding helper applications for a given mime type
-// in addition to launching those applications.
-
-#include "nsExternalHelperAppService.h"
-#include "nsCExternalHandlerService.h"
-#include "nsMIMEInfoImpl.h"
-#include "nsCOMPtr.h"
-
-class nsMIMEInfoBeOS;
-
-class nsOSHelperAppService : public nsExternalHelperAppService
-{
-public:
-	nsOSHelperAppService();
-	virtual ~nsOSHelperAppService();
-
-	already_AddRefed<nsIMIMEInfo> GetMIMEInfoFromOS(const nsACString& aMIMEType, const nsACString& aFileExt, PRBool *aFound);
-	NS_IMETHOD GetProtocolHandlerInfoFromOS(const nsACString &aScheme,
-	                                        PRBool *found,
-	                                        nsIHandlerInfo **_retval);
-
-	// override nsIExternalProtocolService methods
-	nsresult OSProtocolHandlerExists(const char * aProtocolScheme, PRBool * aHandlerExists);
-
-protected:
-	nsresult SetMIMEInfoForType(const char *aMIMEType, nsMIMEInfoBeOS **_retval);
-	nsresult GetMimeInfoFromExtension(const char *aFileExt, nsMIMEInfoBeOS **_retval);
-	nsresult GetMimeInfoFromMIMEType(const char *aMIMEType, nsMIMEInfoBeOS **_retval);
-};
-
-#endif // nsOSHelperAppService_h__
--- a/widget/public/Makefile.in
+++ b/widget/public/Makefile.in
@@ -73,20 +73,16 @@ EXPORTS		+= \
 		nsIPrintDialogService.h \
 		$(NULL)
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 EXPORTS		+= nsIDragSessionOS2.h
 endif
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-EXPORTS		+= nsIDragSessionBeOS.h
-endif
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 EXPORTS		+= \
 		nsIPrintDialogService.h \
 		$(NULL)
 endif
 
 ifneq (,$(filter qt gtk2,$(MOZ_WIDGET_TOOLKIT)))
 EXPORTS		+= \
deleted file mode 100644
--- a/widget/public/nsIDragSessionBeOS.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* ***** 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 nsMime.cpp for the BeOS port of Mozilla.
- *
- * The Initial Developer of the Original Code is
- * Paul Ashford.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Paul Ashford <arougthopher@lizardland.net>
- *   Fredrik Holmqvist <thesuckiestemail@yahoo.se>
- *
- * 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 ***** */
-
-#ifndef nsIDragSessionBeOS_h__
-#define nsIDragSessionBeOS_h__
-
-
-#include "nsISupports.h"
-
-#include <Message.h>
-
-
-#define NS_IDRAGSESSIONBEOS_IID      \
-{ 0x36c4c381, 0x09e3, 0x11d4, { 0xb0, 0x33, 0xa4, 0x20, 0xf4, 0x2c, 0xfd, 0x7c } };
-
-class nsIDragSessionBeOS : public nsISupports
-{
-  public:
-    NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDRAGSESSIONBEOS_IID)
-    NS_IMETHOD TransmitData( BMessage *aNegotiationReply) = 0;  
-    NS_IMETHOD UpdateDragMessageIfNeeded(BMessage *aDragMessage) = 0;
-};
-
-NS_DEFINE_STATIC_IID_ACCESSOR(nsIDragSessionBeOS, NS_IDRAGSESSIONBEOS_IID)
-
-#endif
--- a/widget/src/Makefile.in
+++ b/widget/src/Makefile.in
@@ -41,17 +41,17 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE  = widget
 
 DIRS		= shared xpwidgets
 
-ifneq (,$(filter beos os2 cocoa qt android,$(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter os2 cocoa qt android,$(MOZ_WIDGET_TOOLKIT)))
 DIRS		+= $(MOZ_WIDGET_TOOLKIT)
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 DIRS		+= windows build
 endif
 
 #
deleted file mode 100644
--- a/widget/src/beos/Makefile.in
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# ***** 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):
-#
-# 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 *****
-
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= widget
-LIBRARY_NAME	= widget_beos
-EXPORT_LIBRARY	= 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsWidgetBeOSModule
-GRE_MODULE	= 1
-LIBXUL_LIBRARY = 1
-
-
-CPPSRCS		= \
-		nsAppShell.cpp \
-		nsBidiKeyboard.cpp \
-		nsClipboard.cpp \
-		nsDragService.cpp \
-		nsFilePicker.cpp \
-		nsLookAndFeel.cpp \
-		nsSound.cpp \
-		nsToolkit.cpp \
-		nsWidgetFactory.cpp \
-		nsWindow.cpp \
-		nsPopupWindow.cpp \
-		nsChildView.cpp \
-		nsScreenBeOS.cpp \
-		nsScreenManagerBeOS.cpp \
-		nsDeviceContextSpecB.cpp \
-		nsPrintOptionsBeOS.cpp \
-		$(NULL)
-
-SHARED_LIBRARY_LIBS = $(DIST)/lib/libxpwidgets_s.a
-
-EXTRA_DSO_LDOPTS = \
-		-ltracker \
-		-lgame \
-		$(TOOLKIT_DSO_LDOPTS) \
-		$(MOZ_COMPONENT_LIBS) \
-		-lgkgfx \
-		$(TK_LIBS) \
-		-lthebes \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
-DEFINES		+= -D_IMPL_NS_WIDGET -I$(srcdir)/../xpwidgets -I$(srcdir)
-
-CXXFLAGS	+= $(TK_CFLAGS)
-
-INCLUDES += \
-		-I$(srcdir)/../xpwidgets \
-		-I$(srcdir) \
-		$(NULL)
deleted file mode 100644
--- a/widget/src/beos/nsAppShell.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
-/* ***** 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):
- *   Duncan Wilcox <duncan@be.com>
- *   Yannick Koehler <ykoehler@mythrium.com>
- *   Makoto Hamanaka <VYA04230@nifty.com>
- *   Fredrik Holmqvist <thesuckiestemail@yahoo.se>
- *   Sergei Dolgov <sergei_d@fi.tartu.ee>
- *
- * 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 "nsAppShell.h"
-#include "nsSwitchToUIThread.h"
-#include "prprf.h"
-
-#include <Application.h>
-#include <stdlib.h>
-
-//-------------------------------------------------------------------------
-//
-// nsAppShell constructor
-//
-//-------------------------------------------------------------------------
-nsAppShell::nsAppShell()  
-	: is_port_error(false), scheduled (false)
-{ 
-	eventport = -1; // 0 is legal value for port_id!
-}
-
-
-//-------------------------------------------------------------------------
-//
-// Create the application shell
-//
-//-------------------------------------------------------------------------
-
-NS_IMETHODIMP nsAppShell::Init()
-{
-	// system wide unique names
-	// NOTE: this needs to be run from within the main application thread
-	
-	char portname[B_OS_NAME_LENGTH];
-	PR_snprintf(portname, sizeof(portname), "event%lx", (long unsigned) PR_GetCurrentThread());
-             
-#ifdef DEBUG              
-	printf("nsAppShell::Create portname: %s\n", portname);
-#endif
-
-	// Clean up things. Restart process in toolkit may leave old port alive.
-	if ((eventport = find_port(portname)) >= 0)
-	{
-		close_port(eventport);
-		delete_port(eventport);
-	}
-		
-	eventport = create_port(200, portname);
-	return nsBaseAppShell::Init();
-}
-
-
-
-//-------------------------------------------------------------------------
-//
-// nsAppShell destructor
-//
-//-------------------------------------------------------------------------
-nsAppShell::~nsAppShell()
-{
-	close_port(eventport);
-	delete_port(eventport);
-
-	if (be_app->Lock())
-	{
-		be_app->Quit();
-	}
-}
-
-PRBool nsAppShell::ProcessNextNativeEvent(PRBool mayWait)
-{
-	bool gotMessage = false;
-
-	// should we check for eventport initialization ?
-	if (eventport < 0)
-	{
-		char  portname[B_OS_NAME_LENGTH];	
-		PR_snprintf(portname, sizeof(portname), "event%lx", (long unsigned) PR_GetCurrentThread());
-		// XXX - Do we really need to search eventport every time? There is one istance of AppShell per app
-		// and finding it once in Init() might be sufficient.
-		if((eventport = find_port(portname)) < 0)
-		{
-			// not initialized
-#ifdef DEBUG
-			printf("nsAppShell::DispatchNativeEvent() was called before init\n");
-#endif
-			return gotMessage;
-		}
-	}
-	
-	// Currently we ignoring event type, previously we had 5 priority levels, different for mouse, kbd etc.
-	// MS Windows code sets some priority for kbd and IME events by ignoring mayWait
-
-	if (port_count(eventport))
-		gotMessage = InvokeBeOSMessage(0);
-
-	// There is next message in port queue
-	if (port_count(eventport) && !mayWait)
-	{
-		if (!scheduled)
-		{
-			// There is new (not scheduled) event and we cannot wait.
-			// So inform AppShell about existence of new event.
-			// Actually it should be called from something like BLooper::MessageReceived(),
-			// or, in our case, in nsToolkit CallMethod*() 
-			NativeEventCallback();
-		}
-		else
-		{
-			scheduled = false;
-			gotMessage = InvokeBeOSMessage(0);
-		}
-	}
-	// Hack. Emulating logic for mayWait.
-	// Allow next event to pass through (if it appears inside 100000 uS)
-	// Actually it should block and then be unblocked from independent thread
-	// In that case read_port() should be used.
-	if (mayWait)
-		gotMessage = InvokeBeOSMessage(100000);
-	return gotMessage;
-}
-//-------------------------------------------------------------------------
-
-void nsAppShell::ScheduleNativeEventCallback()
-{
-	if (eventport < 0)
-		return;
-	port_info portinfo;
-	if (get_port_info(eventport, &portinfo) != B_OK)
-		return;
-	if (port_count(eventport) < portinfo.capacity - 20)
-	{
-		// This should be done from different thread in reality in order to unblock
-		ThreadInterfaceData id;
-		id.data = 0;
-		id.waitingThread = find_thread(NULL);
-		write_port_etc(eventport, 'natv', &id, sizeof(id), B_TIMEOUT, 1000000);
-		scheduled = true;
-	}
-}
-
-bool nsAppShell::InvokeBeOSMessage(bigtime_t timeout)
-{
-	int32 code;
-	ThreadInterfaceData id;
-	if (read_port_etc(eventport, &code, &id, sizeof(id), B_TIMEOUT, timeout) < 0)
-	{
-		is_port_error = true;
-		return false;
-	}
-
-	id.waitingThread = 0; 
-	MethodInfo *mInfo = (MethodInfo *)id.data;
-	if (code != 'natv')
-		mInfo->Invoke();
-
-	if (id.waitingThread != 0)
-		resume_thread(id.waitingThread);
-	delete mInfo;
-	return true;
-}
\ No newline at end of file
deleted file mode 100644
--- a/widget/src/beos/nsAppShell.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
-/* ***** 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):
- *   Sergei Dolgov <sergei_d@fi.tartu.ee>
- *
- * 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 ***** */
-
-#ifndef nsAppShell_h__
-#define nsAppShell_h__
-
-#include "nsBaseAppShell.h"
-#include <OS.h>
-
-struct ThreadInterfaceData
-{
-	void*     data;
-	thread_id waitingThread;
-};
-
-struct EventItem
-{
-	int32               code;
-	ThreadInterfaceData ifdata;
-};
-
-struct MethodInfo;
-
-/**
- * Native BeOS Application shell wrapper
- */
-
-class nsAppShell : public nsBaseAppShell
-{
-  public:
-	nsAppShell();
-	nsresult        Init();
-protected:
-	virtual void    ScheduleNativeEventCallback();
-	virtual PRBool  ProcessNextNativeEvent(PRBool mayWait);
-	virtual        ~nsAppShell();
-
-private:
-	port_id	       eventport;
-	volatile bool  scheduled;
-	bool           is_port_error;
-	bool           InvokeBeOSMessage(bigtime_t timeout);    
-};
-
-#endif // nsAppShell_h__
deleted file mode 100644
--- a/widget/src/beos/nsBeOSCursors.h
+++ /dev/null
@@ -1,246 +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):
- *   Yannick Koehler <koehler@mythrium.com>
- *   Paul Ashford <arougthopher@lizardland.net>
- *
- * 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 ***** */
- 
-#ifndef nsBeOSCursors_h__
-#define nsBeOSCursors_h__
-
-#include <app/Cursor.h>
-
-
-static unsigned char cursorHyperlink[] = {16,1,2,2,
-0,0,0,0,56,0,36,0,36,0,19,224,18,92,9,42,
-8,1,60,33,76,113,66,113,48,249,12,249,2,0,1,0,
-0,0,0,0,56,0,60,0,60,0,31,224,31,252,15,254,
-15,255,63,255,127,255,127,255,63,255,15,255,3,254,1,248
-};
-
-static unsigned char cursorHelp[] = {16,1,2,2,
-0,0,0,0,56,0,36,0,36,0,19,224,18,92,9,42,
-8,1,60,121,76,205,66,25,48,49,12,49,2,0,1,48,
-0,0,0,0,56,0,60,0,60,0,31,224,31,252,15,254,
-15,255,63,255,127,255,127,255,63,255,15,255,3,254,1,248
-};
-
-static unsigned char cursorCrosshair[] = {16,1,8,8,
-0,0,0,128,0,128,0,128,0,128,0,128,0,128,0,128,
-127,255,0,128,0,128,0,128,0,128,0,128,0,128,0,128,
-0,0,0,128,0,128,0,128,0,128,0,128,0,128,0,128,
-127,255,0,128,0,128,0,128,0,128,0,128,0,128,0,128
-};
-
-static unsigned char cursorCopy[] = {16,1,2,2,
-0,0,0,0,56,0,36,0,36,0,19,224,18,92,9,42,
-8,1,60,1,76,1,66,17,48,17,12,125,2,17,1,16,
-0,0,0,0,56,0,60,0,60,0,31,224,31,252,15,254,
-15,255,63,255,127,255,127,255,63,255,15,255,3,255,1,248
-};
-
-static unsigned char cursorAlias[] = {16,1,2,2,
-0,0,0,0,56,0,36,0,36,0,19,224,18,92,9,42,
-8,1,60,1,76,113,66,137,48,157,12,137,2,65,1,0,
-0,0,0,0,56,0,60,0,60,0,31,224,31,252,15,254,
-15,255,63,255,127,255,127,255,63,255,15,255,3,255,1,248
-};
-
-static unsigned char cursorGrabbing[] = {16,1,8,2,
-0,0,0,0,0,0,0,0,15,224,18,92,33,42,40,1,
-60,1,20,1,18,1,8,1,4,1,2,1,1,0,0,128,
-0,0,0,0,0,0,0,0,15,224,31,252,63,254,63,255,
-63,255,31,255,31,255,15,255,7,255,3,255,1,254,0,248
-};
-
-static unsigned char cursorGrab[] = {16,1,2,2,
-0,0,0,0,59,64,36,168,36,148,18,74,18,74,9,37,
-8,1,60,1,76,1,68,1,48,1,12,1,2,0,1,0,
-0,0,0,0,59,64,63,232,63,252,31,254,31,254,15,255,
-15,255,63,255,127,255,127,255,63,255,15,255,3,254,1,248
-};
-  
-static unsigned char cursorLowerRight[] = {16,1,13,13,
-0,0,0,0,0,0,0,0,0,0,4,6,2,38,1,38,
-0,166,0,102,3,230,0,6,0,6,7,254,7,254,0,0,
-0,0,0,0,0,0,0,0,4,15,14,127,7,127,3,255,
-1,255,7,255,7,255,7,255,15,255,15,255,15,255,15,255
-};
-
-static unsigned char cursorLowerLeft[] = {16,1,13,2,
-0,0,0,0,0,0,0,0,0,0,96,32,100,64,100,128,
-101,0,102,0,103,192,96,0,96,0,127,224,127,224,0,0,
-0,0,0,0,0,0,0,0,240,32,254,112,254,224,255,192,
-255,128,255,224,255,224,255,224,255,240,255,240,255,240,255,240
-};
-
-static unsigned char cursorUpperLeft[] = {16,1,2,2,
-0,0,127,224,127,224,96,0,96,0,103,192,102,0,101,0,
-100,128,100,64,96,32,0,0,0,0,0,0,0,0,0,0,
-255,240,255,240,255,240,255,240,255,224,255,224,255,224,255,128,
-255,192,254,224,254,112,240,32,0,0,0,0,0,0,0,0
-};
-
-static unsigned char cursorUpperRight[] = {16,1,2,13,
-0,0,7,254,7,254,0,6,0,6,3,230,0,102,0,166,
-1,38,2,38,4,6,0,0,0,0,0,0,0,0,0,0,
-15,255,15,255,15,255,15,255,7,255,7,255,7,255,1,255,
-3,255,7,127,14,127,4,15,0,0,0,0,0,0,0,0
-};
-
-static unsigned char cursorRight[] = {16,1,6,13,
-0,0,0,6,0,6,1,6,0,134,0,70,15,230,0,70,
-0,134,1,6,0,6,0,6,0,0,0,0,0,0,0,0,
-0,15,0,15,1,15,3,143,1,207,31,239,31,255,31,239,
-1,207,3,143,1,15,0,15,0,15,0,0,0,0,0,0
-};
-
-static unsigned char cursorLeft[] = {16,1,6,2,
-0,0,96,0,96,0,96,128,97,0,98,0,103,224,98,0,
-97,0,96,128,96,0,96,0,0,0,0,0,0,0,0,0,
-240,0,240,0,240,128,241,192,243,128,247,240,255,240,247,240,
-243,128,241,192,240,128,240,0,240,0,0,0,0,0,0,0
-};
-
-static unsigned char cursorTop[] = {16,1,2,7,
-0,0,63,248,63,248,0,0,0,0,1,0,3,128,5,64,
-9,32,1,0,1,0,0,0,0,0,0,0,0,0,0,0,
-127,252,127,252,127,252,127,252,1,0,3,128,7,192,15,224,
-31,240,11,160,3,128,3,128,0,0,0,0,0,0,0,0
-};
-
-static unsigned char cursorBottom[] = {16,1,13,7,
-0,0,0,0,0,0,0,0,0,0,1,0,1,0,9,32,
-5,64,3,128,1,0,0,0,0,0,63,248,63,248,0,0,
-0,0,0,0,0,0,0,0,3,128,3,128,11,160,31,240,
-15,224,7,192,3,128,1,0,127,252,127,252,127,252,127,252
-};
-
-static unsigned char cursorHorizontalDrag[] = {16,1,7,7,
-1,128,1,128,1,128,1,128,1,128,17,136,49,140,125,190,
-125,190,49,140,17,136,1,128,1,128,1,128,1,128,1,128,
-3,192,3,192,3,192,3,192,27,216,59,220,127,254,255,255,
-255,255,127,254,59,220,27,216,3,192,3,192,3,192,3,192
-};
-
-static unsigned char cursorVerticalDrag[] = {16,1,7,7,
-0,0,1,128,3,192,7,224,1,128,1,128,0,0,255,255,
-255,255,0,0,1,128,1,128,7,224,3,192,1,128,0,0,
-1,128,3,192,7,224,15,240,15,240,3,192,255,255,255,255,
-255,255,255,255,3,192,15,240,15,240,7,224,3,192,1,128
-};
-
-static unsigned char cursorCell[] = {16,1,2,2,
-0,0,0,0,56,0,36,0,36,0,19,224,18,92,9,42,
-8,1,60,49,76,49,66,205,48,205,12,49,2,49,1,0,
-0,0,0,0,56,0,60,0,60,0,31,224,31,252,15,254,
-15,255,63,255,127,255,127,255,63,255,15,255,3,255,1,248
-};
-
-static unsigned char cursorZoomIn[] = {16,1,5,6,
-15,128,16,64,32,32,66,16,66,16,79,144,66,16,66,16,
-32,32,16,112,15,184,0,28,0,14,0,7,0,2,0,0,
-15,128,31,192,63,224,127,240,127,240,127,240,127,240,127,240,
-63,224,31,240,15,184,0,28,0,14,0,7,0,2,0,0
-};
-
-static unsigned char cursorZoomOut[] = {16,1,5,6,
-15,128,16,64,32,32,64,16,64,16,79,144,64,16,64,16,
-32,32,16,112,15,184,0,28,0,14,0,7,0,2,0,0,
-15,128,31,192,63,224,127,240,127,240,127,240,127,240,127,240,
-63,224,31,240,15,184,0,28,0,14,0,7,0,2,0,0
-};
-
-static unsigned char cursorWatch2[] = {16,1,0,1,
-112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
-152,2,132,2,96,58,24,70,4,138,2,146,1,130,0,197,
-112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
-255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
-};
-
-#if 0
-// keeping these in case we want to animate the spinner at some point
-static unsigned char cursorWatch1[] = {16,1,0,1,
-112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
-152,2,132,2,96,58,24,86,4,146,2,146,1,130,0,197,
-112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
-255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
-};
-
-static unsigned char cursorWatch3[] = {16,1,0,1,
-112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
-152,2,132,2,96,58,24,70,4,130,2,158,1,130,0,197,
-112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
-255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
-};
-
-static unsigned char cursorWatch4[] = {16,1,0,1,
-112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
-152,2,132,2,96,58,24,70,4,130,2,146,1,138,0,197,
-112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
-255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
-};
-
-static unsigned char cursorWatch5[] = {16,1,0,1,
-112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
-152,2,132,2,96,58,24,70,4,130,2,146,1,146,0,213,
-112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
-255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
-};
-
-static unsigned char cursorWatch6[] = {16,1,0,1,
-112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
-152,2,132,2,96,58,24,70,4,130,2,146,1,162,0,197,
-112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
-255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
-};
-
-static unsigned char cursorWatch7[] = {16,1,0,1,
-112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
-152,2,132,2,96,58,24,70,4,130,2,242,1,130,0,197,
-112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
-255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
-};
-
-static unsigned char cursorWatch8[] = {16,1,0,1,
-112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
-152,2,132,2,96,58,24,70,4,162,2,146,1,130,0,197,
-112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
-255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
-};
-#endif
-        
-#endif // nsBeOSCursors_h__
-
deleted file mode 100644
--- a/widget/src/beos/nsBidiKeyboard.cpp
+++ /dev/null
@@ -1,63 +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 IBM code.
- *
- * The Initial Developer of the Original Code is
- * IBM.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Simon Montagu
- *
- * 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 "nsBidiKeyboard.h"
-
-NS_IMPL_ISUPPORTS1(nsBidiKeyboard, nsIBidiKeyboard)
-
-nsBidiKeyboard::nsBidiKeyboard() : nsIBidiKeyboard()
-{
-}
-
-nsBidiKeyboard::~nsBidiKeyboard()
-{
-}
-
-NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL)
-{
-  *aIsRTL = PR_FALSE;
-  // XXX Insert platform specific code to determine keyboard direction
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel)
-{
-  // XXX Insert platform specific code to set keyboard language
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
deleted file mode 100644
--- a/widget/src/beos/nsBidiKeyboard.h
+++ /dev/null
@@ -1,56 +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 IBM code.
- *
- * The Initial Developer of the Original Code is
- * IBM.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Simon Montagu
- *
- * 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 ***** */
-
-#ifndef __nsBidiKeyboard
-#define __nsBidiKeyboard
-#include "nsIBidiKeyboard.h"
-
-class nsBidiKeyboard : public nsIBidiKeyboard
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIBIDIKEYBOARD
-
-  nsBidiKeyboard();
-  virtual ~nsBidiKeyboard();
-  /* additional members */
-};
-
-
-#endif // __nsBidiKeyboard
deleted file mode 100644
--- a/widget/src/beos/nsCList.h
+++ /dev/null
@@ -1,121 +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):
- *
- * 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 ***** */
-
-#ifndef CLIST_H
-#define CLIST_H
-
-#include <stddef.h>
-
-// -----------------------------------------------------------------------
-//
-// Simple circular linked-list implementation...
-//
-// -----------------------------------------------------------------------
-
-// Foreward declarations...
-struct CList;
-
-#define OBJECT_PTR_FROM_CLIST(className, listElement) \
-            ((char*)listElement - offsetof(className, m_link))
-                
-
-struct CList {
-    CList *next;
-    CList *prev;
-
-    CList() {
-        next = prev = this;
-    }
-
-    ~CList() {
-        Remove();
-    }
-        
-    //
-    // Append an element to the end of this list
-    //
-    void Append(CList &element) {
-        element.next = this;
-        element.prev = prev;
-        prev->next = &element;
-        prev = &element;
-    }
-
-    //
-    // Add an element to the beginning of this list
-    //
-    void Add(CList &element) {
-        element.next = next;
-        element.prev = this;
-        next->prev = &element;
-        next = &element;
-    }
-
-    //
-    // Append this element to the end of a list
-    //
-    void AppendToList(CList &list) {
-        list.Append(*this);
-    }
-
-    //
-    // Add this element to the beginning of a list
-    //
-    void AddToList(CList &list) {
-        list.Add(*this);
-    }
-
-    //
-    // Remove this element from the list and re-initialize
-    //
-    void Remove(void) {
-        prev->next = next;
-        next->prev = prev;
- 
-        next = prev = this;
-    }
-
-    //
-    // Is this list empty ?
-    //
-    bool IsEmpty(void) {
-        return (next == this);
-    }
-};    
-
-#endif // CLIST_H
-
deleted file mode 100644
--- a/widget/src/beos/nsChildView.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-/* ***** 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 the Mozilla Browser.
- *
- * The Initial Developer of the Original Code is
- * Fredrik Holmqvist <thesuckiestemail@yahoo.se>.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 "nsChildView.h"
-
-nsChildView::nsChildView() : nsWindow()
-{
-}
-
-
-nsresult nsChildView::Create(nsIWidget *aParent,
-                             nsNativeWidget aNativeParent,
-                             const nsRect &aRect,
-                             EVENT_CALLBACK aHandleEventFunction,
-                             nsIDeviceContext *aContext,
-                             nsIAppShell *aAppShell,
-                             nsIToolkit *aToolkit,
-                             nsWidgetInitData *aInitData)
-{
-
-	NS_ASSERTION(aInitData->mWindowType == eWindowType_child
-		|| aInitData->mWindowType == eWindowType_plugin, 
-		"The windowtype is not handled by this class." );
-
-	mIsTopWidgetWindow = PR_FALSE;
-	
-	BaseCreate(aParent, aRect, aHandleEventFunction, aContext, aAppShell,
-		aToolkit, aInitData);
-
-	mListenForResizes = aNativeParent ? PR_TRUE : aInitData->mListenForResizes;
-		
-	// Switch to the "main gui thread" if necessary... This method must
-	// be executed on the "gui thread"...
-	//
-	nsToolkit* toolkit = (nsToolkit *)mToolkit;
-	if (toolkit && !toolkit->IsGuiThread())
-	{
-		uint32 args[7];
-		args[0] = (uint32)aParent;
-		args[1] = (uint32)&aRect;
-		args[2] = (uint32)aHandleEventFunction;
-		args[3] = (uint32)aContext;
-		args[4] = (uint32)aAppShell;
-		args[5] = (uint32)aToolkit;
-		args[6] = (uint32)aInitData;
-
-		if (nsnull != aParent)
-		{
-			// nsIWidget parent dispatch
-			MethodInfo info(this, this, nsSwitchToUIThread::CREATE, 7, args);
-			toolkit->CallMethod(&info);
-		}
-		else
-		{
-			// Native parent dispatch
-			MethodInfo info(this, this, nsSwitchToUIThread::CREATE_NATIVE, 7, args);
-			toolkit->CallMethod(&info);
-		}
-		return NS_OK;
-	}
-
-	mParent = aParent;
-	// Useful shortcut, wondering if we can use it also in GetParent() instead
-	// nsIWidget* type mParent.
-	mWindowParent = (nsWindow *) aParent;
-	SetBounds(aRect);
-
- 	//NS_NATIVE_GRAPHIC maybe?
- 	//Parent may be a BView if we embed.
-	BView *parent= (BView *)
-		(aParent ? aParent->GetNativeData(NS_NATIVE_WIDGET) :  aNativeParent);
-	//There seems to be three of these on startup,
-	//but I believe that these are because of bugs in 
-	//other code as they existed before rewriting this
-	//function.
-	NS_PRECONDITION(parent, "Childviews without parents don't get added to anything.");
-	// A childview that is never added to a parent is very strange.
-	if (!parent)
-		return NS_ERROR_FAILURE;
-				
-	mView = new nsViewBeOS(this, 
-		BRect(aRect.x, aRect.y, aRect.x + aRect.width - 1, aRect.y + aRect.height - 1)
-		, "Child view", 0, B_WILL_DRAW);
-#if defined(BeIME)
-	mView->SetFlags(mView->Flags() | B_INPUT_METHOD_AWARE);
-#endif	
-	bool mustUnlock = parent->Parent() && parent->LockLooper();
- 	parent->AddChild(mView);
-	if (mustUnlock)
-		parent->UnlockLooper();
-	DispatchStandardEvent(NS_CREATE);
-	return NS_OK;
-}
-
-
-//-------------------------------------------------------------------------
-//
-// Hide or show this component
-//
-//-------------------------------------------------------------------------
-NS_METHOD nsChildView::Show(PRBool bState)
-{
-	if (!mEnabled)
-		return NS_OK;
-
-	if (!mView || !mView->LockLooper())
-		return NS_OK;
-
-	//We need to do the IsHidden() checks
-	//because BeOS counts no of Hide()
-	//and Show() checks. BeBook:
-	// For a hidden view to become visible again, the number of Hide() calls 
-	// must be matched by an equal number of Show() calls.
-	if (PR_FALSE == bState)
-	{
-		if (!mView->IsHidden())
-			mView->Hide();
-	}
-	else
-	{
-		if (mView->IsHidden())
-			mView->Show();              
-	}
-	
-	mView->UnlockLooper();
-	mIsVisible = bState;	
-	return NS_OK;
-}
-
-
-NS_METHOD nsChildView::SetTitle(const nsAString& aTitle)
-{
-	if (mView)
-		mView->SetName(NS_ConvertUTF16toUTF8(aTitle).get());
-	return NS_OK;
-}
-
deleted file mode 100644
--- a/widget/src/beos/nsChildView.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ***** 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 the Mozilla Browser.
- *
- * The Initial Developer of the Original Code is
- * Fredrik Holmqvist <thesuckiestemail@yahoo.se>.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * 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 ***** */
- 
-#ifndef nsChildView_h__
-#define nsChildView_h__
-
-#include "nsWindow.h"
-
-class nsChildView : public nsWindow 
-{
-public:
-	nsChildView();
-	virtual PRBool          IsChild() { return(PR_TRUE); };
-	
-	NS_IMETHOD              Show(PRBool bState);
-	NS_IMETHOD              SetTitle(const nsAString& aTitle);
-};
-#endif //nsChildView_h__
deleted file mode 100644
--- a/widget/src/beos/nsClipboard.cpp
+++ /dev/null
@@ -1,336 +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):
- *   Pierre Phaneuf <pp@ludusdesign.com>
- *   Takashi Toyoshima <toyoshim@be-in.org>
- *
- * 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 "nsClipboard.h"
-#include "nsCOMPtr.h"
-#include "nsITransferable.h"
-#include "nsWidgetsCID.h"
-#include "nsXPIDLString.h"
-#include "nsPrimitiveHelpers.h"
-#include "nsXPCOM.h"
-#include "nsISupportsPrimitives.h"
-#include "nsString.h"
-
-#include <View.h>
-#include <Clipboard.h>
-#include <Message.h>
-
-// The class statics:
-BView *nsClipboard::sView = 0;
-
-#if defined(DEBUG_akkana) || defined(DEBUG_mcafee) || defined(DEBUG_toyoshim)
-#  define DEBUG_CLIPBOARD
-#endif
- 
-
-//-------------------------------------------------------------------------
-//
-// nsClipboard constructor
-//
-//-------------------------------------------------------------------------
-nsClipboard::nsClipboard() : nsBaseClipboard()
-{
-#ifdef DEBUG_CLIPBOARD
-  printf("  nsClipboard::nsClipboard()\n");
-#endif /* DEBUG_CLIPBOARD */
-
-  mIgnoreEmptyNotification = PR_FALSE;
-  mClipboardOwner = nsnull;
-  mTransferable   = nsnull;
-}
-
-//-------------------------------------------------------------------------
-//
-// nsClipboard destructor
-//
-//-------------------------------------------------------------------------
-nsClipboard::~nsClipboard()
-{
-#ifdef DEBUG_CLIPBOARD
-  printf("  nsClipboard::~nsClipboard()\n");  
-#endif /* DEBUG_CLIPBOARD */
-}
-
-void nsClipboard::SetTopLevelView(BView *v)
-{
-  // Don't set up any more event handlers if we're being called twice
-  // for the same toplevel widget
-  if (sView == v)
-    return;
-
-  if (sView != 0 && sView->Window() != 0)
-    return;
-
-  if(v == 0 || v->Window() == 0)
-  {
-#ifdef DEBUG_CLIPBOARD
-    printf("  nsClipboard::SetTopLevelView: widget passed in is null or has no window!\n");
-#endif /* DEBUG_CLIPBOARD */
-    return;
-  }
-
-#ifdef DEBUG_CLIPBOARD
-  printf("  nsClipboard::SetTopLevelView\n");
-#endif /* DEBUG_CLIPBOARD */
-}
-
-//
-// The copy routine
-//
-NS_IMETHODIMP nsClipboard::SetNativeClipboardData(PRInt32 aWhichClipboard)
-{
-  mIgnoreEmptyNotification = PR_TRUE;
-
-#ifdef DEBUG_CLIPBOARD
-  printf("  nsClipboard::SetNativeClipboardData()\n");
-#endif /* DEBUG_CLIPBOARD */
-
-  // make sure we have a good transferable
-  if (nsnull == mTransferable) {
-#ifdef DEBUG_CLIPBOARD
-    printf("  SetNativeClipboardData: no transferable!\n");
-#endif /* DEBUG_CLIPBOARD */
-    return NS_ERROR_FAILURE;
-  }
-
-  // lock the native clipboard
-  if (!be_clipboard->Lock())
-    return NS_ERROR_FAILURE;
-
-  // clear the native clipboard
-  nsresult rv = NS_OK;
-  if (B_OK == be_clipboard->Clear()) {
-    // set data to the native clipboard
-    if (BMessage *msg = be_clipboard->Data()) {
-      // Get the transferable list of data flavors
-      nsCOMPtr<nsISupportsArray> dfList;
-      mTransferable->FlavorsTransferableCanExport(getter_AddRefs(dfList));
-
-      // Walk through flavors that contain data and register them
-      // into the BMessage as supported flavors
-      PRUint32 i;
-      PRUint32 cnt;
-      dfList->Count(&cnt);
-      for (i = 0; i < cnt && rv == NS_OK; i++) {
-        nsCOMPtr<nsISupports> genericFlavor;
-        dfList->GetElementAt(i, getter_AddRefs(genericFlavor));
-        nsCOMPtr<nsISupportsCString> currentFlavor (do_QueryInterface(genericFlavor));
-        if (currentFlavor) {
-          nsXPIDLCString flavorStr;
-          currentFlavor->ToString(getter_Copies(flavorStr));
-
-#ifdef DEBUG_CLIPBOARD
-          printf("nsClipboard: %d/%d = %s\n", i, cnt, (const char *)flavorStr);
-#endif /* DEBUG_CLIPBOARD */
-          if (0 == strncmp(flavorStr, "text/", 5)) {
-            // [NS] text/ * => [Be] text/ *
-            void *data = nsnull;
-            PRUint32 dataSize = 0;
-            nsCOMPtr<nsISupports> genericDataWrapper;
-            rv = mTransferable->GetTransferData(flavorStr, getter_AddRefs(genericDataWrapper), &dataSize);
-            nsPrimitiveHelpers::CreateDataFromPrimitive(flavorStr, genericDataWrapper, &data, dataSize);
-#ifdef DEBUG_CLIPBOARD
-            if (NS_FAILED(rv))
-              printf("nsClipboard: Error getting data from transferable\n");
-#endif /* DEBUG_CLIPBOARD */
-            if (dataSize && data != nsnull) {
-              NS_ConvertUTF16toUTF8 cv((const PRUnichar *)data, (PRUint32)dataSize / 2);
-              const char *utf8Str = cv.get();
-              uint32 utf8Len = strlen(utf8Str);
-#ifdef DEBUG_CLIPBOARD
-              if (0 == strcmp(flavorStr, kUnicodeMime))
-                printf(" => [%s]%s\n", kTextMime, utf8Str);
-              else
-                printf(" => [%s]%s\n", (const char *)flavorStr, utf8Str);
-#endif /* DEBUG_CLIPBOARD */
-              status_t rc;
-              if (0 == strcmp(flavorStr, kUnicodeMime)) {
-                // [NS] text/unicode => [Be] text/plain
-                rc = msg->AddData(kTextMime, B_MIME_TYPE, (void *)utf8Str, utf8Len);
-              } else {
-                // [NS] text/ * => [Be] text/ *
-                rc = msg->AddData((const char *)flavorStr, B_MIME_TYPE, (void *)utf8Str, utf8Len);
-              }
-              if (rc != B_OK)
-                rv = NS_ERROR_FAILURE;
-            } else {
-#ifdef DEBUG_CLIPBOARD
-              printf("nsClipboard: Error null data from transferable\n");
-#endif /* DEBUG_CLIPBOARD */
-                // not fatal. force to continue...
-                rv = NS_OK;
-            }
-          } else {
-            // [NS] * / * => [Be] * / *
-            void *data = nsnull;
-            PRUint32 dataSize = 0;
-            nsCOMPtr<nsISupports> genericDataWrapper;
-            rv = mTransferable->GetTransferData(flavorStr, getter_AddRefs(genericDataWrapper), &dataSize);
-            nsPrimitiveHelpers::CreateDataFromPrimitive(flavorStr, genericDataWrapper, &data, dataSize);
-#ifdef DEBUG_CLIPBOARD
-            if (NS_FAILED(rv))
-              printf("nsClipboard: Error getting data from transferable\n");
-#endif /* DEBUG_CLIPBOARD */
-            if (dataSize && data != nsnull) {
-#ifdef DEBUG_CLIPBOARD
-              printf("[%s](binary)\n", (const char *)flavorStr);
-#endif /* DEBUG_CLIPBOARD */
-              if (B_OK != msg->AddData((const char *)flavorStr, B_MIME_TYPE, data, dataSize))
-                rv = NS_ERROR_FAILURE;
-            }
-          }
-        } else {
-#ifdef DEBUG_CLIPBOARD
-          printf("nsClipboard: Error getting flavor\n");
-#endif /* DEBUG_CLIPBOARD */
-          rv = NS_ERROR_FAILURE;
-        }
-      } /* for */
-    } else {
-      rv = NS_ERROR_FAILURE;
-    }
-  } else {
-    rv = NS_ERROR_FAILURE;
-  }
-  if (B_OK != be_clipboard->Commit())
-    rv = NS_ERROR_FAILURE;
-  be_clipboard->Unlock();
-
-  mIgnoreEmptyNotification = PR_FALSE;
-
-  return rv;
-}
-
-
-//
-// The blocking Paste routine
-//
-NS_IMETHODIMP
-nsClipboard::GetNativeClipboardData(nsITransferable * aTransferable, PRInt32 aWhichClipboard )
-{
-#ifdef DEBUG_CLIPBOARD
-  printf("  nsClipboard::GetNativeClipboardData()\n");
-#endif /* DEBUG_CLIPBOARD */
-
-  // make sure we have a good transferable
-  if (nsnull == aTransferable) {
-    printf("  GetNativeClipboardData: Transferable is null!\n");
-    return NS_ERROR_FAILURE;
-  }
-
-  // get flavor list
-  nsresult rv;
-  nsCOMPtr<nsISupportsArray> flavorList;
-  rv = aTransferable->FlavorsTransferableCanImport(getter_AddRefs(flavorList));
-  if (NS_FAILED(rv))
-    return NS_ERROR_FAILURE;
-
-  // get native clipboard data
-  if (!be_clipboard->Lock())
-    return NS_ERROR_FAILURE;
-
-  BMessage *msg = be_clipboard->Data();
-  if (!msg)
-    return NS_ERROR_FAILURE;  
-#ifdef DEBUG_CLIPBOARD
-  msg->PrintToStream();
-#endif /* DEBUG_CLIPBOARD */
-
-  PRUint32 cnt;
-  flavorList->Count(&cnt);
-  for (PRUint32 i = 0; i < cnt; i++) {
-    nsCOMPtr<nsISupports> genericFlavor;
-    flavorList->GetElementAt(i, getter_AddRefs(genericFlavor));
-    nsCOMPtr<nsISupportsCString> currentFlavor(do_QueryInterface(genericFlavor));
-    if (currentFlavor) {
-      nsXPIDLCString flavorStr;
-      currentFlavor->ToString(getter_Copies(flavorStr));
-
-#ifdef DEBUG_CLIPBOARD
-      printf("nsClipboard: %d/%d = %s\n", i, cnt, (const char *)flavorStr);
-#endif /* DEBUG_CLIPBOARD */
-      const void *data;
-      ssize_t size;
-      if (0 == strncmp(flavorStr, "text/", 5)) {
-        // [Be] text/ * => [NS] text/ *
-        status_t rc;
-        if (0 == strcmp(flavorStr, kUnicodeMime))
-          rc = msg->FindData(kTextMime, B_MIME_TYPE, &data, &size);
-        else
-          rc = msg->FindData(flavorStr, B_MIME_TYPE, &data, &size);
-        if (rc != B_OK || !data || !size) {
-#ifdef DEBUG_CLIPBOARD
-          printf("nsClipboard: not found in BMessage\n");
-#endif /* DEBUG_CLIPBOARD */
-        } else {
-          NS_ConvertUTF8toUTF16 ucs2Str((const char *)data, (PRUint32)size);
-          nsCOMPtr<nsISupports> genericDataWrapper;
-          nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr, (void *)ucs2Str.get(), ucs2Str.Length() * 2, getter_AddRefs(genericDataWrapper));
-          rv = aTransferable->SetTransferData(flavorStr, genericDataWrapper, ucs2Str.Length() * 2);
-        }
-      } else {
-        // [Be] * / * => [NS] * / *
-        if (B_OK != msg->FindData(flavorStr, B_MIME_TYPE, &data, &size)) {
-#ifdef DEBUG_CLIPBOARD
-          printf("nsClipboard: not found in BMessage\n");
-#endif /* DEBUG_CLIPBOARD */
-        } else {
-          nsCOMPtr<nsISupports> genericDataWrapper;
-          nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr, (void *)data, (PRUint32)size, getter_AddRefs(genericDataWrapper));
-          rv = aTransferable->SetTransferData(flavorStr, genericDataWrapper, size);
-        }
-      }
-#ifdef DEBUG_CLIPBOARD
-      if (NS_FAILED(rv))
-        printf("nsClipboard: Error SetTransferData\n");
-#endif /* DEBUG_CLIPBOARD */
-    } else {
-      rv = NS_ERROR_FAILURE;
-#ifdef DEBUG_CLIPBOARD
-      printf("nsClipboard: Error gerring flavor");
-#endif /* DEBUG_CLIPBOARD */
-    }
-    if (rv != NS_OK)
-      break;
-  } /* for */
-
-  be_clipboard->Unlock();
-
-  return rv;
-}
deleted file mode 100644
--- a/widget/src/beos/nsClipboard.h
+++ /dev/null
@@ -1,71 +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):
- *   Takashi Toyoshima <toyoshim@be-in.org>
- *
- * 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 ***** */
-
-#ifndef nsClipboard_h__
-#define nsClipboard_h__
-
-#include "nsBaseClipboard.h"
-#include <Clipboard.h>
-
-class BView;
-class nsITransferable;
-
-/**
- * Native BeOS Clipboard wrapper
- */
-
-class nsClipboard : public nsBaseClipboard
-{
-
-public:
-  nsClipboard();
-  virtual ~nsClipboard();
-
-  static void SetTopLevelView(BView *v);
-
-
-protected:
-  NS_IMETHOD SetNativeClipboardData( PRInt32 aWhichClipboard );
-  NS_IMETHOD GetNativeClipboardData(nsITransferable * aTransferable, PRInt32 aWhichClipboard);
-
-  PRBool            mIgnoreEmptyNotification;
-
-  static BView  *sView;
-};
-
-#endif // nsClipboard_h__
deleted file mode 100644
--- a/widget/src/beos/nsDeviceContextSpecB.cpp
+++ /dev/null
@@ -1,260 +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):
- *   Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 "nsIWidget.h"
-#include "nsDeviceContextSpecB.h"
- 
-#include "nsIPrefService.h"
-#include "nsIPrefBranch.h"
-#include "prenv.h" /* for PR_GetEnv */ 
-#include "nsIServiceManager.h"
-#include "nsReadableUtils.h"
-#include "nsStringEnumerator.h"
-#include "nsTArray.h"
-#include "nsCRT.h"
-
-//----------------------------------------------------------------------------------
-// The printer data is shared between the PrinterEnumerator and the nsDeviceContextSpecG
-// The PrinterEnumerator creates the printer info
-// but the nsDeviceContextSpecG cleans it up
-// If it gets created (via the Page Setup Dialog) but the user never prints anything
-// then it will never be delete, so this class takes care of that.
-class GlobalPrinters {
-public:
-  static GlobalPrinters* GetInstance()   { return &mGlobalPrinters; }
-  ~GlobalPrinters()                      { FreeGlobalPrinters(); }
-
-  void      FreeGlobalPrinters();
-  nsresult  InitializeGlobalPrinters();
-
-  PRBool    PrintersAreAllocated()       { return mGlobalPrinterList != nsnull; }
-  PRUint32  GetNumPrinters()             { return mGlobalNumPrinters; }
-  nsString* GetStringAt(PRInt32 aInx)    { return &mGlobalPrinterList->ElementAt(aInx); }
-
-protected:
-  GlobalPrinters() {}
-
-  static GlobalPrinters mGlobalPrinters;
-  static nsTArray<nsString>* mGlobalPrinterList;
-  static PRUint32 mGlobalNumPrinters;
-
-};
-//---------------
-// static members
-GlobalPrinters GlobalPrinters::mGlobalPrinters;
-nsTArray<nsString>* GlobalPrinters::mGlobalPrinterList = nsnull;
-PRUint32 GlobalPrinters::mGlobalNumPrinters = 0;
-
-nsDeviceContextSpecBeOS::nsDeviceContextSpecBeOS()
-{
-}
-
-nsDeviceContextSpecBeOS::~nsDeviceContextSpecBeOS()
-{
-} 
- 
-NS_IMPL_ISUPPORTS1(nsDeviceContextSpecBeOS, nsIDeviceContextSpec)
- 
-/** -------------------------------------------------------
- *  Initialize the nsDeviceContextSpecBeOS
- *  @update   dc 2/15/98
- *  @update   syd 3/2/99
- */
-NS_IMETHODIMP nsDeviceContextSpecBeOS::Init(nsIWidget *aWidget,
-                                            nsIPrintSettings* aPS,
-                                            PRBool aIsPrintPreview)
-{
-  nsresult rv = NS_ERROR_FAILURE;
-  NS_ASSERTION(nsnull != aPS, "No print settings.");
-
-  mPrintSettings = aPS;
-  
-  // if there is a current selection then enable the "Selection" radio button
-  if (aPS != nsnull) {
-    PRBool isOn;
-    aPS->GetPrintOptions(nsIPrintSettings::kEnableSelectionRB, &isOn);
-    nsCOMPtr<nsIPrefBranch> pPrefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
-    if (NS_SUCCEEDED(rv)) {
-      (void) pPrefs->SetBoolPref("print.selection_radio_enabled", isOn);
-    }
-  }
-
-  rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-
-  
-  GlobalPrinters::GetInstance()->FreeGlobalPrinters();
-
-  return rv;
-}
- 
-/** -------------------------------------------------------
- * Closes the printmanager if it is open.
- *  @update   dc 2/15/98
- */
-NS_IMETHODIMP nsDeviceContextSpecBeOS :: ClosePrintManager()
-{
-  return NS_OK;
-}  
-
-//  Printer Enumerator
-nsPrinterEnumeratorBeOS::nsPrinterEnumeratorBeOS()
-{
-}
-
-NS_IMPL_ISUPPORTS1(nsPrinterEnumeratorBeOS, nsIPrinterEnumerator)
-
-NS_IMETHODIMP nsPrinterEnumeratorBeOS::GetPrinterNameList(nsIStringEnumerator **aPrinterNameList)
-{
-  NS_ENSURE_ARG_POINTER(aPrinterNameList);
-  *aPrinterNameList = nsnull;
-  
-  nsresult rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-
-  PRUint32 numPrinters = GlobalPrinters::GetInstance()->GetNumPrinters();
-  nsTArray<nsString> *printers = new nsTArray<nsString>(numPrinters);
-  if (!printers) {
-    GlobalPrinters::GetInstance()->FreeGlobalPrinters();
-    return NS_ERROR_OUT_OF_MEMORY;
-  }
-  
-  PRUint32 count = 0;
-  while( count < numPrinters )
-  {
-    printers->AppendElement(*GlobalPrinters::GetInstance()->GetStringAt(count++));
-  }
-  GlobalPrinters::GetInstance()->FreeGlobalPrinters();
-
-  return NS_NewAdoptingStringEnumerator(aPrinterNameList, printers);
-}
-
-/* readonly attribute wstring defaultPrinterName; */
-NS_IMETHODIMP nsPrinterEnumeratorBeOS::GetDefaultPrinterName(PRUnichar * *aDefaultPrinterName)
-{
-  NS_ENSURE_ARG_POINTER(aDefaultPrinterName);
-  *aDefaultPrinterName = nsnull;
-  return NS_OK;
-}
-
-/* void initPrintSettingsFromPrinter (in wstring aPrinterName, in nsIPrintSettings aPrintSettings); */
-NS_IMETHODIMP nsPrinterEnumeratorBeOS::InitPrintSettingsFromPrinter(const PRUnichar *aPrinterName, nsIPrintSettings *aPrintSettings)
-{
-    return NS_OK;
-}
-
-NS_IMETHODIMP nsPrinterEnumeratorBeOS::DisplayPropertiesDlg(const PRUnichar *aPrinter, nsIPrintSettings *aPrintSettings)
-{
-  return NS_OK;
-}
-
-//----------------------------------------------------------------------
-nsresult GlobalPrinters::InitializeGlobalPrinters ()
-{
-  if (PrintersAreAllocated())
-    return NS_OK;
-
-  mGlobalNumPrinters = 0;
-
-  mGlobalPrinterList = new nsTArray<nsString>();
-  if (!mGlobalPrinterList) 
-    return NS_ERROR_OUT_OF_MEMORY;
-
-  /* add an entry for the default printer (see nsPostScriptObj.cpp) */
-  mGlobalPrinterList->AppendElement(
-    nsString(NS_ConvertASCIItoUTF16(NS_POSTSCRIPT_DRIVER_NAME "default")));
-  mGlobalNumPrinters++;
-
-  /* get the list of printers */
-  char *printerList = nsnull;
-  
-  /* the env var MOZILLA_PRINTER_LIST can "override" the prefs */
-  printerList = PR_GetEnv("MOZILLA_PRINTER_LIST");
-  
-  if (!printerList) {
-    nsresult rv;
-    nsCOMPtr<nsIPrefBranch> pPrefs = do_GetService(NS_PREFSERVICE_CONTRACTID,
-                                                   &rv);
-    if (NS_SUCCEEDED(rv)) {
-      (void) pPrefs->GetCharPref("print.printer_list", &printerList);
-    }
-  }  
-
-  if (printerList) {
-    char *tok_lasts;
-    char *name;
-    
-    /* PL_strtok_r() will modify the string - copy it! */
-    printerList = strdup(printerList);
-    if (!printerList)
-      return NS_ERROR_OUT_OF_MEMORY;    
-
-    for( name = PL_strtok_r(printerList, " ", &tok_lasts) ; 
-         name != nsnull ; 
-         name = PL_strtok_r(nsnull, " ", &tok_lasts) )
-    {
-      mGlobalPrinterList->AppendElement(
-        nsString(NS_ConvertASCIItoUTF16(NS_POSTSCRIPT_DRIVER_NAME)) + 
-        nsString(NS_ConvertASCIItoUTF16(name)));
-      mGlobalNumPrinters++;      
-    }
-
-    NS_Free(printerList);
-  }
-
-  if (mGlobalNumPrinters == 0)
-    return NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE; 
-
-  return NS_OK;
-}
-
-//----------------------------------------------------------------------
-void GlobalPrinters::FreeGlobalPrinters()
-{
-  delete mGlobalPrinterList;
-  mGlobalPrinterList = nsnull;
-  mGlobalNumPrinters = 0;
-}
-
-
-
-
deleted file mode 100644
--- a/widget/src/beos/nsDeviceContextSpecB.h
+++ /dev/null
@@ -1,113 +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):
- *   Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 ***** */
-
-#ifndef nsDeviceContextSpecB_h___
-#define nsDeviceContextSpecB_h___
-
-#include "nsCOMPtr.h"
-#include "nsIDeviceContextSpec.h"
-#include "nsIPrintSettings.h" 
-#include "nsIPrintOptions.h" 
-// For public interface?
-#include "nsIWidget.h" 
-#include "nsPrintdBeOS.h" 
- 
-class nsDeviceContextSpecBeOS : public nsIDeviceContextSpec
-{
-public:
-/**
- * Construct a nsDeviceContextSpecBeOS, which is an object which contains and manages a mac printrecord
- * @update  dc 12/02/98
- */
-  nsDeviceContextSpecBeOS();
-
-  NS_DECL_ISUPPORTS
-
-/**
- * Initialize the nsDeviceContextSpecBeOS for use.  This will allocate a printrecord for use
- * @update   dc 2/16/98
- * @param aWidget         Unused
- * @param aPS             Settings for this print job
- * @param aIsPrintPreview Unused
- * @return error status
- */
-  NS_IMETHOD Init(nsIWidget *aWidget,
-                  nsIPrintSettings* aPS,
-                  PRBool aIsPrintPreview);
-  
-  
-/**
- * Closes the printmanager if it is open.
- * @update   dc 2/13/98
- * @return error status
- */
-  NS_IMETHOD ClosePrintManager();
-
-  NS_IMETHOD GetSurfaceForPrinter(gfxASurface **nativeSurface) {
-    return NS_ERROR_NOT_IMPLEMENTED;
-  }
-
-/**
- * Destructor for nsDeviceContextSpecBeOS, this will release the printrecord
- * @update  dc 2/16/98
- */
-protected:
-  virtual ~nsDeviceContextSpecBeOS();
- 
-public:
-  int InitializeGlobalPrinters();
-  void FreeGlobalPrinters();
-
-protected:
-  nsCOMPtr<nsIPrintSettings> mPrintSettings;	
-};
-
-//-------------------------------------------------------------------------
-// Printer Enumerator
-//-------------------------------------------------------------------------
-class nsPrinterEnumeratorBeOS : public nsIPrinterEnumerator
-{
-public:
-  nsPrinterEnumeratorBeOS();
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIPRINTERENUMERATOR
-
-protected:
-};
-
-#endif
deleted file mode 100644
--- a/widget/src/beos/nsDragService.cpp
+++ /dev/null
@@ -1,768 +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):
- *   Pierre Phaneuf <pp@ludusdesign.com>
- *   Paul Ashford
- *   Fredrik Holmqvist <thesuckiestemail@yahoo.se>
- *
- * 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 <stdio.h>
-#include "nsDragService.h"
-#include "nsIDocument.h"
-#include "nsIRegion.h"
-#include "nsITransferable.h"
-#include "nsIServiceManager.h"
-#include "nsISupportsPrimitives.h"
-#include "nsXPIDLString.h"
-#include "nsPrimitiveHelpers.h"
-#include "nsWidgetsCID.h"
-#include "nsCRT.h"
-
-#include <AppDefs.h>
-#include <TypeConstants.h>
-#include <DataIO.h>
-#include <Mime.h>
-#include <Rect.h>
-#include <Region.h>
-#include <String.h>
-#include <View.h>
-
-#include "prlog.h"
-#include "nsPresContext.h"
-#include "nsIFrame.h"
-#include "nsIView.h"
-#include "nsIWidget.h"
-  
-static NS_DEFINE_CID(kCDragServiceCID,   NS_DRAGSERVICE_CID);
-  
-static PRLogModuleInfo *sDragLm = NULL;
-
-static nsIFrame*
-GetPrimaryFrameFor(nsIDOMNode *aDOMNode)
-{
-    nsCOMPtr<nsIContent> aContent = do_QueryInterface(aDOMNode);
-    if (nsnull == aContent)
-        return nsnull;
-
-    return aContent->GetPrimaryFrame();
-}
-
-static bool 
-IsInternalDrag(BMessage * aMsg)
-{
-    BString orig;
-    // We started this drag if originater is 'BeZilla'
-    return (nsnull != aMsg && B_OK == aMsg->FindString("be:originator", &orig) &&
-	    0 == orig.Compare("BeZilla"));
-}
-
-NS_IMPL_THREADSAFE_ISUPPORTS3(nsDragService, nsIDragService, nsIDragSession, nsIDragSessionBeOS)
-//NS_IMPL_THREADSAFE_ISUPPORTS1(nsBaseDragService, nsIDragSessionBeOS)
-
-//-------------------------------------------------------------------------
-//
-// DragService constructor
-// Enable logging: 'export NSPR_LOG_MODULES=nsDragService:5'
-//-------------------------------------------------------------------------
-nsDragService::nsDragService()
-{
-    // set up our logging module
-    if (!sDragLm)
-        sDragLm = PR_NewLogModule("nsDragService");
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("\n\nnsDragService::nsDragService"));
-
-    mDragMessage = NULL;
-    mCanDrop = PR_FALSE;
-}
-
-//-------------------------------------------------------------------------
-//
-// DragService destructor
-//
-//-------------------------------------------------------------------------
-nsDragService::~nsDragService()
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::~nsDragService"));
-    ResetDragInfo();
-}
-
-//-------------------------------------------------------------------------
-//
-// nsIDragService : InvokeDragSession
-//
-// Called when a drag is being initiated from within mozilla 
-// The code here gets the BView, the dragRect, builds the DragMessage and 
-// starts the drag.
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::InvokeDragSession (nsIDOMNode *aDOMNode,
-                                  nsISupportsArray * aArrayTransferables,
-                                  nsIScriptableRegion * aRegion,
-                                  PRUint32 aActionType)
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::InvokeDragSession"));
-    nsresult rv = nsBaseDragService::InvokeDragSession(aDOMNode,
-                                                       aArrayTransferables,
-                                                       aRegion, aActionType);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    ResetDragInfo();       
-    // make sure that we have an array of transferables to use
-    if (nsnull == aArrayTransferables)
-        return NS_ERROR_INVALID_ARG;
-
-    // set our reference to the transferables.  this will also addref
-    // the transferables since we're going to hang onto this beyond the
-    // length of this call
-    mSourceDataItems = aArrayTransferables;
-
-    // Get a box or a bitmap to drag
-    bool haveRect = false;
-    BRect dragRect;
-	
-    if (nsnull != aRegion)
-    {
-        PRInt32 aX, aY, aWidth, aHeight;
-        // TODO. Region may represent multiple rects - when dragging multiple items.
-        aRegion->GetBoundingBox(&aX, &aY, &aWidth, &aHeight);
-        dragRect.Set( aX, aY, aX + aWidth, aY + aHeight);
-        haveRect = true;
-        // does this need to be offset?
-    } 
-    
-    // Get the frame for this content node (note: frames are not refcounted)
-    nsIFrame *aFrame = GetPrimaryFrameFor(aDOMNode);
-    if (nsnull == aFrame)
-        return PR_FALSE;
-    
-    // Now that we have the frame, we have to convert its coordinates into global screen
-    // coordinates.
-    nsRect aRect = aFrame->GetRect();
-
-    // Find offset from our view
-    nsIView *containingView = nsnull;
-    nsPoint viewOffset(0,0);
-    aFrame->GetOffsetFromView(viewOffset, &containingView);
-    NS_ASSERTION(containingView, "No containing view!");
-    if (nsnull == containingView)
-        return PR_FALSE;
-
-    // get the widget associated with the containing view. 
-    nsPoint aWidgetOffset;
-    nsCOMPtr<nsIWidget> aWidget = containingView->GetNearestWidget(&aWidgetOffset);
-    if (nsnull == aWidget)
-        return PR_FALSE;
-
-    BView *view = (BView *) aWidget->GetNativeData(NS_NATIVE_WIDGET);
-    // Don't have the rect yet, try to get it from the dom node
-    if (nsnull==haveRect)
-    {
-        float t2p =  aFrame->GetPresContext()->TwipsToPixels(); 
-        // GetOffsetFromWidget() actually returns the _parent's_ offset from its widget, so we
-        // still have to add in the offset to |containingView|'s parent ourselves.
-        nsPoint aViewPos = containingView->GetPosition();
-    
-        // Shift our offset rect by offset into our view, the view's offset to its parent, and
-        // the parent's offset to the closest widget. Then convert that to global coordinates. 
-        // Recall that WidgetToScreen() will give us the global coordinates of the rectangle we 
-        // give it, but it expects  everything to be in pixels.
-        nsRect screenOffset;
-        screenOffset.MoveBy ( NSTwipsToIntPixels(aWidgetOffset.x + aViewPos.x + viewOffset.x, t2p),
-                            NSTwipsToIntPixels(aWidgetOffset.y + aViewPos.y + viewOffset.y, t2p));
-        aWidget->WidgetToScreen ( screenOffset, screenOffset );
-
-        dragRect.Set(screenOffset.x, screenOffset.y, 
-		             screenOffset.x + NSTwipsToIntPixels(aRect.width, t2p),
-		             screenOffset.y + NSTwipsToIntPixels(aRect.height, t2p));
-        haveRect = true;
-    }
-
-    mDragAction = aActionType;
-    mDragMessage = CreateDragMessage();
-
-    if (!view || !mDragMessage)
-        return PR_FALSE;
-        
-    // Set the original click location, how to get this or is it needed ?
-    // sourceMessage->AddPoint("click_location", mPoint);
-    
-    if (!view->LockLooper())
-        return PR_FALSE;
-        
-    // Well, let's just use the view frame, maybe?
-    if (!haveRect) 
-    {
-        dragRect = view->Frame();
-        // do we need to offset?
-    }
-        
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("invoking mDragView->DragMessage"));
-    bool noBitmap = true;
-
-//This is the code for image-dragging, currently disabled. See comments in beginning of file.
-# ifdef 0
-    do
-    {
-        PRUint32 dataSize;
-        PRUint32 noItems;
-        mSourceDataItems->Count(&noItems);
-        if (noItems!=1) 
-        {
-            PR_LOG(sDragLm, PR_LOG_DEBUG, ("Transferables are not ==1, no drag bitmap!"));
-            break;
-        }
-        
-        nsCOMPtr<nsISupports> genericItem;
-        aArrayTransferables->GetElementAt(0, getter_AddRefs(genericItem));
-        nsCOMPtr<nsITransferable> aTransferable (do_QueryInterface(genericItem));
-        
-        nsCOMPtr<nsISupports> genericDataWrapper;
-        nsresult rv = aTransferable->GetTransferData(kNativeImageMime, getter_AddRefs(genericDataWrapper), &dataSize);
-        if (NS_FAILED(rv))
-        {
-            PR_LOG(sDragLm, PR_LOG_DEBUG, ("Could not get nativeimage, no drag bitmap!"));
-            break;
-        }
-
-        nsCOMPtr<nsISupportsInterfacePointer> ptrPrimitive (do_QueryInterface(genericDataWrapper));
-        if (ptrPrimitive == NULL) 
-        {
-            PR_LOG(sDragLm, PR_LOG_DEBUG, ("Could not get ptrPrimitive, no drag bitmap!"));
-            break;
-        }
-
-        nsCOMPtr<nsISupports> genericData;
-        ptrPrimitive->GetData(getter_AddRefs(genericData));
-        if (genericData == NULL) 
-        {
-            PR_LOG(sDragLm, PR_LOG_DEBUG, ("Could not get data, no drag bitmap!"));
-            break;
-        }
-
-        //dependent on bug 294234 and how it's implemented. This code was for attachment 183634.
-        nsCOMPtr<nsIImageBeOS> image (do_QueryInterface(genericData));
-        if (image == NULL)
-        {
-            PR_LOG(sDragLm, PR_LOG_DEBUG, ("Could not get nsImage, no drag bitmap!"));
-            break;
-        }
-
-        BBitmap *aBitmap;
-        image->GetBitmap(&aBitmap);
-        if (aBitmap==NULL || !aBitmap->IsValid())
-        {
-            PR_LOG(sDragLm, PR_LOG_DEBUG, ("Could not get BBitmap, no drag bitmap %s!", aBitmap==NULL?"(null)":"(not valid)" ));
-            break;        
-        }
-
-        view->DragMessage(mDragMessage, aBitmap, B_OP_OVER, BPoint(-4,-4), view); 
-        noBitmap = false;
-    } while(false);
-# endif    
-    
-    if (noBitmap) 
-        view->DragMessage(mDragMessage, dragRect, view);
-    
-    StartDragSession();
-    view->UnlockLooper();
-    return NS_OK;
-}
-
-//-------------------------------------------------------------------------
-//
-// nsIDragService : StartDragSession
-//
-// We overwrite this so we can log it
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::StartDragSession()
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::StartDragSession()"));
-    return nsBaseDragService::StartDragSession();
-}
-
-//-------------------------------------------------------------------------
-//
-// nsIDragService : EndDragSession
-//
-// We overwrite this so we can log it
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::EndDragSession(PRBool aDoneDrag)
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::EndDragSession()"));
-    //Don't reset drag info, keep it until there is a new drag, in case a negotiated drag'n'drop wants the info.
-    //We need the draginfo as we are ending starting the dragsession
-    //on entering/exiting different views (nsWindows) now.
-    //That way the dragsession is always ended when we go outside mozilla windows, but we do throw away the 
-    // mSourceDocument and mSourceNode. We do hold on to the nsTransferable if it was a internal drag. 
-    //ResetDragInfo();
-    return nsBaseDragService::EndDragSession(aDoneDrag);
-}
-
-//-------------------------------------------------------------------------
-//
-// nsIDragSession : SetCanDrop
-//
-// We overwrite this so we can log it
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::SetCanDrop(PRBool aCanDrop)
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::SetCanDrop(%s)",
-                                   aCanDrop ? "TRUE" : "FALSE"));
-    return nsBaseDragService::SetCanDrop(aCanDrop);
-}
-
-
-//-------------------------------------------------------------------------
-//
-// nsIDragSession : GetCanDrop
-//
-// We overwrite this so we can log it
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::GetCanDrop(PRBool *aCanDrop)
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::GetCanDrop()"));
-    return nsBaseDragService::GetCanDrop(aCanDrop);
-}
-
-//-------------------------------------------------------------------------
-//
-// nsIDragSession : GetNumDropItems
-//
-// Gets the number of items currently being dragged
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::GetNumDropItems(PRUint32 * aNumItems)
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::GetNumDropItems()"));
-    if (nsnull == mDragMessage)
-    {
-        *aNumItems = 0;
-        PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::GetNumDropItems(): WARNING! No dragmessage"));
-        return NS_OK;
-    } 
-    // Did we start this drag?
-    if (IsInternalDrag(mDragMessage))
-        mSourceDataItems->Count(aNumItems);
-    else
-        // The only thing native that I can think of that may have multiple items
-        // would be file references, DND-docs don't say anything about multiple items.
-        *aNumItems = 1;
-
-
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::GetNumDropItems():%d", *aNumItems));
-    return NS_OK;
-}
-
-
-//-------------------------------------------------------------------------
-//
-// nsIDragSession : GetData
-//
-// Copies the data at the given index into the given nsITransferable
-//
-// This is usually called on Drop, but can be called before that
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::GetData(nsITransferable * aTransferable, PRUint32 aItemIndex)
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::GetData %d", aItemIndex));
-
-    if (nsnull==mDragMessage)
-        return NS_ERROR_INVALID_ARG;
-
-    // get flavor list that includes all acceptable flavors (including
-    // ones obtained through conversion). Flavors are nsISupportsStrings
-    // so that they can be seen from JS.
-    nsresult rv = NS_ERROR_FAILURE;
-    nsCOMPtr<nsISupportsArray> flavorList;
-    rv = aTransferable->FlavorsTransferableCanImport(getter_AddRefs(flavorList));
-    if (NS_FAILED(rv))
-        return rv;
-
-    // count the number of flavors
-    PRUint32 cnt;
-    flavorList->Count (&cnt);
-
-    nsCOMPtr<nsISupports> genericWrapper;
-    nsCOMPtr<nsISupportsCString> currentFlavor;
-    nsXPIDLCString flavorStr;
-    nsCOMPtr<nsISupports> genericItem;   
-    nsCOMPtr<nsISupports> data;
-    PRUint32 tmpDataLen = 0;
-    for (unsigned int i= 0; i < cnt; ++i )
-    {
-        flavorList->GetElementAt(i, getter_AddRefs(genericWrapper));
-        currentFlavor = do_QueryInterface(genericWrapper);
-        if (!currentFlavor)
-            continue;
-        currentFlavor->ToString(getter_Copies(flavorStr));
-        
-        PR_LOG(sDragLm, PR_LOG_DEBUG, ("tnsDragService::GetData trying to get transfer data for %s",
-                        (const char *)flavorStr));
-                        
-        if (IsInternalDrag(mDragMessage))
-        {
-            mSourceDataItems->GetElementAt(aItemIndex, getter_AddRefs(genericItem));
-            nsCOMPtr<nsITransferable> item (do_QueryInterface(genericItem));
-            if (!item)
-                continue;
-            rv = item->GetTransferData(flavorStr, getter_AddRefs(data), &tmpDataLen);
-            if (NS_FAILED(rv))
-                continue;
-            PR_LOG(sDragLm, PR_LOG_DEBUG, ("tnsDragService::GetData setting data."));
-            return aTransferable->SetTransferData(flavorStr, data, tmpDataLen);
-        } 
-        else
-        {
-            //Check if transfer message is simple_data or older type of DND
-            //Check if message has data else continue
-            //Negotiate for data (if possible) or get data
-        	 //set and return
-        }
-    }
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("tnsDragService::GetData failed"));
-    return NS_ERROR_FAILURE;
-}
-
-
-//-------------------------------------------------------------------------
-//
-// nsIDragSession : IsDataFlavorSupported
-//
-// Tells whether the given flavor is supported by the current drag object
-//
-// Called on MouseOver events
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::IsDataFlavorSupported (const char *aDataFlavor,
-                                      PRBool *_retval)
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::IsDataFlavorSupported %s", aDataFlavor));
-    if (!_retval)
-        return NS_ERROR_INVALID_ARG;
-
-    // set this to no by default
-    *_retval = PR_FALSE;
-
-    // check to make sure that we have a drag object set, here
-    if (nsnull == mDragMessage)
-    {
-        PR_LOG(sDragLm, PR_LOG_DEBUG, ("*** warning: IsDataFlavorSupported called without a valid drag context!"));
-        return NS_OK;
-    }
-
-    if (IsInternalDrag(mDragMessage))
-    {
-        PRUint32 numDragItems = 0;
-        // if we don't have mDataItems we didn't start this drag so it's
-        // an external client trying to fool us.
-        if (nsnull == mSourceDataItems)
-            return NS_OK;
-        mSourceDataItems->Count(&numDragItems);
-        if (0 == numDragItems)
-            PR_LOG(sDragLm, PR_LOG_DEBUG, ("*** warning: Number of dragged items is zero!"));
-
-        // For all dragged items compare their flavors to the one wanted. If there is a match DataFlavor is supported.
-        nsCOMPtr<nsISupports> genericItem;
-        nsCOMPtr <nsISupportsArray> flavorList;
-        PRUint32 numFlavors;
-        for (PRUint32 itemIndex = 0; itemIndex < numDragItems; ++itemIndex)
-        {
-            mSourceDataItems->GetElementAt(itemIndex, getter_AddRefs(genericItem));
-            nsCOMPtr<nsITransferable> currItem (do_QueryInterface(genericItem));
-            if (nsnull == currItem)
-                continue;
-            currItem->FlavorsTransferableCanExport(getter_AddRefs(flavorList));
-            if (nsnull == flavorList)
-                continue;
-            flavorList->Count( &numFlavors );
-            
-            nsCOMPtr<nsISupports> genericWrapper;
-            nsXPIDLCString flavorStr;
-            for ( PRUint32 flavorIndex = 0; flavorIndex < numFlavors ; ++flavorIndex )
-            {
-                flavorList->GetElementAt (flavorIndex, getter_AddRefs(genericWrapper));
-                nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryInterface(genericWrapper);
-                if (nsnull == currentFlavor)
-                    continue;
-                currentFlavor->ToString ( getter_Copies(flavorStr) );
-                PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::IsDataFlavorSupported checking %s against %s", (const char *)flavorStr, aDataFlavor));
-                if (0 != strcmp(flavorStr, aDataFlavor))
-                    continue;
-                PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::IsDataFlavorSupported Got the flavor!"));
-                *_retval = PR_TRUE;
-                return NS_OK;
-            }
-        }
-    }
-    else 
-    {
-        PR_LOG(sDragLm, PR_LOG_DEBUG, ("*** warning: Native drag not implemented."));
-        // TODO: implement native checking
-    }
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::IsDataFlavorSupported FALSE"));
-    return NS_OK;
-}
-
-//-------------------------------------------------------------------------
-//
-// nsDragServoce : CreateDragMessage
-//
-// Builds the drag message needed for BeOS negotiated DND.
-//
-//-------------------------------------------------------------------------
-BMessage *
-nsDragService::CreateDragMessage()
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::GetInitialDragMessage"));
-    if (nsnull == mSourceDataItems)
-        return NULL;
-    
-    unsigned int numDragItems = 0;
-    mSourceDataItems->Count(&numDragItems);
-    
-    BMessage * returnMsg = new BMessage(B_SIMPLE_DATA);
-    
-    returnMsg->AddString("be:originator", "BeZilla");
-    returnMsg->AddString("be:clip_name","BeZilla Drag Item");
-  
-    if (mDragAction & DRAGDROP_ACTION_COPY)
-        returnMsg->AddInt32("be:actions",B_COPY_TARGET);
-    if (mDragAction & DRAGDROP_ACTION_MOVE)
-        returnMsg->AddInt32("be:actions",B_MOVE_TARGET);
-    if (mDragAction & DRAGDROP_ACTION_LINK)
-        returnMsg->AddInt32("be:actions",B_LINK_TARGET);
-  
-    // Check to see if we're dragging > 1 item.  If we are then we use
-    // an internal only type.
-    if (numDragItems > 1)
-    {
-        PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService:: Dragging a list of items ..."));
-//        returnMsg->AddString("be:types", gMimeListType);
-//        returnMsg->AddString("be:types", B_FILE_MIME_TYPE);
-//        returnMsg->AddString("be:filetypes", gMimeListType);
-//        returnMsg->AddString("be:type_descriptions", gMimeListType);        
-        return returnMsg;
-    }
-
-    PRBool addedType = PR_FALSE;
-
-    nsCOMPtr<nsISupports> genericItem;
-    nsCOMPtr <nsISupportsArray> flavorList;
-    PRUint32 numFlavors;
-    nsCOMPtr<nsISupports> genericWrapper;
-    nsXPIDLCString flavorStr;
-
-    for (unsigned int itemIndex = 0; itemIndex < numDragItems; ++itemIndex)
-    {
-        mSourceDataItems->GetElementAt(itemIndex, getter_AddRefs(genericItem));
-        nsCOMPtr<nsITransferable> currItem (do_QueryInterface(genericItem));
-        if (nsnull == currItem) 
-            continue;
-
-        currItem->FlavorsTransferableCanExport(getter_AddRefs(flavorList));
-        if (nsnull == flavorList)
-            continue;
-        flavorList->Count( &numFlavors );
-        for (PRUint32 flavorIndex = 0; flavorIndex < numFlavors ; ++flavorIndex )
-        {
-            flavorList->GetElementAt(flavorIndex, getter_AddRefs(genericWrapper));
-            nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryInterface(genericWrapper);
-            if (nsnull == currentFlavor)
-                continue;
-            currentFlavor->ToString ( getter_Copies(flavorStr) );
-            
-            PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService:: Adding a flavor to our message: %s",flavorStr.get()));
-            
-            type_code aCode;
-            if (B_OK == returnMsg->GetInfo(flavorStr.get(), &aCode))
-                continue;
-            returnMsg->AddString("be:types",flavorStr.get());
-            
-            //returnMsg->AddString("be:types", B_FILE_MIME_TYPE);
-            returnMsg->AddString("be:filetypes",flavorStr.get());
-            returnMsg->AddString("be:type_descriptions",flavorStr.get());
-            
-            addedType = PR_TRUE;            
-            // Check to see if this is text/unicode.  If it is, add
-            // text/plain since we automatically support text/plain if
-            // we support text/unicode.
-            //tqh: but this may cause duplicates?
-            if (0 == strcmp(flavorStr, kUnicodeMime))
-            {
-                PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService:: Adding a TextMime for the UnicodeMime"));
-                returnMsg->AddString("be:types",kTextMime);
-                //returnMsg->AddString("be:types", B_FILE_MIME_TYPE);
-                returnMsg->AddString("be:filetypes",kTextMime);
-                returnMsg->AddString("be:type_descriptions",kTextMime);
-            }
-        }
-    }
-    
-    if (addedType)
-    {
-        returnMsg->AddString("be:types", B_FILE_MIME_TYPE);
-    }
-    returnMsg->PrintToStream();
-    // If we did not add a type, we can't drag
-    NS_ASSERTION(addedType, "No flavor/mime in the drag message!");
-    return returnMsg;
-}
-
-//-------------------------------------------------------------------------
-//
-// nsIDragSessionBeOS : UpdateDragMessageIfNeeded
-//
-// Updates the drag message from the old one if we enter a mozilla view with
-// a dragmessage from outside. IE one where "be:originator"-key != "BeZilla"
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::UpdateDragMessageIfNeeded(BMessage *aDragMessage)
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::UpdateDragMessageIfNeeded()"));
-    if (aDragMessage == mDragMessage) 
-        return NS_OK;
-    
-    // Did we start this drag?
-    //It's already set properly by InvokeDragSession, so don't do anything and avoid throwing away
-    //mSourceDataItems
-    if (IsInternalDrag(aDragMessage))
-        return NS_OK;
-
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("updating."));
-    ResetDragInfo();
-    mDragMessage = aDragMessage;
-    return NS_OK;
-}
-
-
-//-------------------------------------------------------------------------
-//
-// nsIDragSessionBeOS : TransmitData
-//
-// When a negotiated drag'n'drop to another app occurs nsWindow
-// calls this method with the other apps message which contains
-// the info on what data the app wants. This function checks the 
-// message and transmits the data to the app, thereby ending the
-// drag'n'drop to another app.
-//-------------------------------------------------------------------------
-NS_IMETHODIMP
-nsDragService::TransmitData(BMessage *aNegotiationReply)
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::TransmitData()"));
-/*
-    unsigned int numDragItems = 0;
-    mSourceDataItems->Count(&numDragItems);
-    
-    returnMsg->AddString("be:originator", "BeZilla");
-    returnMsg->AddString("be:clip_name","BeZilla Drag Item");
-  
-    // Check to see if we're dragging > 1 item.  If we are then we use
-    // an internal only type.
-    if (numDragItems > 1)
-    {
-        PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService:: Dragging a list of items ..."));
-        delete aNegotiationReply;
-        return;
-    }
-    BMessage aReply = new BMessage(B_MIME_DATA);
-    char * aMimeType;
-    aNegotiationReply->FindString("be:types", &aMimeType);
-     nsCOMPtr<nsITransferable> item;
-     item->addDataFlavor(aMimeType);
-    GetData(item, 0);
-    aReply->AddData(aMimeType, item->);
-  */  
-    aNegotiationReply->PrintToStream();
-    delete aNegotiationReply;
-    return NS_OK;
-}
-
-//-------------------------------------------------------------------------
-//
-// nsIDragService : ResetDragInfo
-//
-// Resets the stored drag information.
-//
-//-------------------------------------------------------------------------
-void
-nsDragService::ResetDragInfo()
-{
-    PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::ResetDragInfo()"));
-    if (nsnull != mDragMessage) delete mDragMessage;
-    mDragMessage = NULL;
-    mSourceDataItems = NULL;
-}
-
-const char *
-nsDragService::FlavorToBeMime(const char * flavor)
-{
-    //text/plain ok
-    //text/unicode -> text/plain
-    if (0 == strcmp(flavor,kUnicodeMime)) return kTextMime;    
-    //text/html ok
-    //AOLMAIL ignore!!     
-    //image/png ok
-    //image/jpg
-    if (0 == strcmp(flavor,kJPEGImageMime)) return "image/jpeg";
-    //image/gif ok
-    //application/x-moz-file
-    if (0 == strcmp(flavor,kFileMime)) return "application/octet-stream";
-    //text/x-moz-url (only support this as a filetype (Be bookmark))
-    if (0 == strcmp(flavor,kURLMime)) return "application/x-vnd.Be-bookmark";
-    //text/x-moz-url-data - we need to read data to find out what type of URL.
-    //text/x-moz-url-desc - a url-description (same as title?)
-    //kNativeImageMime - don't support as BeOS image
-    //kNativeHTMLMime - don't support on BeOS side
-    //kFilePromiseURLMime
-    //kFilePromiseDestFilename
-    //kFilePromiseMime
-    //kFilePromiseDirectoryMime
-    
-//    if (0==strcmp(flavor,kUnicodeMime))
-}
deleted file mode 100644
--- a/widget/src/beos/nsDragService.h
+++ /dev/null
@@ -1,106 +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):
- *   Fredrik Holmqvist <thesuckiestemail@yahoo.se>
- *
- * 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 ***** */
-
-#ifndef nsDragService_h__
-#define nsDragService_h__
-
-#include "nsBaseDragService.h"
-#include "nsIDragSessionBeOS.h"
-#include <String.h>
-
-class BMessage;
-
-/**
- * Native BeOS DragService wrapper
- */
-class nsDragService : public nsBaseDragService, public nsIDragSessionBeOS
-{
-
-public:
-  nsDragService();
-  virtual ~nsDragService();
-
-  //nsISupports
-  NS_DECL_ISUPPORTS_INHERITED
-  
-  //nsIDragService
-  NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode,
-                               nsISupportsArray * anArrayTransferables,
-                               nsIScriptableRegion * aRegion,
-                               PRUint32 aActionType);
-  NS_IMETHOD StartDragSession();
-  NS_IMETHOD EndDragSession(PRBool aDoneDrag);
-  
-  // nsIDragSession
-  NS_IMETHOD GetNumDropItems      (PRUint32 * aNumItems);
-  NS_IMETHOD GetData              (nsITransferable * aTransferable,
-                                   PRUint32 aItemIndex);
-  NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, 
-                                   PRBool *_retval);
-
-  NS_IMETHOD GetCanDrop(PRBool * aCanDrop);
-  NS_IMETHOD SetCanDrop(PRBool aCanDrop);
-
-  // nsIDragSessionBeOS
-  NS_IMETHOD UpdateDragMessageIfNeeded(BMessage *aDragMessage);
-  NS_IMETHOD TransmitData(BMessage *aNegotiationReply);
-
-
-protected:
-  nsCOMPtr<nsISupportsArray> mSourceDataItems;
-
-private:
-  // BeOS specific methods
-  void ResetDragInfo(void);
-  
-  BMessage      *mDragMessage;
-  
-  //If we want to do image-dragging  
-  //BBitmap	*dragBitmap;
-
-  // internal drag identifier for lists
-  BString        gMimeListType;
-  PRPackedBool         IsDragList(void);
-  PRPackedBool         mDragIsList;
-
-  // get the initial drag message for this drag
-  BMessage * CreateDragMessage();
-  static const char * FlavorToBeMime(const char * flavor);
-};
-
-#endif // nsDragService_h__
deleted file mode 100644
--- a/widget/src/beos/nsFilePicker.cpp
+++ /dev/null
@@ -1,530 +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 the Mozilla browser.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Makoto Hamanaka <VYA04230@nifty.com>
- *   Paul Ashford <arougthopher@lizardland.net>
- *   Sergei Dolgov <sergei_d@fi.tartu.ee>
- *
- * 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 "nsCOMPtr.h"
-#include "nsNetUtil.h"
-#include "nsIServiceManager.h"
-#include "nsIPlatformCharset.h"
-#include "nsFilePicker.h"
-#include "nsILocalFile.h"
-#include "nsIURL.h"
-#include "nsIStringBundle.h"
-#include "nsReadableUtils.h"
-#include "nsEscape.h"
-#include "nsEnumeratorUtils.h"
-#include "nsString.h"
-#include <Window.h>
-#include <View.h>
-#include <Button.h>
-
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsFilePicker, nsIFilePicker)
-
-#ifdef FILEPICKER_SAVE_LAST_DIR
-char nsFilePicker::mLastUsedDirectory[B_PATH_NAME_LENGTH+1] = { 0 };
-#endif
-
-//-------------------------------------------------------------------------
-//
-// nsFilePicker constructor
-//
-//-------------------------------------------------------------------------
-nsFilePicker::nsFilePicker()
-		: mParentWindow(nsnull)
-		, mUnicodeEncoder(nsnull)
-		, mUnicodeDecoder(nsnull)
-{
-}
-
-//-------------------------------------------------------------------------
-//
-// nsFilePicker destructor
-//
-//-------------------------------------------------------------------------
-nsFilePicker::~nsFilePicker()
-{
-	NS_IF_RELEASE(mUnicodeEncoder);
-	NS_IF_RELEASE(mUnicodeDecoder);
-}
-
-//-------------------------------------------------------------------------
-//
-// Show - Display the file dialog
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval)
-{
-	PRBool result = PR_TRUE;
-	nsFilePanelBeOS *ppanel;
-	file_panel_mode panel_mode;
-	bool allow_multiple_selection = false;
-	uint32 node_flavors;
-
-	if (mMode == modeGetFolder) {
-		node_flavors = B_DIRECTORY_NODE;
-		panel_mode = B_OPEN_PANEL;
-	}
-	else if (mMode == modeOpen) {
-		node_flavors = B_FILE_NODE;
-		panel_mode = B_OPEN_PANEL;
-	}
-	else if (mMode == modeOpenMultiple) {
-		node_flavors = B_FILE_NODE;
-		panel_mode = B_OPEN_PANEL;
-		allow_multiple_selection = true;
-	}
-	else if (mMode == modeSave) {
-		node_flavors = B_FILE_NODE;
-		panel_mode = B_SAVE_PANEL;
-	}
-	else {
-		printf("nsFilePicker::Show() wrong mode");
-		return PR_FALSE;
-	}
-
-	ppanel = new nsFilePanelBeOS(
-	             panel_mode, //file_panel_mode mode
-	             node_flavors,  //uint32 node_flavors
-	             allow_multiple_selection,  //bool allow_multiple_selection
-	             false, //bool modal
-	             true //bool hide_when_done
-	         );
-	if (!ppanel) return PR_FALSE;
-
-	// set title
-	if (!mTitle.IsEmpty()) {
-		char *title_utf8 = ToNewUTF8String(mTitle);
-		ppanel->Window()->SetTitle(title_utf8);
-		Recycle(title_utf8);
-	}
-
-	// set default text
-	if (!mDefault.IsEmpty()) {
-		char *defaultText = ToNewUTF8String(mDefault);
-		ppanel->SetSaveText(defaultText);
-		Recycle(defaultText);
-	}
-
-	// set initial directory
-	nsCAutoString initialDir;
-	if (mDisplayDirectory)
-		mDisplayDirectory->GetNativePath(initialDir);
-	if(initialDir.IsEmpty()) {
-#ifdef FILEPICKER_SAVE_LAST_DIR		
-		if (strlen(mLastUsedDirectory) < 2)
-			initialDir.Assign("/boot/home");
-		else
-			initialDir.Assign(mLastUsedDirectory);
-#else
-		ppanel->SetPanelDirectory(initialDir.get());
-#endif			
-	}
-
-#ifdef FILEPICKER_SAVE_LAST_DIR
-	ppanel->SetPanelDirectory(initialDir.get());
-#endif
-
-	// set modal feel
-	if (ppanel->LockLooper()) {
-		ppanel->Window()->SetFeel(B_MODAL_APP_WINDOW_FEEL);
-		ppanel->UnlockLooper();
-	}
-
-	// Show File Panel
-	ppanel->Show();
-	ppanel->WaitForSelection();
-
-	if (ppanel->IsCancelSelected()) {
-		result = PR_FALSE;
-	}
-
-	if ((mMode == modeOpen || mMode == modeOpenMultiple || mMode == modeGetFolder) && ppanel->IsOpenSelected()) {
-		BList *list = ppanel->OpenRefs();
-		uint32 numfiles = list->CountItems();
-		if ((list) && numfiles >= 1) {
-			nsresult rv;
-			for (uint32 i = 0; i< numfiles; i++) {
-				BPath *path = (BPath *)list->ItemAt(i);
-
-				if (path->InitCheck() == B_OK) {
-					mFile.Truncate();
-					// Single and Multiple are exclusive now, though, maybe there is sense
-					// to assign also first list element to mFile even in openMultiple case ?
-					if (mMode == modeOpenMultiple) {
-						nsCOMPtr<nsILocalFile> file = do_CreateInstance("@mozilla.org/file/local;1", &rv);
-						NS_ENSURE_SUCCESS(rv,rv);
-						rv = file->InitWithNativePath(nsDependentCString(path->Path()));
-						NS_ENSURE_SUCCESS(rv,rv);
-						rv = mFiles.AppendObject(file);
-						NS_ENSURE_SUCCESS(rv,rv);
-					} else {
-						if (i == 0) mFile.Assign(path->Path());
-					}
-				} else {
-					printf("path.init failed \n");
-				}
-			}
-		} else {
-			printf("list not init \n");
-		}
-	}
-	else if (mMode == modeSave && ppanel->IsSaveSelected()) {
-		BString savefilename = ppanel->SaveFileName();
-		entry_ref ref = ppanel->SaveDirRef();
-		BPath path(&ref);
-		if (path.InitCheck() == B_OK) {
-			path.Append(savefilename.String(), true);
-			mFile.Assign(path.Path());
-		}
-	}
-	else {
-		result = PR_FALSE;
-	}
-
-	// set current directory to mDisplayDirectory
-	entry_ref dir_ref;
-	ppanel->GetPanelDirectory(&dir_ref);
-	BEntry dir_entry(&dir_ref);
-	BPath dir_path;
-	dir_entry.GetPath(&dir_path);
-	if (!mDisplayDirectory)
-		mDisplayDirectory = do_CreateInstance("@mozilla.org/file/local;1");
-	if (mDisplayDirectory)
-		mDisplayDirectory->InitWithNativePath(nsDependentCString(dir_path.Path()));
-
-	if (ppanel->Lock()) {
-		ppanel->Quit();
-	}
-
-	if (result) {
-		PRInt16 returnOKorReplace = returnOK;
-
-#ifdef FILEPICKER_SAVE_LAST_DIR
-		strncpy(mLastUsedDirectory, dir_path.Path(), B_PATH_NAME_LENGTH+1);
-		if (mDisplayDirectory)
-			mDisplayDirectory->InitWithNativePath( nsDependentCString(mLastUsedDirectory) );
-#endif
-
-		if (mMode == modeSave) {
-			//   we must check if file already exists
-			PRBool exists = PR_FALSE;
-			nsCOMPtr<nsILocalFile> file(do_CreateInstance("@mozilla.org/file/local;1"));
-			NS_ENSURE_TRUE(file, NS_ERROR_FAILURE);
-
-			file->InitWithNativePath(mFile);
-			file->Exists(&exists);
-			if (exists)
-				returnOKorReplace = returnReplace;
-		}
-		*retval = returnOKorReplace;
-	}
-	else {
-		*retval = returnCancel;
-	}
-	return NS_OK;
-
-	// TODO: implement filters
-}
-
-
-
-NS_IMETHODIMP nsFilePicker::GetFile(nsILocalFile **aFile)
-{
-	NS_ENSURE_ARG_POINTER(aFile);
-
-	if (mFile.IsEmpty())
-		return NS_OK;
-
-	nsCOMPtr<nsILocalFile> file(do_CreateInstance("@mozilla.org/file/local;1"));
-
-	NS_ENSURE_TRUE(file, NS_ERROR_FAILURE);
-
-	file->InitWithNativePath(mFile);
-
-	NS_ADDREF(*aFile = file);
-
-	return NS_OK;
-}
-
-NS_IMETHODIMP nsFilePicker::GetFiles(nsISimpleEnumerator **aFiles)
-{
-	NS_ENSURE_ARG_POINTER(aFiles);
-	return NS_NewArrayEnumerator(aFiles, mFiles);
-}
-
-//-------------------------------------------------------------------------
-
-NS_IMETHODIMP nsFilePicker::GetFileURL(nsIURI **aFileURL)
-{
-	*aFileURL = nsnull;
-	nsCOMPtr<nsILocalFile> file;
-	nsresult rv = GetFile(getter_AddRefs(file));
-	if (!file)
-		return rv;
-
-	return NS_NewFileURI(aFileURL, file);
-}
-
-//-------------------------------------------------------------------------
-//
-// Get the file + path
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP nsFilePicker::SetDefaultString(const nsAString& aString)
-{
-	mDefault = aString;
-	return NS_OK;
-}
-
-NS_IMETHODIMP nsFilePicker::GetDefaultString(nsAString& aString)
-{
-	return NS_ERROR_FAILURE;
-}
-
-//-------------------------------------------------------------------------
-//
-// The default extension to use for files
-//
-//-------------------------------------------------------------------------
-NS_IMETHODIMP nsFilePicker::GetDefaultExtension(nsAString& aExtension)
-{
-	aExtension.Truncate();
-	return NS_OK;
-}
-
-NS_IMETHODIMP nsFilePicker::SetDefaultExtension(const nsAString& aExtension)
-{
-	return NS_OK;
-}
-
-//-------------------------------------------------------------------------
-void nsFilePicker::InitNative(nsIWidget *aParent,
-                              const nsAString& aTitle,
-                              PRInt16 aMode)
-{
-	mParentWindow = 0;
-
-  BView *view = (BView *) aParent->GetNativeData(NS_NATIVE_WIDGET);
-  if (view && view->LockLooper()) {
-    mParentWindow = view->Window();
-    view->UnlockLooper();
-  }
-
-	mTitle.Assign(aTitle);
-	mMode = aMode;
-}
-
-NS_IMETHODIMP
-nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter)
-{
-	mFilterList.Append(aTitle);
-	mFilterList.Append(PRUnichar('\0'));
-	mFilterList.Append(aFilter);
-	mFilterList.Append(PRUnichar('\0'));
-
-	return NS_OK;
-}
-
-//-------------------------------------------------------------------------
-//
-// BeOS native File Panel
-//
-//-------------------------------------------------------------------------
-
-// Internal message for when the 'Select <dir>' button is used
-const uint32 MSG_DIRECTORY = 'mDIR';
-
-nsFilePanelBeOS::nsFilePanelBeOS(file_panel_mode mode,
-                                 uint32 node_flavors,
-                                 bool allow_multiple_selection,
-                                 bool modal,
-                                 bool hide_when_done)
-		: BLooper()
-		, BFilePanel(mode,
-		             NULL, NULL,
-		             node_flavors,
-		             allow_multiple_selection,
-		             NULL, NULL,
-		             modal,
-		             hide_when_done)
-		, mSelectedActivity(nsFilePanelBeOS::NOT_SELECTED)
-		, mIsSelected(false)
-		, mSaveFileName("")
-		, mSaveDirRef()
-		, mOpenRefs()
-{
-	if ((wait_sem = create_sem(1,"FilePanel")) < B_OK)
-		printf("nsFilePanelBeOS::nsFilePanelBeOS : create_sem error\n");
-	if (wait_sem > 0) acquire_sem(wait_sem);
-
-	SetTarget(BMessenger(this));
-	
-	if ( mode == B_OPEN_PANEL && node_flavors == B_DIRECTORY_NODE ) 
-	{
-		// Add a 'Select <dirname>' button to the open dialog
-		Window()->Lock();
-		
-		BView *background = Window()->ChildAt(0); 
-		entry_ref ref;
-		char label[10+B_FILE_NAME_LENGTH];
-		GetPanelDirectory(&ref);
-		sprintf(label, "Select '%s'", ref.name);
-		mDirectoryButton = new BButton(
-			BRect(113, background->Bounds().bottom-35, 269, background->Bounds().bottom-10),
-			"directoryButton", label, new BMessage(MSG_DIRECTORY), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
-		
-		if(mDirectoryButton)
-		{
-			background->AddChild(mDirectoryButton);
-			mDirectoryButton->SetTarget(Messenger());
-		}
-		else
-			NS_ASSERTION(false, "Out of memory: failed to create mDirectoryButton");
-		
-		SetButtonLabel(B_DEFAULT_BUTTON, "Select");
-		
-		Window()->Unlock();
-	}
-	else 
-		mDirectoryButton = nsnull;
-
-	this->Run();
-}
-
-nsFilePanelBeOS::~nsFilePanelBeOS()
-{
-	int count = mOpenRefs.CountItems();
-	for (int i=0 ; i<count ; i++) {
-		delete mOpenRefs.ItemAt(i);
-	}
-	
-	if (wait_sem > 0) {
-		delete_sem(wait_sem);
-	}
-}
-
-void nsFilePanelBeOS::MessageReceived(BMessage *msg)
-{
-	switch ( msg->what ) {
-	case B_REFS_RECEIVED: // open
-		int32 count;
-		type_code code;
-		msg->GetInfo("refs", &code, &count);
-		if (code == B_REF_TYPE) {
-			for (int i=0 ; i<count ; i++) {
-				// XXX change - adding BPaths * to list instead entry_refs,
-				// entry_refs are too unsafe objects in our case.
-				entry_ref ref;
-				if (msg->FindRef("refs", i, &ref) == B_OK) {
-					BPath *path = new BPath(&ref);
-					mOpenRefs.AddItem((void *) path);
-				}
-			}
-		} else {
-			printf("nsFilePanelBeOS::MessageReceived() no ref!\n");
-		}
-		mSelectedActivity = OPEN_SELECTED;
-		mIsSelected = true;
-		release_sem(wait_sem);
-		break;
-	
-	case MSG_DIRECTORY: // Directory selected
-	{
-		entry_ref ref;
-		GetPanelDirectory(&ref);
-		BPath *path = new BPath(&ref);
-		mOpenRefs.AddItem((void *) path);
-		mSelectedActivity = OPEN_SELECTED;
-		mIsSelected = true;
-		release_sem(wait_sem);
-		break;
-	}
-
-	case B_SAVE_REQUESTED: // save
-		msg->FindString("name", &mSaveFileName);
-		msg->FindRef("directory", &mSaveDirRef);
-		mSelectedActivity = SAVE_SELECTED;
-		mIsSelected = true;
-		release_sem(wait_sem);
-		break;
-
-	case B_CANCEL: // cancel
-		if (mIsSelected) break;
-		mSelectedActivity = CANCEL_SELECTED;
-		mIsSelected = true;
-		release_sem(wait_sem);
-		break;
-	default:
-		break;
-	}
-}
-
-void nsFilePanelBeOS::WaitForSelection()
-{
-	if (wait_sem > 0) {
-		acquire_sem(wait_sem);
-		release_sem(wait_sem);
-	}
-}
-
-uint32 nsFilePanelBeOS::SelectedActivity()
-{
-	uint32 result = 0;
-	result = mSelectedActivity;
-
-	return result;
-}
-
-void nsFilePanelBeOS::SelectionChanged(void)
-{
-	if(mDirectoryButton)
-	{
-		//Update the 'Select <dir>' button
-		entry_ref ref;
-		char label[50];
-		GetPanelDirectory(&ref);
-		Window()->Lock();
-		sprintf(label, "Select '%s'", ref.name);
-		mDirectoryButton->SetLabel(label);
-		Window()->Unlock();
-	}
-	BFilePanel::SelectionChanged();
-}
-
deleted file mode 100644
--- a/widget/src/beos/nsFilePicker.h
+++ /dev/null
@@ -1,161 +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 the Mozilla browser.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Makoto Hamanaka <VYA04230@nifty.com>
- *   Paul Ashford <arougthopher@lizardland.net>
- *   Sergei Dolgov <sergei_d@fi.tartu.ee>
- *
- * 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 ***** */
-
-#ifndef nsFilePicker_h__
-#define nsFilePicker_h__
-
-#ifndef DEBUG
-// XXX adding mLastUsedDirectory and code for handling last used folder on File Open/Save
-// caused crashes in DEBUG builds on some machines - see comments for bug 177720 
-// works well on "normal" builds
-#define FILEPICKER_SAVE_LAST_DIR 1
-#endif
-
-#include "nsICharsetConverterManager.h"
-#include "nsBaseFilePicker.h"
-#include "nsString.h"
-#include "nsdefs.h"
-#include "nsIFileChannel.h"
-#include "nsILocalFile.h"
-#include "nsISimpleEnumerator.h"
-#include "nsCOMArray.h"
-
-//
-// Native BeOS FileSelector wrapper
-//
-
-#include <StorageKit.h>
-#include <Message.h>
-#include <Window.h>
-#include <String.h>
-class BButton;
-
-class nsFilePicker : public nsBaseFilePicker
-{
-public:
-  NS_DECL_ISUPPORTS
-
-  nsFilePicker();
-  virtual ~nsFilePicker();
-
-  // nsIFilePicker (less what's in nsBaseFilePicker)
-  NS_IMETHOD GetDefaultString(nsAString& aDefaultString);
-  NS_IMETHOD SetDefaultString(const nsAString& aDefaultString);
-  NS_IMETHOD GetDefaultExtension(nsAString& aDefaultExtension);
-  NS_IMETHOD SetDefaultExtension(const nsAString& aDefaultExtension);
-  NS_IMETHOD GetFile(nsILocalFile * *aFile);
-  NS_IMETHOD GetFileURL(nsIURI * *aFileURL);
-  NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles);
-  NS_IMETHOD Show(PRInt16 *_retval);
-  NS_IMETHOD AppendFilter(const nsAString& aTitle, const nsAString& aFilter);
-
-protected:
-  // method from nsBaseFilePicker
-  virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle,
-                          PRInt16 aMode);
-
-
-  void GetFilterListArray(nsString& aFilterList);
-
-  BWindow*                      mParentWindow;
-  nsString                      mTitle;
-  PRInt16                       mMode;
-  nsCString                     mFile;
-  nsString                      mDefault;
-  nsString                      mFilterList;
-  nsIUnicodeEncoder*            mUnicodeEncoder;
-  nsIUnicodeDecoder*            mUnicodeDecoder;
-  PRInt16                       mSelectedType;
-  nsCOMArray<nsILocalFile>      mFiles;
-
-#ifdef FILEPICKER_SAVE_LAST_DIR
-  static char                      mLastUsedDirectory[];
-#endif
-};
-
-class nsFilePanelBeOS : public BLooper, public BFilePanel
-{
-public:
-  nsFilePanelBeOS(file_panel_mode mode,
-                  uint32 node_flavors,
-                  bool allow_multiple_selection,
-                  bool modal,
-                  bool hide_when_done);
-  virtual ~nsFilePanelBeOS();
-
-  virtual void MessageReceived(BMessage *message);
-  virtual void WaitForSelection();
-
-  virtual void SelectionChanged();
-
-  virtual bool IsOpenSelected() {
-    return (SelectedActivity() == OPEN_SELECTED);
-  }
-  virtual bool IsSaveSelected() {
-    return (SelectedActivity() == SAVE_SELECTED);
-  }
-  virtual bool IsCancelSelected() {
-    return (SelectedActivity() == CANCEL_SELECTED);
-  }
-  virtual uint32 SelectedActivity();
-
-  virtual BList *OpenRefs() { return &mOpenRefs; }
-  virtual BString SaveFileName() { return mSaveFileName; }
-  virtual entry_ref SaveDirRef() { return mSaveDirRef; }
-
-  enum {
-      NOT_SELECTED    = 0,
-      OPEN_SELECTED   = 1,
-      SAVE_SELECTED   = 2,
-      CANCEL_SELECTED = 3
-  };
-
-protected:
-  BButton *mDirectoryButton;
-  sem_id wait_sem ;
-  uint32 mSelectedActivity;
-  bool mIsSelected;
-  BString mSaveFileName;
-  entry_ref mSaveDirRef;
-  BList mOpenRefs;
-};
-
-#endif // nsFilePicker_h__
deleted file mode 100644
--- a/widget/src/beos/nsLookAndFeel.cpp
+++ /dev/null
@@ -1,418 +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):
- *   Sergei Dolgov <sergei_d@fi.tartu.ee>
- *
- * 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 "nsLookAndFeel.h"
-#include "nsFont.h"
-#include "nsSize.h"
-
-#include <InterfaceDefs.h>
-#include <Menu.h>
-
-nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel()
-{
-}
-
-nsLookAndFeel::~nsLookAndFeel()
-{
-}
-
-nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
-{
-  nsresult res = NS_OK;
-  rgb_color color;
-  /*
-   * There used to be an entirely separate list of these colors in
-   * nsDeviceContextBeOS::GetSystemAttribute.  The colors given there
-   * were a bit different from these.  If these are inaccurate, it might
-   * be worth looking at cvs history for the ones there to see if they
-   * were better.
-   */
-
-  switch (aID) {
-    case eColor_WindowBackground:
-      aColor = NS_RGB(0xff, 0xff, 0xff); 
-      break;
-    case eColor_WindowForeground:
-      aColor = NS_RGB(0x00, 0x00, 0x00);        
-      break;
-    case eColor_WidgetBackground:
-      aColor = NS_RGB(0xdd, 0xdd, 0xdd);
-      break;
-    case eColor_WidgetForeground:
-      aColor = NS_RGB(0x00, 0x00, 0x00);        
-      break;
-    case eColor_WidgetSelectBackground:
-      {
-        color = ui_color(B_MENU_SELECTION_BACKGROUND_COLOR);
-        aColor = NS_RGB(color.red, color.green, color.blue);
-      }
-      break;
-    case eColor_WidgetSelectForeground:
-      aColor = NS_RGB(0x00, 0x00, 0x80);
-      break;
-    case eColor_Widget3DHighlight:
-      aColor = NS_RGB(0xa0, 0xa0, 0xa0);
-      break;
-    case eColor_Widget3DShadow:
-      aColor = NS_RGB(0x40, 0x40, 0x40);
-      break;
-    case eColor_TextBackground:
-      aColor = NS_RGB(0xff, 0xff, 0xff);
-      break;
-    case eColor_TextForeground: 
-      aColor = NS_RGB(0x00, 0x00, 0x00);
-      break;
-    case eColor_TextSelectBackground:
-    case eColor_IMESelectedRawTextBackground:
-    case eColor_IMESelectedConvertedTextBackground:
-      {
-        // looks good in Mozilla, though, never noticed this color in BeOS menu
-        color = ui_color(B_MENU_SELECTION_BACKGROUND_COLOR);
-        aColor = NS_RGB(color.red, color.green, color.blue);
-      }
-      break;
-    case eColor_TextSelectForeground:
-    case eColor_IMESelectedRawTextForeground:
-    case eColor_IMESelectedConvertedTextForeground:
-      {
-        color = ui_color(B_MENU_SELECTED_ITEM_TEXT_COLOR);
-        aColor = NS_RGB(color.red, color.green, color.blue);
-      }
-      break;
-    case eColor_IMERawInputBackground:
-    case eColor_IMEConvertedTextBackground:
-      aColor = NS_TRANSPARENT;
-      break;
-    case eColor_IMERawInputForeground:
-    case eColor_IMEConvertedTextForeground:
-      aColor = NS_SAME_AS_FOREGROUND_COLOR;
-      break;
-    case eColor_IMERawInputUnderline:
-    case eColor_IMEConvertedTextUnderline:
-      aColor = NS_SAME_AS_FOREGROUND_COLOR;
-      break;
-    case eColor_IMESelectedRawTextUnderline:
-    case eColor_IMESelectedConvertedTextUnderline:
-      aColor = NS_TRANSPARENT;
-      break;
-    case eColor_SpellCheckerUnderline:
-      aColor = NS_RGB(0xff, 0, 0);
-      break;
-	// two following colors get initialisation in XPLookAndFeel.
-	//eColor_TextSelectBackgroundDisabled,
-    //eColor_TextSelectBackgroundAttention,
-    
-    //  CSS 2 Colors
-    case eColor_activeborder:
-      aColor = NS_RGB(0x88, 0x88, 0x88);
-      break;
-    // active titletab
-    case eColor_activecaption:
-      {
-        color = ui_color(B_WINDOW_TAB_COLOR);
-        aColor = NS_RGB(color.red, color.green, color.blue);
-      }    
-      break;