Summary: | CSS: line rendering bug in KHTML (border/padding, nesting) | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Vadim Plessky <lucy-ples> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde |
Priority: | NOR | ||
Version: | 4.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Other | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Patch to fix the width
A better patch Testcase for nesting Testcase for nesting |
Description
Vadim Plessky
2002-06-19 07:20:57 UTC
On Wednesday 19 June 2002 11:20 am Vadim Plessky wrote: | Package: khtml | Version: 4.0 (using KDE 3.0.1) | Severity: normal | | Trescase extracted (and slightly enhanced) from WWW-Style mailing list. | In my opinion Konqueror's rendering is wrong | It doesn't nest <b> and <em> tags (Mozilla respects nesting) plus | border/padding rendering is wrong. | Here is updated testcase which demonstrates wrong Konqueror rendering. I increased padding for inline (SPAN) elements to make example more visible. Mozilla renders example correctly. -------------------------------------------------------------------- <html> <head> <style type="text/css"> p { line-height: 100px; } .aa { padding: 20px; margin: 8px; border-width: 6px; border-style: solid; line-height: 100px; } .bb { padding: 10px; margin: 8px; border-width: 6px; border-style: dashed; border-color: navy; line-height: 40px; } </style> </head> <body> <p>Text inside first P tag <span class="aa"> class aa applied <span class="bb">class bb </span> </span> test outside SPAN aa and SPAN bb inside P tag</p> </body> </html> -------------------------------------------------------------------- -- Vadim Plessky http://kde2.newmail.ru (English) 33 Window Decorations and 6 Widget Styles for KDE http://kde2.newmail.ru/kde_themes.html KDE mini-Themes http://kde2.newmail.ru/themes/ ugly one Happens with the CIA bot statistics page too. Was about to file a bug for it and the dup catcher caught me :) The problem on http://navi.picogui.org/cgi-bin/cia_stats.cgi is exactly the same as above. What's worse ... I swear Konq rendered the stats page correctly sometime in the September timeframe and before that :( ... I had thought it was the problem with 'strong' tags but now that that's fixed (??) ... Here's another example of, I think, the same error. Also note that the spans containing anchors don't seem to get the style. ---------------------------------- <html> <head> <title>Style Test</title> <style type="text/css"> .item { border-style:solid; border-width:15px; border-color:#C2CCDF; padding:15px; } </style> </head> <body> <span class="item">000000000000000</span> <span class="item">111111111111111</span> <span class="item"><a href="2.php">222222222222222</a></span> <span class="item"><a href="3.php">333333333333333</a></span> </body> </html> Created attachment 3230 [details]
Patch to fix the width
This patch fixes the width, but doesn't fix the problem with embedding anchors
in spans.
It is probably the wrong place to fix the bug, since a few lines earlier
there's a comment saying m_maxWidth contains the padding and borders, but it
works for me, and I'm pretty pleased because I've never hacked KDE before!
Created attachment 3415 [details]
A better patch
This is an improved patch for the padding problem. Still doesn't touch the
nesting problem.
Created attachment 3416 [details]
Testcase for nesting
Here's a testcase demonstrating the nested tags which still don't work. Note
how the anchors are displaying different behaviour from the spans.
Created attachment 3417 [details]
Testcase for nesting
Sorry about the bugspam, but I should have kept the style the same in the
testcase.
*** Bug 73090 has been marked as a duplicate of this bug. *** Comment on attachment 3415 [details] A better patch The padding has been fixed in bug 68394 (or very nearly fixed). And my patch was all wrong anyway. CVS commit by ggarand: Activate/merge alternate code path for inline boxes construction and painting. Whitespace count consistency (justification). CCMAIL: 44092-done@bugs.kde.org,51163-done@bugs.kde.org CCMAIL: 73965-done@bugs.kde.org,73823-done@bugs.kde.org,62283-done@bugs.kde.org M +29 -0 ChangeLog 1.203 M +168 -194 rendering/bidi.cpp 1.180 M +6 -6 rendering/font.cpp 1.25 M +1 -1 rendering/render_block.h 1.14 M +28 -5 rendering/render_box.cpp 1.226 M +2 -2 rendering/render_box.h 1.73 M +32 -11 rendering/render_line.cpp 1.12 M +12 -8 rendering/render_object.cpp 1.249 M +7 -2 rendering/render_object.h 1.177 M +3 -3 rendering/render_replaced.cpp 1.160 M +2 -2 rendering/render_replaced.h 1.70 M +5 -5 rendering/render_table.h 1.101 M +22 -127 rendering/render_text.cpp 1.237 M +7 -6 rendering/render_text.h 1.105 Hooray! Now konqueror is the best browser in the world! |