зеркало из https://github.com/mozilla/pjs.git
fix word breaking problem. r=mjudge. treat all word breaking as the same.
This commit is contained in:
Родитель
8384beb244
Коммит
573b760f5c
|
@ -450,6 +450,11 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
||||||
PRBool isWhitespace = PR_FALSE;
|
PRBool isWhitespace = PR_FALSE;
|
||||||
PRUnichar* result = nsnull;
|
PRUnichar* result = nsnull;
|
||||||
|
|
||||||
|
// Fix word breaking problem w/ PREFORMAT and PREWRAP
|
||||||
|
// for word breaking, we should really go to the normal code
|
||||||
|
if((! aForLineBreak) && (eNormal != mMode))
|
||||||
|
mMode = eNormal;
|
||||||
|
|
||||||
while (offset < fragLen) {
|
while (offset < fragLen) {
|
||||||
PRUnichar firstChar = frag->CharAt(offset);
|
PRUnichar firstChar = frag->CharAt(offset);
|
||||||
|
|
||||||
|
@ -764,6 +769,11 @@ nsTextTransformer::GetPrevWord(PRBool aInWord,
|
||||||
PRBool isWhitespace = PR_FALSE;
|
PRBool isWhitespace = PR_FALSE;
|
||||||
PRUnichar* result = nsnull;
|
PRUnichar* result = nsnull;
|
||||||
|
|
||||||
|
// Fix word breaking problem w/ PREFORMAT and PREWRAP
|
||||||
|
// for word breaking, we should really go to the normal code
|
||||||
|
if((! aForLineBreak) && (eNormal != mMode))
|
||||||
|
mMode = eNormal;
|
||||||
|
|
||||||
while (--offset >= 0) {
|
while (--offset >= 0) {
|
||||||
PRUnichar firstChar = frag->CharAt(offset);
|
PRUnichar firstChar = frag->CharAt(offset);
|
||||||
|
|
||||||
|
|
|
@ -450,6 +450,11 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
|
||||||
PRBool isWhitespace = PR_FALSE;
|
PRBool isWhitespace = PR_FALSE;
|
||||||
PRUnichar* result = nsnull;
|
PRUnichar* result = nsnull;
|
||||||
|
|
||||||
|
// Fix word breaking problem w/ PREFORMAT and PREWRAP
|
||||||
|
// for word breaking, we should really go to the normal code
|
||||||
|
if((! aForLineBreak) && (eNormal != mMode))
|
||||||
|
mMode = eNormal;
|
||||||
|
|
||||||
while (offset < fragLen) {
|
while (offset < fragLen) {
|
||||||
PRUnichar firstChar = frag->CharAt(offset);
|
PRUnichar firstChar = frag->CharAt(offset);
|
||||||
|
|
||||||
|
@ -764,6 +769,11 @@ nsTextTransformer::GetPrevWord(PRBool aInWord,
|
||||||
PRBool isWhitespace = PR_FALSE;
|
PRBool isWhitespace = PR_FALSE;
|
||||||
PRUnichar* result = nsnull;
|
PRUnichar* result = nsnull;
|
||||||
|
|
||||||
|
// Fix word breaking problem w/ PREFORMAT and PREWRAP
|
||||||
|
// for word breaking, we should really go to the normal code
|
||||||
|
if((! aForLineBreak) && (eNormal != mMode))
|
||||||
|
mMode = eNormal;
|
||||||
|
|
||||||
while (--offset >= 0) {
|
while (--offset >= 0) {
|
||||||
PRUnichar firstChar = frag->CharAt(offset);
|
PRUnichar firstChar = frag->CharAt(offset);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче