forked from mirrors/gecko-dev
Bug 548495 followup to fix reftest failure. r=masayuki pending
This commit is contained in:
parent
1fabfee5d2
commit
eb498351f7
1 changed files with 8 additions and 4 deletions
|
|
@ -722,15 +722,19 @@ ContextualAnalysis(PRUnichar prev, PRUnichar cur, PRUnichar next,
|
||||||
// If this is immediately after same char, we should not break here.
|
// If this is immediately after same char, we should not break here.
|
||||||
if (prev == cur)
|
if (prev == cur)
|
||||||
return CLASS_CHARACTER;
|
return CLASS_CHARACTER;
|
||||||
|
// If this text has two or more (BACK)SLASHs, this may be file path or URL.
|
||||||
|
// Make sure to compute shouldReturn before we notify on this slash.
|
||||||
|
PRBool shouldReturn = !aState.UseConservativeBreaking() &&
|
||||||
|
(cur == U_SLASH ?
|
||||||
|
aState.HasPreviousSlash() : aState.HasPreviousBackslash());
|
||||||
|
|
||||||
if (cur == U_SLASH) {
|
if (cur == U_SLASH) {
|
||||||
aState.NotifySeenSlash();
|
aState.NotifySeenSlash();
|
||||||
} else {
|
} else {
|
||||||
aState.NotifySeenBackslash();
|
aState.NotifySeenBackslash();
|
||||||
}
|
}
|
||||||
// If this text has two or more (BACK)SLASHs, this may be file path or URL.
|
|
||||||
if (!aState.UseConservativeBreaking() &&
|
if (shouldReturn)
|
||||||
(cur == U_SLASH ?
|
|
||||||
aState.HasPreviousSlash() : aState.HasPreviousBackslash()))
|
|
||||||
return CLASS_OPEN;
|
return CLASS_OPEN;
|
||||||
} else if (cur == U_PERCENT) {
|
} else if (cur == U_PERCENT) {
|
||||||
// If this is a part of the param of URL, we should break before.
|
// If this is a part of the param of URL, we should break before.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue