Bug 655756 - Remove final XP_MAC remnants; r=josh
authorEd Morley <bmo@edmorley.co.uk>
Tue, 10 May 2011 20:24:48 +0200
changeset 69391 b68afa9fd243acb26283e3b4236ad568af6f3fd2
parent 69390 d75f13dbf81fd5e4f11835ae40e26169e994fc8d
child 69392 6f092fa95ba15012578557624f413e5b2e933add
push idunknown
push userunknown
push dateunknown
reviewersjosh
bugs655756
milestone6.0a1
Bug 655756 - Remove final XP_MAC remnants; r=josh
db/mork/src/morkConfig.h
docshell/base/nsDefaultURIFixup.cpp
dom/base/nsGlobalWindow.cpp
editor/composer/src/nsComposerCommands.cpp
editor/composer/src/nsComposerDocumentCommands.cpp
editor/composer/src/nsEditingSession.cpp
editor/libeditor/base/nsEditor.cpp
editor/libeditor/base/nsEditorCommands.cpp
editor/libeditor/base/nsStyleSheetTxns.cpp
editor/libeditor/html/nsHTMLDataTransfer.cpp
editor/libeditor/html/nsHTMLEditRules.cpp
editor/libeditor/html/nsHTMLEditor.cpp
editor/libeditor/html/nsHTMLEditorEventListener.cpp
editor/libeditor/text/nsPlaintextEditor.cpp
editor/txtsvc/src/nsTextServicesDocument.cpp
embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
embedding/components/commandhandler/src/nsCommandManager.cpp
embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
extensions/pref/autoconfig/src/nsReadConfig.cpp
ipc/chromium/src/base/third_party/nspr/prtime.cc
ipc/chromium/src/base/third_party/nspr/prtypes.h
js/src/xpconnect/src/xpccomponents.cpp
layout/base/nsDocumentViewer.cpp
layout/xul/base/src/nsListBoxBodyFrame.cpp
modules/libpref/src/nsPrefService.cpp
modules/libpref/src/prefapi.cpp
modules/libreg/src/nr_bufio.c
modules/libreg/src/vr_stubs.h
netwerk/cache/nsCacheService.cpp
netwerk/cache/nsDiskCacheBinding.cpp
netwerk/cache/nsDiskCacheStreams.cpp
netwerk/protocol/about/nsAboutBloat.cpp
rdf/base/src/nsRDFService.cpp
rdf/datasource/src/nsFileSystemDataSource.cpp
widget/src/xpwidgets/nsPrimitiveHelpers.cpp
widget/src/xpwidgets/nsTransferable.cpp
xpcom/io/nsLinebreakConverter.cpp
--- a/db/mork/src/morkConfig.h
+++ b/db/mork/src/morkConfig.h
@@ -45,18 +45,16 @@
 // } %%%%% end debug mode options in Mork %%%%%
 
 #ifdef MORK_DEBUG
 #define MORK_MAX_CODE_COMPILE 1
 #endif
 
 // { %%%%% begin platform defs peculiar to Mork %%%%%
 
-//#define XP_MAC 1
-
 #ifdef XP_MACOSX
 #define MORK_MAC 1
 #endif
 
 #ifdef XP_OS2
 #define MORK_OS2 1
 #endif
 
--- a/docshell/base/nsDefaultURIFixup.cpp
+++ b/docshell/base/nsDefaultURIFixup.cpp
@@ -812,26 +812,16 @@ const char * nsDefaultURIFixup::GetFileS
   }
 
   return mFsCharset.get();
 }
 
 const char * nsDefaultURIFixup::GetCharsetForUrlBar()
 {
   const char *charset = GetFileSystemCharset();
-#ifdef XP_MAC
-  // check for "x-mac-" prefix
-  if ((strlen(charset) >= 6) && charset[0] == 'x' && charset[2] == 'm')
-  {
-    if (!strcmp("x-mac-roman", charset))
-      return "ISO-8859-1";
-    // we can do more x-mac-xxxx mapping here
-    // or somewhere in intl code like nsIPlatformCharset.
-  }
-#endif
   return charset;
 }
 
 nsresult nsDefaultURIFixup::KeywordURIFixup(const nsACString & aURIString, 
                                             nsIURI** aURI)
 {
     // These are keyword formatted strings
     // "what is mozilla"
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -813,17 +813,17 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalW
     mIsPopupSpam(PR_FALSE),
     mBlockScriptedClosingFlag(PR_FALSE),
     mFireOfflineStatusChangeEventOnThaw(PR_FALSE),
     mCreatingInnerWindow(PR_FALSE),
     mIsChrome(PR_FALSE),
     mCleanMessageManager(PR_FALSE),
     mNeedsFocus(PR_TRUE),
     mHasFocus(PR_FALSE),
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
     mShowAccelerators(PR_FALSE),
     mShowFocusRings(PR_FALSE),
 #else
     mShowAccelerators(PR_TRUE),
     mShowFocusRings(PR_TRUE),
 #endif
     mShowFocusRingForContent(PR_FALSE),
     mFocusByKeyOccurred(PR_FALSE),
@@ -4086,17 +4086,17 @@ nsGlobalWindow::CheckSecurityLeftAndTop(
       winWidth  = DevToCSSIntPixels(winWidth);
       winHeight = DevToCSSIntPixels(winHeight);
 
       // Get the screen dimensions
       // XXX This should use nsIScreenManager once it's fully fleshed out.
       screen->GetAvailLeft(&screenLeft);
       screen->GetAvailWidth(&screenWidth);
       screen->GetAvailHeight(&screenHeight);
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
       /* The mac's coordinate system is different from the assumed Windows'
          system. It offsets by the height of the menubar so that a window
          placed at (0,0) will be entirely visible. Unfortunately that
          correction is made elsewhere (in Widget) and the meaning of
          the Avail... coordinates is overloaded. Here we allow a window
          to be placed at (0,0) because it does make sense to do so.
       */
       screen->GetTop(&screenTop);
@@ -4426,17 +4426,17 @@ NS_IMETHODIMP
 nsGlobalWindow::Dump(const nsAString& aStr)
 {
   if (!DOMWindowDumpEnabled()) {
     return NS_OK;
   }
 
   char *cstr = ToNewUTF8String(aStr);
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
   // have to convert \r to \n so that printing to the console works
   char *c = cstr, *cEnd = cstr + strlen(cstr);
   while (c < cEnd) {
     if (*c == '\r')
       *c = '\n';
     c++;
   }
 #endif
--- a/editor/composer/src/nsComposerCommands.cpp
+++ b/editor/composer/src/nsComposerCommands.cpp
@@ -81,21 +81,16 @@ nsresult SetTextProperty(nsIEditor *aEdi
 
 nsBaseComposerCommand::nsBaseComposerCommand()
 {
 }
 
 NS_IMPL_ISUPPORTS1(nsBaseComposerCommand, nsIControllerCommand)
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 nsBaseStateUpdatingCommand::nsBaseStateUpdatingCommand(const char* aTagName)
 : nsBaseComposerCommand()
 , mTagName(aTagName)
 {
 }
 
 nsBaseStateUpdatingCommand::~nsBaseStateUpdatingCommand()
 {
@@ -192,20 +187,16 @@ nsPasteNoFormattingCommand::GetCommandSt
 
   PRBool enabled = PR_FALSE;
   nsresult rv = IsCommandEnabled(aCommandName, refCon, &enabled);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return aParams->SetBooleanValue(STATE_ENABLED, enabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsStyleUpdatingCommand::nsStyleUpdatingCommand(const char* aTagName)
 : nsBaseStateUpdatingCommand(aTagName)
 {
 }
 
 nsresult
 nsStyleUpdatingCommand::GetCurrentState(nsIEditor *aEditor, 
                                         const char* aTagName,
@@ -288,19 +279,16 @@ nsStyleUpdatingCommand::ToggleState(nsIE
     if (NS_SUCCEEDED(rv))
       rv = SetTextProperty(aEditor,tagName.get(), nsnull, nsnull);
 
     aEditor->EndTransaction();
   }
 
   return rv;
 }
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 nsListCommand::nsListCommand(const char* aTagName)
 : nsBaseStateUpdatingCommand(aTagName)
 {
 }
 
 nsresult
 nsListCommand::GetCurrentState(nsIEditor *aEditor, const char* aTagName,
@@ -346,20 +334,16 @@ nsListCommand::ToggleState(nsIEditor *aE
   else
   {
     rv = editor->MakeOrChangeList(listType, PR_FALSE, EmptyString());
   }
   
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsListItemCommand::nsListItemCommand(const char* aTagName)
 : nsBaseStateUpdatingCommand(aTagName)
 {
 }
 
 nsresult
 nsListItemCommand::GetCurrentState(nsIEditor *aEditor, const char* aTagName,
                                    nsICommandParams *aParams)
@@ -430,20 +414,16 @@ nsListItemCommand::ToggleState(nsIEditor
     //    but we currently don't use this for non DL lists anyway.
     // Problem: won't this replace any current block paragraph style?
     rv = htmlEditor->SetParagraphFormat(itemType);
   }
     
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsRemoveListCommand::IsCommandEnabled(const char * aCommandName,
                                       nsISupports *refCon,
                                       PRBool *outCmdEnabled)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
   if (editor)
   {
@@ -492,20 +472,16 @@ nsRemoveListCommand::GetCommandStatePara
                                            nsICommandParams *aParams, 
                                            nsISupports *refCon)
 {
   PRBool outCmdEnabled = PR_FALSE;
   IsCommandEnabled(aCommandName, refCon, &outCmdEnabled);
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsIndentCommand::IsCommandEnabled(const char * aCommandName,
                                   nsISupports *refCon, PRBool *outCmdEnabled)
 {
   nsCOMPtr<nsIHTMLEditor> editor = do_QueryInterface(refCon);
   *outCmdEnabled = editor ? PR_TRUE : PR_FALSE;
   return NS_OK;
 }
@@ -588,21 +564,16 @@ nsOutdentCommand::GetCommandStateParams(
                                         nsICommandParams *aParams,
                                         nsISupports *refCon)
 {
   PRBool outCmdEnabled = PR_FALSE;
   IsCommandEnabled(aCommandName, refCon, &outCmdEnabled);
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 nsMultiStateCommand::nsMultiStateCommand()
 : nsBaseComposerCommand()
 {
 }
 
 nsMultiStateCommand::~nsMultiStateCommand()
 {
 }
@@ -668,20 +639,16 @@ nsMultiStateCommand::GetCommandStatePara
   nsresult rv = NS_OK;
   if (editor)
   {
       rv = GetCurrentState(editor, aParams);
   }
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsParagraphStateCommand::nsParagraphStateCommand()
 : nsMultiStateCommand()
 {
 }
 
 nsresult
 nsParagraphStateCommand::GetCurrentState(nsIEditor *aEditor,
                                          nsICommandParams *aParams)
@@ -710,20 +677,16 @@ nsParagraphStateCommand::SetState(nsIEdi
 {
   NS_ASSERTION(aEditor, "Need an editor here");
   nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(aEditor);
   NS_ENSURE_TRUE(htmlEditor, NS_ERROR_FAILURE);
 
   return htmlEditor->SetParagraphFormat(newState);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsFontFaceStateCommand::nsFontFaceStateCommand()
 : nsMultiStateCommand()
 {
 }
 
 nsresult
 nsFontFaceStateCommand::GetCurrentState(nsIEditor *aEditor,
                                         nsICommandParams *aParams)
@@ -774,20 +737,16 @@ nsFontFaceStateCommand::SetState(nsIEdit
       rv = htmlEditor->SetInlineProperty(fontAtom, NS_LITERAL_STRING("face"),
                                          newState);
     }
   }
   
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsFontSizeStateCommand::nsFontSizeStateCommand()
   : nsMultiStateCommand()
 {
 }
 
 //  nsCAutoString tOutStateString;
 //  tOutStateString.AssignWithConversion(outStateString);
 nsresult
@@ -854,19 +813,16 @@ nsFontSizeStateCommand::SetState(nsIEdit
     // set the size
     rv = htmlEditor->SetInlineProperty(fontAtom, NS_LITERAL_STRING("size"),
                                        newState);
   }
 
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 nsFontColorStateCommand::nsFontColorStateCommand()
 : nsMultiStateCommand()
 {
 }
 
 nsresult
 nsFontColorStateCommand::GetCurrentState(nsIEditor *aEditor,
                                          nsICommandParams *aParams)
@@ -904,20 +860,16 @@ nsFontColorStateCommand::SetState(nsIEdi
   } else {
     rv = htmlEditor->SetInlineProperty(fontAtom, NS_LITERAL_STRING("color"), 
                                        newState);
   }
   
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsHighlightColorStateCommand::nsHighlightColorStateCommand()
 : nsMultiStateCommand()
 {
 }
 
 nsresult
 nsHighlightColorStateCommand::GetCurrentState(nsIEditor *aEditor,
                                               nsICommandParams *aParams)
@@ -966,20 +918,16 @@ nsHighlightColorStateCommand::IsCommandE
                                                PRBool *outCmdEnabled)
 {
   nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(refCon);
   *outCmdEnabled = htmlEditor ? PR_TRUE : PR_FALSE;
   return NS_OK;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsBackgroundColorStateCommand::nsBackgroundColorStateCommand()
 : nsMultiStateCommand()
 {
 }
 
 nsresult
 nsBackgroundColorStateCommand::GetCurrentState(nsIEditor *aEditor,
                                                nsICommandParams *aParams)
@@ -1008,20 +956,16 @@ nsBackgroundColorStateCommand::SetState(
   NS_ASSERTION(aEditor, "Need an editor here");
   
   nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(aEditor);
   NS_ENSURE_TRUE(htmlEditor, NS_ERROR_FAILURE);
 
   return htmlEditor->SetBackgroundColor(newState);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsAlignCommand::nsAlignCommand()
 : nsMultiStateCommand()
 {
 }
 
 nsresult
 nsAlignCommand::GetCurrentState(nsIEditor *aEditor, nsICommandParams *aParams)
 {
@@ -1069,22 +1013,16 @@ nsAlignCommand::SetState(nsIEditor *aEdi
   NS_ASSERTION(aEditor, "Need an editor here");
   
   nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(aEditor);
   NS_ENSURE_TRUE(htmlEditor, NS_ERROR_FAILURE);
 
   return htmlEditor->Align(newState);
 }
 
-
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 nsAbsolutePositioningCommand::nsAbsolutePositioningCommand()
 : nsBaseStateUpdatingCommand("")
 {
 }
 
 NS_IMETHODIMP
 nsAbsolutePositioningCommand::IsCommandEnabled(const char * aCommandName,
                                                nsISupports *aCommandRefCon,
@@ -1146,20 +1084,16 @@ nsAbsolutePositioningCommand::ToggleStat
   }
   else {
     rv = htmlEditor->AbsolutePositionSelection(PR_TRUE);
   }
   return rv;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsDecreaseZIndexCommand::IsCommandEnabled(const char * aCommandName,
                                           nsISupports *refCon,
                                           PRBool *outCmdEnabled)
 {
   nsCOMPtr<nsIHTMLAbsPosEditor> htmlEditor = do_QueryInterface(refCon);
   NS_ENSURE_TRUE(htmlEditor, NS_ERROR_FAILURE);
 
@@ -1207,20 +1141,16 @@ nsDecreaseZIndexCommand::GetCommandState
 
   PRBool enabled = PR_FALSE;
   nsresult rv = IsCommandEnabled(aCommandName, refCon, &enabled);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return aParams->SetBooleanValue(STATE_ENABLED, enabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsIncreaseZIndexCommand::IsCommandEnabled(const char * aCommandName,
                                           nsISupports *refCon,
                                           PRBool *outCmdEnabled)
 {
   nsCOMPtr<nsIHTMLAbsPosEditor> htmlEditor = do_QueryInterface(refCon);
   NS_ENSURE_TRUE(htmlEditor, NS_ERROR_FAILURE);
 
@@ -1261,20 +1191,16 @@ nsIncreaseZIndexCommand::GetCommandState
 
   PRBool enabled = PR_FALSE;
   nsresult rv = IsCommandEnabled(aCommandName, refCon, &enabled);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return aParams->SetBooleanValue(STATE_ENABLED, enabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 
 NS_IMETHODIMP
 nsRemoveStylesCommand::IsCommandEnabled(const char * aCommandName,
                                         nsISupports *refCon,
                                         PRBool *outCmdEnabled)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
   // test if we have any styles?
@@ -1312,20 +1238,16 @@ nsRemoveStylesCommand::GetCommandStatePa
                                              nsICommandParams *aParams,
                                              nsISupports *refCon)
 {
   PRBool outCmdEnabled = PR_FALSE;
   IsCommandEnabled(aCommandName, refCon, &outCmdEnabled);
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsIncreaseFontSizeCommand::IsCommandEnabled(const char * aCommandName,
                                             nsISupports *refCon,
                                             PRBool *outCmdEnabled)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
   // test if we have any styles?
   *outCmdEnabled = editor ? PR_TRUE : PR_FALSE;
@@ -1361,20 +1283,16 @@ nsIncreaseFontSizeCommand::GetCommandSta
                                                  nsICommandParams *aParams,
                                                  nsISupports *refCon)
 {
   PRBool outCmdEnabled = PR_FALSE;
   IsCommandEnabled(aCommandName, refCon, &outCmdEnabled);
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsDecreaseFontSizeCommand::IsCommandEnabled(const char * aCommandName,
                                             nsISupports *refCon,
                                             PRBool *outCmdEnabled)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
   // test if we are at min size?
   *outCmdEnabled = editor ? PR_TRUE : PR_FALSE;
@@ -1410,20 +1328,16 @@ nsDecreaseFontSizeCommand::GetCommandSta
                                                  nsICommandParams *aParams,
                                                  nsISupports *refCon)
 {
   PRBool outCmdEnabled = PR_FALSE;
   IsCommandEnabled(aCommandName, refCon, &outCmdEnabled);
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsInsertHTMLCommand::IsCommandEnabled(const char * aCommandName,
                                       nsISupports *refCon,
                                       PRBool *outCmdEnabled)
 {
   NS_ENSURE_ARG_POINTER(outCmdEnabled);
   nsCOMPtr<nsIHTMLEditor> editor = do_QueryInterface(refCon);
   *outCmdEnabled = editor ? PR_TRUE : PR_FALSE;
@@ -1467,20 +1381,16 @@ nsInsertHTMLCommand::GetCommandStatePara
   NS_ENSURE_ARG_POINTER(aParams);
   NS_ENSURE_ARG_POINTER(refCon);
 
   PRBool outCmdEnabled = PR_FALSE;
   IsCommandEnabled(aCommandName, refCon, &outCmdEnabled);
   return aParams->SetBooleanValue(STATE_ENABLED, outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMPL_ISUPPORTS_INHERITED0(nsInsertTagCommand, nsBaseComposerCommand)
 
 nsInsertTagCommand::nsInsertTagCommand(const char* aTagName)
 : nsBaseComposerCommand()
 , mTagName(aTagName)
 {
 }
 
@@ -1579,19 +1489,16 @@ nsInsertTagCommand::GetCommandStateParam
   NS_ENSURE_ARG_POINTER(aParams);
   NS_ENSURE_ARG_POINTER(refCon);
 
   PRBool outCmdEnabled = PR_FALSE;
   IsCommandEnabled(aCommandName, refCon, &outCmdEnabled);
   return aParams->SetBooleanValue(STATE_ENABLED, outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 /****************************/
 //HELPER METHODS
 /****************************/
 
 nsresult
 GetListState(nsIEditor *aEditor, PRBool *aMixed, PRUnichar **_retval)
 {
--- a/editor/composer/src/nsComposerDocumentCommands.cpp
+++ b/editor/composer/src/nsComposerDocumentCommands.cpp
@@ -443,20 +443,16 @@ nsSetDocumentStateCommand::GetCommandSta
  *
  *  5. Use GetCommandStateParams() to obtain state information
  *     e.g., any creation state codes when creating an editor are 
  *     supplied for "obs_documentCreated" command in the 
  *     "state_data" param's value
  *
  */
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsDocumentStateCommand::IsCommandEnabled(const char* aCommandName,
                                          nsISupports *refCon,
                                          PRBool *outCmdEnabled)
 {
   NS_ENSURE_ARG_POINTER(outCmdEnabled);
   // Always return false to discourage callers from using DoCommand()
   *outCmdEnabled = PR_FALSE;
--- a/editor/composer/src/nsEditingSession.cpp
+++ b/editor/composer/src/nsEditingSession.cpp
@@ -636,20 +636,16 @@ nsEditingSession::GetEditorForWindow(nsI
   nsCOMPtr<nsIEditorDocShell> editorDocShell;
   nsresult rv = GetEditorDocShellFromWindow(aWindow,
                                             getter_AddRefs(editorDocShell));
   NS_ENSURE_SUCCESS(rv, rv);  
   
   return editorDocShell->GetEditor(outEditor);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 /*---------------------------------------------------------------------------
 
   OnStateChange
 
 ----------------------------------------------------------------------------*/
 NS_IMETHODIMP
 nsEditingSession::OnStateChange(nsIWebProgress *aWebProgress,
                                 nsIRequest *aRequest,
@@ -889,21 +885,16 @@ NS_IMETHODIMP
 nsEditingSession::OnSecurityChange(nsIWebProgress *aWebProgress,
                                    nsIRequest *aRequest, PRUint32 state)
 {
     NS_NOTREACHED("notification excluded in AddProgressListener(...)");
     return NS_OK;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 /*---------------------------------------------------------------------------
 
   IsProgressForTargetDocument
 
   Check that this notification is for our document.
 ----------------------------------------------------------------------------*/
 
 PRBool
@@ -1144,21 +1135,16 @@ nsEditingSession::EndPageLoad(nsIWebProg
 #if 0
   // Shouldn't we do this when we want to edit sub-frames?
   return MakeWindowEditable(domWindow, "html", PR_FALSE, mInteractive);
 #else
   return NS_OK;
 #endif
 }
 
-
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 /*---------------------------------------------------------------------------
 
   GetDocShellFromWindow
 
   Utility method. This will always return nsnull if no docShell is found.
 ----------------------------------------------------------------------------*/
 nsIDocShell *
 nsEditingSession::GetDocShellFromWindow(nsIDOMWindow *aWindow)
--- a/editor/libeditor/base/nsEditor.cpp
+++ b/editor/libeditor/base/nsEditor.cpp
@@ -210,22 +210,16 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
  NS_INTERFACE_MAP_ENTRY(nsIEditorIMESupport)
  NS_INTERFACE_MAP_ENTRY(nsIEditor)
  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIEditor)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsEditor)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsEditor)
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditorMethods 
-#pragma mark -
-#endif
-
 
 NS_IMETHODIMP
 nsEditor::Init(nsIDOMDocument *aDoc, nsIContent *aRoot, nsISelectionController *aSelCon, PRUint32 aFlags)
 {
   NS_PRECONDITION(aDoc, "bad arg");
   if (!aDoc)
     return NS_ERROR_NULL_POINTER;
 
@@ -1334,22 +1328,16 @@ NS_IMETHODIMP nsEditor::SyncRealTimeSpel
 
 NS_IMETHODIMP nsEditor::SetSpellcheckUserOverride(PRBool enable)
 {
   mSpellcheckCheckboxState = enable ? eTriTrue : eTriFalse;
 
   return SyncRealTimeSpell();
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  main node manipulation routines 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP nsEditor::CreateNode(const nsAString& aTag,
                                    nsIDOMNode *    aParent,
                                    PRInt32         aPosition,
                                    nsIDOMNode **   aNewNode)
 {
   PRInt32 i;
 
   nsAutoRules beginRulesSniffing(this, kOpCreateNode, nsIEditor::eNext);
@@ -1697,21 +1685,16 @@ nsEditor::MoveNode(nsIDOMNode *aNode, ns
   }
 
   // put aNode in new parent
   res = DeleteNode(aNode);
   NS_ENSURE_SUCCESS(res, res);
   return InsertNode(aNode, aParent, aOffset);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  editor observer maintainance
-#pragma mark -
-#endif
 
 NS_IMETHODIMP
 nsEditor::AddEditorObserver(nsIEditorObserver *aObserver)
 {
   // we don't keep ownership of the observers.  They must
   // remove themselves as observers before they are destroyed.
   
   NS_ENSURE_TRUE(aObserver, NS_ERROR_NULL_POINTER);
@@ -1739,21 +1722,16 @@ nsEditor::RemoveEditorObserver(nsIEditor
 }
 
 void nsEditor::NotifyEditorObservers(void)
 {
   for (PRInt32 i = 0; i < mEditorObservers.Count(); i++)
     mEditorObservers[i]->EditAction();
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  action listener maintainance
-#pragma mark -
-#endif
 
 NS_IMETHODIMP
 nsEditor::AddEditActionListener(nsIEditActionListener *aListener)
 {
   NS_ENSURE_TRUE(aListener, NS_ERROR_NULL_POINTER);
 
   // Make sure the listener isn't already on the list
   if (mActionListeners.IndexOf(aListener) == -1) 
@@ -1773,23 +1751,16 @@ nsEditor::RemoveEditActionListener(nsIEd
 
   if (!mActionListeners.RemoveObject(aListener))
     return NS_ERROR_FAILURE;
 
   return NS_OK;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  docstate listener maintainance
-#pragma mark -
-#endif
-
-
 NS_IMETHODIMP
 nsEditor::AddDocumentStateListener(nsIDocumentStateListener *aListener)
 {
   NS_ENSURE_TRUE(aListener, NS_ERROR_NULL_POINTER);
 
   if (mDocStateListeners.IndexOf(aListener) == -1)
   {
     if (!mDocStateListeners.AppendObject(aListener))
@@ -1807,22 +1778,16 @@ nsEditor::RemoveDocumentStateListener(ns
 
   if (!mDocStateListeners.RemoveObject(aListener))
     return NS_ERROR_FAILURE;
 
   return NS_OK;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  misc 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP nsEditor::OutputToString(const nsAString& aFormatType,
                                        PRUint32 aFlags,
                                        nsAString& aOutputString)
 {
   // these should be implemented by derived classes.
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
@@ -1868,21 +1833,16 @@ NS_IMETHODIMP
 nsEditor::DebugUnitTests(PRInt32 *outNumTests, PRInt32 *outNumTestsFailed)
 {
 #ifdef DEBUG
   NS_NOTREACHED("This should never get called. Overridden by subclasses");
 #endif
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  support for selection preservation
-#pragma mark -
-#endif
 
 PRBool   
 nsEditor::ArePreservingSelection()
 {
   return !(mSavedSel.IsEmpty());
 }
 
 nsresult 
@@ -1905,22 +1865,16 @@ nsEditor::RestorePreservedSelection(nsIS
 void     
 nsEditor::StopPreservingSelection()
 {
   mRangeUpdater.DropSelectionState(mSavedSel);
   mSavedSel.MakeEmpty();
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  IME event handlers 
-#pragma mark -
-#endif
-
 nsresult
 nsEditor::BeginIMEComposition()
 {
   mInIMEMode = PR_TRUE;
   if (mPhonetic) {
     mPhonetic->Truncate(0);
   }
   return NS_OK;
@@ -1956,42 +1910,28 @@ nsEditor::EndIMEComposition()
 
   // notify editor observers of action
   NotifyEditorObservers();
 
   return rv;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIPhonetic
-#pragma mark -
-#endif
-
-
 NS_IMETHODIMP
 nsEditor::GetPhonetic(nsAString& aPhonetic)
 {
   if (mPhonetic)
     aPhonetic = *mPhonetic;
   else
     aPhonetic.Truncate(0);
 
   return NS_OK;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditorIMESupport 
-#pragma mark -
-#endif
-
-
 static nsresult
 GetEditorContentWindow(nsIDOMElement *aRoot, nsIWidget **aResult)
 {
   NS_ENSURE_TRUE(aRoot && aResult, NS_ERROR_NULL_POINTER);
 
   *aResult = 0;
 
   nsCOMPtr<nsIContent> content = do_QueryInterface(aRoot);
@@ -2030,17 +1970,17 @@ NS_IMETHODIMP
 nsEditor::ForceCompositionEnd()
 {
 
 // We can test mInIMEMode and do some optimization for Mac and Window
 // Howerver, since UNIX support over-the-spot, we cannot rely on that 
 // flag for Unix.
 // We should use nsILookAndFeel to resolve this
 
-#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2)
   // XXXmnakano see bug 558976, ResetInputState() has two meaning which are
   // "commit the composition" and "cursor is moved".  This method name is
   // "ForceCompositionEnd", so, ResetInputState() should be used only for the
   // former here.  However, ResetInputState() is also used for the latter here
   // because even if we don't have composition, we call ResetInputState() on
   // Linux.  Currently, nsGtkIMModule can know the timing of the cursor move,
   // so, the latter meaning should be gone and we should remove this #if.
   if(! mInIMEMode)
@@ -2099,24 +2039,19 @@ nsEditor::GetPreferredIMEState(PRUint32 
 NS_IMETHODIMP
 nsEditor::GetComposing(PRBool* aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   *aResult = IsIMEComposing();
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  public nsEditor methods 
-#pragma mark -
-#endif
+
 /* Non-interface, public methods */
 
-
 NS_IMETHODIMP
 nsEditor::GetRootElement(nsIDOMElement **aRootElement)
 {
   NS_ENSURE_ARG_POINTER(aRootElement);
   NS_ENSURE_TRUE(mRootElement, NS_ERROR_NOT_AVAILABLE);
   *aRootElement = mRootElement;
   NS_ADDREF(*aRootElement);
   return NS_OK;
@@ -2269,21 +2204,16 @@ nsEditor::CloneAttributes(nsIDOMNode *aD
           }
         }        
       }
     }
   }
   return result;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  Protected and static methods 
-#pragma mark -
-#endif
 
 NS_IMETHODIMP nsEditor::ScrollSelectionIntoView(PRBool aScrollToAnchor)
 {
   nsCOMPtr<nsISelectionController> selCon;
   if (NS_SUCCEEDED(GetSelectionController(getter_AddRefs(selCon))) && selCon)
   {
     PRInt16 region = nsISelectionController::SELECTION_FOCUS_REGION;
 
@@ -2756,21 +2686,16 @@ NS_IMETHODIMP nsEditor::CreateTxnForJoin
   }
 
   return rv;
 }
 
 
 // END nsEditor core implementation
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsEditor public static helper methods 
-#pragma mark -
-#endif
 
 // BEGIN nsEditor public helper methods
 
 nsresult
 nsEditor::SplitNodeImpl(nsIDOMNode * aExistingRightNode,
                         PRInt32      aOffset,
                         nsIDOMNode*  aNewLeftNode,
                         nsIDOMNode*  aParent)
@@ -4266,23 +4191,16 @@ nsresult nsEditor::EndUpdateViewBatch()
 
 PRBool 
 nsEditor::GetShouldTxnSetSelection()
 {
   return mShouldTxnSetSelection;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  protected nsEditor methods 
-#pragma mark -
-#endif
-
-
 NS_IMETHODIMP 
 nsEditor::DeleteSelectionImpl(nsIEditor::EDirection aAction)
 {
   nsCOMPtr<nsISelection>selection;
   nsresult res = GetSelection(getter_AddRefs(selection));
   NS_ENSURE_SUCCESS(res, res);
   nsRefPtr<EditAggregateTxn> txn;
   nsCOMPtr<nsIDOMNode> deleteNode;
--- a/editor/libeditor/base/nsEditorCommands.cpp
+++ b/editor/libeditor/base/nsEditorCommands.cpp
@@ -55,20 +55,16 @@
 
 
 nsBaseEditorCommand::nsBaseEditorCommand()
 {
 }
 
 NS_IMPL_ISUPPORTS1(nsBaseEditorCommand, nsIControllerCommand)
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 
 NS_IMETHODIMP
 nsUndoCommand::IsCommandEnabled(const char * aCommandName, 
                                 nsISupports *aCommandRefCon, 
                                 PRBool *outCmdEnabled)
 {
   NS_ENSURE_ARG_POINTER(outCmdEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
@@ -785,19 +781,16 @@ nsSelectionMoveCommands::GetCommandState
                                                nsICommandParams *aParams,
                                                nsISupports *aCommandRefCon)
 {
   PRBool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED,canUndo);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 NS_IMETHODIMP
 nsInsertPlaintextCommand::IsCommandEnabled(const char * aCommandName,
                                            nsISupports *refCon, 
                                            PRBool *outCmdEnabled)
 {
   NS_ENSURE_ARG_POINTER(outCmdEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
@@ -845,20 +838,16 @@ nsInsertPlaintextCommand::GetCommandStat
   NS_ENSURE_ARG_POINTER(aParams);
 
   PRBool outCmdEnabled = PR_FALSE;
   IsCommandEnabled(aCommandName, refCon, &outCmdEnabled);
   return aParams->SetBooleanValue(STATE_ENABLED, outCmdEnabled);
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsPasteQuotationCommand::IsCommandEnabled(const char * aCommandName,
                                           nsISupports *refCon,
                                           PRBool *outCmdEnabled)
 {
   NS_ENSURE_ARG_POINTER(outCmdEnabled);
 
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
--- a/editor/libeditor/base/nsStyleSheetTxns.cpp
+++ b/editor/libeditor/base/nsStyleSheetTxns.cpp
@@ -123,20 +123,16 @@ AddStyleSheetTxn::UndoTransaction()
 
 NS_IMETHODIMP
 AddStyleSheetTxn::GetTxnDescription(nsAString& aString)
 {
   aString.AssignLiteral("AddStyleSheetTxn");
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 
 RemoveStyleSheetTxn::RemoveStyleSheetTxn()
 :  EditTxn()
 ,  mEditor(NULL)
 {
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(RemoveStyleSheetTxn)
--- a/editor/libeditor/html/nsHTMLDataTransfer.cpp
+++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp
@@ -1565,17 +1565,17 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromDr
       PRBool userWantsCopy = PR_FALSE;
 
       nsCOMPtr<nsIDOMNSUIEvent> nsuiEvent(do_QueryInterface(aDropEvent));
       NS_ENSURE_TRUE(nsuiEvent, NS_ERROR_FAILURE);
 
       nsCOMPtr<nsIDOMMouseEvent> mouseEvent(do_QueryInterface(aDropEvent));
       if (mouseEvent)
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
         mouseEvent->GetAltKey(&userWantsCopy);
 #else
         mouseEvent->GetCtrlKey(&userWantsCopy);
 #endif
 
       // Current doc is destination
       nsCOMPtr<nsIDOMDocument>destdomdoc; 
       rv = GetDocument(getter_AddRefs(destdomdoc)); 
--- a/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -35,21 +35,16 @@
  * 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 ***** */
 
-/* build on macs with low memory */
-#if defined(XP_MAC) && defined(MOZ_MAC_LOWMEM)
-#pragma optimization_level 1
-#endif
-
 #include "nsHTMLEditRules.h"
 
 #include "nsEditor.h"
 #include "nsTextEditUtils.h"
 #include "nsHTMLEditUtils.h"
 #include "nsHTMLCSSUtils.h"
 #include "nsHTMLEditor.h"
 
@@ -8396,22 +8391,16 @@ nsHTMLEditRules::InsertMozBRIfNeeded(nsI
   NS_ENSURE_SUCCESS(res, res);
   if (isEmpty)
   {
     res = CreateMozBR(aNode, 0, address_of(brNode));
   }
   return res;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditActionListener methods 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP 
 nsHTMLEditRules::WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, PRInt32 aPosition)
 {
   return NS_OK;  
 }
 
 NS_IMETHODIMP 
 nsHTMLEditRules::DidCreateNode(const nsAString& aTag, 
--- a/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/editor/libeditor/html/nsHTMLEditor.cpp
@@ -1388,22 +1388,16 @@ nsHTMLEditor::GetIsDocumentEditable(PRBo
   return NS_OK;
 }
 
 PRBool nsHTMLEditor::IsModifiable()
 {
   return !IsReadonly();
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIHTMLEditor methods 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsHTMLEditor::UpdateBaseURL()
 {
   nsCOMPtr<nsIDOMDocument> domDoc;
   GetDocument(getter_AddRefs(domDoc));
   NS_ENSURE_TRUE(domDoc, NS_ERROR_FAILURE);
 
   // Look for an HTML <base> tag
@@ -3479,21 +3473,16 @@ nsHTMLEditor::GetLinkedObjects(nsISuppor
       }
       iter->Next();
     }
   }
 
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditorStyleSheets methods 
-#pragma mark -
-#endif
 
 NS_IMETHODIMP
 nsHTMLEditor::AddStyleSheet(const nsAString &aURL)
 {
   // Enable existing sheet if already loaded.
   if (EnableExistingStyleSheet(aURL))
     return NS_OK;
 
@@ -3805,22 +3794,16 @@ nsHTMLEditor::GetEmbeddedObjects(nsISupp
       iter->Next();
     }
   }
 
   return res;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditor overrides 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP nsHTMLEditor::DeleteNode(nsIDOMNode * aNode)
 {
   // do nothing if the node is read-only
   if (!IsModifiableNode(aNode) && !IsMozEditorBogusNode(aNode)) {
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIDOMNode> selectAllNode = FindUserSelectAllNode(aNode);
@@ -3858,22 +3841,16 @@ NS_IMETHODIMP nsHTMLEditor::InsertTextIm
   // do nothing if the node is read-only
   if (!IsModifiableNode(*aInOutNode)) {
     return NS_ERROR_FAILURE;
   }
 
   return nsEditor::InsertTextImpl(aStringToInsert, aInOutNode, aInOutOffset, aDoc);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsStubMutationObserver overrides 
-#pragma mark -
-#endif
-
 void
 nsHTMLEditor::ContentAppended(nsIDocument *aDocument, nsIContent* aContainer,
                               nsIContent* aFirstNewContent,
                               PRInt32 /* unused */)
 {
   ContentInserted(aDocument, aContainer, aFirstNewContent, 0);
 }
 
@@ -3917,21 +3894,16 @@ nsHTMLEditor::ContentRemoved(nsIDocument
     if (node && IsMozEditorBogusNode(node)) {
       // Ignore removal of the bogus node
       return;
     }
     mRules->DocumentModified();
   }
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  support utils
-#pragma mark -
-#endif
 
 /* This routine examines aNode and it's ancestors looking for any node which has the
    -moz-user-select: all style lit.  Return the highest such ancestor.  */
 nsCOMPtr<nsIDOMNode> nsHTMLEditor::FindUserSelectAllNode(nsIDOMNode *aNode)
 {
   nsCOMPtr<nsIDOMNode> resultNode;  // starts out empty
   nsCOMPtr<nsIDOMNode> node = aNode;
   nsIDOMElement *root = GetRoot();
@@ -4066,22 +4038,16 @@ nsHTMLEditor::DebugUnitTests(PRInt32 *ou
   tester->Run(this, outNumTests, outNumTestsFailed);
   delete tester;
   return NS_OK;
 #else
   return NS_ERROR_NOT_IMPLEMENTED;
 #endif
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  StyleSheet utils 
-#pragma mark -
-#endif
-
 
 NS_IMETHODIMP 
 nsHTMLEditor::StyleSheetLoaded(nsCSSStyleSheet* aSheet, PRBool aWasAlternate,
                                nsresult aStatus)
 {
   nsresult rv = NS_OK;
   nsAutoEditBatch batchIt(this);
 
@@ -4109,22 +4075,16 @@ nsHTMLEditor::StyleSheetLoaded(nsCSSStyl
         AddNewStyleSheetToList(mLastStyleSheetURL, aSheet);
       }
     }
   }
 
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsEditor overrides 
-#pragma mark -
-#endif
-
 
 /** All editor operations which alter the doc should be prefaced
  *  with a call to StartOperation, naming the action and direction */
 NS_IMETHODIMP
 nsHTMLEditor::StartOperation(PRInt32 opID, nsIEditor::EDirection aDirection)
 {
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
@@ -4260,22 +4220,16 @@ nsHTMLEditor::SelectAll()
 
   nsCOMPtr<nsIDOMNode> rootElement = do_QueryInterface(rootContent, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return selection->SelectAllChildren(rootElement);
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  Random methods 
-#pragma mark -
-#endif
-
 // this will NOT find aAttribute unless aAttribute has a non-null value
 // so singleton attributes like <Table border> will not be matched!
 void nsHTMLEditor::IsTextPropertySetByContent(nsIDOMNode        *aNode,
                                               nsIAtom           *aProperty, 
                                               const nsAString   *aAttribute, 
                                               const nsAString   *aValue, 
                                               PRBool            &aIsSet,
                                               nsIDOMNode       **aStyleNode,
@@ -4335,19 +4289,16 @@ void nsHTMLEditor::IsTextPropertySetByCo
       node = temp;
     }
     else {
       node = nsnull;
     }
   }
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 //================================================================
 // HTML Editor methods
 //
 // Note: Table Editing methods are implemented in nsTableEditor.cpp
 //
 
 
@@ -4442,19 +4393,16 @@ nsHTMLEditor::GetEnclosingTable(nsIDOMNo
     tmp = GetBlockNodeParent(node);
     if (!tmp) break;
     if (nsHTMLEditUtils::IsTable(tmp)) tbl = tmp;
     node = tmp;
   }
   return tbl;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 #ifdef PRE_NODE_IN_BODY
 nsCOMPtr<nsIDOMElement> nsHTMLEditor::FindPreElement()
 {
   nsCOMPtr<nsIDOMDocument> domdoc;
   nsEditor::GetDocument(getter_AddRefs(domdoc));
   NS_ENSURE_TRUE(domdoc, 0);
 
@@ -4547,19 +4495,16 @@ NS_IMETHODIMP
 nsHTMLEditor::SetSelectionAtDocumentStart(nsISelection *aSelection)
 {
   nsIDOMElement *rootElement = GetRoot();  
   NS_ENSURE_TRUE(rootElement, NS_ERROR_NULL_POINTER);
 
   return aSelection->Collapse(rootElement,0);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 ///////////////////////////////////////////////////////////////////////////
 // RemoveBlockContainer: remove inNode, reparenting it's children into their
 //                  the parent of inNode.  In addition, INSERT ANY BR's NEEDED
 //                  TO PRESERVE IDENTITY OF REMOVED BLOCK.
 //
 nsresult
 nsHTMLEditor::RemoveBlockContainer(nsIDOMNode *inNode)
--- a/editor/libeditor/html/nsHTMLEditorEventListener.cpp
+++ b/editor/libeditor/html/nsHTMLEditorEventListener.cpp
@@ -131,17 +131,17 @@ nsHTMLEditorEventListener::MouseDown(nsI
   //XXX This should be easier to do!
   // But eDOMEvents_contextmenu and NS_CONTEXTMENU is not exposed in any event interface :-(
   PRUint16 buttonNumber;
   nsresult res = mouseEvent->GetButton(&buttonNumber);
   NS_ENSURE_SUCCESS(res, res);
 
   PRBool isContextClick;
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
   // Ctrl+Click for context menu
   res = mouseEvent->GetCtrlKey(&isContextClick);
   NS_ENSURE_SUCCESS(res, res);
 #else
   // Right mouse button for Windows, UNIX
   isContextClick = buttonNumber == 2;
 #endif
   
--- a/editor/libeditor/text/nsPlaintextEditor.cpp
+++ b/editor/libeditor/text/nsPlaintextEditor.cpp
@@ -413,22 +413,16 @@ nsPlaintextEditor::HandleKeyPressEvent(n
     // we don't PreventDefault() here or keybindings like control-x won't work
     return NS_OK;
   }
   aKeyEvent->PreventDefault();
   nsAutoString str(nativeKeyEvent->charCode);
   return TypedText(str, eTypedText);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIHTMLEditor methods 
-#pragma mark -
-#endif
-
 /* This routine is needed to provide a bottleneck for typing for logging
    purposes.  Can't use HandleKeyPress() (above) for that since it takes
    a nsIDOMKeyEvent* parameter.  So instead we pass enough info through
    to TypedText() to determine what action to take, but without passing
    an event.
    */
 NS_IMETHODIMP nsPlaintextEditor::TypedText(const nsAString& aString,
                                       PRInt32 aAction)
@@ -1202,22 +1196,16 @@ nsPlaintextEditor::GetNewlineHandling(PR
 NS_IMETHODIMP 
 nsPlaintextEditor::SetNewlineHandling(PRInt32 aNewlineHandling)
 {
   mNewlineHandling = aNewlineHandling;
   
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditor overrides 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP 
 nsPlaintextEditor::Undo(PRUint32 aCount)
 {
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   FireTrustedInputEvent trusted(this);
 
@@ -1452,23 +1440,16 @@ nsPlaintextEditor::OutputToStream(nsIOut
   rv = GetAndInitDocEncoder(aFormatType, aFlags, aCharset,
                             getter_AddRefs(encoder));
 
   NS_ENSURE_SUCCESS(rv, rv);
 
   return encoder->EncodeToStream(aOutputStream);
 }
 
-
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditorMailSupport overrides 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsPlaintextEditor::InsertTextWithQuotations(const nsAString &aStringToInsert)
 {
   return InsertText(aStringToInsert);
 }
 
 NS_IMETHODIMP
 nsPlaintextEditor::PasteAsQuotation(PRInt32 aSelectionType)
@@ -1668,23 +1649,16 @@ nsPlaintextEditor::StripCites()
 NS_IMETHODIMP
 nsPlaintextEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList)
 {
   *aNodeList = 0;
   return NS_OK;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsEditor overrides 
-#pragma mark -
-#endif
-
-
 /** All editor operations which alter the doc should be prefaced
  *  with a call to StartOperation, naming the action and direction */
 NS_IMETHODIMP
 nsPlaintextEditor::StartOperation(PRInt32 opID, nsIEditor::EDirection aDirection)
 {
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
@@ -1736,23 +1710,16 @@ nsPlaintextEditor::SelectEntireDocument(
 already_AddRefed<nsPIDOMEventTarget>
 nsPlaintextEditor::GetPIDOMEventTarget()
 {
   NS_IF_ADDREF(mEventTarget);
   return mEventTarget.get();
 }
 
 
-
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  Random methods 
-#pragma mark -
-#endif
-
 nsresult
 nsPlaintextEditor::SetAttributeOrEquivalent(nsIDOMElement * aElement,
                                             const nsAString & aAttribute,
                                             const nsAString & aValue,
                                             PRBool aSuppressTransaction)
 {
   return nsEditor::SetAttribute(aElement, aAttribute, aValue);
 }
--- a/editor/txtsvc/src/nsTextServicesDocument.cpp
+++ b/editor/txtsvc/src/nsTextServicesDocument.cpp
@@ -3816,21 +3816,17 @@ nsTextServicesDocument::NodeHasOffsetEnt
 
   *aHasEntry   = PR_FALSE;
   *aEntryIndex = -1;
 
   return NS_OK;
 }
 
 // Spellchecker code has this. See bug 211343
-#ifdef XP_MAC
-#define IS_NBSP_CHAR(c) (((unsigned char)0xca)==(c))
-#else
 #define IS_NBSP_CHAR(c) (((unsigned char)0xa0)==(c))
-#endif
 
 nsresult
 nsTextServicesDocument::FindWordBounds(nsTArray<OffsetEntry*> *aOffsetTable,
                                        nsString *aBlockStr,
                                        nsIDOMNode *aNode,
                                        PRInt32 aNodeOffset,
                                        nsIDOMNode **aWordStartNode,
                                        PRInt32 *aWordStartOffset,
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
@@ -1022,21 +1022,16 @@ nsDocShellTreeOwner::GetOwnerRequestor()
     req = mOwnerRequestor;
     NS_ADDREF(mOwnerRequestor);
   }
 
   return req;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 ///////////////////////////////////////////////////////////////////////////////
 // DefaultTooltipTextProvider
 
 class DefaultTooltipTextProvider : public nsITooltipTextProvider
 {
 public:
     DefaultTooltipTextProvider();
 
@@ -1646,22 +1641,16 @@ ChromeTooltipListener::sAutoHideCallback
   if ( self )
     self->HideTooltip();
 
   // NOTE: |aTimer| and |self->mAutoHideTimer| are invalid after calling ClosePopup();
   
 } // sAutoHideCallback
 
 
-
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 NS_IMPL_ADDREF(ChromeContextMenuListener)
 NS_IMPL_RELEASE(ChromeContextMenuListener)
 
 NS_INTERFACE_MAP_BEGIN(ChromeContextMenuListener)
     NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMContextMenuListener)
     NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMContextMenuListener)
     NS_INTERFACE_MAP_ENTRY(nsIDOMContextMenuListener)
 NS_INTERFACE_MAP_END
--- a/embedding/components/commandhandler/src/nsCommandManager.cpp
+++ b/embedding/components/commandhandler/src/nsCommandManager.cpp
@@ -270,20 +270,16 @@ nsCommandManager::DoCommand(const char *
   nsCOMPtr<nsICommandController>  commandController = do_QueryInterface(controller);
   if (commandController && aCommandParams)
     rv = commandController->DoCommandWithParams(aCommandName, aCommandParams);
   else
     rv = controller->DoCommand(aCommandName);
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsresult
 nsCommandManager::IsCallerChrome(PRBool *is_caller_chrome)
 {
   *is_caller_chrome = PR_FALSE;
   nsresult rv = NS_OK;
   nsCOMPtr<nsIScriptSecurityManager> secMan = 
       do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
   if (NS_FAILED(rv))
--- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
@@ -210,22 +210,17 @@ struct CleanupData
     // catch files that turn into dirs or vice versa.
     PRPackedBool mIsDirectory;
 };
 
 // Maximum file length constant. The max file name length is
 // volume / server dependent but it is difficult to obtain
 // that information. Instead this constant is a reasonable value that
 // modern systems should able to cope with.
-
-#ifdef XP_MAC
-const PRUint32 kDefaultMaxFilenameLength = 31;
-#else
 const PRUint32 kDefaultMaxFilenameLength = 64;
-#endif
 
 // Default flags for persistence
 const PRUint32 kDefaultPersistFlags = 
     nsIWebBrowserPersist::PERSIST_FLAGS_NO_CONVERSION |
     nsIWebBrowserPersist::PERSIST_FLAGS_REPLACE_EXISTING_FILES;
 
 // String bundle where error messages come from
 const char *kWebBrowserPersistStringBundle =
--- a/extensions/pref/autoconfig/src/nsReadConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp
@@ -275,20 +275,17 @@ nsresult nsReadConfig::openAndEvaluateJS
 
     nsCOMPtr<nsIInputStream> inStr;
     if (isBinDir) {
         nsCOMPtr<nsIFile> jsFile;
         rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, 
                                     getter_AddRefs(jsFile));
         if (NS_FAILED(rv)) 
             return rv;
-        
-#ifdef XP_MAC
-        jsFile->AppendNative(NS_LITERAL_CSTRING("Essential Files"));
-#endif
+
         rv = jsFile->AppendNative(nsDependentCString(aFileName));
         if (NS_FAILED(rv)) 
             return rv;
 
         rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
         if (NS_FAILED(rv)) 
             return rv;
 
--- a/ipc/chromium/src/base/third_party/nspr/prtime.cc
+++ b/ipc/chromium/src/base/third_party/nspr/prtime.cc
@@ -473,20 +473,16 @@ PR_NormalizeTime(PRExplodedTime *time, P
  *     Trivially, both the tp_gmt_offset and tp_dst_offset fields are 0.
  *
  *------------------------------------------------------------------------
  */
 
 PRTimeParameters
 PR_GMTParameters(const PRExplodedTime *gmt)
 {
-#if defined(XP_MAC)
-#pragma unused (gmt)
-#endif
-
     PRTimeParameters retVal = { 0, 0 };
     return retVal;
 }
 
 /*
  * The following code implements PR_ParseTimeString().  It is based on
  * ns/lib/xp/xp_time.c, revision 1.25, by Jamie Zawinski <jwz@netscape.com>.
  */
--- a/ipc/chromium/src/base/third_party/nspr/prtypes.h
+++ b/ipc/chromium/src/base/third_party/nspr/prtypes.h
@@ -148,32 +148,16 @@
 #define PR_IMPLEMENT(__type) __type _cdecl _export
 #define PR_EXTERN_DATA(__type) extern __type _export
 #define PR_IMPLEMENT_DATA(__type) __type _export
 
 #define PR_CALLBACK             __cdecl __loadds
 #define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK
 #endif /* _WINDLL */
 
-#elif defined(XP_MAC)
-
-#define PR_EXPORT(__type) extern __declspec(export) __type
-#define PR_EXPORT_DATA(__type) extern __declspec(export) __type
-#define PR_IMPORT(__type) extern __declspec(export) __type
-#define PR_IMPORT_DATA(__type) extern __declspec(export) __type
-
-#define PR_EXTERN(__type) extern __declspec(export) __type
-#define PR_IMPLEMENT(__type) __declspec(export) __type
-#define PR_EXTERN_DATA(__type) extern __declspec(export) __type
-#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type
-
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
 #elif defined(XP_OS2) && defined(__declspec)
 
 #define PR_EXPORT(__type) extern __declspec(dllexport) __type
 #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
 #define PR_IMPORT(__type) extern  __declspec(dllimport) __type
 #define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type
 
 #define PR_EXTERN(__type) extern __declspec(dllexport) __type
@@ -495,17 +479,17 @@ typedef PRUint8 PRPackedBool;
 /*
 ** Status code used by some routines that have a single point of failure or
 ** special status return.
 */
 typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
 
 #ifndef __PRUNICHAR__
 #define __PRUNICHAR__
-#if defined(WIN32) || defined(XP_MAC)
+#if defined(WIN32)
 typedef wchar_t PRUnichar;
 #else
 typedef PRUint16 PRUnichar;
 #endif
 #endif
 
 /*
 ** WARNING: The undocumented data types PRWord and PRUword are
--- a/js/src/xpconnect/src/xpccomponents.cpp
+++ b/js/src/xpconnect/src/xpccomponents.cpp
@@ -2962,17 +2962,17 @@ SandboxDump(JSContext *cx, uintN argc, j
     if (!chars)
         return JS_FALSE;
 
     nsDependentString wstr(chars, length);
     char *cstr = ToNewUTF8String(wstr);
     if (!cstr)
         return JS_FALSE;
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
     // Be nice and convert all \r to \n.
     char *c = cstr, *cEnd = cstr + strlen(cstr);
     while (c < cEnd) {
         if (*c == '\r')
             *c = '\n';
         c++;
     }
 #endif
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -222,20 +222,16 @@ static PRLogModuleInfo * kPrintingLogMod
 #define PR_PL(_p1)
 #endif
 //-----------------------------------------------------
 
 class DocumentViewerImpl;
 
 // a small delegate class used to avoid circular references
 
-#ifdef XP_MAC
-#pragma mark ** nsDocViewerSelectionListener **
-#endif
-
 class nsDocViewerSelectionListener : public nsISelectionListener
 {
 public:
 
   // nsISupports interface...
   NS_DECL_ISUPPORTS
 
   // nsISelectionListerner interface
@@ -284,21 +280,16 @@ public:
 /*END implementations of focus event handler interface*/
   nsresult             Init(DocumentViewerImpl *aDocViewer);
 
 private:
     DocumentViewerImpl*  mDocViewer;
 };
 
 
-
-#ifdef XP_MAC
-#pragma mark ** DocumentViewerImpl **
-#endif
-
 //-------------------------------------------------------------
 class DocumentViewerImpl : public nsIDocumentViewer,
                            public nsIContentViewerEdit,
                            public nsIContentViewerFile,
                            public nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH,
                            public nsIDocumentViewerPrint
 
 #ifdef NS_PRINTING
@@ -2588,19 +2579,16 @@ NS_IMETHODIMP DocumentViewerImpl::GetCan
 {
   NS_ENSURE_ARG_POINTER(aCanGetContents);
   *aCanGetContents = PR_FALSE;
   NS_ENSURE_STATE(mDocument);
   *aCanGetContents = nsCopySupport::CanCopy(mDocument);
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 /* ========================================================================================
  * nsIContentViewerFile
  * ======================================================================================== */
 /** ---------------------------------------------------
  *  See documentation above in the nsIContentViewerfile class definition
  *	@update 01/24/00 dwc
  */
--- a/layout/xul/base/src/nsListBoxBodyFrame.cpp
+++ b/layout/xul/base/src/nsListBoxBodyFrame.cpp
@@ -75,20 +75,16 @@
 /* A mediator used to smooth out scrolling. It works by seeing if 
  * we have time to scroll the amount of rows requested. This is determined
  * by measuring how long it takes to scroll a row. If we can scroll the 
  * rows in time we do so. If not we start a timer and skip the request. We
  * do this until the timer finally first because the user has stopped moving
  * the mouse. Then do all the queued requests in on shot.
  */
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 // the longest amount of time that can go by before the use
 // notices it as a delay.
 #define USER_TIME_THRESHOLD 150000
 
 // how long it takes to layout a single row initial value.
 // we will time this after we scroll a few rows.
 #define TIME_PER_ROW_INITAL  50000
 
--- a/modules/libpref/src/nsPrefService.cpp
+++ b/modules/libpref/src/nsPrefService.cpp
@@ -866,17 +866,17 @@ static nsresult pref_InitInitialObjects(
     // Load $gre/defaults/pref/*.js
     nsCOMPtr<nsIFile> defaultPrefDir;
 
     rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir));
     NS_ENSURE_SUCCESS(rv, rv);
 
     /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
     static const char* specialFiles[] = {
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
       "macprefs.js"
 #elif defined(XP_WIN)
       "winpref.js"
 #elif defined(XP_UNIX)
       "unix.js"
 #if defined(VMS)
       , "openvms.js"
 #elif defined(_AIX)
--- a/modules/libpref/src/prefapi.cpp
+++ b/modules/libpref/src/prefapi.cpp
@@ -40,22 +40,18 @@
 #include "PrefTuple.h"
 #include "prefread.h"
 #include "nsReadableUtils.h"
 #include "nsCRT.h"
 
 #define PL_ARENA_CONST_ALIGN_MASK 3
 #include "plarena.h"
 
-#if defined(XP_MAC)
-  #include <stat.h>
-#else
-  #ifdef XP_OS2
-    #include <sys/types.h>
-  #endif
+#ifdef XP_OS2
+  #include <sys/types.h>
 #endif
 #ifdef _WIN32
   #include "windows.h"
 #endif /* _WIN32 */
 
 #include "plstr.h"
 #include "pldhash.h"
 #include "plbase64.h"
--- a/modules/libreg/src/nr_bufio.c
+++ b/modules/libreg/src/nr_bufio.c
@@ -203,26 +203,26 @@ BufioFile*  bufio_Open(const char* name,
     }
     else
     {
         /* couldn't open file. Figure out why and set NSPR errors */
         
         switch (errno)
         {
             /* file not found */
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
             case fnfErr:
 #else
             case ENOENT:
 #endif
                 PR_SetError(PR_FILE_NOT_FOUND_ERROR,0);
                 break;
 
             /* file in use */
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
             case opWrErr:
 #else
             case EACCES:
 #endif
                 PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR,0);
                 break;
 
             default:
--- a/modules/libreg/src/vr_stubs.h
+++ b/modules/libreg/src/vr_stubs.h
@@ -45,38 +45,30 @@
 
 #ifndef _VR_STUBS_H_
 #define _VR_STUBS_H_
 
 #ifdef STANDALONE_REGISTRY
 
 #include <errno.h>
 #include <string.h>
-#ifdef XP_MAC
-#include "macstdlibextras.h"  /* For strcasecmp and strncasecmp */
-#include <extras.h>
-#endif
 
 #else
 
 #include "prio.h"
 #include "prlog.h"
 #include "prmem.h"
 #include "plstr.h"
 
 #endif /* STANDALONE_REGISTRY*/
 
-#ifdef XP_MAC
-#include <stat.h>
-#else
 #if ( defined(BSDI) && !defined(BSDI_2) ) || defined(XP_OS2)
 #include <sys/types.h>
 #endif
 #include <sys/stat.h>
-#endif
 
 #ifndef FALSE
 #define FALSE 0
 #endif
 #ifndef TRUE
 #define TRUE 1
 #endif
 
@@ -280,27 +272,19 @@ typedef PRFileDesc* XP_File;
 #include "prtypes.h"
 #endif /*STANDALONE_REGISTRY*/
 
 typedef int XP_Bool;
 
 typedef struct stat    XP_StatStruct;
 #define  XP_Stat(file,data)     stat((file),(data))
 
-#if defined(XP_MAC)
- extern int nr_RenameFile(char *from, char *to);
-#else
-    XP_BEGIN_PROTOS
-    #define nr_RenameFile(from, to)    rename((from), (to))
-    XP_END_PROTOS
-#endif
+XP_BEGIN_PROTOS
 
-
-
-XP_BEGIN_PROTOS
+#define nr_RenameFile(from, to)    rename((from), (to))
 
 extern char* globalRegName;
 extern char* verRegName;
 
 extern void vr_findGlobalRegName();
 extern char* vr_findVerRegName();
 
 
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -78,20 +78,16 @@
 
 #include "mozilla/net/NeckoCommon.h"
 
 using namespace mozilla;
 
 /******************************************************************************
  * nsCacheProfilePrefObserver
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark nsCacheProfilePrefObserver
-#endif
-
 #define DISK_CACHE_ENABLE_PREF      "browser.cache.disk.enable"
 #define DISK_CACHE_DIR_PREF         "browser.cache.disk.parent_directory"
 #define DISK_CACHE_SMART_SIZE_FIRST_RUN_PREF\
     "browser.cache.disk.smart_size.first_run"
 #define DISK_CACHE_SMART_SIZE_ENABLED_PREF \
     "browser.cache.disk.smart_size.enabled"
 #define DISK_CACHE_SMART_SIZE_PREF "browser.cache.disk.smart_size_cached_value"
 #define DISK_CACHE_CAPACITY_PREF    "browser.cache.disk.capacity"
@@ -964,21 +960,16 @@ protected:
 
 private:
     nsCacheRequest *mRequest;
 };
 
 /******************************************************************************
  * nsCacheService
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark nsCacheService
-#endif
-
 nsCacheService *   nsCacheService::gService = nsnull;
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsCacheService, nsICacheService)
 
 nsCacheService::nsCacheService()
     : mLock("nsCacheService.mLock"),
       mCondVar(mLock, "nsCacheService.mCondVar"),
       mInitialized(PR_FALSE),
@@ -2118,20 +2109,16 @@ nsCacheService::SetMemoryCache()
         }
     }
 }
 
 
 /******************************************************************************
  * static methods for nsCacheEntryDescriptor
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 void
 nsCacheService::CloseDescriptor(nsCacheEntryDescriptor * descriptor)
 {
     // ask entry to remove descriptor
     nsCacheEntry * entry       = descriptor->CacheEntry();
     PRBool         stillActive = entry->RemoveDescriptor(descriptor);
     nsresult       rv          = NS_OK;
 
@@ -2243,20 +2230,16 @@ nsCacheService::ValidateEntry(nsCacheEnt
     entry->MarkValid();
     nsresult rv = gService->ProcessPendingRequests(entry);
     NS_ASSERTION(rv == NS_OK, "ProcessPendingRequests failed.");
     // XXX what else should be done?
 
     return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 
 void
 nsCacheService::DeactivateEntry(nsCacheEntry * entry)
 {
     CACHE_LOG_DEBUG(("Deactivating entry %p\n", entry));
     nsresult  rv = NS_OK;
     NS_ASSERTION(entry->IsNotInUse(), "### deactivating an entry while in use!");
     nsCacheDevice * device = nsnull;
--- a/netwerk/cache/nsDiskCacheBinding.cpp
+++ b/netwerk/cache/nsDiskCacheBinding.cpp
@@ -45,21 +45,16 @@
 #include "nsDiskCacheBinding.h"
 
 
 
 /******************************************************************************
  *  static hash table callback functions
  *
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark HASHTABLE CALLBACKS
-#endif
-
 struct HashTableEntry : PLDHashEntryHdr {
     nsDiskCacheBinding *  mBinding;
 };
 
 
 static PLDHashNumber
 HashKey( PLDHashTable *table, const void *key)
 {
@@ -91,21 +86,16 @@ ClearEntry(PLDHashTable *      /* table 
 {
     ((HashTableEntry *)header)->mBinding = nsnull;
 }
 
 
 /******************************************************************************
  *  Utility Functions
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark DISK CACHE BINDERY
-#endif
-
 nsDiskCacheBinding *
 GetCacheEntryBinding(nsCacheEntry * entry)
 {
     return (nsDiskCacheBinding *) entry->Data();
 }
 
 
 /******************************************************************************
--- a/netwerk/cache/nsDiskCacheStreams.cpp
+++ b/netwerk/cache/nsDiskCacheStreams.cpp
@@ -53,19 +53,16 @@
 //      - streams will only be used by FileTransport,
 //         they will not be directly accessible to clients
 //      - overlapped I/O is NOT supported
 
 
 /******************************************************************************
  *  nsDiskCacheInputStream
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark nsDiskCacheInputStream
-#endif
 class nsDiskCacheInputStream : public nsIInputStream {
 
 public:
 
     nsDiskCacheInputStream( nsDiskCacheStreamIO * parent,
                             PRFileDesc *          fileDesc,
                             const char *          buffer,
                             PRUint32              endOfStream);
@@ -188,20 +185,16 @@ nsDiskCacheInputStream::IsNonBlocking(PR
     *nonBlocking = PR_FALSE;
     return NS_OK;
 }
 
 
 /******************************************************************************
  *  nsDiskCacheOutputStream
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark nsDiskCacheOutputStream
-#endif
 class nsDiskCacheOutputStream : public nsIOutputStream
                               , public nsIDiskCacheStreamInternal
 {
 public:
     nsDiskCacheOutputStream( nsDiskCacheStreamIO * parent);
     virtual ~nsDiskCacheOutputStream();
 
     NS_DECL_ISUPPORTS
@@ -300,21 +293,16 @@ nsDiskCacheOutputStream::IsNonBlocking(P
     return NS_OK;
 }
 
 
 
 /******************************************************************************
  *  nsDiskCacheStreamIO
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark nsDiskCacheStreamIO
-#endif
-
 NS_IMPL_THREADSAFE_ISUPPORTS0(nsDiskCacheStreamIO)
 
 // we pick 16k as the max buffer size because that is the threshold above which
 //      we are unable to store the data in the cache block files
 //      see nsDiskCacheMap.[cpp,h]
 #define kMaxBufferSize      (16 * 1024)
 
 nsDiskCacheStreamIO::nsDiskCacheStreamIO(nsDiskCacheBinding *   binding)
--- a/netwerk/protocol/about/nsAboutBloat.cpp
+++ b/netwerk/protocol/about/nsAboutBloat.cpp
@@ -48,21 +48,17 @@
 #include "nsIURI.h"
 #include "prtime.h"
 #include "nsCOMPtr.h"
 #include "nsIFileStreams.h"
 #include "nsNetUtil.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsILocalFile.h"
 
-#ifdef XP_MAC
-extern "C" void GC_gcollect(void);
-#else
 static void GC_gcollect() {}
-#endif
 
 NS_IMPL_ISUPPORTS1(nsAboutBloat, nsIAboutModule)
 
 NS_IMETHODIMP
 nsAboutBloat::NewChannel(nsIURI *aURI, nsIChannel **result)
 {
     NS_ENSURE_ARG_POINTER(aURI);
     nsresult rv;
--- a/rdf/base/src/nsRDFService.cpp
+++ b/rdf/base/src/nsRDFService.cpp
@@ -109,50 +109,34 @@ class BlobImpl;
 
 // These functions are copied from nsprpub/lib/ds/plhash.c, with one
 // change to free the key in DataSourceFreeEntry.
 // XXX sigh, why were DefaultAllocTable et. al. declared static, anyway?
 
 static void *
 DataSourceAllocTable(void *pool, PRSize size)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     return PR_MALLOC(size);
 }
 
 static void
 DataSourceFreeTable(void *pool, void *item)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     PR_Free(item);
 }
 
 static PLHashEntry *
 DataSourceAllocEntry(void *pool, const void *key)
 {
-#if defined(XP_MAC)
-#pragma unused (pool,key)
-#endif
-
     return PR_NEW(PLHashEntry);
 }
 
 static void
 DataSourceFreeEntry(void *pool, PLHashEntry *he, PRUintn flag)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     if (flag == HT_FREE_ENTRY) {
         PL_strfree((char*) he->key);
         PR_Free(he);
     }
 }
 
 static PLHashAllocOps dataSourceHashAllocOps = {
     DataSourceAllocTable, DataSourceFreeTable,
--- a/rdf/datasource/src/nsFileSystemDataSource.cpp
+++ b/rdf/datasource/src/nsFileSystemDataSource.cpp
@@ -119,30 +119,16 @@ FileSystemDataSource::isDirURI(nsIRDFRes
     rv = NS_GetFileFromURLSpec(nsDependentCString(uri), getter_AddRefs(aDir));
     if (NS_FAILED(rv)) return(PR_FALSE);
 
     PRBool isDirFlag = PR_FALSE;
 
     rv = aDir->IsDirectory(&isDirFlag);
     if (NS_FAILED(rv)) return(PR_FALSE);
 
-#ifdef  XP_MAC
-    // Hide directory structure of packages under Mac OS 9/X
-    nsCOMPtr<nsILocalFileMac>   aMacFile = do_QueryInterface(aDir);
-    if (aMacFile)
-    {
-        PRBool isPackageFlag = PR_FALSE;
-        rv = aMacFile->IsPackage(&isPackageFlag);
-        if (NS_SUCCEEDED(rv) && isPackageFlag)
-        {
-            isDirFlag = PR_FALSE;
-        }
-    }
-#endif
-
     return(isDirFlag);
 }
 
 
 nsresult
 FileSystemDataSource::Init()
 {
     nsresult rv;
@@ -1197,27 +1183,18 @@ FileSystemDataSource::GetFileSize(nsIRDF
     // don't do anything with directories
     PRBool  isDir = PR_FALSE;
     if (NS_FAILED(rv = aFile->IsDirectory(&isDir)))
         return(rv);
     if (isDir)
         return(NS_RDF_NO_VALUE);
 
     PRInt64     aFileSize64;
-#ifdef  XP_MAC
-    // on Mac, get total file size (data + resource fork)
-    nsCOMPtr<nsILocalFileMac>   aMacFile = do_QueryInterface(aFile);
-    if (!aMacFile)
-        return(NS_ERROR_UNEXPECTED);
-    if (NS_FAILED(rv = aMacFile->GetFileSizeWithResFork(&aFileSize64)))
-        return(rv);
-#else
     if (NS_FAILED(rv = aFile->GetFileSize(&aFileSize64)))
         return(rv);
-#endif
 
     // convert 64bits to 32bits
     PRInt32     aFileSize32 = 0;
     LL_L2I(aFileSize32, aFileSize64);
 
     mRDFService->GetIntLiteral(aFileSize32, aResult);
 
     return(NS_OK);
@@ -1257,34 +1234,16 @@ FileSystemDataSource::GetName(nsIRDFReso
         aFileLocal->SetFollowLinks(PR_FALSE);
 
     nsAutoString name;
     if (NS_FAILED(rv = aFile->GetLeafName(name)))
         return(rv);
     if (name.IsEmpty())
         return(NS_ERROR_UNEXPECTED);
 
-#ifdef  XP_MAC
-    nsCOMPtr<nsILocalFileMac>   aMacFile = do_QueryInterface(aFile);
-    if (aMacFile)
-    {
-        PRBool isPackageFlag = PR_FALSE;
-        rv = aMacFile->IsPackage(&isPackageFlag);
-        if (NS_SUCCEEDED(rv) && isPackageFlag)
-        {
-            // mungle package names under Mac OS 9/X
-            PRUint32 len = name.Length();
-            if (name.RFind(".app", PR_TRUE) == len - 4)
-            {
-                name.SetLength(len-4);
-            }
-        }
-    }
-#endif
-
 #ifdef  XP_WIN
     // special hack for IE favorites under Windows; strip off the
     // trailing ".url" or ".lnk" at the end of IE favorites names
     PRInt32 nameLen = name.Length();
     if ((strncmp(uri, ieFavoritesDir.get(), ieFavoritesDir.Length()) == 0) && (nameLen > 4))
     {
         nsAutoString extension;
         name.Right(extension, 4);
--- a/widget/src/xpwidgets/nsPrimitiveHelpers.cpp
+++ b/widget/src/xpwidgets/nsPrimitiveHelpers.cpp
@@ -255,21 +255,16 @@ nsPrimitiveHelpers :: ConvertPlatformPla
   } // if valid length
 
   NS_ASSERTION ( NS_SUCCEEDED(rv), "Error converting plain text to unicode" );
 
   return rv;
 } // ConvertPlatformPlainTextToUnicode
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 //
 // ConvertPlatformToDOMLinebreaks
 //
 // Given some data, convert from the platform linebreaks into the LF expected by the
 // DOM. This will attempt to convert the data in place, but the buffer may still need to
 // be reallocated regardless (disposing the old buffer is taken care of internally, see
 // the note below).
 //
--- a/widget/src/xpwidgets/nsTransferable.cpp
+++ b/widget/src/xpwidgets/nsTransferable.cpp
@@ -241,21 +241,16 @@ DataStruct::ReadCache(nsISupports** aDat
     *aData    = nsnull;
     *aDataLen = 0;
   }
 
   return NS_ERROR_FAILURE;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 //-------------------------------------------------------------------------
 //
 // Transferable constructor
 //
 //-------------------------------------------------------------------------
 nsTransferable::nsTransferable()
 {
 }
--- a/xpcom/io/nsLinebreakConverter.cpp
+++ b/xpcom/io/nsLinebreakConverter.cpp
@@ -322,21 +322,16 @@ static T* ConvertUnknownBreaks(const T* 
     src++;
   }
 
   ioLen = finalLen;
   return resultString;
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 /*----------------------------------------------------------------------------
 	ConvertLineBreaks 
 	
 ----------------------------------------------------------------------------*/
 char* nsLinebreakConverter::ConvertLineBreaks(const char* aSrc,
             ELinebreakType aSrcBreaks, ELinebreakType aDestBreaks, PRInt32 aSrcLen, PRInt32* outLen)
 {
   NS_ASSERTION(aDestBreaks != eLinebreakAny &&