Bug 3437

Summary: "wrap" attribute not supported on <pre>
Product: WebKit Reporter: David Young <daver>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: cmarcelo, ian, robert, shadowofged
Priority: P2 Keywords: HasReduction
Version: 412   
Hardware: Macintosh   
OS: OS X 10.4   
URL: http://www.stuffonfire.com/tmp/prewrap.html
Description Flags
testcase none

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]
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!