mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Backed out changeset fd1d01c7a9e2 (bug 1081858) for failing reftest segment-break-transformation-1.html on Windows XP. r=backout
This commit is contained in:
parent
c31797b642
commit
5187549cd1
@ -51,7 +51,7 @@ nsTextFrameUtils::TransformText(const char16_t* aText, uint32_t aLength,
|
||||
// Skip discardables.
|
||||
uint32_t i;
|
||||
for (i = 0; i < aLength; ++i) {
|
||||
char16_t ch = aText[i];
|
||||
char16_t ch = *aText++;
|
||||
if (IsDiscardable(ch, &flags)) {
|
||||
aSkipChars->SkipChar();
|
||||
} else {
|
||||
@ -82,15 +82,15 @@ nsTextFrameUtils::TransformText(const char16_t* aText, uint32_t aLength,
|
||||
bool inWhitespace = (*aIncomingFlags & INCOMING_WHITESPACE) != 0;
|
||||
uint32_t i;
|
||||
for (i = 0; i < aLength; ++i) {
|
||||
char16_t ch = aText[i];
|
||||
char16_t ch = *aText++;
|
||||
bool nowInWhitespace;
|
||||
if (ch == ' ' &&
|
||||
(i + 1 >= aLength ||
|
||||
!IsSpaceCombiningSequenceTail(&aText[i + 1], aLength - (i + 1)))) {
|
||||
!IsSpaceCombiningSequenceTail(aText, aLength - (i + 1)))) {
|
||||
nowInWhitespace = true;
|
||||
} else if (ch == '\n' && aCompression == COMPRESS_WHITESPACE_NEWLINE) {
|
||||
if (i > 0 && IS_CJ_CHAR(aText[i - 1]) &&
|
||||
i + 1 < aLength && IS_CJ_CHAR(aText[i + 1])) {
|
||||
if (i > 0 && IS_CJ_CHAR(aText[-1]) &&
|
||||
i + 1 < aLength && IS_CJ_CHAR(aText[1])) {
|
||||
// Discard newlines between CJK chars.
|
||||
// XXX this really requires more context to get right!
|
||||
aSkipChars->SkipChar();
|
||||
@ -158,7 +158,7 @@ nsTextFrameUtils::TransformText(const uint8_t* aText, uint32_t aLength,
|
||||
// Skip discardables.
|
||||
uint32_t i;
|
||||
for (i = 0; i < aLength; ++i) {
|
||||
uint8_t ch = aText[i];
|
||||
uint8_t ch = *aText++;
|
||||
if (IsDiscardable(ch, &flags)) {
|
||||
aSkipChars->SkipChar();
|
||||
} else {
|
||||
@ -182,7 +182,7 @@ nsTextFrameUtils::TransformText(const uint8_t* aText, uint32_t aLength,
|
||||
bool inWhitespace = (*aIncomingFlags & INCOMING_WHITESPACE) != 0;
|
||||
uint32_t i;
|
||||
for (i = 0; i < aLength; ++i) {
|
||||
uint8_t ch = aText[i];
|
||||
uint8_t ch = *aText++;
|
||||
bool nowInWhitespace = ch == ' ' || ch == '\t' ||
|
||||
(ch == '\n' && aCompression == COMPRESS_WHITESPACE_NEWLINE);
|
||||
if (!nowInWhitespace) {
|
||||
|
Loading…
Reference in New Issue
Block a user