Bug 154143 - [testcase] No line wraps in [code] tag
Summary: [testcase] No line wraps in [code] tag
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 161964 188715 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-15 21:06 UTC by Jonathan Thomas
Modified: 2009-04-03 19:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Thomas 2007-12-15 21:06:18 UTC
Version:           3.5.8 (using KDE KDE 3.5.8)
Installed from:    Ubuntu Packages
OS:                Linux

It seems that text in [code] tags don't wrap around when they get bigger than the width of the window. Instead, they just stretch the screen super wide.

Example: http://wiki.winehq.org/WineOn64bit
The code tags render fine in Firefox, but this bug occurs in Konqueror.
Comment 1 Marko Burjek 2007-12-17 00:03:38 UTC
Confirmed in KDE 3.5.7 and 3.97.1
Comment 2 Thomas Friedrichsmeier 2007-12-30 22:06:29 UTC
"[code]" is essentially a <pre>-tag.

The page links two CSS files:

<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="/wiki/winehq/css/common.css">
<link rel="stylesheet" type="text/css" charset="utf-8" media="screen" href="/wiki/winehq/css/screen.css">

screen.css does not define any special handling for <pre>, but common.css defines:

pre {
/* snip */
	white-space: pre;
	/* begin css 3 or browser specific rules - do not remove!
	see: http://forums.techguy.org/archive/index.php/t-249849.html */
    white-space: pre-wrap;
    word-wrap: break-word;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    /* end css 3 or browser specific rules */
}

Not sure what is the correct behavior, here (but Opera agrees with Firefox).
Comment 3 Jaime Torres 2008-07-24 19:59:08 UTC
Confirmed in 4.1.60 svn trunk 831729
Comment 4 Germain Garand 2009-04-03 11:08:26 UTC
*** Bug 188715 has been marked as a duplicate of this bug. ***
Comment 5 Germain Garand 2009-04-03 18:38:53 UTC
*** Bug 161964 has been marked as a duplicate of this bug. ***
Comment 6 Germain Garand 2009-04-03 19:19:56 UTC
SVN commit 948754 by ggarand:

fix calcMinMaxWidth broken logic for new lines
in preserveLF mode (white-space: pre, pre-wrap, pre-line).

This bug would prevent line-wraping in a lot of situations.

New lines could also affect non-pre codepath - so make the code tighter,
matching the actual comments!

BUG: 154143, 130181


 M  +8 -4      render_text.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=948754
Comment 7 Germain Garand 2009-04-03 19:23:59 UTC
SVN commit 948757 by ggarand:

automatically merged revision 948754:
fix calcMinMaxWidth broken logic for new lines
in preserveLF mode (white-space: pre, pre-wrap, pre-line).

This bug would prevent line-wraping in a lot of situations.

New lines could also affect non-pre codepath - so make the code tighter,
matching the actual comments!

BUG: 154143, 130181

 M  +8 -4      render_text.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=948757