Bug 548495 followup to fix reftest failure. r=masayuki pending

This commit is contained in:
Boris Zbarsky 2010-02-26 22:20:56 -05:00
parent 792725950c
commit 558d86c2f6

View File

@ -722,15 +722,19 @@ ContextualAnalysis(PRUnichar prev, PRUnichar cur, PRUnichar next,
// If this is immediately after same char, we should not break here.
if (prev == cur)
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) {
aState.NotifySeenSlash();
} else {
aState.NotifySeenBackslash();
}
// If this text has two or more (BACK)SLASHs, this may be file path or URL.
if (!aState.UseConservativeBreaking() &&
(cur == U_SLASH ?
aState.HasPreviousSlash() : aState.HasPreviousBackslash()))
if (shouldReturn)
return CLASS_OPEN;
} else if (cur == U_PERCENT) {
// If this is a part of the param of URL, we should break before.