зеркало из https://github.com/mozilla/gecko-dev.git
Bug 675556 - Switch from PRPackedBool to PRUint8 in nsILineBreaker, r=roc
This commit is contained in:
Родитель
01905612c3
Коммит
79d88fac19
|
@ -65,9 +65,9 @@ public:
|
|||
// aLength is the length of the aText array and also the length of the aBreakBefore
|
||||
// output array.
|
||||
virtual void GetJISx4051Breaks(const PRUnichar* aText, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore) = 0;
|
||||
PRUint8* aBreakBefore) = 0;
|
||||
virtual void GetJISx4051Breaks(const PRUint8* aText, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore) = 0;
|
||||
PRUint8* aBreakBefore) = 0;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsILineBreaker, NS_ILINEBREAKER_IID)
|
||||
|
|
|
@ -42,12 +42,12 @@
|
|||
|
||||
void
|
||||
NS_GetComplexLineBreaks(const PRUnichar* aText, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore)
|
||||
PRUint8* aBreakBefore)
|
||||
{
|
||||
NS_ASSERTION(aText, "aText shouldn't be null");
|
||||
TextBreakLocatorRef breakLocator;
|
||||
|
||||
memset(aBreakBefore, PR_FALSE, aLength * sizeof(PRPackedBool));
|
||||
memset(aBreakBefore, PR_FALSE, aLength * sizeof(PRUint8));
|
||||
|
||||
OSStatus status = UCCreateTextBreakLocator(NULL, 0, kUCTextBreakLineMask, &breakLocator);
|
||||
|
||||
|
|
|
@ -47,6 +47,6 @@
|
|||
*/
|
||||
void
|
||||
NS_GetComplexLineBreaks(const PRUnichar* aText, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore);
|
||||
PRUint8* aBreakBefore);
|
||||
|
||||
#endif /* nsComplexBreaker_h__ */
|
||||
|
|
|
@ -786,7 +786,7 @@ nsJISx4051LineBreaker::WordMove(const PRUnichar* aText, PRUint32 aLen,
|
|||
}
|
||||
|
||||
PRInt32 ret;
|
||||
nsAutoTArray<PRPackedBool, 2000> breakState;
|
||||
nsAutoTArray<PRUint8, 2000> breakState;
|
||||
if (!textNeedsJISx4051 || !breakState.AppendElements(end - begin)) {
|
||||
// No complex text character, do not try to do complex line break.
|
||||
// (This is required for serializers. See Bug #344816.)
|
||||
|
@ -833,7 +833,7 @@ nsJISx4051LineBreaker::Prev(const PRUnichar* aText, PRUint32 aLen,
|
|||
|
||||
void
|
||||
nsJISx4051LineBreaker::GetJISx4051Breaks(const PRUnichar* aChars, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore)
|
||||
PRUint8* aBreakBefore)
|
||||
{
|
||||
PRUint32 cur;
|
||||
PRInt8 lastClass = CLASS_NONE;
|
||||
|
@ -890,7 +890,7 @@ nsJISx4051LineBreaker::GetJISx4051Breaks(const PRUnichar* aChars, PRUint32 aLeng
|
|||
|
||||
void
|
||||
nsJISx4051LineBreaker::GetJISx4051Breaks(const PRUint8* aChars, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore)
|
||||
PRUint8* aBreakBefore)
|
||||
{
|
||||
PRUint32 cur;
|
||||
PRInt8 lastClass = CLASS_NONE;
|
||||
|
|
|
@ -53,9 +53,9 @@ public:
|
|||
PRInt32 Prev( const PRUnichar* aText, PRUint32 aLen, PRUint32 aPos);
|
||||
|
||||
virtual void GetJISx4051Breaks(const PRUnichar* aText, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore);
|
||||
PRUint8* aBreakBefore);
|
||||
virtual void GetJISx4051Breaks(const PRUint8* aText, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore);
|
||||
PRUint8* aBreakBefore);
|
||||
|
||||
private:
|
||||
PRInt32 WordMove(const PRUnichar* aText, PRUint32 aLen, PRUint32 aPos,
|
||||
|
|
|
@ -45,11 +45,11 @@
|
|||
|
||||
void
|
||||
NS_GetComplexLineBreaks(const PRUnichar* aText, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore)
|
||||
PRUint8* aBreakBefore)
|
||||
{
|
||||
NS_ASSERTION(aText, "aText shouldn't be null");
|
||||
|
||||
memset(aBreakBefore, PR_FALSE, aLength * sizeof(PRPackedBool));
|
||||
memset(aBreakBefore, PR_FALSE, aLength * sizeof(PRUint8));
|
||||
|
||||
nsAutoTArray<PangoLogAttr, 2000> attrBuffer;
|
||||
if (!attrBuffer.AppendElements(aLength + 1))
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
void
|
||||
NS_GetComplexLineBreaks(const PRUnichar* aText, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore)
|
||||
PRUint8* aBreakBefore)
|
||||
{
|
||||
NS_ASSERTION(aText, "aText shouldn't be null");
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
void
|
||||
NS_GetComplexLineBreaks(const PRUnichar* aText, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore)
|
||||
PRUint8* aBreakBefore)
|
||||
{
|
||||
NS_ASSERTION(aText, "aText shouldn't be null");
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ nsTransformedTextRun::SetCapitalization(PRUint32 aStart, PRUint32 aLength,
|
|||
|
||||
PRBool
|
||||
nsTransformedTextRun::SetPotentialLineBreaks(PRUint32 aStart, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore,
|
||||
PRUint8* aBreakBefore,
|
||||
gfxContext* aRefContext)
|
||||
{
|
||||
PRBool changed = gfxTextRun::SetPotentialLineBreaks(aStart, aLength,
|
||||
|
@ -264,7 +264,7 @@ nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
|
|||
PRUint32 runStart = 0;
|
||||
PRBool runIsLowercase = PR_FALSE;
|
||||
nsAutoTArray<nsStyleContext*,50> styleArray;
|
||||
nsAutoTArray<PRPackedBool,50> canBreakBeforeArray;
|
||||
nsAutoTArray<PRUint8,50> canBreakBeforeArray;
|
||||
|
||||
PRUint32 i;
|
||||
for (i = 0; i <= length; ++i) {
|
||||
|
@ -338,7 +338,7 @@ nsCaseTransformTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
|
|||
nsAutoString convertedString;
|
||||
nsAutoTArray<PRPackedBool,50> charsToMergeArray;
|
||||
nsAutoTArray<nsStyleContext*,50> styleArray;
|
||||
nsAutoTArray<PRPackedBool,50> canBreakBeforeArray;
|
||||
nsAutoTArray<PRUint8,50> canBreakBeforeArray;
|
||||
PRUint32 extraCharsCount = 0;
|
||||
|
||||
PRUint32 i;
|
||||
|
|
|
@ -117,7 +117,7 @@ public:
|
|||
PRPackedBool* aCapitalization,
|
||||
gfxContext* aRefContext);
|
||||
virtual PRBool SetPotentialLineBreaks(PRUint32 aStart, PRUint32 aLength,
|
||||
PRPackedBool* aBreakBefore,
|
||||
PRUint8* aBreakBefore,
|
||||
gfxContext* aRefContext);
|
||||
/**
|
||||
* Called after SetCapitalization and SetPotentialLineBreaks
|
||||
|
|
Загрузка…
Ссылка в новой задаче