зеркало из https://github.com/mozilla/pjs.git
Bug 361334 - Onbeforeunload dialog has too many line breaks, r+sr=jst
This commit is contained in:
Родитель
2f3bb42947
Коммит
cec937c8bb
|
@ -1194,9 +1194,15 @@ DocumentViewerImpl::PermitUnload(PRBool *aPermitUnload)
|
||||||
// dialogue to 1024 characters.
|
// dialogue to 1024 characters.
|
||||||
PRInt32 len = PR_MIN(event.text.Length(), 1024);
|
PRInt32 len = PR_MIN(event.text.Length(), 1024);
|
||||||
|
|
||||||
nsAutoString msg(preMsg + NS_LITERAL_STRING("\n\n") +
|
nsAutoString msg;
|
||||||
StringHead(event.text, len) +
|
if (len == 0) {
|
||||||
NS_LITERAL_STRING("\n\n") + postMsg);
|
msg = preMsg + StringHead(event.text, len) +
|
||||||
|
NS_LITERAL_STRING("\n\n") + postMsg;
|
||||||
|
} else {
|
||||||
|
msg = preMsg + NS_LITERAL_STRING("\n\n") +
|
||||||
|
StringHead(event.text, len) +
|
||||||
|
NS_LITERAL_STRING("\n\n") + postMsg;
|
||||||
|
}
|
||||||
|
|
||||||
// This doesn't pass a title, which makes the title be
|
// This doesn't pass a title, which makes the title be
|
||||||
// "Confirm", is that ok, or do we want a localizable title for
|
// "Confirm", is that ok, or do we want a localizable title for
|
||||||
|
|
Загрузка…
Ссылка в новой задаче