Bug 469499 - Remove MOZ_MACBROWSER ifdefs; r=bsmedberg
authorEd Morley <bmo@edmorley.co.uk>
Tue, 07 Jun 2011 12:35:17 -0700
changeset 71016 f4af0c31419335f1b961e63088260d11264327ed
parent 71015 ef59fe81e9435e30d0e1459c2ca376ace5027659
child 71017 a7546cc8c2eedf4c4b8db10961eb73055b9adfb1
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs469499
milestone7.0a1
Bug 469499 - Remove MOZ_MACBROWSER ifdefs; r=bsmedberg
extensions/spellcheck/Makefile.in
extensions/spellcheck/osxspell/Makefile.in
extensions/spellcheck/osxspell/src/Makefile.in
extensions/spellcheck/osxspell/src/mozOSXSpell.h
extensions/spellcheck/osxspell/src/mozOSXSpell.mm
extensions/spellcheck/src/Makefile.in
extensions/spellcheck/src/mozSpellCheckerFactory.cpp
--- a/extensions/spellcheck/Makefile.in
+++ b/extensions/spellcheck/Makefile.in
@@ -37,19 +37,11 @@
 DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= spellchecker
-DIRS		= idl locales
-
-ifeq (camino,$(MOZ_BUILD_APP))
-DIRS		+= osxspell
-else
-DIRS		+= hunspell
-endif
-
-DIRS += src
+DIRS		= idl locales hunspell src
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/extensions/spellcheck/osxspell/Makefile.in
+++ /dev/null
@@ -1,47 +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 Spellchecker Component.
-#
-# The Initial Developer of the Original Code is Mike Pinkerton.
-# Portions created by the Initial Developer are Copyright (C) 2006
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s): Mike Pinkerton <mikepinkerton@mac.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 *****
-
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= hunspell
-DIRS		= src
-
-include $(topsrcdir)/config/rules.mk
-
deleted file mode 100644
--- a/extensions/spellcheck/osxspell/src/Makefile.in
+++ /dev/null
@@ -1,53 +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 Spellchecker Component.
-#
-# The Initial Developer of the Original Code is Mike Pinkerton.
-# Portions created by the Initial Developer are Copyright (C) 2006
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s): Mike Pinkerton <mikepinkerton@mac.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 *****
-
-DEPTH		= ../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= hunspell
-LIBRARY_NAME	= osxspell_s
-FORCE_STATIC_LIB = 1
-LIBXUL_LIBRARY = 1
-
-
-CMMSRCS = \
-			mozOSXSpell.mm \
-			$(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/extensions/spellcheck/osxspell/src/mozOSXSpell.h
+++ /dev/null
@@ -1,79 +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 Spellchecker Component.
- *
- * The Initial Developer of the Original Code is Mike Pinkerton.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Mike Pinkerton <mikepinkerton@mac.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.
- *
- * This spellchecker is based on the built-in spellchecker on Mac OS X. It
- * does not use any Hunspell technology or rely on their dictionaries. It's just
- * a thin wrapper around the Cocoa NSSpellChecker API.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef mozOSXSpell_h__
-#define mozOSXSpell_h__
-
-#include "mozISpellCheckingEngine.h"
-#include "mozIPersonalDictionary.h"
-#include "nsString.h"
-#include "nsCOMPtr.h"
-#include "nsCycleCollectionParticipant.h"
-
-// Use the same contract ID as the Hunspell spellchecker so we get picked up
-// instead on Mac OS X but we have our own CID. 
-#define MOZ_OSXSPELL_CONTRACTID "@mozilla.org/spellchecker/engine;1"
-#define MOZ_OSXSPELL_CID         \
-{ /* BAABBAF4-71C3-47F4-A576-E75469E485E2 */  \
-0xBAABBAF4, 0x71C3, 0x47F4,                    \
-{ 0xA5, 0x76, 0xE7, 0x54, 0x69, 0xE4, 0x85, 0xE2} }
-
-class mozOSXSpell : public mozISpellCheckingEngine
-{
-public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_MOZISPELLCHECKINGENGINE
-  NS_DECL_CYCLE_COLLECTION_CLASS(mozOSXSpell)
-
-  mozOSXSpell();
-
-private:
- 
-  ~mozOSXSpell();
-
-  // NSSpellChecker provides the ability to add words to the local dictionary,
-  // but it's much easier to let the rest of Gecko handle that via the personal
-  // dictionary given to us and just be ignorant about new words.
-  nsCOMPtr<mozIPersonalDictionary> mPersonalDictionary;
-
-  nsString  mLanguage;    // cached to speed up Check()
-};
-
-#endif
deleted file mode 100644
--- a/extensions/spellcheck/osxspell/src/mozOSXSpell.mm
+++ /dev/null
@@ -1,338 +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 Spellchecker Component.
- *
- * The Initial Developer of the Original Code is Mike Pinkerton.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Mike Pinkerton <mikepinkerton@mac.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.
- *
- * This spellchecker is based on the built-in spellchecker on Mac OS X. It
- * does not use any Hunspell technology or rely on their dictionaries. It's just
- * a thin wrapper around the Cocoa NSSpellChecker API.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "mozOSXSpell.h"
-#include "nsReadableUtils.h"
-#include "nsCRT.h"
-#include "nsObjCExceptions.h"
-
-#import <Cocoa/Cocoa.h>
-
-// utility category we need for PRUnichar<->NSString conversion (taken from Camino)
-@interface NSString(PRUnicharUtils)
-+ (id)stringWithPRUnichars:(const PRUnichar*)inString;
-- (PRUnichar*)createNewUnicodeBuffer;
-@end
-
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(mozOSXSpell)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(mozOSXSpell)
-
-NS_INTERFACE_MAP_BEGIN(mozOSXSpell)
-  NS_INTERFACE_MAP_ENTRY(mozISpellCheckingEngine)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, mozISpellCheckingEngine)
-  NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(mozOSXSpell)
-NS_INTERFACE_MAP_END
-
-NS_IMPL_CYCLE_COLLECTION_1(mozOSXSpell, mPersonalDictionary);
-
-mozOSXSpell::mozOSXSpell()
-{
-}
-
-mozOSXSpell::~mozOSXSpell()
-{
-}
-
-//
-// GetDictionary
-//
-// Nothing to do here, we don't have a dictionary on disk, so this is really
-// just a no-op. The caller is responsible for disposing of |aDictionary|.
-//
-NS_IMETHODIMP mozOSXSpell::GetDictionary(PRUnichar **aDictionary)
-{
-  NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
-
-  NS_ENSURE_ARG_POINTER(aDictionary);
-
-  *aDictionary = [@"" createNewUnicodeBuffer];
-  return NS_OK;
-
-  NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
-}
-
-//
-// SetDictionary
-//
-// Another no-op as there's nothing to load or initialize.
-//
-NS_IMETHODIMP mozOSXSpell::SetDictionary(const PRUnichar *aDictionary)
-{
-  return NS_OK;
-}
-
-//
-// GetLanguage
-//
-// Returns the language of the current dictionary, which should be the l10n
-// the user is running.  The caller is responsible for disposing of |aLanguage|.
-//
-NS_IMETHODIMP mozOSXSpell::GetLanguage(PRUnichar **aLanguage)
-{
-  NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
-
-  NS_ENSURE_ARG_POINTER(aLanguage);
-
-  if (!mLanguage.Length()) {
-    @try {
-      NSString* lang = [[NSSpellChecker sharedSpellChecker] language];
-      *aLanguage = [lang createNewUnicodeBuffer];
-    }
-    @catch (id exception) {
-      // If we get here, the spelling system on the user's machine is almost
-      // certainly damaged; do what the rest of the OS does, and silently
-      // ignore it.
-      *aLanguage = NULL;
-    }
-    mLanguage.Assign(*aLanguage);
-  }
-  else {
-    *aLanguage = ToNewUnicode(mLanguage);
-  }
-
-  return *aLanguage ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
-
-  NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
-}
-
-//
-// GetProvidesPersonalDictionary
-//
-// We let Gecko handle the personal dictionary, even though NSSpellChecker can
-// handle ignoring words itself. 
-//
-NS_IMETHODIMP mozOSXSpell::GetProvidesPersonalDictionary(PRBool *aProvidesPersonalDictionary)
-{
-  NS_ENSURE_ARG_POINTER(aProvidesPersonalDictionary);
-
-  *aProvidesPersonalDictionary = PR_FALSE;
-  return NS_OK;
-}
-
-//
-// GetProvidesWordUtils
-//
-// I have no idea what this is, so we don't provide it.
-//
-NS_IMETHODIMP mozOSXSpell::GetProvidesWordUtils(PRBool *aProvidesWordUtils)
-{
-  NS_ENSURE_ARG_POINTER(aProvidesWordUtils);
-
-  *aProvidesWordUtils = PR_FALSE;
-  return NS_OK;
-}
-
-//
-// GetName
-//
-// Name not supported (nor is it in Hunspell impl)
-//
-NS_IMETHODIMP mozOSXSpell::GetName(PRUnichar * *aName)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-//
-// GetCopyright
-//
-// Copyright not supported (nor is it in Hunspell impl)
-//
-NS_IMETHODIMP mozOSXSpell::GetCopyright(PRUnichar * *aCopyright)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-//
-// GetPersonalDictionary
-//
-// Return the personal dictionary we've been given with Set.
-//
-NS_IMETHODIMP mozOSXSpell::GetPersonalDictionary(mozIPersonalDictionary** aPersonalDictionary)
-{
-  *aPersonalDictionary = mPersonalDictionary;
-  NS_IF_ADDREF(*aPersonalDictionary);
-  return NS_OK;
-}
-
-//
-// SetPersonalDictionary
-//
-// Hold onto the personal dictionary we're given.
-//
-NS_IMETHODIMP mozOSXSpell::SetPersonalDictionary(mozIPersonalDictionary* aPersonalDictionary)
-{
-  mPersonalDictionary = aPersonalDictionary;
-  return NS_OK;
-}
-
-//
-// GetDictionaryList
-//
-// We only support the OS dictionary from NSSpellChecker so there will only ever
-// be one. The caller is responsible for disposing of |aDictionaries|.
-//
-NS_IMETHODIMP mozOSXSpell::GetDictionaryList(PRUnichar ***aDictionaries, PRUint32 *aCount)
-{
-  NS_ENSURE_ARG_POINTER(aDictionaries);
-  NS_ENSURE_ARG_POINTER(aCount);
-
-  *aCount = 1;
-  *aDictionaries = (PRUnichar **)nsMemory::Alloc(sizeof(PRUnichar *)); // only one entry
-  GetLanguage(*aDictionaries);
-	
-	return NS_OK;
-}
-
-//
-// Check
-//
-// Check if the given word is spelled correctly. If the main dictionary says
-// it's not, check again against the peronal dictionary we were given.
-//
-NS_IMETHODIMP mozOSXSpell::Check(const PRUnichar *aWord, PRBool *aResult)
-{
-  NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
-
-  NS_ENSURE_ARG_POINTER(aWord);
-  NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
-
-  NSString* wordStr = [NSString stringWithPRUnichars:aWord];
-  NSRange misspelledRange;
-  @try {
-    misspelledRange = [[NSSpellChecker sharedSpellChecker] checkSpellingOfString:wordStr startingAt:0];
-  }
-  @catch (id exception) {
-    // Silently return true; if something is seriously wrong with the
-    // spelling system on a user's machine, the best thing to do is
-    // to just treat everything as correct.
-    *aResult = PR_TRUE;
-    return NS_OK;
-  }
-  if (misspelledRange.location != NSNotFound && mPersonalDictionary)
-    mPersonalDictionary->Check(aWord, mLanguage.get(), aResult);
-  else
-    *aResult = PR_TRUE;
-
-  return NS_OK;
-
-  NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
-}
-
-//
-// Suggest
-//
-// Provide a list of suggestions for the incrorectly spelled word |aWord| by 
-// converting the list we get back from NSSpellChecker into an array of PRUnichar
-// strings. If |aWord| is spelled correctly, |aSuggestions| will be NULL. The caller
-// is responsible for disposing of |aSuggestions|.
-//
-NS_IMETHODIMP mozOSXSpell::Suggest(const PRUnichar *aWord, PRUnichar ***aSuggestions, PRUint32 *aSuggestionCount)
-{
-  NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
-
-  NS_ENSURE_ARG_POINTER(aSuggestions);
-  NS_ENSURE_ARG_POINTER(aSuggestionCount);
-  *aSuggestions = NULL;
-
-  // check the word against the NSSpellChecker
-  NSString* wordStr = [NSString stringWithPRUnichars:aWord];
-  NSArray* guesses = [[NSSpellChecker sharedSpellChecker] guessesForWord:wordStr];
-  *aSuggestionCount = [guesses count];
-
-  // convert results from NSArray to array of PRUnichar's
-  if (*aSuggestionCount) {
-    *aSuggestions = (PRUnichar **)nsMemory::Alloc(*aSuggestionCount * sizeof(PRUnichar *));    
-    PRUint32 i = 0;
-    NSEnumerator* e = [guesses objectEnumerator];
-    NSString* guess = nil;
-    while ((guess = [e nextObject])) {
-      (*aSuggestions)[i] = [guess createNewUnicodeBuffer];
-      ++i;
-    }
-  }
-
-  return NS_OK;
-
-  NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
-}
-
-NS_IMETHODIMP mozOSXSpell::LoadDictionariesFromDir(nsIFile* aFile)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-#pragma mark -
-
-//
-// String utilities taken from Camino
-//
-
-@implementation NSString(PRUnicharUtils)
-
-- (PRUnichar*)createNewUnicodeBuffer
-{
-  NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSNULL;
-
-  PRUint32 length = [self length];
-  PRUnichar* retStr = (PRUnichar*)nsMemory::Alloc((length + 1) * sizeof(PRUnichar));
-  if (!retStr)
-    return NULL;
-  [self getCharacters:retStr];
-  retStr[length] = PRUnichar(0);
-  return retStr;
-
-  NS_OBJC_END_TRY_ABORT_BLOCK_NSNULL;
-}
-
-+ (id)stringWithPRUnichars:(const PRUnichar*)inString
-{
-  NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
-
-  if (inString)
-    return [self stringWithCharacters:inString length:nsCRT::strlen(inString)];
-  else
-    return [self string];
-
-  NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
-}
-
-@end
--- a/extensions/spellcheck/src/Makefile.in
+++ b/extensions/spellcheck/src/Makefile.in
@@ -57,23 +57,18 @@ CPPSRCS		= \
 		mozPersonalDictionary.cpp	\
 		mozEnglishWordUtils.cpp		\
 		mozGenericWordUtils.cpp		\
 		mozSpellI18NManager.cpp		\
 		mozInlineSpellChecker.cpp	\
 		mozInlineSpellWordUtil.cpp      \
 		$(NULL)
 
-ifeq (camino,$(MOZ_BUILD_APP))
-SHARED_LIBRARY_LIBS += ../osxspell/src/$(LIB_PREFIX)osxspell_s.$(LIB_SUFFIX)
-LOCAL_INCLUDES += -I$(srcdir)/../osxspell/src
-else
 SHARED_LIBRARY_LIBS += ../hunspell/src/$(LIB_PREFIX)hunspell_s.$(LIB_SUFFIX)
 LOCAL_INCLUDES += -I$(srcdir)/../hunspell/src
-endif
 
 EXTRA_DSO_LDOPTS = \
 		$(LIBS_DIR) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_HUNSPELL_LIBS) \
 		$(NULL)
 
--- a/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
+++ b/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
@@ -31,47 +31,36 @@
  * 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 "mozilla/ModuleUtils.h"
-
-#ifdef MOZ_MACBROWSER
-#include "mozOSXSpell.h"
-#else
 #include "mozHunspell.h"
 #include "mozHunspellDirProvider.h"
-#endif
-
 #include "mozSpellChecker.h"
 #include "mozInlineSpellChecker.h"
 #include "nsTextServicesCID.h"
 #include "mozPersonalDictionary.h"
 #include "mozSpellI18NManager.h"
 
 #define NS_SPELLCHECKER_CID         \
 { /* 8227f019-afc7-461e-b030-9f185d7a0e29 */    \
 0x8227F019, 0xAFC7, 0x461e,                     \
 { 0xB0, 0x30, 0x9F, 0x18, 0x5D, 0x7A, 0x0E, 0x29} }
 
 #define MOZ_INLINESPELLCHECKER_CID         \
 { /* 9FE5D975-09BD-44aa-A01A-66402EA28657 */    \
 0x9fe5d975, 0x9bd, 0x44aa,                      \
 { 0xa0, 0x1a, 0x66, 0x40, 0x2e, 0xa2, 0x86, 0x57} }
 
-#ifdef MOZ_MACBROWSER
-NS_GENERIC_FACTORY_CONSTRUCTOR(mozOSXSpell)
-#else
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozHunspell, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(mozHunspellDirProvider)
-#endif
-
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozSpellChecker, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozPersonalDictionary, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(mozSpellI18NManager)
 
 // This special constructor for the inline spell checker asks the inline
 // spell checker if we can create spell checking objects at all (ie, if there
 // are any dictionaries loaded) before trying to create one. The static
 // CanEnableInlineSpellChecking caches the value so this will be faster (we
@@ -99,59 +88,45 @@ mozInlineSpellCheckerConstructor(nsISupp
   }
   NS_ADDREF(inst);
   rv = inst->QueryInterface(aIID, aResult);
   NS_RELEASE(inst);
 
   return rv;
 }
 
-#ifdef MOZ_MACBROWSER
-NS_DEFINE_NAMED_CID(MOZ_OSXSPELL_CID);
-#else
 NS_DEFINE_NAMED_CID(MOZ_HUNSPELL_CID);
 NS_DEFINE_NAMED_CID(HUNSPELLDIRPROVIDER_CID);
-#endif // MOZ_MACBROWSER
 NS_DEFINE_NAMED_CID(NS_SPELLCHECKER_CID);
 NS_DEFINE_NAMED_CID(MOZ_PERSONALDICTIONARY_CID);
 NS_DEFINE_NAMED_CID(MOZ_SPELLI18NMANAGER_CID);
 NS_DEFINE_NAMED_CID(MOZ_INLINESPELLCHECKER_CID);
 
 static const mozilla::Module::CIDEntry kSpellcheckCIDs[] = {
-#ifdef MOZ_MACBROWSER
-    { &kMOZ_OSXSPELL_CID, false, NULL, mozOSXSpellConstructor },
-#else
     { &kMOZ_HUNSPELL_CID, false, NULL, mozHunspellConstructor },
     { &kHUNSPELLDIRPROVIDER_CID, false, NULL, mozHunspellDirProviderConstructor },
-#endif // MOZ_MACBROWSER
     { &kNS_SPELLCHECKER_CID, false, NULL, mozSpellCheckerConstructor },
     { &kMOZ_PERSONALDICTIONARY_CID, false, NULL, mozPersonalDictionaryConstructor },
     { &kMOZ_SPELLI18NMANAGER_CID, false, NULL, mozSpellI18NManagerConstructor },
     { &kMOZ_INLINESPELLCHECKER_CID, false, NULL, mozInlineSpellCheckerConstructor },
     { NULL }
 };
 
 static const mozilla::Module::ContractIDEntry kSpellcheckContracts[] = {
-#ifdef MOZ_MACBROWSER
-    { MOZ_OSXSPELL_CONTRACTID, &kMOZ_OSXSPELL_CID },
-#else
     { MOZ_HUNSPELL_CONTRACTID, &kMOZ_HUNSPELL_CID },
     { mozHunspellDirProvider::kContractID, &kHUNSPELLDIRPROVIDER_CID },
-#endif // MOZ_MACBROWSER
     { NS_SPELLCHECKER_CONTRACTID, &kNS_SPELLCHECKER_CID },
     { MOZ_PERSONALDICTIONARY_CONTRACTID, &kMOZ_PERSONALDICTIONARY_CID },
     { MOZ_SPELLI18NMANAGER_CONTRACTID, &kMOZ_SPELLI18NMANAGER_CID },
     { MOZ_INLINESPELLCHECKER_CONTRACTID, &kMOZ_INLINESPELLCHECKER_CID },
     { NULL }
 };
 
 static const mozilla::Module::CategoryEntry kSpellcheckCategories[] = {
-#ifndef MOZ_MACBROWSER
     { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "spellcheck-directory-provider", mozHunspellDirProvider::kContractID },
-#endif
     { NULL }
 };
 
 const mozilla::Module kSpellcheckModule = {
     mozilla::Module::kVersion,
     kSpellcheckCIDs,
     kSpellcheckContracts,
     kSpellcheckCategories