Version: (using KDE 4.1.1) Installed from: Compiled From Sources The layout of http://pollycoke.net/, an italian blog wordpress-based, is broken in KDE 4.x while it renders correctly in 3.5.x.
when I disable JS the rendering is fine, so might be a script misbehaving.. not sure why it would not affect 3.5 in the same way though.
Created attachment 27356 [details] Reduced test case This reduced test case still shows the strange behaviour for me - some text is shown outside the box in 4.1.1, but not in 3.5.10. I can now reproduce it without JS although I'm pretty sure that removing the links to the ".js" files did not work at an earlier stage in the reduction. It's also funny that the buggy behaviour depends on the "<!DOCTYPE..." declaration. Remove it or change "XHTML Strict" to "XHTML Transitional", and the bug goes away. Replacing "XHTML Strict" by "HTML Strict" keeps the buggy behaviour though.
thanks for the nice testcase! so the 'bug' is that we try to do stricter, more standard HTML parsing in 4.x in standard mode. Apparently, this is way too optimistic for the web. I'll revert to more loosy parsing in all modes.
SVN commit 861054 by ggarand: .doing strict dtd checking for inlines in strict mode turns out to be too optimistic. It breaks sites. .no popBlock for dl/dt errors. It doesn't match what other browsers do. BUG: 170650 M +2 -5 dtd.cpp M +0 -8 htmlparser.cpp --- trunk/KDE/kdelibs/khtml/html/dtd.cpp #861053:861054 @@ -474,14 +474,11 @@ case ID_FONT: case ID_LEGEND: case ID_Q: + case ID_A: case ID_NOBR: case ID_WBR: // %inline * - return check_inline(childID, strict) || - (!strict && check_block(childID, strict)); - case ID_A: - // A: %inline * (but even strict sites expect %flow) - return check_flow(childID, strict); + return check_inline(childID, strict) || check_block(childID, strict); case ID_P: // P: %inline * return check_inline(childID, strict) || --- trunk/KDE/kdelibs/khtml/html/htmlparser.cpp #861053:861054 @@ -801,14 +801,6 @@ insertNode(e); handled = true; break; - case ID_DL: - popBlock(ID_DL); - handled = true; - break; - case ID_DT: - popBlock(ID_DT); - handled = true; - break; case ID_FORM: popBlock(ID_FORM); handled = true;