From e6f66b78e34d19a5656098b7ad6b901a9570847f Mon Sep 17 00:00:00 2001
From: "mkanat%bugzilla.org" <>
Date: Sat, 9 Feb 2008 05:20:32 +0000
Subject: [PATCH] Bug 388723: Make the browser wrap comments on display in
addition to the normal wrapping, to support CJK languages that have no
spaces. Patch By Max Kanat-Alexander r=glob, a=mkanat
---
skins/standard/IE-fixes.css | 5 +++++
skins/standard/global.css | 18 ++++++++++++++++++
template/en/default/bug/comments.html.tmpl | 3 ++-
.../en/default/bug/process/midair.html.tmpl | 4 +++-
template/en/default/pages/linked.html.tmpl | 4 ++--
5 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/skins/standard/IE-fixes.css b/skins/standard/IE-fixes.css
index b0f34141da..fce20445b5 100755
--- a/skins/standard/IE-fixes.css
+++ b/skins/standard/IE-fixes.css
@@ -13,6 +13,11 @@
* Contributor(s): Marc Schumann
*/
+.bz_comment_text {
+ white-space: pre;
+ word-wrap: break-word;
+}
+
#footer #useful-links li {
padding-bottom: 0.8ex;
}
diff --git a/skins/standard/global.css b/skins/standard/global.css
index e336f67f21..0b1d71c521 100644
--- a/skins/standard/global.css
+++ b/skins/standard/global.css
@@ -244,6 +244,22 @@ div#docslinks {
margin-bottom: 2em;
}
+/* The rules for these classes make international text wrap correctly,
+ even for languages like Japanese that have no spaces. */
+.bz_comment_text {
+ font-family: monospace;
+ /* Note that these must all be on separate lines or they stop
+ working in Konqueror. */
+ white-space: pre-wrap; /* CSS 3 & 2.1 */
+ white-space: -moz-pre-wrap; /* Gecko */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+}
+
+.bz_comment_text {
+ width: 50em;
+}
+
.bz_comment_head {
background-color: #e0e0e0;
}
@@ -255,6 +271,8 @@ div#docslinks {
span.quote {
color: #65379c;
+ /* Make quoted text not wrap. */
+ white-space: pre;
}
table#flags th,
diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl
index 5add6d54f4..c507c58019 100644
--- a/template/en/default/bug/comments.html.tmpl
+++ b/template/en/default/bug/comments.html.tmpl
@@ -152,7 +152,8 @@
[% ELSE %]
[% wrapped_comment = comment.body FILTER wrap_comment %]
[% END %]
-
[% END %]
diff --git a/template/en/default/pages/linked.html.tmpl b/template/en/default/pages/linked.html.tmpl
index bd59330943..ada3c90dc4 100644
--- a/template/en/default/pages/linked.html.tmpl
+++ b/template/en/default/pages/linked.html.tmpl
@@ -31,7 +31,7 @@
-
+
@@ -46,7 +46,7 @@
-
+
--
2.47.3