Bug 3437 - "wrap" attribute not supported on <pre>
Summary: "wrap" attribute not supported on <pre>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 412
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.stuffonfire.com/tmp/prewra...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2005-06-11 08:42 PDT by David Young
Modified: 2012-12-26 10:20 PST (History)
4 users (show)

See Also:


Attachments
testcase (363 bytes, text/html)
2006-01-16 01:11 PST, Joost de Valk (AlthA)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Young 2005-06-11 08:42:45 PDT
Not much to say, it's a pretty simple tag, though apparently it's a proprietary MS extension to CSS, but that 
doesn't stop people from using it. Looking at html_blockimpl.cpp, there's just no code there to support it.
Comment 2 Dave Hyatt 2005-06-14 11:31:11 PDT
I may be wrong, but i think this is equivalent to the new CSS2.1 white-space property value, "pre-wrap."
Comment 3 Niels Leenheer (HTML5test) 2005-06-15 11:56:46 PDT
I think you're right. The CSS 2.1 even gives the following example to mimic 
IE's proprietary wrap parameter: 

    "In addition, the effect of an HTML PRE element with the non-standard "wrap"   
     attribute is demonstrated by the following example:"

     pre[wrap]  { white-space: pre-wrap }
Comment 4 Eric Seidel (no email) 2005-12-27 13:53:50 PST
We would need a test case.  The css 2.1 test suite we've landed does not seem to have a test for this.
Comment 5 Joost de Valk (AlthA) 2006-01-16 01:11:13 PST
Created attachment 5716 [details]
testcase
Comment 6 Joost de Valk (AlthA) 2006-01-16 01:13:38 PST
Added a testcase, even with <pre wrap="soft> and <pre wrap="hard"> in it... Don't know if we should 
support that though.
Comment 7 Paul Marks 2006-05-30 00:19:00 PDT
This is useful for styling <code> tags using CSS; currently just setting white-space: pre; is undesirable, because on small windows (or long lines of code), this forces the code to flow across other parts of the page.

For <code>, the desirable effect is to have "white-space: pre-wrap;" with soft wrapping, though I cannot speak as to whether it's useful to support both hard and soft wrapping...
Comment 8 Paul Marks 2006-05-30 00:25:17 PDT
Regarding my comments in #7:

Looks like I was using <code> incorrectly; I got its default behavior confused with that of <pre>.  However, <pre> still flows text outside of its box for small windows or long lines, which was already known, so please pardon the bump.
Comment 9 Alexey Proskuryakov 2011-03-11 12:03:17 PST
This looks like it's working now.
Comment 10 Robert Hogan 2012-12-26 10:20:19 PST
It does look like there's nothing to do in this bug anymore. So please shout if you disagree!