Use macros from nsTextFragment
git-svn-id: svn://10.0.0.236/trunk@17198 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
39aadedaf7
commit
31c482e2a8
@ -45,17 +45,14 @@
|
||||
#include "nsIDOMHTMLImageElement.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsTextFragment.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#define BROKEN_IMAGE_URL "resource:/res/html/broken-image.gif"
|
||||
#endif
|
||||
|
||||
#define XP_IS_SPACE(_ch) \
|
||||
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
|
||||
|
||||
static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID);
|
||||
|
||||
|
||||
// Value's for mSuppress
|
||||
#define SUPPRESS_UNSET 0
|
||||
#define DONT_SUPPRESS 1
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsXIFConverter.h"
|
||||
#include "nsISizeOfHandler.h"
|
||||
#include "nsTextFragment.h"
|
||||
|
||||
class Area {
|
||||
public:
|
||||
@ -97,10 +98,6 @@ Area::SizeOf(nsISizeOfHandler* aHandler) const
|
||||
aHandler->Add(mNumCoords * sizeof(nscoord));
|
||||
}
|
||||
|
||||
// XXX move into nsCRT
|
||||
#define XP_IS_SPACE(_ch) \
|
||||
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\r') || ((_ch) == '\n'))
|
||||
|
||||
#include <stdlib.h>
|
||||
#define XP_ATOI(_s) ::atoi(_s)
|
||||
|
||||
|
||||
@ -61,15 +61,6 @@ static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID);
|
||||
#define WORD_BUF_SIZE 100
|
||||
#define TEXT_BUF_SIZE 1000
|
||||
|
||||
// XXX these are a copy of nsTextTransformer's version and they aren't I18N'd!
|
||||
#define XP_IS_LOWERCASE(_ch) \
|
||||
(((_ch) >= 'a') && ((_ch) <= 'z'))
|
||||
|
||||
#define XP_TO_UPPER(_ch) ((_ch) & ~32)
|
||||
|
||||
#define XP_IS_SPACE(_ch) \
|
||||
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
|
||||
|
||||
static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
|
||||
|
||||
class TextFrame;
|
||||
@ -681,8 +672,6 @@ TextFrame::ComputeSelectionInfo(nsIRenderingContext& aRenderingContext,
|
||||
}
|
||||
#endif //0
|
||||
|
||||
#define XP_IS_SPACE_W XP_IS_SPACE
|
||||
|
||||
/**
|
||||
* Prepare the text in the content for rendering. If aIndexes is not nsnull
|
||||
* then fill in aIndexes's with the mapping from the original input to
|
||||
|
||||
@ -26,20 +26,6 @@
|
||||
// XXX put a copy in nsHTMLIIDs
|
||||
static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
|
||||
|
||||
// XXX these need I18N spankage
|
||||
#define XP_IS_SPACE(_ch) \
|
||||
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
|
||||
|
||||
#define XP_IS_UPPERCASE(_ch) \
|
||||
(((_ch) >= 'A') && ((_ch) <= 'Z'))
|
||||
|
||||
#define XP_IS_LOWERCASE(_ch) \
|
||||
(((_ch) >= 'a') && ((_ch) <= 'z'))
|
||||
|
||||
#define XP_TO_LOWER(_ch) ((_ch) | 32)
|
||||
|
||||
#define XP_TO_UPPER(_ch) ((_ch) & ~32)
|
||||
|
||||
// XXX I'm sure there are other special characters
|
||||
#define CH_NBSP 160
|
||||
|
||||
|
||||
@ -45,17 +45,14 @@
|
||||
#include "nsIDOMHTMLImageElement.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsTextFragment.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#define BROKEN_IMAGE_URL "resource:/res/html/broken-image.gif"
|
||||
#endif
|
||||
|
||||
#define XP_IS_SPACE(_ch) \
|
||||
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
|
||||
|
||||
static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID);
|
||||
|
||||
|
||||
// Value's for mSuppress
|
||||
#define SUPPRESS_UNSET 0
|
||||
#define DONT_SUPPRESS 1
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsXIFConverter.h"
|
||||
#include "nsISizeOfHandler.h"
|
||||
#include "nsTextFragment.h"
|
||||
|
||||
class Area {
|
||||
public:
|
||||
@ -97,10 +98,6 @@ Area::SizeOf(nsISizeOfHandler* aHandler) const
|
||||
aHandler->Add(mNumCoords * sizeof(nscoord));
|
||||
}
|
||||
|
||||
// XXX move into nsCRT
|
||||
#define XP_IS_SPACE(_ch) \
|
||||
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\r') || ((_ch) == '\n'))
|
||||
|
||||
#include <stdlib.h>
|
||||
#define XP_ATOI(_s) ::atoi(_s)
|
||||
|
||||
|
||||
@ -61,15 +61,6 @@ static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID);
|
||||
#define WORD_BUF_SIZE 100
|
||||
#define TEXT_BUF_SIZE 1000
|
||||
|
||||
// XXX these are a copy of nsTextTransformer's version and they aren't I18N'd!
|
||||
#define XP_IS_LOWERCASE(_ch) \
|
||||
(((_ch) >= 'a') && ((_ch) <= 'z'))
|
||||
|
||||
#define XP_TO_UPPER(_ch) ((_ch) & ~32)
|
||||
|
||||
#define XP_IS_SPACE(_ch) \
|
||||
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
|
||||
|
||||
static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
|
||||
|
||||
class TextFrame;
|
||||
@ -681,8 +672,6 @@ TextFrame::ComputeSelectionInfo(nsIRenderingContext& aRenderingContext,
|
||||
}
|
||||
#endif //0
|
||||
|
||||
#define XP_IS_SPACE_W XP_IS_SPACE
|
||||
|
||||
/**
|
||||
* Prepare the text in the content for rendering. If aIndexes is not nsnull
|
||||
* then fill in aIndexes's with the mapping from the original input to
|
||||
|
||||
@ -26,20 +26,6 @@
|
||||
// XXX put a copy in nsHTMLIIDs
|
||||
static NS_DEFINE_IID(kITextContentIID, NS_ITEXT_CONTENT_IID);
|
||||
|
||||
// XXX these need I18N spankage
|
||||
#define XP_IS_SPACE(_ch) \
|
||||
(((_ch) == ' ') || ((_ch) == '\t') || ((_ch) == '\n'))
|
||||
|
||||
#define XP_IS_UPPERCASE(_ch) \
|
||||
(((_ch) >= 'A') && ((_ch) <= 'Z'))
|
||||
|
||||
#define XP_IS_LOWERCASE(_ch) \
|
||||
(((_ch) >= 'a') && ((_ch) <= 'z'))
|
||||
|
||||
#define XP_TO_LOWER(_ch) ((_ch) | 32)
|
||||
|
||||
#define XP_TO_UPPER(_ch) ((_ch) & ~32)
|
||||
|
||||
// XXX I'm sure there are other special characters
|
||||
#define CH_NBSP 160
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user