Version: 3.4.90 (using KDE 3.4.90 (alpha1, >= 20050806), compiled sources) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.13-rc6-git9-rt9 Simplest testcase attached. With Firefox, Mozilla and Opera Document* texts are rendered in different lines, with Konqueror both are in the same line.
Created an attachment (id=12478) [details] Simple testcase
The parser lost the <dt> tags -- probably because they were meant to be contained in something (dl, IIRC)
Agreed. Too much hassle to fix this broken behaviour on a tag not used so often. Please use <dl>.
Huh? Thiago, since when you're a maintainer of the parser?
It's error-handling. Currently we don't generate missing <dl> for mis-placed <dt>s only for mis-placed <dd> I think. But seriously what is the point in the test-case? It looks like complete non-sense to me.
Bugreport was inspired by http://www.juniper.net/techpubs/software/junos/junos73/feature-guide-73/frameset.htm . See left frame, it's almost unreadable in Konqueror. But it's OK in other browsers - Opera, Mozilla. There seems to be problem with <small> tag as well, btw. In Opera and Mozilla headlines are using bigger fonts than "[PDF ...]" after them. But in Konqueror it's all same font.
It's regression actually. Left frame of http://www.juniper.net/techpubs/software/junos/junos73/feature-guide-73/frameset.htm is OK in 3.4 (at least line breaks are there, although there seems to be small font problems).
Created an attachment (id=13798) [details] Patch to fix the problem This patch makes the navigation frame of http://www.juniper.net/techpubs/software/junos/junos73/feature-guide-73/frameset.htm to look in Konqueror exactly as it looks in Firefox, Opera and Safari. Code is taken from WebCore 125.
I think I've tried that before, and it will create regressions on some other sites.
I think I can put more time into it (to escape from coworkers whining) if I'd know these sites.
SVN commit 542479 by carewolf: Match better the error-handling capabilities of Firefox with respect to DL/DT/DD elements. - Stand-alone DT now generate DLs. - Stand-alone DD are just generally allowed, but doesn't indent - <P> are made more frickle and will auto-close at the first sign of trouble. BUG: 121888 BUG: 112069 BUG: 109877 M +3 -0 css/html4.css M +4 -1 html/dtd.cpp M +23 -2 html/htmlparser.cpp --- branches/KDE/3.5/kdelibs/khtml/css/html4.css #542478:542479 @@ -271,6 +271,9 @@ dd { display: block; +} + +dl > dd { -khtml-margin-start: 40px; } --- branches/KDE/3.5/kdelibs/khtml/html/dtd.cpp #542478:542479 @@ -380,6 +380,7 @@ ID_BUTTON, ID_COMMENT, ID_LI, + ID_DD, ID_XMP, ID_INS, ID_DEL, @@ -425,6 +426,7 @@ ID_ADDRESS, ID_COMMENT, ID_LI, + ID_DD, ID_XMP, ID_MARQUEE, 0 @@ -502,6 +504,7 @@ ID_BUTTON, ID_COMMENT, ID_LI, + ID_DD, ID_XMP, ID_MARQUEE, 0 @@ -605,7 +608,7 @@ case ID_H5: case ID_H6: // _0 * - return check_array(childID, tag_list_0) || + return check_array(childID, tag_list_0) || (!strict && check_array(childID, tag_list_3) && (childID < ID_H1 || childID > ID_H6)); case ID_BASEFONT: case ID_BR: --- branches/KDE/3.5/kdelibs/khtml/html/htmlparser.cpp #542478:542479 @@ -366,6 +366,22 @@ HTMLElementImpl *e; bool handled = false; + // first switch on current element for a elements with optional end-tag + switch(current->id()) + { + case ID_P: + case ID_DD: + case ID_LI: + if(!n->isInline()) + { + popBlock(current->id()); + return insertNode(n); + } + break; + default: + break; + } + // switch according to the element to insert switch(id) { @@ -514,6 +530,13 @@ handled = true; } break; + case ID_DT: + e = new HTMLDListElementImpl(document); + if ( insertNode(e) ) { + insertNode(n); + return true; + } + break; case ID_AREA: { if(map) @@ -1179,8 +1202,6 @@ { case ID_HTML+ID_CLOSE_TAG: case ID_BODY+ID_CLOSE_TAG: - case ID_DT+ID_CLOSE_TAG: - case ID_DD+ID_CLOSE_TAG: // we never trust those close tags, since stupid webpages close // them prematurely return;
You need to log in before you can comment on or make changes to this bug.