зеркало из https://github.com/mozilla/gecko-dev.git
Bug 655756 - Remove final XP_MAC remnants; r=josh
This commit is contained in:
Родитель
65b08d69be
Коммит
97cc9c4eea
|
@ -50,8 +50,6 @@
|
|||
|
||||
// { %%%%% begin platform defs peculiar to Mork %%%%%
|
||||
|
||||
//#define XP_MAC 1
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#define MORK_MAC 1
|
||||
#endif
|
||||
|
|
|
@ -817,16 +817,6 @@ const char * nsDefaultURIFixup::GetFileSystemCharset()
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -818,7 +818,7 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
|
|||
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
|
||||
|
@ -4091,7 +4091,7 @@ nsGlobalWindow::CheckSecurityLeftAndTop(PRInt32* aLeft, PRInt32* aTop)
|
|||
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
|
||||
|
@ -4431,7 +4431,7 @@ nsGlobalWindow::Dump(const nsAString& aStr)
|
|||
|
||||
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) {
|
||||
|
|
|
@ -86,11 +86,6 @@ nsBaseComposerCommand::nsBaseComposerCommand()
|
|||
NS_IMPL_ISUPPORTS1(nsBaseComposerCommand, nsIControllerCommand)
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
nsBaseStateUpdatingCommand::nsBaseStateUpdatingCommand(const char* aTagName)
|
||||
: nsBaseComposerCommand()
|
||||
, mTagName(aTagName)
|
||||
|
@ -197,10 +192,6 @@ nsPasteNoFormattingCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED, enabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsStyleUpdatingCommand::nsStyleUpdatingCommand(const char* aTagName)
|
||||
: nsBaseStateUpdatingCommand(aTagName)
|
||||
{
|
||||
|
@ -293,9 +284,6 @@ nsStyleUpdatingCommand::ToggleState(nsIEditor *aEditor, const char* aTagName)
|
|||
|
||||
return rv;
|
||||
}
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsListCommand::nsListCommand(const char* aTagName)
|
||||
: nsBaseStateUpdatingCommand(aTagName)
|
||||
|
@ -351,10 +339,6 @@ nsListCommand::ToggleState(nsIEditor *aEditor, const char* aTagName)
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsListItemCommand::nsListItemCommand(const char* aTagName)
|
||||
: nsBaseStateUpdatingCommand(aTagName)
|
||||
{
|
||||
|
@ -435,10 +419,6 @@ nsListItemCommand::ToggleState(nsIEditor *aEditor, const char* aTagName)
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRemoveListCommand::IsCommandEnabled(const char * aCommandName,
|
||||
nsISupports *refCon,
|
||||
|
@ -497,10 +477,6 @@ nsRemoveListCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIndentCommand::IsCommandEnabled(const char * aCommandName,
|
||||
nsISupports *refCon, PRBool *outCmdEnabled)
|
||||
|
@ -593,11 +569,6 @@ nsOutdentCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
nsMultiStateCommand::nsMultiStateCommand()
|
||||
: nsBaseComposerCommand()
|
||||
{
|
||||
|
@ -673,10 +644,6 @@ nsMultiStateCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsParagraphStateCommand::nsParagraphStateCommand()
|
||||
: nsMultiStateCommand()
|
||||
{
|
||||
|
@ -715,10 +682,6 @@ nsParagraphStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
|
|||
return htmlEditor->SetParagraphFormat(newState);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsFontFaceStateCommand::nsFontFaceStateCommand()
|
||||
: nsMultiStateCommand()
|
||||
{
|
||||
|
@ -779,10 +742,6 @@ nsFontFaceStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsFontSizeStateCommand::nsFontSizeStateCommand()
|
||||
: nsMultiStateCommand()
|
||||
{
|
||||
|
@ -859,9 +818,6 @@ nsFontSizeStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
nsFontColorStateCommand::nsFontColorStateCommand()
|
||||
: nsMultiStateCommand()
|
||||
{
|
||||
|
@ -909,10 +865,6 @@ nsFontColorStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsHighlightColorStateCommand::nsHighlightColorStateCommand()
|
||||
: nsMultiStateCommand()
|
||||
{
|
||||
|
@ -971,10 +923,6 @@ nsHighlightColorStateCommand::IsCommandEnabled(const char * aCommandName,
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsBackgroundColorStateCommand::nsBackgroundColorStateCommand()
|
||||
: nsMultiStateCommand()
|
||||
{
|
||||
|
@ -1013,10 +961,6 @@ nsBackgroundColorStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
|
|||
return htmlEditor->SetBackgroundColor(newState);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsAlignCommand::nsAlignCommand()
|
||||
: nsMultiStateCommand()
|
||||
{
|
||||
|
@ -1074,12 +1018,6 @@ nsAlignCommand::SetState(nsIEditor *aEditor, nsString& newState)
|
|||
return htmlEditor->Align(newState);
|
||||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
nsAbsolutePositioningCommand::nsAbsolutePositioningCommand()
|
||||
: nsBaseStateUpdatingCommand("")
|
||||
{
|
||||
|
@ -1151,10 +1089,6 @@ nsAbsolutePositioningCommand::ToggleState(nsIEditor *aEditor, const char* aTagNa
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDecreaseZIndexCommand::IsCommandEnabled(const char * aCommandName,
|
||||
nsISupports *refCon,
|
||||
|
@ -1212,10 +1146,6 @@ nsDecreaseZIndexCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED, enabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIncreaseZIndexCommand::IsCommandEnabled(const char * aCommandName,
|
||||
nsISupports *refCon,
|
||||
|
@ -1266,10 +1196,6 @@ nsIncreaseZIndexCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED, enabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRemoveStylesCommand::IsCommandEnabled(const char * aCommandName,
|
||||
|
@ -1317,10 +1243,6 @@ nsRemoveStylesCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIncreaseFontSizeCommand::IsCommandEnabled(const char * aCommandName,
|
||||
nsISupports *refCon,
|
||||
|
@ -1366,10 +1288,6 @@ nsIncreaseFontSizeCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDecreaseFontSizeCommand::IsCommandEnabled(const char * aCommandName,
|
||||
nsISupports *refCon,
|
||||
|
@ -1415,10 +1333,6 @@ nsDecreaseFontSizeCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsInsertHTMLCommand::IsCommandEnabled(const char * aCommandName,
|
||||
nsISupports *refCon,
|
||||
|
@ -1472,10 +1386,6 @@ nsInsertHTMLCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED, outCmdEnabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(nsInsertTagCommand, nsBaseComposerCommand)
|
||||
|
||||
nsInsertTagCommand::nsInsertTagCommand(const char* aTagName)
|
||||
|
@ -1584,9 +1494,6 @@ nsInsertTagCommand::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED, outCmdEnabled);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
/****************************/
|
||||
//HELPER METHODS
|
||||
|
|
|
@ -448,10 +448,6 @@ nsSetDocumentStateCommand::GetCommandStateParams(const char *aCommandName,
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentStateCommand::IsCommandEnabled(const char* aCommandName,
|
||||
nsISupports *refCon,
|
||||
|
|
|
@ -641,10 +641,6 @@ nsEditingSession::GetEditorForWindow(nsIDOMWindow *aWindow,
|
|||
return editorDocShell->GetEditor(outEditor);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
OnStateChange
|
||||
|
@ -894,11 +890,6 @@ nsEditingSession::OnSecurityChange(nsIWebProgress *aWebProgress,
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
IsProgressForTargetDocument
|
||||
|
@ -1149,11 +1140,6 @@ nsEditingSession::EndPageLoad(nsIWebProgress *aWebProgress,
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
GetDocShellFromWindow
|
||||
|
|
|
@ -215,12 +215,6 @@ 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)
|
||||
|
@ -1339,12 +1333,6 @@ NS_IMETHODIMP nsEditor::SetSpellcheckUserOverride(PRBool enable)
|
|||
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,
|
||||
|
@ -1702,11 +1690,6 @@ nsEditor::MoveNode(nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aOffset)
|
|||
return InsertNode(aNode, aParent, aOffset);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark editor observer maintainance
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditor::AddEditorObserver(nsIEditorObserver *aObserver)
|
||||
|
@ -1744,11 +1727,6 @@ void nsEditor::NotifyEditorObservers(void)
|
|||
mEditorObservers[i]->EditAction();
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark action listener maintainance
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditor::AddEditActionListener(nsIEditActionListener *aListener)
|
||||
|
@ -1778,13 +1756,6 @@ nsEditor::RemoveEditActionListener(nsIEditActionListener *aListener)
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark docstate listener maintainance
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditor::AddDocumentStateListener(nsIDocumentStateListener *aListener)
|
||||
{
|
||||
|
@ -1812,12 +1783,6 @@ nsEditor::RemoveDocumentStateListener(nsIDocumentStateListener *aListener)
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark misc
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP nsEditor::OutputToString(const nsAString& aFormatType,
|
||||
PRUint32 aFlags,
|
||||
nsAString& aOutputString)
|
||||
|
@ -1873,11 +1838,6 @@ nsEditor::DebugUnitTests(PRInt32 *outNumTests, PRInt32 *outNumTestsFailed)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark support for selection preservation
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
PRBool
|
||||
nsEditor::ArePreservingSelection()
|
||||
|
@ -1910,12 +1870,6 @@ nsEditor::StopPreservingSelection()
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark IME event handlers
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsresult
|
||||
nsEditor::BeginIMEComposition()
|
||||
{
|
||||
|
@ -1961,13 +1915,6 @@ nsEditor::EndIMEComposition()
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark nsIPhonetic
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditor::GetPhonetic(nsAString& aPhonetic)
|
||||
{
|
||||
|
@ -1980,13 +1927,6 @@ nsEditor::GetPhonetic(nsAString& aPhonetic)
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark nsIEditorIMESupport
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
static nsresult
|
||||
GetEditorContentWindow(nsIDOMElement *aRoot, nsIWidget **aResult)
|
||||
{
|
||||
|
@ -2035,7 +1975,7 @@ nsEditor::ForceCompositionEnd()
|
|||
// 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
|
||||
|
@ -2104,13 +2044,8 @@ nsEditor::GetComposing(PRBool* aResult)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark public nsEditor methods
|
||||
#pragma mark -
|
||||
#endif
|
||||
/* Non-interface, public methods */
|
||||
|
||||
/* Non-interface, public methods */
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditor::GetRootElement(nsIDOMElement **aRootElement)
|
||||
|
@ -2274,11 +2209,6 @@ nsEditor::CloneAttributes(nsIDOMNode *aDestNode, nsIDOMNode *aSourceNode)
|
|||
return result;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark Protected and static methods
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP nsEditor::ScrollSelectionIntoView(PRBool aScrollToAnchor)
|
||||
{
|
||||
|
@ -2761,11 +2691,6 @@ NS_IMETHODIMP nsEditor::CreateTxnForJoinNode(nsIDOMNode *aLeftNode,
|
|||
|
||||
// END nsEditor core implementation
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark nsEditor public static helper methods
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
// BEGIN nsEditor public helper methods
|
||||
|
||||
|
@ -4271,13 +4196,6 @@ nsEditor::GetShouldTxnSetSelection()
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark protected nsEditor methods
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditor::DeleteSelectionImpl(nsIEditor::EDirection aAction)
|
||||
{
|
||||
|
|
|
@ -60,10 +60,6 @@ nsBaseEditorCommand::nsBaseEditorCommand()
|
|||
|
||||
NS_IMPL_ISUPPORTS1(nsBaseEditorCommand, nsIControllerCommand)
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsUndoCommand::IsCommandEnabled(const char * aCommandName,
|
||||
|
@ -790,9 +786,6 @@ nsSelectionMoveCommands::GetCommandStateParams(const char *aCommandName,
|
|||
return aParams->SetBooleanValue(STATE_ENABLED,canUndo);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsInsertPlaintextCommand::IsCommandEnabled(const char * aCommandName,
|
||||
|
@ -850,10 +843,6 @@ nsInsertPlaintextCommand::GetCommandStateParams(const char *aCommandName,
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPasteQuotationCommand::IsCommandEnabled(const char * aCommandName,
|
||||
nsISupports *refCon,
|
||||
|
|
|
@ -128,10 +128,6 @@ AddStyleSheetTxn::GetTxnDescription(nsAString& aString)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
RemoveStyleSheetTxn::RemoveStyleSheetTxn()
|
||||
: EditTxn()
|
||||
|
|
|
@ -1570,7 +1570,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromDrop(nsIDOMEvent* aDropEvent)
|
|||
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);
|
||||
|
|
|
@ -40,11 +40,6 @@
|
|||
*
|
||||
* ***** 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"
|
||||
|
@ -8401,12 +8396,6 @@ nsHTMLEditRules::InsertMozBRIfNeeded(nsIDOMNode *aNode)
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -1393,12 +1393,6 @@ PRBool nsHTMLEditor::IsModifiable()
|
|||
return !IsReadonly();
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark nsIHTMLEditor methods
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLEditor::UpdateBaseURL()
|
||||
{
|
||||
|
@ -3484,11 +3478,6 @@ nsHTMLEditor::GetLinkedObjects(nsISupportsArray** aNodeList)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark nsIEditorStyleSheets methods
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLEditor::AddStyleSheet(const nsAString &aURL)
|
||||
|
@ -3810,12 +3799,6 @@ nsHTMLEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList)
|
|||
}
|
||||
|
||||
|
||||
#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
|
||||
|
@ -3863,12 +3846,6 @@ NS_IMETHODIMP nsHTMLEditor::InsertTextImpl(const nsAString& aStringToInsert,
|
|||
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,
|
||||
|
@ -3922,11 +3899,6 @@ nsHTMLEditor::ContentRemoved(nsIDocument *aDocument, nsIContent* aContainer,
|
|||
}
|
||||
}
|
||||
|
||||
#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. */
|
||||
|
@ -4071,12 +4043,6 @@ nsHTMLEditor::DebugUnitTests(PRInt32 *outNumTests, PRInt32 *outNumTestsFailed)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark StyleSheet utils
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLEditor::StyleSheetLoaded(nsCSSStyleSheet* aSheet, PRBool aWasAlternate,
|
||||
|
@ -4114,12 +4080,6 @@ nsHTMLEditor::StyleSheetLoaded(nsCSSStyleSheet* aSheet, PRBool aWasAlternate,
|
|||
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 */
|
||||
|
@ -4265,12 +4225,6 @@ nsHTMLEditor::SelectAll()
|
|||
}
|
||||
|
||||
|
||||
#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,
|
||||
|
@ -4340,9 +4294,6 @@ void nsHTMLEditor::IsTextPropertySetByContent(nsIDOMNode *aNode,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
//================================================================
|
||||
// HTML Editor methods
|
||||
|
@ -4447,9 +4398,6 @@ nsHTMLEditor::GetEnclosingTable(nsIDOMNode *aNode)
|
|||
return tbl;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
#ifdef PRE_NODE_IN_BODY
|
||||
nsCOMPtr<nsIDOMElement> nsHTMLEditor::FindPreElement()
|
||||
|
@ -4552,9 +4500,6 @@ nsHTMLEditor::SetSelectionAtDocumentStart(nsISelection *aSelection)
|
|||
return aSelection->Collapse(rootElement,0);
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// RemoveBlockContainer: remove inNode, reparenting it's children into their
|
||||
|
|
|
@ -136,7 +136,7 @@ nsHTMLEditorEventListener::MouseDown(nsIDOMEvent* aMouseEvent)
|
|||
|
||||
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);
|
||||
|
|
|
@ -418,12 +418,6 @@ nsPlaintextEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
|
|||
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
|
||||
|
@ -1207,12 +1201,6 @@ nsPlaintextEditor::SetNewlineHandling(PRInt32 aNewlineHandling)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark nsIEditor overrides
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPlaintextEditor::Undo(PRUint32 aCount)
|
||||
{
|
||||
|
@ -1457,13 +1445,6 @@ nsPlaintextEditor::OutputToStream(nsIOutputStream* aOutputStream,
|
|||
return encoder->EncodeToStream(aOutputStream);
|
||||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark nsIEditorMailSupport overrides
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPlaintextEditor::InsertTextWithQuotations(const nsAString &aStringToInsert)
|
||||
{
|
||||
|
@ -1673,13 +1654,6 @@ nsPlaintextEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList)
|
|||
}
|
||||
|
||||
|
||||
#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
|
||||
|
@ -1741,13 +1715,6 @@ nsPlaintextEditor::GetPIDOMEventTarget()
|
|||
}
|
||||
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark Random methods
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsresult
|
||||
nsPlaintextEditor::SetAttributeOrEquivalent(nsIDOMElement * aElement,
|
||||
const nsAString & aAttribute,
|
||||
|
|
|
@ -3821,11 +3821,7 @@ nsTextServicesDocument::NodeHasOffsetEntry(nsTArray<OffsetEntry*> *aOffsetTable,
|
|||
}
|
||||
|
||||
// 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,
|
||||
|
|
|
@ -1027,11 +1027,6 @@ nsDocShellTreeOwner::GetOwnerRequestor()
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// DefaultTooltipTextProvider
|
||||
|
||||
|
@ -1651,12 +1646,6 @@ ChromeTooltipListener::sAutoHideCallback(nsITimer *aTimer, void* aListener)
|
|||
} // sAutoHideCallback
|
||||
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
NS_IMPL_ADDREF(ChromeContextMenuListener)
|
||||
NS_IMPL_RELEASE(ChromeContextMenuListener)
|
||||
|
||||
|
|
|
@ -275,10 +275,6 @@ nsCommandManager::DoCommand(const char *aCommandName,
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
nsresult
|
||||
nsCommandManager::IsCallerChrome(PRBool *is_caller_chrome)
|
||||
{
|
||||
|
|
|
@ -215,12 +215,7 @@ struct CleanupData
|
|||
// 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 =
|
||||
|
|
|
@ -280,10 +280,7 @@ nsresult nsReadConfig::openAndEvaluateJSFile(const char *aFileName, PRInt32 obsc
|
|||
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;
|
||||
|
|
|
@ -478,10 +478,6 @@ PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params)
|
|||
PRTimeParameters
|
||||
PR_GMTParameters(const PRExplodedTime *gmt)
|
||||
{
|
||||
#if defined(XP_MAC)
|
||||
#pragma unused (gmt)
|
||||
#endif
|
||||
|
||||
PRTimeParameters retVal = { 0, 0 };
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -153,22 +153,6 @@
|
|||
#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
|
||||
|
@ -500,7 +484,7 @@ 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;
|
||||
|
|
|
@ -2967,7 +2967,7 @@ SandboxDump(JSContext *cx, uintN argc, jsval *vp)
|
|||
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) {
|
||||
|
|
|
@ -227,10 +227,6 @@ class DocumentViewerImpl;
|
|||
|
||||
// a small delegate class used to avoid circular references
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark ** nsDocViewerSelectionListener **
|
||||
#endif
|
||||
|
||||
class nsDocViewerSelectionListener : public nsISelectionListener
|
||||
{
|
||||
public:
|
||||
|
@ -289,11 +285,6 @@ private:
|
|||
};
|
||||
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark ** DocumentViewerImpl **
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------
|
||||
class DocumentViewerImpl : public nsIDocumentViewer,
|
||||
public nsIContentViewerEdit,
|
||||
|
@ -2593,9 +2584,6 @@ NS_IMETHODIMP DocumentViewerImpl::GetCanGetContents(PRBool *aCanGetContents)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
/* ========================================================================================
|
||||
* nsIContentViewerFile
|
||||
|
|
|
@ -80,10 +80,6 @@
|
|||
* 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
|
||||
|
|
|
@ -871,7 +871,7 @@ static nsresult pref_InitInitialObjects()
|
|||
|
||||
/* 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"
|
||||
|
|
|
@ -45,12 +45,8 @@
|
|||
#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"
|
||||
|
|
|
@ -208,7 +208,7 @@ BufioFile* bufio_Open(const char* name, const char* mode)
|
|||
switch (errno)
|
||||
{
|
||||
/* file not found */
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
#if defined(XP_MACOSX)
|
||||
case fnfErr:
|
||||
#else
|
||||
case ENOENT:
|
||||
|
@ -217,7 +217,7 @@ BufioFile* bufio_Open(const char* name, const char* mode)
|
|||
break;
|
||||
|
||||
/* file in use */
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
#if defined(XP_MACOSX)
|
||||
case opWrErr:
|
||||
#else
|
||||
case EACCES:
|
||||
|
|
|
@ -50,10 +50,6 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#ifdef XP_MAC
|
||||
#include "macstdlibextras.h" /* For strcasecmp and strncasecmp */
|
||||
#include <extras.h>
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
@ -64,14 +60,10 @@
|
|||
|
||||
#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
|
||||
|
@ -285,18 +277,10 @@ 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
|
||||
|
||||
#define nr_RenameFile(from, to) rename((from), (to))
|
||||
|
||||
extern char* globalRegName;
|
||||
extern char* verRegName;
|
||||
|
||||
|
|
|
@ -83,10 +83,6 @@ 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\
|
||||
|
@ -969,11 +965,6 @@ private:
|
|||
/******************************************************************************
|
||||
* nsCacheService
|
||||
*****************************************************************************/
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark nsCacheService
|
||||
#endif
|
||||
|
||||
nsCacheService * nsCacheService::gService = nsnull;
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsCacheService, nsICacheService)
|
||||
|
@ -2123,10 +2114,6 @@ nsCacheService::SetMemoryCache()
|
|||
/******************************************************************************
|
||||
* static methods for nsCacheEntryDescriptor
|
||||
*****************************************************************************/
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
void
|
||||
nsCacheService::CloseDescriptor(nsCacheEntryDescriptor * descriptor)
|
||||
{
|
||||
|
@ -2248,10 +2235,6 @@ nsCacheService::ValidateEntry(nsCacheEntry * entry)
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
nsCacheService::DeactivateEntry(nsCacheEntry * entry)
|
||||
|
|
|
@ -50,11 +50,6 @@
|
|||
* static hash table callback functions
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark HASHTABLE CALLBACKS
|
||||
#endif
|
||||
|
||||
struct HashTableEntry : PLDHashEntryHdr {
|
||||
nsDiskCacheBinding * mBinding;
|
||||
};
|
||||
|
@ -96,11 +91,6 @@ ClearEntry(PLDHashTable * /* table */,
|
|||
/******************************************************************************
|
||||
* Utility Functions
|
||||
*****************************************************************************/
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark DISK CACHE BINDERY
|
||||
#endif
|
||||
|
||||
nsDiskCacheBinding *
|
||||
GetCacheEntryBinding(nsCacheEntry * entry)
|
||||
{
|
||||
|
|
|
@ -58,9 +58,6 @@
|
|||
/******************************************************************************
|
||||
* nsDiskCacheInputStream
|
||||
*****************************************************************************/
|
||||
#ifdef XP_MAC
|
||||
#pragma mark nsDiskCacheInputStream
|
||||
#endif
|
||||
class nsDiskCacheInputStream : public nsIInputStream {
|
||||
|
||||
public:
|
||||
|
@ -193,10 +190,6 @@ nsDiskCacheInputStream::IsNonBlocking(PRBool * nonBlocking)
|
|||
/******************************************************************************
|
||||
* nsDiskCacheOutputStream
|
||||
*****************************************************************************/
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#pragma mark nsDiskCacheOutputStream
|
||||
#endif
|
||||
class nsDiskCacheOutputStream : public nsIOutputStream
|
||||
, public nsIDiskCacheStreamInternal
|
||||
{
|
||||
|
@ -305,11 +298,6 @@ nsDiskCacheOutputStream::IsNonBlocking(PRBool * nonBlocking)
|
|||
/******************************************************************************
|
||||
* 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
|
||||
|
|
|
@ -53,11 +53,7 @@
|
|||
#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)
|
||||
|
||||
|
|
|
@ -114,40 +114,24 @@ class BlobImpl;
|
|||
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);
|
||||
|
|
|
@ -124,20 +124,6 @@ FileSystemDataSource::isDirURI(nsIRDFResource* source)
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -1202,17 +1188,8 @@ FileSystemDataSource::GetFileSize(nsIRDFResource *source, nsIRDFInt **aResult)
|
|||
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;
|
||||
|
@ -1262,24 +1239,6 @@ FileSystemDataSource::GetName(nsIRDFResource *source, nsIRDFLiteral **aResult)
|
|||
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
|
||||
|
|
|
@ -260,11 +260,6 @@ nsPrimitiveHelpers :: ConvertPlatformPlainTextToUnicode ( const char* inText, PR
|
|||
} // ConvertPlatformPlainTextToUnicode
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// ConvertPlatformToDOMLinebreaks
|
||||
//
|
||||
|
|
|
@ -246,11 +246,6 @@ DataStruct::ReadCache(nsISupports** aData, PRUint32* aDataLen)
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Transferable constructor
|
||||
|
|
|
@ -327,11 +327,6 @@ static T* ConvertUnknownBreaks(const T* inSrc, PRInt32& ioLen, const char* destB
|
|||
}
|
||||
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma mark -
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
ConvertLineBreaks
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче