Last Comment Bug 261081 - Add support for pre-wrap value of white-space
: Add support for pre-wrap value of white-space
Status: RESOLVED FIXED
: css2, dev-doc-complete
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: P1 normal with 14 votes (vote)
: mozilla1.9beta4
Assigned To: Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
:
Mentors:
http://www.hut.fi/~tkarvine/pre-wrap-...
: 330706 (view as bug list)
Depends on: 191699 393096 411792 435177
Blocks: line-breaking acid3 418543
  Show dependency treegraph
 
Reported: 2004-09-22 15:01 PDT by Hugo Haas
Modified: 2010-03-05 08:54 PST (History)
26 users (show)
dbaron: blocking1.9-
roc: wanted1.9+
roc: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix? (17.44 KB, patch)
2008-01-10 16:16 PST, Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
dbaron: review+
dbaron: superreview+
mtschrep: approval1.9+
Details | Diff | Splinter Review

Description Hugo Haas 2004-09-22 15:01:03 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040914 Firefox/0.9
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040914 Firefox/0.9

Mozilla supports "white-space: -moz-pre-wrap", which is proprietary, and not the
CSS 2 property "white-space: pre-wrap", which is equivalent.

Could it be added?

Thank you.

Regards,

Hugo

Reproducible: Always
Steps to Reproduce:
Comment 1 Bill Mason 2004-09-22 15:40:03 PDT

*** This bug has been marked as a duplicate of 230555 ***
Comment 2 Anne (:annevk) 2004-11-25 11:33:22 PST
See also bug 230555.
Comment 3 Justin Wood (:Callek) 2004-11-25 23:13:13 PST
s/CSS 2/CSS2.1/

-->Accept, should be as simple as changing all in-source uses from -moz- to
normal use.

Dbaron, should I keep backwards compat somehow with current version, for
websites which used it, similar to how we kept backwards compat with -moz-opacity ?
Comment 4 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2004-11-25 23:52:10 PST
More needs to be done than just renaming.  We first need to make sure it does
what the spec says.
Comment 5 Phil Ringnalda (:philor, back in August) 2006-03-16 10:26:02 PST
*** Bug 330706 has been marked as a duplicate of this bug. ***
Comment 6 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2007-08-30 03:32:49 PDT
I think we'll be looking good for this when I'm done with bug 393096
Comment 7 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-01-06 23:42:04 PST
I think we should do this now. Our white-space:-moz-pre-wrap handling has improved a lot and is now very good IMHO.
Comment 8 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-01-10 16:16:24 PST
Created attachment 296444 [details] [diff] [review]
fix?

This should do it.

We could give -moz-pre-wrap its own value so that getComputedStyle and readers of style.whiteSpace can still return "-moz-pre-wrap", but I don't think that should be necessary.

There are a lot of uses of -moz-pre-wrap in stylesheets in our tree, which could be replaced in a separate patch.

I did some testing and found bug 411792, which should be fixed before we land this.
Comment 9 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2008-02-16 00:34:22 PST
Comment on attachment 296444 [details] [diff] [review]
fix?

r+sr=dbaron.

I tend to think you should just remove -moz-pre-wrap (from nsCSSProps.cpp and nsCSSKeywordList.h).

Could you add pre-wrap to layout/style/test/property-database.js too ?
Comment 10 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-02-16 01:20:12 PST
> Could you add pre-wrap to layout/style/test/property-database.js too ?

OK

> I tend to think you should just remove -moz-pre-wrap (from nsCSSProps.cpp and
> nsCSSKeywordList.h).

We use it all over the place in our tree. I could do a big search-and-replace, but extensions may also use it, not to mention actual Web sites. Can we not do this in 1.9? I think it's polite to have a transition period with both are supported.
Comment 11 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2008-02-16 09:08:14 PST
OK, fine to keep -moz-pre-wrap for 1.9 given how close to release we are, but file a bug on removing it afterwards.
Comment 12 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-02-17 13:19:32 PST
Comment on attachment 296444 [details] [diff] [review]
fix?

For a long time we've supported CSS "white-space:-moz-pre-wrap" but it was too buggy to officially support it as "white-space:pre-wrap". Now, thanks to all the text work in 1.9, we think it's ready to enable via "pre-wrap"; that's all this patch does.

The patch looks big but it's actually quite simple. The risk is that Web sites using "pre-wrap" might be broken by this change.
Comment 13 Mike Schroepfer 2008-02-18 22:56:22 PST
Comment on attachment 296444 [details] [diff] [review]
fix?

Thnx for the backgroun Roc
Comment 14 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-02-19 18:08:06 PST
checked in
Comment 15 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-02-19 18:16:36 PST
filed bug 418543 on removing -moz-pre-wrap.
Comment 16 Eric Shepherd [:sheppy] 2008-02-29 12:43:49 PST
This is already documented, marking as doc complete.

Note You need to log in before you can comment on or make changes to this bug.