Version: 3.5 (using KDE 3.5.0, compiled sources) Compiler: gcc version 3.4.4 20050721 (Red Hat 3.4.4-2) OS: Linux (i686) release 2.6.9-1.667smp I often read lib.ru. Some text from this site use <dd> tag (instead <p> and without <dl>) for line wrap. But Konqueror doesn't support line wrapping on several <dd> without <dl>. For example, Firefox shows this text wrapped. Please, wrap lines on <dd> tag even without <dl>.
Created an attachment (id=14670) [details] Testcase for <dd> behaviour
Problem is that DD is illegal w/o DL, so the parser just drops it. But since DD is display:block, it's rather poor error recovery...
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.