Bug 453468: fix regression in wrap attribute in textareas from bug 99457. r+sr=dbaron

This commit is contained in:
Simon Montagu 2008-10-16 14:34:10 -07:00
parent 3c5947edd0
commit 78759c8bb2
7 changed files with 60 additions and 2 deletions

View File

@ -18,6 +18,10 @@ random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == wordwrap-03.html wordwrap-03-ref.html #
== wordwrap-05.html wordwrap-05-ref.html
== wordwrap-06.html wordwrap-06-ref.html
== wordwrap-07.html wordwrap-07-ref.html
!= wordwrap-08.html wordwrap-01-ref.html
== wordwrap-08.html wordwrap-08-ref.html
!= wordwrap-09.html wordwrap-01-ref.html
== wordwrap-09.html wordwrap-09-ref.html
== zwnj-01.html zwnj-01-ref.html
== zwnj-02.html zwnj-02-ref.html
random-if(MOZ_WIDGET_TOOLKIT=="gtk2") != zwnj-01.html zwnj-02-ref.html # Bad fonts on the tinderbox -- works locally

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
textarea { overflow: scroll; word-wrap: normal; white-space: pre}
</style>
<title>Test Wordwrap</title>
</head>
<body>
<textarea rows="10" cols="20">It's&nbsp;lipsmackinthirstquenchinacetastinmotivatingoodbuzzincooltalkinhighwalkinfastlivinevergivincoolfizzin&nbsp;Firefox!</textarea>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
textarea { overflow: scroll}
</style>
<title>Test Wordwrap</title>
</head>
<body>
<textarea rows="10" cols="20" wrap="off">It's lipsmackinthirstquenchinacetastinmotivatingoodbuzzincooltalkinhighwalkinfastlivinevergivincoolfizzin Firefox!</textarea>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
textarea { overflow: scroll; word-wrap: normal; white-space: pre; }
</style>
<title>Test Wordwrap</title>
</head>
<body>
<textarea rows="10" cols="20">It's
lipsmackinthirstquenchinacetastinmotivatingoodbuzzincooltalkinhighwalkinfastlivinevergivincoolfizzin
Firefox!</textarea>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
textarea { overflow: scroll; word-wrap: normal; }
</style>
<title>Test Wordwrap</title>
</head>
<body>
<textarea rows="10" cols="20">It's lipsmackinthirstquenchinacetastinmotivatingoodbuzzincooltalkinhighwalkinfastlivinevergivincoolfizzin Firefox!</textarea>
</body>
</html>

View File

@ -127,7 +127,7 @@ textarea {
text-indent: 0;
-moz-user-select: text;
text-shadow: none;
word-wrap: break-word !important;
word-wrap: break-word;
}
textarea > scrollbar {

View File

@ -812,7 +812,7 @@ struct nsStyleText {
}
PRBool WordCanWrap() const {
return mWordWrap == NS_STYLE_WORDWRAP_BREAK_WORD;
return WhiteSpaceCanWrap() && mWordWrap == NS_STYLE_WORDWRAP_BREAK_WORD;
}
};