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 1fabfee5d2
commit eb498351f7

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 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.